2
0

dos.pp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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. {$IFNDEF FPC_DOTTEDUNITS}
  18. unit Dos;
  19. {$ENDIF FPC_DOTTEDUNITS}
  20. interface
  21. {$MODE objfpc}
  22. type
  23. SearchRec = Packed Record
  24. AnchorPtr : Pointer; { Pointer to the Anchorpath structure }
  25. Fill: Array[1..15] of Byte; {future use}
  26. {End of replacement for fill}
  27. Attr : BYTE; {attribute of found file}
  28. Time : LongInt; {last modify date of found file}
  29. Size : LongInt; {file size of found file}
  30. Name : String[255]; {name of found file}
  31. End;
  32. {$I dosh.inc}
  33. implementation
  34. {$define HAS_GETMSCOUNT}
  35. {$I dos.inc}
  36. {******************************************************************************
  37. --- Internal routines ---
  38. ******************************************************************************}
  39. function dosLock(const name: String; accessmode: Longint) : LongInt;
  40. begin
  41. result := -1;
  42. end;
  43. function IsLeapYear(Source : Word) : Boolean;
  44. begin
  45. result := false;
  46. end;
  47. function dosSetProtection(const name: string; mask:longint): Boolean;
  48. begin
  49. result := false;
  50. end;
  51. function dosSetFileDate(name: string): Boolean;
  52. begin
  53. result := false;
  54. end;
  55. {******************************************************************************
  56. --- Info / Date / Time ---
  57. ******************************************************************************}
  58. function DosVersion: Word;
  59. begin
  60. result := 0;
  61. end;
  62. procedure NewList ();
  63. begin
  64. end;
  65. function CreateExtIO (size: Longint): integer;
  66. begin
  67. result := -1;
  68. end;
  69. procedure DeleteExtIO ();
  70. begin
  71. end;
  72. function Createport(name : PAnsiChar; pri : longint): integer;
  73. begin
  74. result := -1;
  75. end;
  76. procedure DeletePort ();
  77. begin
  78. end;
  79. function Create_Timer(theUnit : longint) : integer;
  80. begin
  81. result := -1;
  82. end;
  83. Procedure Delete_Timer();
  84. begin
  85. end;
  86. function set_new_time(secs, micro : longint): longint;
  87. begin
  88. result := -1;
  89. end;
  90. function get_sys_time(): longint;
  91. begin
  92. result := -1;
  93. end;
  94. procedure GetDate(Var Year, Month, MDay, WDay: Word);
  95. begin
  96. Year := 0;
  97. Month := 0;
  98. MDay := 0;
  99. WDay := 0;
  100. end;
  101. procedure SetDate(Year, Month, Day: Word);
  102. begin
  103. end;
  104. procedure GetTime(Var Hour, Minute, Second, Sec100: Word);
  105. begin
  106. Hour := 0;
  107. Minute := 0;
  108. Second := 0;
  109. Sec100 := 0;
  110. end;
  111. Procedure SetTime(Hour, Minute, Second, Sec100: Word);
  112. begin
  113. end;
  114. function GetMsCount: int64;
  115. begin
  116. result:=0;
  117. end;
  118. {******************************************************************************
  119. --- Exec ---
  120. ******************************************************************************}
  121. procedure Exec(const Path: PathStr; const ComLine: ComStr);
  122. begin
  123. end;
  124. {******************************************************************************
  125. --- Disk ---
  126. ******************************************************************************}
  127. Function DiskFree(Drive: Byte): int64;
  128. Begin
  129. result := -1;
  130. end;
  131. Function DiskSize(Drive: Byte): int64;
  132. Begin
  133. result := -1;
  134. end;
  135. procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
  136. begin
  137. DosError:=18;
  138. end;
  139. procedure FindNext(Var f: SearchRec);
  140. begin
  141. DosError:=18;
  142. end;
  143. procedure FindClose(Var f: SearchRec);
  144. begin
  145. DosError:=18;
  146. end;
  147. {******************************************************************************
  148. --- File ---
  149. ******************************************************************************}
  150. function FSearch(path: PathStr; dirlist: String) : PathStr;
  151. begin
  152. result := '';
  153. end;
  154. Procedure getftime (var f; var time : longint);
  155. begin
  156. end;
  157. Procedure setftime(var f; time : longint);
  158. Begin
  159. End;
  160. procedure getfattr(var f; var attr : word);
  161. begin
  162. End;
  163. procedure setfattr(var f; attr : word);
  164. begin
  165. end;
  166. {******************************************************************************
  167. --- Environment ---
  168. ******************************************************************************}
  169. function getpathstring: string;
  170. begin
  171. result := '';
  172. end;
  173. function EnvCount: Longint;
  174. begin
  175. result := -1;
  176. end;
  177. function EnvStr(Index: LongInt): String;
  178. begin
  179. result := '';
  180. end;
  181. function GetEnv(envvar : String): String;
  182. begin
  183. result := '';
  184. end;
  185. procedure AddDevice(str : String);
  186. begin
  187. end;
  188. function MakeDeviceName(str : PAnsiChar): string;
  189. begin
  190. result := '';
  191. end;
  192. function IsInDeviceList(str : string): boolean;
  193. begin
  194. result := false;
  195. end;
  196. procedure ReadInDevices;
  197. begin
  198. end;
  199. begin
  200. // DosError:=0;
  201. // numberofdevices := 0;
  202. // StrOfPaths := '';
  203. // ReadInDevices;
  204. end.