dos.pp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. end;
  95. procedure SetDate(Year, Month, Day: Word);
  96. begin
  97. end;
  98. procedure GetTime(Var Hour, Minute, Second, Sec100: Word);
  99. begin
  100. end;
  101. Procedure SetTime(Hour, Minute, Second, Sec100: Word);
  102. begin
  103. end;
  104. function GetMsCount: int64;
  105. begin
  106. result:=0;
  107. end;
  108. {******************************************************************************
  109. --- Exec ---
  110. ******************************************************************************}
  111. procedure Exec(const Path: PathStr; const ComLine: ComStr);
  112. begin
  113. end;
  114. {******************************************************************************
  115. --- Disk ---
  116. ******************************************************************************}
  117. Function DiskFree(Drive: Byte): int64;
  118. Begin
  119. result := -1;
  120. end;
  121. Function DiskSize(Drive: Byte): int64;
  122. Begin
  123. result := -1;
  124. end;
  125. procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
  126. begin
  127. end;
  128. procedure FindNext(Var f: SearchRec);
  129. begin
  130. end;
  131. procedure FindClose(Var f: SearchRec);
  132. begin
  133. end;
  134. {******************************************************************************
  135. --- File ---
  136. ******************************************************************************}
  137. function FSearch(path: PathStr; dirlist: String) : PathStr;
  138. begin
  139. result := '';
  140. end;
  141. Procedure getftime (var f; var time : longint);
  142. begin
  143. end;
  144. Procedure setftime(var f; time : longint);
  145. Begin
  146. End;
  147. procedure getfattr(var f; var attr : word);
  148. begin
  149. End;
  150. procedure setfattr(var f; attr : word);
  151. begin
  152. end;
  153. {******************************************************************************
  154. --- Environment ---
  155. ******************************************************************************}
  156. function getpathstring: string;
  157. begin
  158. result := '';
  159. end;
  160. function EnvCount: Longint;
  161. begin
  162. result := -1;
  163. end;
  164. function EnvStr(Index: LongInt): String;
  165. begin
  166. result := '';
  167. end;
  168. function GetEnv(envvar : String): String;
  169. begin
  170. result := '';
  171. end;
  172. procedure AddDevice(str : String);
  173. begin
  174. end;
  175. function MakeDeviceName(str : pchar): string;
  176. begin
  177. result := '';
  178. end;
  179. function IsInDeviceList(str : string): boolean;
  180. begin
  181. result := false;
  182. end;
  183. procedure ReadInDevices;
  184. begin
  185. end;
  186. begin
  187. // DosError:=0;
  188. // numberofdevices := 0;
  189. // StrOfPaths := '';
  190. // ReadInDevices;
  191. end.