home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!gatech!destroyer!cs.ubc.ca!news.UVic.CA!spruce.pfc.forestry.ca!bcsystems!cconstantine
- From: cconstantine@galaxy.gov.bc.ca
- Newsgroups: comp.sys.mac.programmer
- Subject: MPW Compile errors, Help!!! (long)
- Message-ID: <1992Dec23.075909.1414@galaxy.gov.bc.ca>
- Date: 23 Dec 92 07:59:09 -0800
- Organization: BC Systems Corporation
- Lines: 88
-
- Here is yet another question on MPW C. In one of my initialze routines, I do a
- check to see what kind of system the App is running on. One of the checks is
- to quit if the screen is not in 8-bit mode (256 colors). I used the routine
- found in Dave Mark & Cartwright Reed's C book 2, chapter 4 and just modified it
- so that all I want is the 8-bit depth. However, I get the following error
- message when I compile:
-
- # 7:55:00 AM ----- Build of AR DataLogger/Mac.
- # 7:55:00 AM ----- Analyzing dependencies.
- # 7:55:02 AM ----- Executing build commands.
- Rez 'AR DataLogger/Mac.r' -append -o 'AR DataLogger/Mac'
- C -r -i ":Hdrs:" -sym on ":Src:"Main.c -o ":Obj:"Main.c.o
- # pixDepth = GetPixelDepth( curDev );
- # if ( pixDepth <> 8 )
- # ?
- ### Error 22 error in factor
- # ?
- ### Error 29 ')' expected
- # ?
- ### Error 30 ';' expected
- # ?
- ### Error 22 error in factor
- #--------------------------------------------------------------------------------------------------------------------------------
- File ":Src:Main.c"; Line 198
- #--------------------------------------------------------------------------------------------------------------------------------
- # if ( pixDepth <> 8 )
- # DeathAlert( 6 );
- # ?
- ### Error 30 ';' expected
- #--------------------------------------------------------------------------------------------------------------------------------
- File ":Src:Main.c"; Line 199
- #--------------------------------------------------------------------------------------------------------------------------------
- ### MPW Shell - Execution of AR DataLogger/Mac.makeout terminated.
- ### MPW Shell - Execution of BuildProgram terminated.
-
-
- I'm pretty sure i'm including everything I need (includeing Types.h, Traps.h &
- QuickDraw.h). Here is the section I call the code from:
-
-
- void SystemCheck()
- {
- long machineType, qdVersion;
- short pixDepth;
- GDHandle curDev;
-
- if ( !GestaltAvailable() || !System607Available() )
- DeathAlert( errWimpySystem );
-
- if ( !Gestalt( gestaltMachineType, &machineType ))
- {
- if ( machineType < 7 )
- DeathAlert( errWimpyMac );
- }
-
- if ( !Gestalt( gestaltQuickdrawVersion, &qdVersion ))
- {
- if (qdVersion < 0x0200)
- DeathAlert( errNo32BitQD );
-
- pixDepth = GetPixelDepth( curDev );
- if ( pixDepth <> 8 )
- DeathAlert( errNot8Bit );
- }
-
- }
-
-
- and here is the actual code for the GetPixelDepth:
-
-
- short GetPixelDepth( GDHandle theDevice )
- {
- short pixelDepth;
- PixMapHandle screenPMapH;
-
- screenPMapH = (**theDevice).gdPMap;
- pixelDepth = (**screenPMapH).pixelSize;
- return( pixelDepth );
- }
-
- pretty short and simple, huh... Can anyone see what I am doing wrong.
-
- Any help is appreciated.
-
-
- Carl B. Constantine
- CCONSTANTINE@galaxy.gov.bc.ca
-