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