sysutils.pp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 by the Free Pascal development team
  4. Sysutils unit for the embedded target.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$MODE objfpc}
  12. {$MODESWITCH OUT}
  13. {$H+}
  14. unit sysutils;
  15. interface
  16. { used OS file system APIs use ansistring }
  17. {$define SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL}
  18. { OS has an ansistring/single byte environment variable API }
  19. {$define SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL}
  20. { Include platform independent interface part }
  21. {$i sysutilh.inc}
  22. implementation
  23. uses
  24. sysconst,heapmgr;
  25. { Include platform independent implementation part }
  26. {$i sysutils.inc}
  27. {****************************************************************************
  28. File Functions
  29. ****************************************************************************}
  30. function FileOpen(const FileName: RawByteString; Mode: Integer): LongInt;
  31. begin
  32. result := -1;
  33. end;
  34. function FileGetDate(Handle: LongInt) : LongInt;
  35. begin
  36. result := -1;
  37. end;
  38. function FileSetDate(Handle, Age: LongInt) : LongInt;
  39. begin
  40. result := -1;
  41. end;
  42. function FileCreate(const FileName: RawByteString) : LongInt;
  43. begin
  44. result := -1;
  45. end;
  46. function FileCreate(const FileName: RawByteString; Rights: integer): LongInt;
  47. begin
  48. result := -1;
  49. end;
  50. function FileCreate(const FileName: RawByteString; ShareMode: integer; rights : integer): LongInt;
  51. begin
  52. result := -1;
  53. end;
  54. function FileRead(Handle: LongInt; Out Buffer; Count: LongInt): LongInt;
  55. begin
  56. result := -1;
  57. end;
  58. function FileWrite(Handle: LongInt; const Buffer; Count: LongInt): LongInt;
  59. begin
  60. result := -1;
  61. end;
  62. function FileSeek(Handle, FOffset, Origin: LongInt) : LongInt;
  63. begin
  64. result := -1;
  65. end;
  66. function FileSeek(Handle: LongInt; FOffset: Int64; Origin: Longint): Int64;
  67. begin
  68. result := -1;
  69. end;
  70. procedure FileClose(Handle: LongInt);
  71. begin
  72. end;
  73. function FileTruncate(Handle: THandle; Size: Int64): Boolean;
  74. begin
  75. result := false;
  76. end;
  77. function DeleteFile(const FileName: RawByteString) : Boolean;
  78. begin
  79. result := false;
  80. end;
  81. function RenameFile(const OldName, NewName: RawByteString): Boolean;
  82. begin
  83. result := false;
  84. end;
  85. Function FileAge (Const FileName : RawByteString): Longint;
  86. begin
  87. result := -1;
  88. end;
  89. Function FileExists (Const FileName : RawByteString) : Boolean;
  90. Begin
  91. result := false;
  92. end;
  93. Function InternalFindFirst (Const Path : RawByteString; Attr : Longint; out Rslt : TAbstractSearchRec; var Name: RawByteString) : Longint;
  94. begin
  95. result := -1;
  96. end;
  97. Function InternalFindNext (var Rslt : TAbstractSearchRec; var Name : RawByteString) : Longint;
  98. begin
  99. result := -1;
  100. end;
  101. Procedure InternalFindClose(var Handle: THandle);
  102. begin
  103. end;
  104. Function FileGetAttr (Const FileName : RawByteString) : Longint;
  105. begin
  106. result := -1;
  107. end;
  108. Function FileSetAttr (Const Filename : RawByteString; Attr: longint) : Longint;
  109. begin
  110. result := -1;
  111. end;
  112. {****************************************************************************
  113. Disk Functions
  114. ****************************************************************************}
  115. Procedure AddDisk(const path:string);
  116. begin
  117. end;
  118. Function DiskFree(Drive: Byte): int64;
  119. Begin
  120. result := -1;
  121. End;
  122. Function DiskSize(Drive: Byte): int64;
  123. Begin
  124. result := -1;
  125. End;
  126. function DirectoryExists(const Directory: RawByteString): Boolean;
  127. begin
  128. result := false;
  129. end;
  130. {****************************************************************************
  131. Misc Functions
  132. ****************************************************************************}
  133. Function GetLastOSError : Integer;
  134. begin
  135. Result:=-1;
  136. end;
  137. {****************************************************************************
  138. Locale Functions
  139. ****************************************************************************}
  140. Procedure GetLocalTime(var SystemTime: TSystemTime);
  141. begin
  142. end ;
  143. function SysErrorMessage(ErrorCode: Integer): String;
  144. begin
  145. { Result:=StrError(ErrorCode);}
  146. result := '';
  147. end;
  148. {****************************************************************************
  149. OS utility functions
  150. ****************************************************************************}
  151. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  152. begin
  153. result := '';
  154. end;
  155. Function GetEnvironmentVariableCount : Integer;
  156. begin
  157. result := -1;
  158. end;
  159. Function GetEnvironmentString(Index : Integer) : {$ifdef FPC_RTL_UNICODE}UnicodeString{$else}AnsiString{$endif};
  160. begin
  161. result := '';
  162. end;
  163. function ExecuteProcess (const Path: AnsiString; const ComLine: AnsiString;Flags:TExecuteFlags=[]): integer;
  164. begin
  165. result := -1;
  166. end;
  167. function ExecuteProcess (const Path: AnsiString;
  168. const ComLine: array of AnsiString;Flags:TExecuteFlags=[]): integer;
  169. begin
  170. result := -1;
  171. end;
  172. {****************************************************************************
  173. Initialization code
  174. ****************************************************************************}
  175. Initialization
  176. InitExceptions;
  177. Finalization
  178. DoneExceptions;
  179. end.