* removed warnings/notes

This commit is contained in:
peter 2000-02-27 14:40:40 +00:00
parent 7b226fcd19
commit 66ea55dd7c
11 changed files with 2530 additions and 3455 deletions

View File

@ -140,10 +140,8 @@ Var
OptionsSet : Array[1..NrOptions] Of Boolean; OptionsSet : Array[1..NrOptions] Of Boolean;
FileName : String; FileName : String;
Infile,outfile : Text; Infile,outfile : Text;
Magic : String[20];
LineNr : Longint; LineNr : Longint;
NrForms,NrControls : Longint; NrForms,NrControls : Longint;
UnitOfMeasure : string;
FormRoot : PFormRec; FormRoot : PFormRec;
cbroot : pcbrec; cbroot : pcbrec;
{ Default properties emitters } { Default properties emitters }
@ -299,12 +297,12 @@ begin
EmitLineError('Unknown keyword : '+Key) EmitLineError('Unknown keyword : '+Key)
else else
Case K of Case K of
PPMagic : Magic:=key; PPMagic,
PPunitofmeasure: ;
PPnrforms: begin PPnrforms: begin
val(value,NrForms,code); val(value,NrForms,code);
if code<>0 then EmitLineError('Invalid number of forms'); if code<>0 then EmitLineError('Invalid number of forms');
end; end;
PPunitofmeasure: UnitOfMeasure:=Value;
end; end;
end; end;
@ -338,7 +336,7 @@ Procedure ProcessControlLine (PC : PControl; const S : String);
Var Key,Value : String; Var Key,Value : String;
i,k : ContProps; i,k : ContProps;
ppos,code : word; ppos : word;
begin begin
if s='' then exit; if s='' then exit;
@ -461,7 +459,7 @@ end;
Procedure DoForms; Procedure DoForms;
Var Line : String; Var
i : Longint; i : Longint;
CurrentForm: PformRec; CurrentForm: PformRec;
@ -586,7 +584,6 @@ end;
Procedure EmitHeader; Procedure EmitHeader;
var fp : PFormRec; var fp : PFormRec;
cp : PControl;
begin begin
if OptionsSet[2] then if OptionsSet[2] then
@ -685,9 +682,6 @@ begin
end; end;
Procedure EmitAlternateMain; Procedure EmitAlternateMain;
var fp : PFormRec;
begin begin
{ Alternate format, we just call creatallforms to create all forms} { Alternate format, we just call creatallforms to create all forms}
writeln (OutFile,'Create_The_Forms;'); writeln (OutFile,'Create_The_Forms;');
@ -716,9 +710,6 @@ begin
end; end;
Procedure EmitFooter; Procedure EmitFooter;
var fp : PFormRec;
begin begin
if OptionsSet[3] then {Alternate format.} if OptionsSet[3] then {Alternate format.}
EmitCreateForms; EmitCreateForms;
@ -856,7 +847,6 @@ end;
Procedure EmitObject(cp : PControl); Procedure EmitObject(cp : PControl);
var temp : string; var temp : string;
Corners : array[1..4] of string[5];
I : Longint; I : Longint;
j,k : ObjClasses; j,k : ObjClasses;
@ -989,10 +979,7 @@ end;
Procedure EmitForms; Procedure EmitForms;
var var
fp : PformRec;
fp : PformRec;
cp : PControl;
begin begin
{ Start emitting forms } { Start emitting forms }
fp:=Formroot; fp:=Formroot;

File diff suppressed because it is too large Load Diff

View File

@ -742,7 +742,6 @@ End;
function Keypressed : boolean; function Keypressed : boolean;
var var
l : longint; l : longint;
fd : fdSet;
Begin Begin
Keypressed := FALSE; Keypressed := FALSE;
nodelay(ActiveWn,bool(TRUE)); nodelay(ActiveWn,bool(TRUE));

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ type
var var
nActive, nNextEdge : Longint; nActive, nNextEdge : Longint;
p0, p1 : pointtype; p0, p1 : pointtype;
endy, i, j, gap, x0, x1, y, nEdges : Longint; i, j, gap, x0, x1, y, nEdges : Longint;
ET : pedgearray; ET : pedgearray;
GET, AET : ppedgearray; GET, AET : ppedgearray;
t : pedge; t : pedge;
@ -368,7 +368,6 @@ var
Cont : Boolean; Cont : Boolean;
BackupColor : Word; BackupColor : Word;
x1, x2, prevy: smallint; x1, x2, prevy: smallint;
Index : smallint;
Begin Begin
FillChar(DrawnList,sizeof(DrawnList),0); FillChar(DrawnList,sizeof(DrawnList),0);
{ init prevy } { init prevy }
@ -387,8 +386,6 @@ var
end; end;
If (x<0) Or (y<0) Or If (x<0) Or (y<0) Or
(x>ViewWidth) Or (y>ViewHeight) then Exit; (x>ViewWidth) Or (y>ViewHeight) then Exit;
{ Some internal variables }
Index := 0;
{ Index of points to check } { Index of points to check }
Buffer.WordIndex:=0; Buffer.WordIndex:=0;
PushPoint (x,y); PushPoint (x,y);
@ -482,7 +479,10 @@ var
{ {
$Log$ $Log$
Revision 1.17 2000-02-12 13:39:19 jonas Revision 1.18 2000-02-27 14:41:25 peter
* removed warnings/notes
Revision 1.17 2000/02/12 13:39:19 jonas
+ new, faster fillpoly from Thomas Schatzl + new, faster fillpoly from Thomas Schatzl
* some logging commands in vesa.inc disabled * some logging commands in vesa.inc disabled

View File

@ -2099,55 +2099,28 @@ end;
Begin Begin
{ All default hooks procedures } { All default hooks procedures }
{$ifdef fpc}
{ required...} { required...}
DirectPutPixel := @DirectPutPixelDefault; DirectPutPixel := {$ifdef fpc}@{$endif}DirectPutPixelDefault;
PutPixel := @PutPixelDefault; PutPixel := {$ifdef fpc}@{$endif}PutPixelDefault;
GetPixel := @GetPixelDefault; GetPixel := {$ifdef fpc}@{$endif}GetPixelDefault;
SetRGBPalette := @SetRGBPaletteDefault; SetRGBPalette := {$ifdef fpc}@{$endif}SetRGBPaletteDefault;
GetRGBPalette := @GetRGBPaletteDefault; GetRGBPalette := {$ifdef fpc}@{$endif}GetRGBPaletteDefault;
{ optional...} { optional...}
SetActivePage := @SetActivePageDefault; SetActivePage := {$ifdef fpc}@{$endif}SetActivePageDefault;
SetVisualPage := @SetVisualPageDefault; SetVisualPage := {$ifdef fpc}@{$endif}SetVisualPageDefault;
ClearViewPort := @ClearViewportDefault; ClearViewPort := {$ifdef fpc}@{$endif}ClearViewportDefault;
PutImage := @DefaultPutImage; PutImage := {$ifdef fpc}@{$endif}DefaultPutImage;
GetImage := @DefaultGetImage; GetImage := {$ifdef fpc}@{$endif}DefaultGetImage;
ImageSize := @DefaultImageSize; ImageSize := {$ifdef fpc}@{$endif}DefaultImageSize;
{$else fpc}
{ required...}
DirectPutPixel := DirectPutPixelDefault;
PutPixel := PutPixelDefault;
GetPixel := GetPixelDefault;
SetRGBPalette := SetRGBPaletteDefault;
GetRGBPalette := GetRGBPaletteDefault;
{ optional...}
SetActivePage := SetActivePageDefault;
SetVisualPage := SetVisualPageDefault;
ClearViewPort := ClearViewportDefault;
PutImage := DefaultPutImage;
GetImage := DefaultGetImage;
ImageSize := DefaultImageSize;
{$endif fpc}
GraphFreeMemPtr := nil; GraphFreeMemPtr := nil;
GraphGetMemPtr := nil; GraphGetMemPtr := nil;
{$ifdef fpc} GetScanLine := {$ifdef fpc}@{$endif}GetScanLineDefault;
GetScanLine := @GetScanLineDefault; Line := {$ifdef fpc}@{$endif}LineDefault;
Line := @LineDefault; InternalEllipse := {$ifdef fpc}@{$endif}InternalEllipseDefault;
InternalEllipse := @InternalEllipseDefault; PatternLine := {$ifdef fpc}@{$endif}PatternLineDefault;
PatternLine := @PatternLineDefault; HLine := {$ifdef fpc}@{$endif}HLineDefault;
HLine := @HLineDefault; VLine := {$ifdef fpc}@{$endif}VLineDefault;
VLine := @VLineDefault;
{$else fpc}
GetScanLine := GetScanLineDefault;
Line := LineDefault;
InternalEllipse := InternalEllipseDefault;
PatternLine := PatternLineDefault;
HLine := HLineDefault;
VLine := VLineDefault;
{$endif fpc}
end; end;
Procedure InitVars; Procedure InitVars;
@ -2176,6 +2149,7 @@ end;
PaletteSize := 0; PaletteSize := 0;
DirectColor := FALSE; DirectColor := FALSE;
HardwarePages := 0; HardwarePages := 0;
if hardwarepages=0 then; { remove note }
DefaultHooks; DefaultHooks;
end; end;
@ -2212,22 +2186,14 @@ end;
{ OldWriteMode := CurrentWriteMode; { OldWriteMode := CurrentWriteMode;
if (LineInfo.Thickness = NormWidth) then if (LineInfo.Thickness = NormWidth) then
CurrentWriteMode := NormalPut;} CurrentWriteMode := NormalPut;}
{$ifdef fpc} InternalEllipse(X,Y,Radius,Radius,StAngle,Endangle,{$ifdef fpc}@{$endif}DummyPatternLine);
InternalEllipse(X,Y,Radius,Radius,StAngle,Endangle,@DummyPatternLine);
{$else fpc}
InternalEllipse(X,Y,Radius,Radius,StAngle,Endangle,DummyPatternLine);
{$endif fpc}
{ CurrentWriteMode := OldWriteMode;} { CurrentWriteMode := OldWriteMode;}
end; end;
procedure Ellipse(X,Y : smallint; stAngle, EndAngle: word; XRadius,YRadius: word); procedure Ellipse(X,Y : smallint; stAngle, EndAngle: word; XRadius,YRadius: word);
Begin Begin
{$ifdef fpc} InternalEllipse(X,Y,XRadius,YRadius,StAngle,Endangle,{$ifdef fpc}@{$endif}DummyPatternLine);
InternalEllipse(X,Y,XRadius,YRadius,StAngle,Endangle,@DummyPatternLine);
{$else fpc}
InternalEllipse(X,Y,XRadius,YRadius,StAngle,Endangle,DummyPatternLine);
{$endif fpc}
end; end;
@ -2278,11 +2244,7 @@ end;
OldWriteMode := CurrentWriteMode; OldWriteMode := CurrentWriteMode;
CurrentWriteMode := CopyPut; CurrentWriteMode := CopyPut;
end; end;
{$ifdef fpc} InternalEllipse(X,Y,Radius,Radius,0,360,{$ifdef fpc}@{$endif}DummyPatternLine);
InternalEllipse(X,Y,Radius,Radius,0,360,@DummyPatternLine);
{$else fpc}
InternalEllipse(X,Y,Radius,Radius,0,360,DummyPatternLine);
{$endif fpc}
if LineInfo.Thickness = Normwidth then if LineInfo.Thickness = Normwidth then
CurrentWriteMode := OldWriteMode; CurrentWriteMode := OldWriteMode;
{ restore arc information } { restore arc information }
@ -2455,14 +2417,8 @@ end;
end; end;
procedure Sector(x, y: smallint; StAngle,EndAngle, XRadius, YRadius: Word); procedure Sector(x, y: smallint; StAngle,EndAngle, XRadius, YRadius: Word);
(* var angle : graph_float;
writemode : word; *)
begin begin
{$ifdef fpc} internalellipse(x,y,XRadius, YRadius, StAngle, EndAngle, {$ifdef fpc}@{$endif}SectorPL);
internalellipse(x,y,XRadius, YRadius, StAngle, EndAngle, @SectorPL);
{$else fpc}
internalellipse(x,y,XRadius, YRadius, StAngle, EndAngle, SectorPL);
{$endif fpc}
Line(ArcCall.XStart, ArcCall.YStart, x,y); Line(ArcCall.XStart, ArcCall.YStart, x,y);
Line(x,y,ArcCall.Xend,ArcCall.YEnd); Line(x,y,ArcCall.Xend,ArcCall.YEnd);
end; end;
@ -3010,7 +2966,6 @@ begin
ModeList := nil; ModeList := nil;
SaveVideoState := nil; SaveVideoState := nil;
RestoreVideoState := nil; RestoreVideoState := nil;
SavePtr := Nil;
{$ifdef oldfont} {$ifdef oldfont}
{$ifdef go32v2} {$ifdef go32v2}
LoadFont8x8; LoadFont8x8;
@ -3045,14 +3000,12 @@ begin
charmessagehandler:=nil; charmessagehandler:=nil;
{$endif win32} {$endif win32}
end. end.
SetGraphBufSize
{ {
$Log$ $Log$
Revision 1.56 2000-02-06 01:47:15 sg Revision 1.57 2000-02-27 14:41:25 peter
* removed warnings/notes
Revision 1.56 2000/02/06 01:47:15 sg
* For Linux, "/" is added to the bgipath instead of "\" if this character * For Linux, "/" is added to the bgipath instead of "\" if this character
isn't already there. isn't already there.

View File

@ -368,7 +368,6 @@
cnt3,cnt4 : smallint; cnt3,cnt4 : smallint;
charsize : word; charsize : word;
WriteMode : word; WriteMode : word;
CurX, CurY : smallint;
curX2, curY2, xpos2, ypos2, x2, y2: graph_float; curX2, curY2, xpos2, ypos2, x2, y2: graph_float;
oldvalues : linesettingstype; oldvalues : linesettingstype;
chr : char; chr : char;
@ -591,7 +590,6 @@
Prefix: array[0..Prefix_Size-1] of char; {* File Prefix Holder *} Prefix: array[0..Prefix_Size-1] of char; {* File Prefix Holder *}
Length, Current: longint; Length, Current: longint;
FontData: Pchar; FontData: Pchar;
Base: longint;
hp : pchar; hp : pchar;
i : longint; i : longint;
begin begin
@ -685,22 +683,14 @@
move(hp[i+1],fonts[font].PHeader,sizeof(TFHeader)); move(hp[i+1],fonts[font].PHeader,sizeof(TFHeader));
(* Read in the Header file *) (* Read in the Header file *)
BlockRead(F,fonts[font].Header,Sizeof(THeader)); BlockRead(F,fonts[font].Header,Sizeof(THeader));
Base := FilePos(F); {* Remember the address of table*}
BlockRead(F,Fonts[font].Offsets[Fonts[font].Header.First_Char],Fonts[font].Header.Nr_chars*sizeof(smallint)); BlockRead(F,Fonts[font].Offsets[Fonts[font].Header.First_Char],Fonts[font].Header.Nr_chars*sizeof(smallint));
{* Load the character width table into memory. *} {* Load the character width table into memory. *}
base := filePos( f );
BlockRead(F,Fonts[font].Widths[Fonts[font].Header.First_Char],Fonts[font].Header.Nr_chars*sizeof(byte)); BlockRead(F,Fonts[font].Widths[Fonts[font].Header.First_Char],Fonts[font].Header.Nr_chars*sizeof(byte));
{* Determine the length of the stroke database. *} {* Determine the length of the stroke database. *}
current := FilePos( f ); {* Current file location *} current := FilePos( f ); {* Current file location *}
Seek( f, FileSize(F)); {* Go to the end of the file *} Seek( f, FileSize(F)); {* Go to the end of the file *}
length := FilePos( f ); {* Get the file length *} length := FilePos( f ); {* Get the file length *}
Seek( f, current); {* Restore old file location *} Seek( f, current); {* Restore old file location *}
{* Load the stroke database. *} {* Load the stroke database. *}
{ also allocate space for Null character } { also allocate space for Null character }
Getmem(FontData, Length+1); {* Create space for font data *} Getmem(FontData, Length+1); {* Create space for font data *}
@ -737,7 +727,10 @@
{ {
$Log$ $Log$
Revision 1.14 2000-01-07 16:41:38 daniel Revision 1.15 2000-02-27 14:41:25 peter
* removed warnings/notes
Revision 1.14 2000/01/07 16:41:38 daniel
* copyright 2000 * copyright 2000
Revision 1.13 2000/01/07 16:32:26 daniel Revision 1.13 2000/01/07 16:32:26 daniel

View File

@ -89,7 +89,7 @@ var
procedure getIntPart(d: extended); procedure getIntPart(d: extended);
var var
intPartStack: TIntPartStack; intPartStack: TIntPartStack;
count, stackPtr, endStackPtr, digits: longint; stackPtr, endStackPtr, digits: longint;
overflow: boolean; overflow: boolean;
begin begin
{ position in the stack (gets increased before first write) } { position in the stack (gets increased before first write) }
@ -376,7 +376,10 @@ end;
{ {
$Log$ $Log$
Revision 1.24 2000-02-26 18:53:11 jonas Revision 1.25 2000-02-27 14:41:25 peter
* removed warnings/notes
Revision 1.24 2000/02/26 18:53:11 jonas
* fix for lost precision because sometimes the correction value was * fix for lost precision because sometimes the correction value was
larger than the number to be corrected larger than the number to be corrected
* incompatibility with TP's output fixed * incompatibility with TP's output fixed

View File

@ -20,9 +20,6 @@
const const
InternalDriverName = 'LinuxGGI'; InternalDriverName = 'LinuxGGI';
var
SavePtr: Pointer;
{ --------------------------------------------------------------------- { ---------------------------------------------------------------------
GGI bindings [(c) 1999 Sebastian Guenther] GGI bindings [(c) 1999 Sebastian Guenther]
---------------------------------------------------------------------} ---------------------------------------------------------------------}
@ -433,18 +430,19 @@ begin
end; end;
end; end;
end; end;
{ {
$Log$ $Log$
Revision 1.8 2000-01-07 16:41:40 daniel Revision 1.9 2000-02-27 14:41:25 peter
* removed warnings/notes
Revision 1.8 2000/01/07 16:41:40 daniel
* copyright 2000 * copyright 2000
Revision 1.7 1999/12/20 11:22:38 peter Revision 1.7 1999/12/20 11:22:38 peter
* modes moved to interface * modes moved to interface
* integer -> smallint * integer -> smallint
Revision 1.6 1999/12/11 23:41:39 jonas Revision 1.6 1999/12/11 23:41:39 jonas
* changed definition of getscanlineproc to "getscanline(x1,x2,y: * changed definition of getscanlineproc to "getscanline(x1,x2,y:
smallint; var data);" so it can be used by getimage too smallint; var data);" so it can be used by getimage too
* changed getimage so it uses getscanline * changed getimage so it uses getscanline
@ -452,24 +450,23 @@ Revision 1.6 1999/12/11 23:41:39 jonas
include files so they use this new format include files so they use this new format
+ getscanlineVESA256 for 256 color VESA modes (banked) + getscanlineVESA256 for 256 color VESA modes (banked)
Revision 1.5 1999/11/12 02:13:01 carl Revision 1.5 1999/11/12 02:13:01 carl
* Bugfix if getimage / putimage, format was not standard with FPC * Bugfix if getimage / putimage, format was not standard with FPC
graph. graph.
Revision 1.4 1999/11/10 10:54:24 sg Revision 1.4 1999/11/10 10:54:24 sg
* Fixed a LOT of bugs: * Fixed a LOT of bugs:
* - Default mode should be determined by GGI now * - Default mode should be determined by GGI now
* - Colors are working (only the 16 standard VGA colors, though) * - Colors are working (only the 16 standard VGA colors, though)
Revision 1.3 1999/11/08 20:04:55 sg Revision 1.3 1999/11/08 20:04:55 sg
* GGI programs must link to libc, or ggiOpen will fail! * GGI programs must link to libc, or ggiOpen will fail!
* Changed max length of ModeNames string from 18 to 20 chars * Changed max length of ModeNames string from 18 to 20 chars
Revision 1.2 1999/11/08 00:08:43 michael Revision 1.2 1999/11/08 00:08:43 michael
* Fist working version of svgalib new graph unit * Fist working version of svgalib new graph unit
* Initial implementation of ggi new graph unit * Initial implementation of ggi new graph unit
Revision 1.1 1999/11/07 16:57:26 michael
+ Start of common graph implementation
Revision 1.1 1999/11/07 16:57:26 michael
+ Start of common graph implementation
} }

View File

@ -17,8 +17,6 @@
const const
InternalDriverName = 'LinuxVGA'; InternalDriverName = 'LinuxVGA';
var SavePtr : Pointer;
{ --------------------------------------------------------------------- { ---------------------------------------------------------------------
SVGA bindings. SVGA bindings.
@ -161,12 +159,10 @@ var
---------------------------------------------------------------------} ---------------------------------------------------------------------}
procedure libvga_savevideostate; procedure libvga_savevideostate;
begin begin
end; end;
procedure libvga_restorevideostate; procedure libvga_restorevideostate;
begin begin
vga_setmode(0); vga_setmode(0);
end; end;
@ -449,26 +445,29 @@ end;
end; end;
{ {
$Log$ $Log$
Revision 1.8 2000-02-06 11:26:45 sg Revision 1.9 2000-02-27 14:41:25 peter
* Fixed SetRGBPalette and GetRGBPalette (hopefully; not tested) * removed warnings/notes
Revision 1.7 2000/02/06 01:48:55 sg Revision 1.8 2000/02/06 11:26:45 sg
* Fixed the default palette. libsvga works with a RGB range from 0-63, not * Fixed SetRGBPalette and GetRGBPalette (hopefully; not tested)
Revision 1.7 2000/02/06 01:48:55 sg
* Fixed the default palette. libsvga works with a RGB range from 0-63, not
0-255! 0-255!
* PutPixel fixed (pixels didn't get drawn before) * PutPixel fixed (pixels didn't get drawn before)
Revision 1.6 2000/02/03 20:39:58 michael Revision 1.6 2000/02/03 20:39:58 michael
+ Version using only vgalib + Version using only vgalib
Revision 1.5 2000/01/07 16:41:42 daniel Revision 1.5 2000/01/07 16:41:42 daniel
* copyright 2000 * copyright 2000
Revision 1.4 1999/12/20 11:22:38 peter Revision 1.4 1999/12/20 11:22:38 peter
* modes moved to interface * modes moved to interface
* integer -> smallint * integer -> smallint
Revision 1.3 1999/12/11 23:41:39 jonas Revision 1.3 1999/12/11 23:41:39 jonas
* changed definition of getscanlineproc to "getscanline(x1,x2,y: * changed definition of getscanlineproc to "getscanline(x1,x2,y:
integer; var data);" so it can be used by getimage too integer; var data);" so it can be used by getimage too
* changed getimage so it uses getscanline * changed getimage so it uses getscanline
@ -476,11 +475,10 @@ Revision 1.3 1999/12/11 23:41:39 jonas
include files so they use this new format include files so they use this new format
+ getscanlineVESA256 for 256 color VESA modes (banked) + getscanlineVESA256 for 256 color VESA modes (banked)
Revision 1.2 1999/11/08 00:08:43 michael Revision 1.2 1999/11/08 00:08:43 michael
* Fist working version of svgalib new graph unit * Fist working version of svgalib new graph unit
* Initial implementation of ggi new graph unit * Initial implementation of ggi new graph unit
Revision 1.1 1999/11/07 16:57:26 michael
+ Start of common graph implementation
Revision 1.1 1999/11/07 16:57:26 michael
+ Start of common graph implementation
} }

View File

@ -87,7 +87,7 @@ end ;
function MSecsToTimeStamp(MSecs: comp): TTimeStamp; function MSecsToTimeStamp(MSecs: comp): TTimeStamp;
begin begin
result.Date := trunc(msecs / msecsperday); result.Date := trunc(msecs / msecsperday);
msecs:= msecs - comp(result.date) * comp(msecsperday); msecs:= comp(msecs-result.date*msecsperday);
result.Time := Trunc(MSecs); result.Time := Trunc(MSecs);
end ; end ;
@ -680,7 +680,10 @@ end;
{ {
$Log$ $Log$
Revision 1.20 2000-02-09 16:59:32 peter Revision 1.21 2000-02-27 14:41:25 peter
* removed warnings/notes
Revision 1.20 2000/02/09 16:59:32 peter
* truncated log * truncated log
Revision 1.19 1999/11/29 16:59:27 pierre Revision 1.19 1999/11/29 16:59:27 pierre