sysutils.pp 5.4 KB

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