Преглед на файлове

atari: implemented GetLocalTime in sysutils. initialized the return value of unimplemented functions

git-svn-id: trunk@35206 -
Károly Balogh преди 8 години
родител
ревизия
d78b1ffc14
променени са 2 файла, в които са добавени 21 реда и са изтрити 3 реда
  1. 4 1
      rtl/atari/gemdos.inc
  2. 17 2
      rtl/atari/sysutils.pp

+ 4 - 1
rtl/atari/gemdos.inc

@@ -128,6 +128,10 @@ function gemdos_dsetdrv(drv: smallint): longint; syscall 1 14;
 function gemdos_dgetdrv: smallint; syscall 1 25;
 procedure gemdos_setdta(buf: PDTA); syscall 1 26;
 
+function gemdos_tgetdate: longint; syscall 1 42;
+
+function gemdos_tgettime: longint; syscall 1 44;
+
 function gemdos_getdta: PDTA; syscall 1 47;
 
 function gemdos_dfree(buf: PDISKINFO; driveno: smallint): smallint; syscall 1 54;
@@ -135,7 +139,6 @@ function gemdos_dfree(buf: PDISKINFO; driveno: smallint): smallint; syscall 1 54
 function gemdos_dcreate(const path: pchar): longint; syscall 1 57;
 function gemdos_ddelete(const path: pchar): longint; syscall 1 58;
 function gemdos_dsetpath(path: pchar): smallint; syscall 1 59;
-
 function gemdos_fcreate(fname: pchar; attr: smallint): smallint; syscall 1 60;
 function gemdos_fopen(fname: pchar; mode: smallint): longint; syscall 1 61;
 function gemdos_fclose(handle: smallint): smallint; syscall 1 62;

+ 17 - 2
rtl/atari/sysutils.pp

@@ -391,7 +391,12 @@ end;
 ****************************************************************************}
 
 Procedure GetLocalTime(var SystemTime: TSystemTime);
+var
+  TOSTime: Longint;
 begin
+   LongRec(TOSTime).hi:=gemdos_tgetdate;
+   LongRec(TOSTime).lo:=gemdos_tgettime;
+   DateTimeToSystemTime(FileDateToDateTime(TOSTime),SystemTime);
 end;
 
 
@@ -431,7 +436,7 @@ end;
 
 function GetLastOSError: Integer;
 begin
-    result:=-1;
+  result:=-1;
 end;
 
 {****************************************************************************
@@ -440,24 +445,33 @@ end;
 
 function GetPathString: String;
 begin
-   result := '';
+  {writeln('Unimplemented GetPathString');}
+  result := '';
 end;
 
 Function GetEnvironmentVariable(Const EnvVar : String) : String;
 begin
+  {writeln('Unimplemented GetEnvironmentVariable');}
+  result:='';
 end;
 
 Function GetEnvironmentVariableCount : Integer;
 begin
+  {writeln('Unimplemented GetEnvironmentVariableCount');}
+  result:=0;
 end;
 
 Function GetEnvironmentString(Index : Integer) : {$ifdef FPC_RTL_UNICODE}UnicodeString{$else}AnsiString{$endif};
 begin
+  {writeln('Unimplemented GetEnvironmentString');}
+  result:='';
 end;
 
 function ExecuteProcess (const Path: RawByteString; const ComLine: RawByteString;Flags:TExecuteFlags=[]):
                                                                        integer;
 begin
+  {writeln('Unimplemented ExecuteProcess');}
+  result:=-1;
 end;
 
 function ExecuteProcess (const Path: RawByteString;
@@ -478,6 +492,7 @@ end;
 
 procedure Sleep(Milliseconds: cardinal);
 begin
+  {writeln('Unimplemented Sleep');}
 end;