home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!gatech!destroyer!cs.ubc.ca!bcsystems!cconstantine
- From: cconstantine@galaxy.gov.bc.ca
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: MPW Compile errors, Help!!! (repost)
- Message-ID: <1992Dec24.085803.1415@galaxy.gov.bc.ca>
- Date: 24 Dec 92 08:58:03 -0800
- References: <1992Dec23.075909.1414@galaxy.gov.bc.ca>
- Organization: BC Systems Corporation
- Lines: 105
-
- In article <1992Dec23.075909.1414@galaxy.gov.bc.ca>, cconstantine@galaxy.gov.bc.ca writes:
-
-
- This is a repost 'cause I don't know if the first one got out, but I also have
- some new information. When I take a look at my variables in SourceBug, I get a
- rather large negative value for pixDepth (-18756488 or something like that).
- This is bizzar to say the least. At work I'm running on a Mac IIci running
- System 6.0.7 w/ Multifinder 6.1b9 and 2 monitors. At home I'm running on a Mac
- LCII running system 7.0.1 w/ tuneup 1.1.1 and I still get the following error
- messages.
-
- Please, does anyone have any ideas???? I've definatly got everything #include
- 'd that needs to be.
-
- Carl B. Constantine
- CCONSTANTINE@galaxy.gov.bc.ca
-
- > 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
-