Is there a known bug when using declarations such as Integer(32) with types? I ask because I was working on my MM Libs, and I got a (null) record error when GPC compiled my test program. What I'm doing is defining a type, then defining another type using that declaration, then using the 2nd declaration to define a parameter in a procedure. Confused? I attatched the necessary source files to reproduce the error. I don't see any reason why it would do that since what I'm doing is valid. I traced the error down to the Integer(32) declaration in EDDEF.PAS, when I use Integer alone it works fine. What could be causing the error? I'm using GPC v971001 (2.7.2.1) which leads me to another problem I'm having..
I sent an e-mail, but I didn't see it come back to me, so I think it may have been lost. I downloaded PGCC 2.9.0.something and installed the latest GPC (980511?), and the PGCC works properly, but GPC crashes despite my setting the stack up as high as 4MB with Stubedit. I'm running Windows '98 (legit Beta, not pirated), but had the same problem with Windows '95 (dunno about DOS 6.x/Win 3.x, I don't use them for compiling). Is there any reason why it might be crashing?
Thanks in advance!
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414
UNIT EDDef; { } { Epic Delusions MM Libs: Definitions v0.5 } { Copyright 1998 Orlando Llanes aka WundrDawg } { } { Disclaimer: } { The author will not be held responsible for any } { damages that may occur despite great care taken to } { ensure that the EDMM Libs and Utilities are bug free. } { } { License: } { The Epic Delusions Multimedia Libraries and Utilities } { are released as Copyrighted Freeware. This means that } { you may use the libraries, in whole or in part, for use } { in free or commercial productions so long as the } { copyright notice is intact. However, the EDMM Libs and } { Utilities may NOT be used for pornographic productions. } { } { Contacting: } { WWW -> http://www.geocities.com/SiliconValley/Lab/4677 } { E-Mail -> a010111t@bc.seflin.org } { -- or -- } { ollanes@planetall.com } { } { Bug Reports: } { In the event that a bug shows up, check the FAQ and/or } { the known bugs list. If you do not find a solution in } { either, write a description of the error, and if } { possible, a snippet of the code that caused the error } { and send it using one of the methods listed in the } { "Contacting:" section. } { } { Known Bugs: } { } { History: } { 05/18/98 v0.5 Started Coding } { } { "Common" Interface }
INTERFACE
TYPE { Compiler specific definitions } EDBool = Boolean; EDChar8 = Char;
{$IFDEF __GPC__} EDInt8 = Integer(8); EDUInt8 = Cardinal(8);
EDInt16 = Integer(16); EDUInt16 = Cardinal(16);
EDInt32 = Integer(32); EDUInt32 = Cardinal(32); {$ENDIF}
{$IFDEF VER70} Borland Pascal 7 is not supported at this time {$ENDIF}
{$IFDEF MWERKS} CodeWarrior is not supported at this time {$ENDIF}
TPixel = EDUInt32; TWorldXY = Integer(32);
TClipRect = RECORD MinX, MinY, MaxX, MaxY : TWorldXY; END;
CONST { Currently, BIOS and VBE modes } m320x200x256 = $13; mOSDefault = $03;
IMPLEMENTATION
END.
UNIT EDGraph;
{ }
{ Epic Delusions MM Libs: Graphics "Drivers" v0.5 }
{ Copyright 1998 Orlando Llanes aka WundrDawg }
{ Defines a base object to define a "common" interface }
{ }
{ Disclaimer: }
{ The author will not be held responsible for any }
{ damages that may occur despite great care taken to }
{ ensure that the EDMM Libs and Utilities are bug free. }
{ }
{ License: }
{ The Epic Delusions Multimedia Libraries and Utilities }
{ are released as Copyrighted Freeware. This means that }
{ you may use the libraries, in whole or in part, for use }
{ in free or commercial productions so long as the }
{ copyright notice is intact. However, the EDMM Libs and }
{ Utilities may NOT be used for pornographic productions. }
{ }
{ Contacting: }
{ WWW -> http://www.geocities.com/SiliconValley/Lab/4677 }
{ E-Mail -> a010111t@bc.seflin.org }
{ -- or -- }
{ ollanes@planetall.com }
{ }
{ Bug Reports: }
{ In the event that a bug shows up, check the FAQ and/or }
{ the known bugs list. If you do not find a solution in }
{ either, write a description of the error, and if }
{ possible, a snippet of the code that caused the error }
{ and send it using one of the methods listed in the }
{ "Contacting:" section. }
{ }
{ Known Bugs: }
{ }
{ History: }
{ 05/18/98 v0.5 Started Coding }
{ }
{ GPC/DJGPP Interface }
INTERFACE
USES
EDDef;
TYPE
TGraphBase = OBJECT
FUNCTION SetMode( zMode : EDUInt16 ): EDBool;
PROCEDURE PutImg( zClipRect : TClipRect;
zX, zY : TWorldXY; VAR zImg );
END;
IMPLEMENTATION
FUNCTION TGraphBase.SetMode( zMode : EDUInt16 ) IsValidMode: EDBool;
BEGIN
IsValidMode := FALSE;
END;
PROCEDURE TGraphBase.PutImg( zClipRect : TClipRect;
zX, zY : TWorldXY; VAR zImg );
BEGIN
END;
END.
UNIT EDGr256;
{ }
{ Epic Delusions MM Libs: 256 Color Graphics v0.5 }
{ Copyright 1998 Orlando Llanes aka WundrDawg }
{ Routines for 256 color index video modes }
{ }
{ Disclaimer: }
{ The author will not be held responsible for any }
{ damages that may occur despite great care taken to }
{ ensure that the EDMM Libs and Utilities are bug free. }
{ }
{ License: }
{ The Epic Delusions Multimedia Libraries and Utilities }
{ are released as Copyrighted Freeware. This means that }
{ you may use the libraries, in whole or in part, for use }
{ in free or commercial productions so long as the }
{ copyright notice is intact. However, the EDMM Libs and }
{ Utilities may NOT be used for pornographic productions. }
{ }
{ Contacting: }
{ WWW -> http://www.geocities.com/SiliconValley/Lab/4677 }
{ E-Mail -> a010111t@bc.seflin.org }
{ ollanes@planetall.com }
{ }
{ Bug Reports: }
{ In the event that a bug shows up, check the FAQ and/or }
{ the known bugs list. If you do not find a solution in }
{ either, write a description of the error, and if }
{ possible, a snippet of the code that caused the error }
{ and send it using one of the methods listed in the }
{ "Contacting:" section. }
{ }
{ Known Bugs: }
{ }
{ History: }
{ 05/19/98 v0.5 Started Coding }
{ }
{ GPC/DJGPP Interface }
INTERFACE
USES
EDDef, EDGraph;
TYPE
TGraph256 = OBJECT( TGraphBase )
FUNCTION SetMode( zMode : EDUInt16 ): EDBool;
PROCEDURE PutImg( zClipRect : TClipRect;
zX, zY : TWorldXY; VAR zImg );
END;
IMPLEMENTATION
FUNCTION TGraph256.SetMode( zMode : EDUInt16 ) IsValidMode: EDBool;
BEGIN
IF (zMode = m320x200x256) OR (zMode = mOSDefault) THEN
BEGIN
asm
( "movw %0, %%ax
int $0x10"
: : "g" (zMode)
);
IsValidMode := TRUE;
END;
END;
PROCEDURE TGraph256.PutImg( zClipRect : TClipRect;
zX, zY : TWorldXY; VAR zImg );
VAR
Foo : TWorldXY;
BEGIN
Foo := zClipRect.MinX;
END;
END.
According to Orlando Llanes:
Is there a known bug when using declarations such as Integer(32) with
types?
There was, but this has been fixed in current Alphas.
I ask because I was working on my MM Libs, and I got a (null) record error when GPC compiled my test program. What I'm doing is defining a type, then defining another type using that declaration, then using the 2nd declaration to define a parameter in a procedure. Confused?
Yes, but only because this type of declaration is quite standard and should not cause any problems.
I attatched the necessary source files to reproduce the error. [...]
It does not occur here, so upgrading to gpc-980511 might solve your problem.
I sent an e-mail, but I didn't see it come back to me, so I think it
may have been lost. I downloaded PGCC 2.9.0.something and installed the latest GPC (980511?), and the PGCC works properly, but GPC crashes despite my setting the stack up as high as 4MB with Stubedit.
Yes, that was a problem with the C library. I uploaded a fix for that yesterday (scan your GPC list folder).
Cheers,
Peter