123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- {
- This file is part of the Free Pascal run time library.
- Copyright (c) 2004 by the Free Pascal development team
- Sysutils unit for the embedded target.
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- **********************************************************************}
- {$MODE objfpc}
- {$MODESWITCH OUT}
- {$H+}
- unit sysutils;
- interface
- {$DEFINE HAS_SLEEP}
- {$DEFINE HAS_OSERROR}
- {$modeswitch typehelpers}
- {$modeswitch advancedrecords}
- { used OS file system APIs use ansistring }
- {$define SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL}
- { OS has an ansistring/single byte environment variable API }
- {$define SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL}
- { Include platform independent interface part }
- {$i sysutilh.inc}
- var
- SleepHandler: procedure(ms: cardinal) = nil;
- implementation
- uses
- sysconst,heapmgr;
- { Include platform independent implementation part }
- {$i sysutils.inc}
- {****************************************************************************
- File Functions
- ****************************************************************************}
- function FileOpen(const FileName: RawByteString; Mode: Integer): THandle;
- begin
- result := -1;
- end;
- function FileGetDate(Handle: THandle) : TOSTimestamp;
- begin
- result := -1;
- end;
- function FileSetDate(Handle: THandle; Age: TOSTimestamp) : Longint;
- begin
- result := -1;
- end;
- function FileCreate(const FileName: RawByteString) : THandle;
- begin
- result := -1;
- end;
- function FileCreate(const FileName: RawByteString; Rights: integer): THandle;
- begin
- result := -1;
- end;
- function FileCreate(const FileName: RawByteString; ShareMode: integer; rights : integer): THandle;
- begin
- result := -1;
- end;
- function FileRead(Handle: THandle; Out Buffer; Count: LongInt): LongInt;
- begin
- result := -1;
- end;
- function FileWrite(Handle: THandle; const Buffer; Count: LongInt): LongInt;
- begin
- result := -1;
- end;
- function FileSeek(Handle: THandle; FOffset, Origin: LongInt) : LongInt;
- begin
- result := -1;
- end;
- function FileSeek(Handle: THandle; FOffset: Int64; Origin: Longint): Int64;
- begin
- result := -1;
- end;
- procedure FileClose(Handle: THandle);
- begin
- end;
- function FileTruncate(Handle: THandle; Size: Int64): Boolean;
- begin
- result := false;
- end;
- function DeleteFile(const FileName: RawByteString) : Boolean;
- begin
- result := false;
- end;
- function RenameFile(const OldName, NewName: RawByteString): Boolean;
- begin
- result := false;
- end;
- Function FileAge (Const FileName : RawByteString): TOSTimestamp;
- begin
- result := -1;
- end;
- function FileGetSymLinkTarget(const FileName: RawByteString; out SymLinkRec: TRawbyteSymLinkRec): Boolean;
- begin
- Result := False;
- end;
- Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean;
- Begin
- result := false;
- end;
- Function InternalFindFirst (Const Path : RawByteString; Attr : Longint; out Rslt : TAbstractSearchRec; var Name: RawByteString) : Longint;
- begin
- result := -1;
- end;
- Function InternalFindNext (var Rslt : TAbstractSearchRec; var Name : RawByteString) : Longint;
- begin
- result := -1;
- end;
- Procedure InternalFindClose(var Handle: THandle);
- begin
- end;
- Function FileGetAttr (Const FileName : RawByteString) : Longint;
- begin
- result := -1;
- end;
- Function FileSetAttr (Const Filename : RawByteString; Attr: longint) : Longint;
- begin
- result := -1;
- end;
- {****************************************************************************
- Disk Functions
- ****************************************************************************}
- Procedure AddDisk(const path:string);
- begin
- end;
- Function DiskFree(Drive: Byte): int64;
- Begin
- result := -1;
- End;
- Function DiskSize(Drive: Byte): int64;
- Begin
- result := -1;
- End;
- function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean;
- begin
- result := false;
- end;
- {****************************************************************************
- Misc Functions
- ****************************************************************************}
- procedure sysBeep;
- begin
- end;
- Procedure Sleep(Milliseconds : Cardinal);
- begin
- if assigned(SleepHandler) then
- SleepHandler(Milliseconds);
- end;
- Function GetLastOSError : Integer;
- begin
- Result:=-1;
- end;
- {****************************************************************************
- Locale Functions
- ****************************************************************************}
- Procedure GetLocalTime(var SystemTime: TSystemTime);
- begin
- end ;
- function SysErrorMessage(ErrorCode: Integer): String;
- begin
- { Result:=StrError(ErrorCode);}
- result := '';
- end;
- {****************************************************************************
- OS utility functions
- ****************************************************************************}
- Function GetEnvironmentVariable(Const EnvVar : String) : String;
- begin
- result := '';
- end;
- Function GetEnvironmentVariableCount : Integer;
- begin
- result := -1;
- end;
- Function GetEnvironmentString(Index : Integer) : {$ifdef FPC_RTL_UNICODE}UnicodeString{$else}AnsiString{$endif};
- begin
- result := '';
- end;
- function ExecuteProcess (const Path: RawByteString; const ComLine: RawByteString;Flags:TExecuteFlags=[]): integer;
- begin
- result := -1;
- end;
- function ExecuteProcess (const Path: RawByteString;
- const ComLine: array of RawByteString;Flags:TExecuteFlags=[]): integer;
- begin
- result := -1;
- end;
- function ExecuteProcess (const Path: UnicodeString; const ComLine: UnicodeString;Flags:TExecuteFlags=[]): integer;
- begin
- result := -1;
- end;
- function ExecuteProcess (const Path: UnicodeString;
- const ComLine: array of UnicodeString;Flags:TExecuteFlags=[]): integer;
- begin
- result := -1;
- end;
- {****************************************************************************
- Initialization code
- ****************************************************************************}
- Initialization
- InitExceptions;
- Finalization
- FreeTerminateProcs;
- DoneExceptions;
- end.
|