* linux updates

This commit is contained in:
peter 1999-01-25 20:23:04 +00:00
parent ad379bc2dd
commit 91070d3da1
11 changed files with 100 additions and 50 deletions

View File

@ -20,9 +20,9 @@ else
EXEEXT= EXEEXT=
getreturncode : getreturncode :
getret $(COMMAND) !> $(FILE).log !2>$(FILE).log getret $(COMMAND) > $(FILE).log 2>$(FILE).log
cp retcode $(FILE).$(RESEXT) cp retcode $(FILE).$(RESEXT)
@echo Return code of $(FILE) is $(cat retcode) @echo "Return code of $(FILE) is $(cat retcode)"
endif endif
@ -43,12 +43,12 @@ endif
ifeq ($(RETVAL),0) ifeq ($(RETVAL),0)
testsuccess: testsuccess:
@echo Test for $(FILE) success (compiles) @echo "Test for $(FILE) success (compiles)"
@echo Test for $(FILE) success (compiles) >>log @echo "Test for $(FILE) success (compiles)" >>log
else else
testsuccess: testsuccess:
@echo Test for $(FILE) fails (does not compile) error $(RETVAL) @echo "Test for $(FILE) fails (does not compile) error $(RETVAL)"
@echo Test for $(FILE) fails (does not compile) error $(RETVAL)>>log @echo "Test for $(FILE) fails (does not compile) error $(RETVAL)" >>log
@echo $(FILE) >> ts_fail @echo $(FILE) >> ts_fail
@echo $(FILE) >> faillist @echo $(FILE) >> faillist
endif endif
@ -65,17 +65,17 @@ endif
ifeq ($(EXERETVAL),0) ifeq ($(EXERETVAL),0)
testexecsuccess: testexecsuccess:
@echo Test for exec $(FILE) success (runs without error) @echo "Test for exec $(FILE) success (runs without error)"
@echo Test for $(FILE) success (runs without error) >>log @echo "Test for $(FILE) success (runs without error)" >>log
else else
testexecsuccess: testexecsuccess:
@echo Test for exec $(FILE) fails exec error $(EXERETVAL) @echo "Test for exec $(FILE) fails exec error $(EXERETVAL)"
@echo Test for exec $(FILE) fails exec error $(EXERETVAL)>>log @echo "Test for exec $(FILE) fails exec error $(EXERETVAL)" >>log
endif endif
ifeq ($(wildcard $(FILE)$(EXEEXT)*),$(FILE)$(EXEEXT)) ifeq ($(wildcard $(FILE)$(EXEEXT)*),$(FILE)$(EXEEXT))
testexec: testexec:
@echo Testing $(FILE)$(EXEEXT) @echo "Testing $(FILE)$(EXEEXT)"
ifdef NOREDIR ifdef NOREDIR
getret $(FILE)$(EXEEXT) getret $(FILE)$(EXEEXT)
else else
@ -85,7 +85,7 @@ endif
$(MAKE) testexecsuccess 'FILE=$(FILE)' 'EXCFILE=$(FILE).exc' $(MAKE) testexecsuccess 'FILE=$(FILE)' 'EXCFILE=$(FILE).exc'
else else
testexec: testexec:
@echo No exefile $(FILE)$(EXEEXT) @echo "No exefile $(FILE)$(EXEEXT)"
@echo $(FILE) >> faillist @echo $(FILE) >> faillist
endif endif
@ -96,12 +96,12 @@ test_exc :
ifneq ($(RETVAL),0) ifneq ($(RETVAL),0)
testfail: testfail:
@echo Test for $(FILE) success (does not compile) error $(RETVAL) @echo "Test for $(FILE) success (does not compile) error $(RETVAL)"
@echo Test for $(FILE) success (does not compile) error $(RETVAL)>> log @echo "Test for $(FILE) success (does not compile) error $(RETVAL)" >> log
else else
testfail: testfail:
@echo Test for $(FILE) fails (does compile and should not) @echo "Test for $(FILE) fails (does compile and should not)"
@echo Test for $(FILE) fails (does compile and should not) >> log @echo "Test for $(FILE) fails (does compile and should not)" >> log
@echo $(FILE) >> tf_fail @echo $(FILE) >> tf_fail
@echo $(FILE) >> faillist @echo $(FILE) >> faillist
endif endif
@ -219,8 +219,13 @@ info :
@echo created behave like the should @echo created behave like the should
@echo run \'make tesiexec\' to test executables @echo run \'make tesiexec\' to test executables
@echo that require interactive mode @echo that require interactive mode
#
# $Log$ # $Log$
# Revision 1.12 1999-01-19 18:01:43 pierre # Revision 1.1 1999-01-25 20:23:04 peter
# * linux updates
#
# Revision 1.12 1999/01/19 18:01:43 pierre
# local change removed # local change removed
# #
# Revision 1.11 1999/01/19 17:34:01 pierre # Revision 1.11 1999/01/19 17:34:01 pierre
@ -254,4 +259,3 @@ info :
# Revision 1.3 1998/10/21 12:12:09 pierre # Revision 1.3 1998/10/21 12:12:09 pierre
# Log inserted # Log inserted
# #

View File

@ -1,4 +1,4 @@
{$OPT= -Tamiga} { $OPT= -Tamiga }
unit tbs0102; unit tbs0102;
interface interface

View File

@ -1,5 +1,8 @@
{$ifdef go32v2}
uses uses
dpmiexcp; dpmiexcp;
{$endif}
{ Two cardinal type bugs } { Two cardinal type bugs }
var var
c : cardinal; c : cardinal;
@ -9,5 +12,5 @@ begin
c:=$80001234; c:=$80001234;
writeln(c); writeln(c);
c:=$ffffffff; c:=$ffffffff;
writeln(c); writeln(c);
end. end.

View File

@ -10,18 +10,19 @@
uses linux; uses linux;
{$endif linux} {$endif linux}
function our_sig(l : longint) : longint; function our_sig(l : longint) : longint;{$ifdef linux}cdecl;{$endif}
begin begin
{ If we land here the program works correctly !! } { If we land here the program works correctly !! }
Writeln('Bound check error signal recieved'); Writeln('Bound check error signal recieved');
our_sig:=0;
Halt(0); Halt(0);
end; end;
Var Var
Sel: Word; Sel: Word;
v: longint; v: longint;
Begin Begin
Signal(SIGSEGV,our_sig); Signal(SIGSEGV,signalhandler(our_sig));
v:=$00ffffff; v:=$00ffffff;
Sel:=word(v); Sel:=word(v);
writeln(sel); writeln(sel);

View File

@ -3,8 +3,11 @@
Program Test1; Program Test1;
{$ifdef go32v2}
uses uses
dpmiexcp; dpmiexcp;
{$endif}
type type
myObject = object myObject = object
constructor init; constructor init;

View File

@ -1,5 +1,5 @@
{$I386_INTEL}
begin begin
{$asmmode intel}
asm asm
SHRD [ESI-8], EAX, CL SHRD [ESI-8], EAX, CL
end; end;

View File

@ -1,12 +1,11 @@
{$I386_INTEL}
{ Compile with -Rintel switch }
var var
l : longint; l : longint;
begin begin
{$asmmode intel}
{ problem here is that l is replaced by BP-offset } { problem here is that l is replaced by BP-offset }
{ relative to stack, and the parser thinks all wrong } { relative to stack, and the parser thinks all wrong }
{ because of this. } { because of this. }
asm asm
mov eax, [eax*4+l] mov eax, [eax*4+l]
end; end;
end. end.

View File

@ -1,4 +1,4 @@
{ $OPT=-Cr } { $OPT=-St -Cr }
program test; program test;
{$ifdef go32v2} {$ifdef go32v2}
@ -61,7 +61,7 @@ end;
var other1 : TOtherClass; var other1 : TOtherClass;
begin begin
with other1 do with other1 do
Init; Init;
with base1 do with base1 do
Init; Init;
with other1 do with other1 do
@ -69,21 +69,21 @@ end;
Writeln('number of objects = ',st_count); Writeln('number of objects = ',st_count);
base_arg:=2; base_arg:=2;
other_arg:=6; other_arg:=6;
Run; Run;
end; end;
{ test if changed !! } { test if changed !! }
if (other1.base_arg<>2) or (other1.other_arg<>6) then if (other1.base_arg<>2) or (other1.other_arg<>6) then
Halt(1); Halt(1);
with base1 do with base1 do
begin begin
Run; Run;
Done; Done;
end; end;
other1.done; other1.done;
end; end;
var base : Tbaseclass; var base : Tbaseclass;
other : Totherclass; other : Totherclass;
testfield : longint; testfield : longint;

View File

@ -1,3 +1,4 @@
{$mode objfpc}
type type
to1 = class to1 = class
function GetCaps1 : Longint;virtual;abstract; function GetCaps1 : Longint;virtual;abstract;

View File

@ -19,24 +19,24 @@ uses
dpmiexcp, dpmiexcp,
{$endif go32v2} {$endif go32v2}
graph; graph;
const max = 1000; const max = 1000;
maxint = 10000*max; maxint = 10000*max;
var x : array[0..max-1] of longint; var x : array[0..max-1] of longint;
y : array[-100..100] of longint; y : array[-100..100] of longint;
mean,level,i : longint; mean,level,i : longint;
maxcount,delta,maximum,minimum : longint; maxcount,delta,maximum,minimum : longint;
st,st2 : string; st,st2 : string;
gm,gd : integer; gm,gd : integer;
color : longint; color : longint;
begin begin
{$ifdef FPC} {$ifdef go32v2}
gm:=G640x400x256; gm:=G640x400x256;
gd:=$ff; gd:=$ff;
{$else } {$else }
@ -50,10 +50,10 @@ begin
color:=blue; color:=blue;
mean:=maxint div max; mean:=maxint div max;
for level:=0 to 10 do for level:=0 to 10 do
begin begin
for i:=0 to max-1 do for i:=0 to max-1 do
x[i]:=0; x[i]:=0;
for i:=-100 to 100 do for i:=-100 to 100 do
@ -93,9 +93,9 @@ begin
maxcount:=y[i]; maxcount:=y[i];
if maxcount=0 then if maxcount=0 then
inc(maxcount); inc(maxcount);
OutTextXY(GetMaxX div 2,GetMaxY-30,'Random Test Program'); OutTextXY(GetMaxX div 2,GetMaxY-30,'Random Test Program');
str(level,st); str(level,st);
st:='Level '+st; st:='Level '+st;
OutTextXY(30,GetMaxY-60,st); OutTextXY(30,GetMaxY-60,st);
@ -103,7 +103,7 @@ begin
str(minimum,st2); str(minimum,st2);
st:='Maximum = '+st+' Minimum ='+st2; st:='Maximum = '+st+' Minimum ='+st2;
OutTextXY(30,GetMaxY-30,st); OutTextXY(30,GetMaxY-30,st);
for i:=0 to max-1 do for i:=0 to max-1 do
putpixel( (i*getmaxX) div max, putpixel( (i*getmaxX) div max,
GetMaxY-(x[i]*getMaxY) div (2*mean), color); GetMaxY-(x[i]*getMaxY) div (2*mean), color);
@ -127,10 +127,13 @@ begin
end; end;
CloseGraph; CloseGraph;
end. end.
{ {
$Log$ $Log$
Revision 1.2 1998-11-23 23:44:52 pierre Revision 1.3 1999-01-25 20:23:13 peter
* linux updates
Revision 1.2 1998/11/23 23:44:52 pierre
+ several bugs converted + several bugs converted
} }

View File

@ -1,10 +1,47 @@
{ $OPT=-Fu../rtl/utils { $OPT=-Fu../rtl/utils
$Id$ $Id$
Program to test string functions and speed of the functions Program to test string functions and speed of the functions
} }
program TestStr; program TestStr;
{$ifdef timer}
uses Timer; uses Timer;
{$else}
type
TTimer = Object
TotalMSec,
StartMSec : longint;
constructor init;
procedure reset;
procedure start;
procedure stop;
Function MSec:longint;
end;
procedure TTimer.Reset;
begin
end;
procedure TTimer.Start;
begin
end;
procedure TTimer.Stop;
begin
end;
Function TTimer.MSec:longint;
begin
MSec:=0;
end;
Constructor TTimer.Init;
begin
end;
{$endif}
const const
TestSize=10; {Use at least 10 for reasonable results} TestSize=10; {Use at least 10 for reasonable results}
@ -22,7 +59,6 @@ var
MixBen : BenType; MixBen : BenType;
t : TTimer; t : TTimer;
function TestOK:boolean; function TestOK:boolean;
Const Const
TestStr: string[22]='HELLO, THIS IS A TEST '; TestStr: string[22]='HELLO, THIS IS A TEST ';
@ -87,7 +123,7 @@ procedure TestSpeed(Row,Len:byte);
var var
l : longint; l : longint;
hstr, hstr,
OrgStr : string; OrgStr : string[10];
begin begin
HeadBen[Row]:=Len; HeadBen[Row]:=Len;
OrgStr:=''; OrgStr:='';