sysutils.pp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 by Karoly Balogh
  4. Sysutils unit for Nintendo DS.
  5. This unit is based on the MorphOS one and is adapted for Nintendo DS
  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. { force ansistrings }
  20. {$H+}
  21. { Include platform independent interface part }
  22. {$i sysutilh.inc}
  23. implementation
  24. uses
  25. dos, sysconst;
  26. { Include platform independent implementation part }
  27. {$i sysutils.inc}
  28. {****************************************************************************
  29. File Functions
  30. ****************************************************************************}
  31. function FileOpen(const FileName: string; Mode: Integer): LongInt;
  32. begin
  33. result := -1;
  34. end;
  35. function FileGetDate(Handle: LongInt) : LongInt;
  36. begin
  37. result := -1;
  38. end;
  39. function FileSetDate(Handle, Age: LongInt) : LongInt;
  40. begin
  41. result := -1;
  42. end;
  43. function FileCreate(const FileName: string) : LongInt;
  44. begin
  45. result := -1;
  46. end;
  47. function FileCreate(const FileName: string; Mode: integer): LongInt;
  48. begin
  49. result := -1;
  50. end;
  51. function FileRead(Handle: LongInt; var Buffer; Count: LongInt): LongInt;
  52. begin
  53. result := -1;
  54. end;
  55. function FileWrite(Handle: LongInt; const Buffer; Count: LongInt): LongInt;
  56. begin
  57. result := -1;
  58. end;
  59. function FileSeek(Handle, FOffset, Origin: LongInt) : LongInt;
  60. begin
  61. result := -1;
  62. end;
  63. function FileSeek(Handle: LongInt; FOffset: Int64; Origin: Longint): Int64;
  64. begin
  65. result := -1;
  66. end;
  67. procedure FileClose(Handle: LongInt);
  68. begin
  69. end;
  70. function FileTruncate(Handle, Size: LongInt): Boolean;
  71. begin
  72. result := false;
  73. end;
  74. function DeleteFile(const FileName: string) : Boolean;
  75. begin
  76. result := false;
  77. end;
  78. function RenameFile(const OldName, NewName: string): Boolean;
  79. begin
  80. result := false;
  81. end;
  82. (****** end of non portable routines ******)
  83. Function FileAge (Const FileName : String): Longint;
  84. begin
  85. result := -1;
  86. end;
  87. Function FileExists (Const FileName : String) : 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 : String) : Longint;
  103. begin
  104. result := -1;
  105. end;
  106. Function FileSetAttr (Const Filename : String; 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 GetCurrentDir : String;
  125. begin
  126. result := '';
  127. end;
  128. Function SetCurrentDir (Const NewDir : String) : Boolean;
  129. begin
  130. result := false;
  131. end;
  132. Function CreateDir (Const NewDir : String) : Boolean;
  133. begin
  134. result := false;
  135. end;
  136. Function RemoveDir (Const Dir : String) : Boolean;
  137. begin
  138. result := false;
  139. end;
  140. function DirectoryExists(const Directory: string): Boolean;
  141. begin
  142. result := false;
  143. end;
  144. {****************************************************************************
  145. Misc Functions
  146. ****************************************************************************}
  147. procedure Beep;
  148. begin
  149. end;
  150. {****************************************************************************
  151. Locale Functions
  152. ****************************************************************************}
  153. Procedure GetLocalTime(var SystemTime: TSystemTime);
  154. begin
  155. end ;
  156. function SysErrorMessage(ErrorCode: Integer): String;
  157. begin
  158. { Result:=StrError(ErrorCode);}
  159. result := '';
  160. end;
  161. {****************************************************************************
  162. OS utility functions
  163. ****************************************************************************}
  164. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  165. begin
  166. result := '';
  167. end;
  168. Function GetEnvironmentVariableCount : Integer;
  169. begin
  170. result := -1;
  171. end;
  172. Function GetEnvironmentString(Index : Integer) : String;
  173. begin
  174. result := '';
  175. end;
  176. function ExecuteProcess (const Path: AnsiString; const ComLine: AnsiString): integer;
  177. begin
  178. result := -1;
  179. end;
  180. function ExecuteProcess (const Path: AnsiString;
  181. const ComLine: array of AnsiString): integer;
  182. begin
  183. result := -1;
  184. end;
  185. {****************************************************************************
  186. Initialization code
  187. ****************************************************************************}
  188. Initialization
  189. InitExceptions;
  190. Finalization
  191. DoneExceptions;
  192. end.