2
0

dos.pp 5.3 KB

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