sysutils.pp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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. { Include platform independent interface part }
  17. {$i sysutilh.inc}
  18. implementation
  19. uses
  20. sysconst,heapmgr;
  21. { used OS file system APIs use ansistring }
  22. {$define SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL}
  23. { Include platform independent implementation part }
  24. {$i sysutils.inc}
  25. {****************************************************************************
  26. File Functions
  27. ****************************************************************************}
  28. function FileOpen(const FileName: RawByteString; Mode: Integer): LongInt;
  29. begin
  30. result := -1;
  31. end;
  32. function FileGetDate(Handle: LongInt) : LongInt;
  33. begin
  34. result := -1;
  35. end;
  36. function FileSetDate(Handle, Age: LongInt) : LongInt;
  37. begin
  38. result := -1;
  39. end;
  40. function FileCreate(const FileName: RawByteString) : LongInt;
  41. begin
  42. result := -1;
  43. end;
  44. function FileCreate(const FileName: RawByteString; Rights: integer): LongInt;
  45. begin
  46. result := -1;
  47. end;
  48. function FileCreate(const FileName: RawByteString; ShareMode: integer; rights : integer): LongInt;
  49. begin
  50. result := -1;
  51. end;
  52. function FileRead(Handle: LongInt; Out Buffer; Count: LongInt): LongInt;
  53. begin
  54. result := -1;
  55. end;
  56. function FileWrite(Handle: LongInt; const Buffer; Count: LongInt): LongInt;
  57. begin
  58. result := -1;
  59. end;
  60. function FileSeek(Handle, FOffset, Origin: LongInt) : LongInt;
  61. begin
  62. result := -1;
  63. end;
  64. function FileSeek(Handle: LongInt; FOffset: Int64; Origin: Longint): Int64;
  65. begin
  66. result := -1;
  67. end;
  68. procedure FileClose(Handle: LongInt);
  69. begin
  70. end;
  71. function FileTruncate(Handle: THandle; Size: Int64): Boolean;
  72. begin
  73. result := false;
  74. end;
  75. function DeleteFile(const FileName: RawByteString) : Boolean;
  76. begin
  77. result := false;
  78. end;
  79. function RenameFile(const OldName, NewName: RawByteString): Boolean;
  80. begin
  81. result := false;
  82. end;
  83. Function FileAge (Const FileName : String): Longint;
  84. begin
  85. result := -1;
  86. end;
  87. Function FileExists (Const FileName : RawByteString) : Boolean;
  88. Begin
  89. result := false;
  90. end;
  91. Function FindFirst (Const Path : String; Attr : Longint; Out Rslt : TSearchRec) : Longint;
  92. begin
  93. result := -1;
  94. end;
  95. Function FindNext (Var Rslt : TSearchRec) : Longint;
  96. begin
  97. result := -1;
  98. end;
  99. Procedure FindClose (Var F : TSearchrec);
  100. begin
  101. end;
  102. Function FileGetAttr (Const FileName : RawByteString) : Longint;
  103. begin
  104. result := -1;
  105. end;
  106. Function FileSetAttr (Const Filename : RawByteString; Attr: longint) : Longint;
  107. begin
  108. result := -1;
  109. end;
  110. {****************************************************************************
  111. Disk Functions
  112. ****************************************************************************}
  113. Procedure AddDisk(const path:string);
  114. begin
  115. end;
  116. Function DiskFree(Drive: Byte): int64;
  117. Begin
  118. result := -1;
  119. End;
  120. Function DiskSize(Drive: Byte): int64;
  121. Begin
  122. result := -1;
  123. End;
  124. function DirectoryExists(const Directory: RawByteString): Boolean;
  125. begin
  126. result := false;
  127. end;
  128. {****************************************************************************
  129. Misc Functions
  130. ****************************************************************************}
  131. Function GetLastOSError : Integer;
  132. begin
  133. Result:=-1;
  134. end;
  135. {****************************************************************************
  136. Locale Functions
  137. ****************************************************************************}
  138. Procedure GetLocalTime(var SystemTime: TSystemTime);
  139. begin
  140. end ;
  141. function SysErrorMessage(ErrorCode: Integer): String;
  142. begin
  143. { Result:=StrError(ErrorCode);}
  144. result := '';
  145. end;
  146. {****************************************************************************
  147. OS utility functions
  148. ****************************************************************************}
  149. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  150. begin
  151. result := '';
  152. end;
  153. Function GetEnvironmentVariableCount : Integer;
  154. begin
  155. result := -1;
  156. end;
  157. Function GetEnvironmentString(Index : Integer) : String;
  158. begin
  159. result := '';
  160. end;
  161. function ExecuteProcess (const Path: AnsiString; const ComLine: AnsiString;Flags:TExecuteFlags=[]): integer;
  162. begin
  163. result := -1;
  164. end;
  165. function ExecuteProcess (const Path: AnsiString;
  166. const ComLine: array of AnsiString;Flags:TExecuteFlags=[]): integer;
  167. begin
  168. result := -1;
  169. end;
  170. {****************************************************************************
  171. Initialization code
  172. ****************************************************************************}
  173. Initialization
  174. InitExceptions;
  175. Finalization
  176. DoneExceptions;
  177. end.