* remove sysutils

This commit is contained in:
peter 2004-10-31 16:20:58 +00:00
parent 4a4c940fc4
commit 5ef188da6f

View File

@ -66,7 +66,7 @@ Procedure AddDisk(const path:string);
Implementation
Uses
Strings,SysUtils,Unix,BaseUnix,Syscall;
Strings,Unix,BaseUnix,Syscall;
{$i sysnr.inc}
@ -227,15 +227,14 @@ begin
end;
end;
Procedure GetDate(Var Year, Month, MDay, WDay: Word);
var t :TSystemtime;
Begin
sysutils.getlocaltime(t);
mday:=t.day;
month:=t.month;
year:=t.year;
var
tz:timeval;
hour,min,sec : word;
begin
fpgettimeofday(@tz,nil);
EpochToLocal(tz.tv_sec,year,month,mday,hour,min,sec);
Wday:=weekday(Year,Month,MDay);
end;
@ -270,15 +269,13 @@ begin
end;
Procedure GetTime(Var Hour, Minute, Second, Sec100: Word);
var t :TSystemtime;
Begin
sysutils.getlocaltime(t);
sec100:=0;
second:=t.second;
minute:=t.minute;
hour :=t.hour;
var
tz:timeval;
year,month,day : word;
begin
fpgettimeofday(@tz,nil);
EpochToLocal(tz.tv_sec,year,month,day,hour,minute,second);
sec100:=tz.tv_usec div 10000;
end;
Procedure packtime(var t : datetime;var p : longint);
@ -378,10 +375,10 @@ Begin
cmdline2^:=pchar(realPath);
cmdline2[1]:=nil;
end;
{The child does the actual exec, and then exits}
fpExecv(pchar(realPath),cmdline2);
{If the execve fails, we return an exitvalue of 127, to let it be known}
fpExit(127);
{The child does the actual exec, and then exits}
fpExecv(pchar(realPath),cmdline2);
{If the execve fails, we return an exitvalue of 127, to let it be known}
fpExit(127);
end
else
if pid=-1 then {Fork failed}
@ -389,12 +386,12 @@ Begin
DosError:=8;
exit
end;
{We're in the parent, let's wait.}
{We're in the parent, let's wait.}
LastDosExitCode:=WaitProcess(pid); // WaitPid and result-convert
if (LastDosExitCode>=0) and (LastDosExitCode<>127) then
DosError:=0
DosError:=0
else
DosError:=8; // perhaps one time give an better error
DosError:=8; // perhaps one time give an better error
End;
@ -1047,7 +1044,10 @@ End.
{
$Log$
Revision 1.36 2004-10-30 20:55:54 marco
Revision 1.37 2004-10-31 16:20:58 peter
* remove sysutils
Revision 1.36 2004/10/30 20:55:54 marco
* unix interface cleanup
Revision 1.35 2004/09/25 15:09:57 peter