dos.pp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 by Karoly Balogh for Genesi S.a.r.l.
  4. Heavily based on the Commodore Amiga/m68k RTL by Nils Sjoholm and
  5. Carl Eric Codere
  6. MorphOS port was done on a free Pegasos II/G4 machine
  7. provided by Genesi S.a.r.l. <www.genesi.lu>
  8. This unit is based on the MorphOS one and is adapted for Gameboy Advance
  9. simply by stripping out all stuff inside funcs and procs.
  10. Copyright (c) 2006 by Francesco Lombardi
  11. See the file COPYING.FPC, included in this distribution,
  12. for details about the copyright.
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. **********************************************************************}
  17. unit Dos;
  18. interface
  19. {$MODE objfpc}
  20. type
  21. SearchRec = Packed Record
  22. AnchorPtr : Pointer; { Pointer to the Anchorpath structure }
  23. Fill: Array[1..15] of Byte; {future use}
  24. {End of replacement for fill}
  25. Attr : BYTE; {attribute of found file}
  26. Time : LongInt; {last modify date of found file}
  27. Size : LongInt; {file size of found file}
  28. Name : String[255]; {name of found file}
  29. End;
  30. {$I dosh.inc}
  31. implementation
  32. {$define HAS_GETMSCOUNT}
  33. {$I dos.inc}
  34. {******************************************************************************
  35. --- Internal routines ---
  36. ******************************************************************************}
  37. function dosLock(const name: String; accessmode: Longint) : LongInt;
  38. begin
  39. result := -1;
  40. end;
  41. function IsLeapYear(Source : Word) : Boolean;
  42. begin
  43. result := false;
  44. end;
  45. function dosSetProtection(const name: string; mask:longint): Boolean;
  46. begin
  47. result := false;
  48. end;
  49. function dosSetFileDate(name: string): Boolean;
  50. begin
  51. result := false;
  52. end;
  53. {******************************************************************************
  54. --- Info / Date / Time ---
  55. ******************************************************************************}
  56. function DosVersion: Word;
  57. begin
  58. result := 0;
  59. end;
  60. procedure NewList ();
  61. begin
  62. end;
  63. function CreateExtIO (size: Longint): integer;
  64. begin
  65. result := -1;
  66. end;
  67. procedure DeleteExtIO ();
  68. begin
  69. end;
  70. function Createport(name : PChar; pri : longint): integer;
  71. begin
  72. result := -1;
  73. end;
  74. procedure DeletePort ();
  75. begin
  76. end;
  77. function Create_Timer(theUnit : longint) : integer;
  78. begin
  79. result := -1;
  80. end;
  81. Procedure Delete_Timer();
  82. begin
  83. end;
  84. function set_new_time(secs, micro : longint): longint;
  85. begin
  86. result := -1;
  87. end;
  88. function get_sys_time(): longint;
  89. begin
  90. result := -1;
  91. end;
  92. procedure GetDate(Var Year, Month, MDay, WDay: Word);
  93. begin
  94. Year := 0;
  95. Month := 0;
  96. MDay := 0;
  97. WDay := 0;
  98. end;
  99. procedure SetDate(Year, Month, Day: Word);
  100. begin
  101. end;
  102. procedure GetTime(Var Hour, Minute, Second, Sec100: Word);
  103. begin
  104. Hour := 0;
  105. Minute := 0;
  106. Second := 0;
  107. Sec100 := 0;
  108. end;
  109. Procedure SetTime(Hour, Minute, Second, Sec100: Word);
  110. begin
  111. end;
  112. function GetMsCount: int64;
  113. begin
  114. result:=0;
  115. end;
  116. {******************************************************************************
  117. --- Exec ---
  118. ******************************************************************************}
  119. procedure Exec(const Path: PathStr; const ComLine: ComStr);
  120. begin
  121. end;
  122. {******************************************************************************
  123. --- Disk ---
  124. ******************************************************************************}
  125. Function DiskFree(Drive: Byte): int64;
  126. Begin
  127. result := -1;
  128. end;
  129. Function DiskSize(Drive: Byte): int64;
  130. Begin
  131. result := -1;
  132. end;
  133. procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
  134. begin
  135. DosError:=18;
  136. end;
  137. procedure FindNext(Var f: SearchRec);
  138. begin
  139. DosError:=18;
  140. end;
  141. procedure FindClose(Var f: SearchRec);
  142. begin
  143. DosError:=18;
  144. end;
  145. {******************************************************************************
  146. --- File ---
  147. ******************************************************************************}
  148. function FSearch(path: PathStr; dirlist: String) : PathStr;
  149. begin
  150. result := '';
  151. end;
  152. Procedure getftime (var f; var time : longint);
  153. begin
  154. end;
  155. Procedure setftime(var f; time : longint);
  156. Begin
  157. End;
  158. procedure getfattr(var f; var attr : word);
  159. begin
  160. End;
  161. procedure setfattr(var f; attr : word);
  162. begin
  163. end;
  164. {******************************************************************************
  165. --- Environment ---
  166. ******************************************************************************}
  167. function getpathstring: string;
  168. begin
  169. result := '';
  170. end;
  171. function EnvCount: Longint;
  172. begin
  173. result := -1;
  174. end;
  175. function EnvStr(Index: LongInt): String;
  176. begin
  177. result := '';
  178. end;
  179. function GetEnv(envvar : String): String;
  180. begin
  181. result := '';
  182. end;
  183. procedure AddDevice(str : String);
  184. begin
  185. end;
  186. function MakeDeviceName(str : pchar): string;
  187. begin
  188. result := '';
  189. end;
  190. function IsInDeviceList(str : string): boolean;
  191. begin
  192. result := false;
  193. end;
  194. procedure ReadInDevices;
  195. begin
  196. end;
  197. begin
  198. // DosError:=0;
  199. // numberofdevices := 0;
  200. // StrOfPaths := '';
  201. // ReadInDevices;
  202. end.