* 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
cont_tests : all_compilations
ifdef DJGPP
EXEEXT=.exe
@ -230,7 +232,10 @@ info :
#
# $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
#
# Revision 1.4 1999/09/19 11:23:06 peter

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,20 @@
{$ifdef go32v2}
{$define OK}
{$endif}
{$ifdef linux}
{$define OK}
{$endif}
{$ifdef OK}
uses
graph,crt;
var
gd,gm : integer;
{$endif OK}
begin
{$ifdef OK}
gd:=detect;
gm:=$103;
initgraph(gd,gm,'');
@ -15,4 +25,5 @@ begin
line(100,100,1,100);
{readkey;}delay(1000);
closegraph;
{$endif OK}
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+}
{ 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! }
@ -21,7 +31,9 @@
Var
Sel: Word;
v: longint;
{$endif OK}
Begin
{$ifdef OK}
Signal(SIGSEGV,signalhandler(@our_sig));
v:=$00ffffff;
Sel:=word(v);
@ -31,4 +43,5 @@ Begin
{ we should not go to here }
Writeln('Error : signal not called');
Halt(1);
{$endif OK}
end.

View File

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

View File

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