sysutils.pp 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 by Karoly Balogh
  4. Sysutils unit for Gameboy Advance.
  5. This unit is based on the MorphOS one and is adapted for Gameboy Advance
  6. simply by stripping out all stuff inside funcs and procs.
  7. Copyright (c) 2006 by Francesco Lombardi
  8. Based on Amiga version by Carl Eric Codere, and other
  9. parts of the RTL
  10. See the file COPYING.FPC, included in this distribution,
  11. for details about the copyright.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. **********************************************************************}
  16. unit sysutils;
  17. interface
  18. {$MODE objfpc}
  19. {$MODESWITCH OUT}
  20. { force ansistrings }
  21. {$H+}
  22. { Include platform independent interface part }
  23. {$i sysutilh.inc}
  24. implementation
  25. uses
  26. dos, sysconst;
  27. { Include platform independent implementation part }
  28. {$i sysutils.inc}
  29. {****************************************************************************
  30. File Functions
  31. ****************************************************************************}
  32. function FileOpen(const FileName: string; Mode: Integer): LongInt;
  33. begin
  34. result := -1;
  35. end;
  36. function FileGetDate(Handle: LongInt) : LongInt;
  37. begin
  38. result := -1;
  39. end;
  40. function FileSetDate(Handle, Age: LongInt) : LongInt;
  41. begin
  42. result := -1;
  43. end;
  44. function FileCreate(const FileName: string) : LongInt;
  45. begin
  46. result := -1;
  47. end;
  48. function FileCreate(const FileName: string; Rights: integer): LongInt;
  49. begin
  50. result := -1;
  51. end;
  52. function FileCreate(const FileName: string; ShareMode: integer; rights : integer): LongInt;
  53. begin
  54. result := -1;
  55. end;
  56. function FileRead(Handle: LongInt; Out Buffer; Count: LongInt): LongInt;
  57. begin
  58. result := -1;
  59. end;
  60. function FileWrite(Handle: LongInt; const Buffer; Count: LongInt): LongInt;
  61. begin
  62. result := -1;
  63. end;
  64. function FileSeek(Handle, FOffset, Origin: LongInt) : LongInt;
  65. begin
  66. result := -1;
  67. end;
  68. function FileSeek(Handle: LongInt; FOffset: Int64; Origin: Longint): Int64;
  69. begin
  70. result := -1;
  71. end;
  72. procedure FileClose(Handle: LongInt);
  73. begin
  74. end;
  75. function FileTruncate(Handle: THandle; Size: Int64): Boolean;
  76. begin
  77. result := false;
  78. end;
  79. function DeleteFile(const FileName: string) : Boolean;
  80. begin
  81. result := false;
  82. end;
  83. function RenameFile(const OldName, NewName: string): Boolean;
  84. begin
  85. result := false;
  86. end;
  87. (****** end of non portable routines ******)
  88. Function FileAge (Const FileName : String): Longint;
  89. begin
  90. result := -1;
  91. end;
  92. Function FileExists (Const FileName : String) : Boolean;
  93. Begin
  94. result := false;
  95. end;
  96. Function FindFirst (Const Path : String; Attr : Longint; Out Rslt : TSearchRec) : Longint;
  97. begin
  98. result := -1;
  99. end;
  100. Function FindNext (Var Rslt : TSearchRec) : Longint;
  101. begin
  102. result := -1;
  103. end;
  104. Procedure FindClose (Var F : TSearchrec);
  105. begin
  106. end;
  107. Function FileGetAttr (Const FileName : String) : Longint;
  108. begin
  109. result := -1;
  110. end;
  111. Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
  112. begin
  113. result := -1;
  114. end;
  115. {****************************************************************************
  116. Disk Functions
  117. ****************************************************************************}
  118. Procedure AddDisk(const path:string);
  119. begin
  120. end;
  121. Function DiskFree(Drive: Byte): int64;
  122. Begin
  123. result := -1;
  124. End;
  125. Function DiskSize(Drive: Byte): int64;
  126. Begin
  127. result := -1;
  128. End;
  129. Function GetCurrentDir : String;
  130. begin
  131. result := '';
  132. end;
  133. Function SetCurrentDir (Const NewDir : String) : Boolean;
  134. begin
  135. result := false;
  136. end;
  137. Function CreateDir (Const NewDir : String) : Boolean;
  138. begin
  139. result := false;
  140. end;
  141. Function RemoveDir (Const Dir : String) : Boolean;
  142. begin
  143. result := false;
  144. end;
  145. function DirectoryExists(const Directory: string): Boolean;
  146. begin
  147. result := false;
  148. end;
  149. {****************************************************************************
  150. Misc Functions
  151. ****************************************************************************}
  152. procedure Beep;
  153. begin
  154. end;
  155. {****************************************************************************
  156. Locale Functions
  157. ****************************************************************************}
  158. Procedure GetLocalTime(var SystemTime: TSystemTime);
  159. begin
  160. end ;
  161. function SysErrorMessage(ErrorCode: Integer): String;
  162. begin
  163. { Result:=StrError(ErrorCode);}
  164. result := '';
  165. end;
  166. {****************************************************************************
  167. OS utility functions
  168. ****************************************************************************}
  169. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  170. begin
  171. result := '';
  172. end;
  173. Function GetEnvironmentVariableCount : Integer;
  174. begin
  175. result := -1;
  176. end;
  177. Function GetEnvironmentString(Index : Integer) : String;
  178. begin
  179. result := '';
  180. end;
  181. function ExecuteProcess (const Path: AnsiString; const ComLine: AnsiString;Flags:TExecuteFlags=[]): integer;
  182. begin
  183. result := -1;
  184. end;
  185. function ExecuteProcess (const Path: AnsiString;
  186. const ComLine: array of AnsiString;Flags:TExecuteFlags=[]): integer;
  187. begin
  188. result := -1;
  189. end;
  190. {****************************************************************************
  191. Initialization code
  192. ****************************************************************************}
  193. Initialization
  194. InitExceptions;
  195. Finalization
  196. DoneExceptions;
  197. end.