* small fixes for win32

This commit is contained in:
pierre 1999-10-13 12:42:09 +00:00
parent 4069f03938
commit b298406a63
10 changed files with 98 additions and 12 deletions

View File

@ -8,6 +8,8 @@ all : info
tests : clean all_compilations tests : clean all_compilations
cont_tests : all_compilations
ifdef DJGPP ifdef DJGPP
EXEEXT=.exe EXEEXT=.exe
@ -230,7 +232,10 @@ info :
# #
# $Log$ # $Log$
# Revision 1.5 1999-09-19 11:48:18 peter # Revision 1.6 1999-10-13 12:42:09 pierre
# * small fixes for win32
#
# Revision 1.5 1999/09/19 11:48:18 peter
# * remove ppas and retcode # * remove ppas and retcode
# #
# Revision 1.4 1999/09/19 11:23:06 peter # Revision 1.4 1999/09/19 11:23:06 peter

View File

@ -1,3 +1,5 @@
{ $OPT=-Sg }
program bug0035; program bug0035;
{Discovered by Daniel Mantione.} {Discovered by Daniel Mantione.}

View File

@ -1,10 +1,21 @@
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses uses
graph,crt; graph,
crt;
var var
gd,gm : integer; gd,gm : integer;
{$endif OK}
begin begin
{$ifdef OK}
gd:=detect; gd:=detect;
initgraph(gd,gm,''); initgraph(gd,gm,'');
line(1,1,100,100); line(1,1,100,100);
@ -14,5 +25,6 @@ begin
{readkey;} {readkey;}
delay(1000); delay(1000);
closegraph; closegraph;
{$endif OK}
end. end.

View File

@ -1,3 +1,11 @@
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses uses
graph,crt; graph,crt;
@ -5,8 +13,10 @@ var
gd,gm : integer; gd,gm : integer;
i,size : longint; i,size : longint;
p : pointer; p : pointer;
{$endif OK}
begin begin
{$ifdef OK}
gd:=detect; gd:=detect;
initgraph(gd,gm,''); initgraph(gd,gm,'');
setcolor(brown); setcolor(brown);
@ -27,5 +37,5 @@ begin
end; end;
{readkey;}delay(1000); {readkey;}delay(1000);
closegraph; closegraph;
{$endif OK}
end. end.

View File

@ -4,6 +4,14 @@ program TestPutP;
{$define has_colors_equal} {$define has_colors_equal}
{$endif go32v2} {$endif go32v2}
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses crt,graph; uses crt,graph;
{$ifndef has_colors_equal} {$ifndef has_colors_equal}
@ -21,7 +29,9 @@ var gd,gm,gError,yi,i : integer;
col: longint; col: longint;
error : word; error : word;
{$endif OK}
BEGIN BEGIN
{$ifdef OK}
if paramcount=0 then if paramcount=0 then
gm:=$111 {640x480/64K HiColor} gm:=$111 {640x480/64K HiColor}
else else
@ -52,8 +62,9 @@ BEGIN
for i:=0 to 255 do for i:=0 to 255 do
if not ColorsEqual(getpixel(i,15),getpixel(i,30)) then if not ColorsEqual(getpixel(i,15),getpixel(i,30)) then
Halt(1); Halt(1);
{readkey;}delay(1000); {readkey;}delay(1000);
closegraph; closegraph;
{$endif OK}
END. END.

View File

@ -1,4 +1,12 @@
uses {$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses
crt,graph; crt,graph;
const const
@ -10,7 +18,9 @@ const
(X: 275; Y: 150), (X: 280; Y : 50), (X:295; Y : 80) ); (X: 275; Y: 150), (X: 280; Y : 50), (X:295; Y : 80) );
var Gd, Gm: Integer; var Gd, Gm: Integer;
{$endif OK}
begin begin
{$ifdef OK}
Gd := Detect; Gd := Detect;
InitGraph(Gd, Gm, 'c:\bp\bgi'); InitGraph(Gd, Gm, 'c:\bp\bgi');
if GraphResult <> grOk then if GraphResult <> grOk then
@ -32,4 +42,5 @@ begin
graphdefaults; graphdefaults;
{readln;}delay(1000); {readln;}delay(1000);
CloseGraph; CloseGraph;
{$endif OK}
end. end.

View File

@ -1,10 +1,20 @@
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses uses
graph,crt; graph,crt;
var var
gd,gm : integer; gd,gm : integer;
{$endif OK}
begin begin
{$ifdef OK}
gd:=detect; gd:=detect;
gm:=$103; gm:=$103;
initgraph(gd,gm,''); initgraph(gd,gm,'');
@ -15,4 +25,5 @@ begin
line(100,100,1,100); line(100,100,1,100);
{readkey;}delay(1000); {readkey;}delay(1000);
closegraph; closegraph;
{$endif OK}
end. end.

View File

@ -1,3 +1,13 @@
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{ Win32 signal support is still missing ! }
{$ifdef OK}
{$R+} {$R+}
{ BOUND check error... I don't think this is a code generator error } { BOUND check error... I don't think this is a code generator error }
{ but an error because the type casting is not considered at all! } { but an error because the type casting is not considered at all! }
@ -21,7 +31,9 @@
Var Var
Sel: Word; Sel: Word;
v: longint; v: longint;
{$endif OK}
Begin Begin
{$ifdef OK}
Signal(SIGSEGV,signalhandler(@our_sig)); Signal(SIGSEGV,signalhandler(@our_sig));
v:=$00ffffff; v:=$00ffffff;
Sel:=word(v); Sel:=word(v);
@ -31,4 +43,5 @@ Begin
{ we should not go to here } { we should not go to here }
Writeln('Error : signal not called'); Writeln('Error : signal not called');
Halt(1); Halt(1);
{$endif OK}
end. end.

View File

@ -1,3 +1,4 @@
{ $OPT=-Sg}
PROGRAM NoLabel; { this program compiles fine with TP but not with FP } PROGRAM NoLabel; { this program compiles fine with TP but not with FP }
type type
@ -9,7 +10,7 @@ PROGRAM NoLabel; { this program compiles fine with TP but not with FP }
const const
allowed : boolean = false; allowed : boolean = false;
constructor ttestobj.init; constructor ttestobj.init;
begin begin
if not allowed then if not allowed then
@ -28,7 +29,7 @@ PROGRAM NoLabel; { this program compiles fine with TP but not with FP }
Halt(1); Halt(1);
end; end;
end; end;
LABEL LABEL
N1, N1,
@ -61,4 +62,3 @@ BEGIN
FAIL: Write; FAIL: Write;
self:=1; self:=1;
END. END.

View File

@ -1,3 +1,11 @@
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses graph uses graph
{$ifdef go32v2} {$ifdef go32v2}
,dpmiexcp ,dpmiexcp
@ -6,7 +14,9 @@ var
GDriver, GMode: Integer; GDriver, GMode: Integer;
w:word; w:word;
p:pointer; p:pointer;
{$endif OK}
begin begin
{$ifdef OK}
GDriver := $FF; GDriver := $FF;
GMode := $101; GMode := $101;
InitGraph(GDriver, GMode, ''); InitGraph(GDriver, GMode, '');
@ -19,12 +29,13 @@ begin
{---runtime-error!------} {---runtime-error!------}
{ getimage(0,0,111,111, p); } { getimage(0,0,111,111, p); }
{-----------------------} {-----------------------}
{ This is the correct usage (PFV) } { This is the correct usage (PFV) }
getimage(0,0,111,111, p^); getimage(0,0,111,111, p^);
freemem(p, w); freemem(p, w);
closegraph; closegraph;
readln; readln;
{$endif OK}
end. end.