dos.pp 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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 Nintendo DS
  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. {$I dos.inc}
  33. {******************************************************************************
  34. --- Internal routines ---
  35. ******************************************************************************}
  36. function dosLock(const name: String; accessmode: Longint) : LongInt;
  37. begin
  38. result := -1;
  39. end;
  40. function IsLeapYear(Source : Word) : Boolean;
  41. begin
  42. result := false;
  43. end;
  44. function dosSetProtection(const name: string; mask:longint): Boolean;
  45. begin
  46. result := false;
  47. end;
  48. function dosSetFileDate(name: string): Boolean;
  49. begin
  50. result := false;
  51. end;
  52. {******************************************************************************
  53. --- Info / Date / Time ---
  54. ******************************************************************************}
  55. function DosVersion: Word;
  56. begin
  57. result := 0;
  58. end;
  59. procedure NewList ();
  60. begin
  61. end;
  62. function CreateExtIO (size: Longint): integer;
  63. begin
  64. result := -1;
  65. end;
  66. procedure DeleteExtIO ();
  67. begin
  68. end;
  69. function Createport(name : PChar; pri : longint): integer;
  70. begin
  71. result := -1;
  72. end;
  73. procedure DeletePort ();
  74. begin
  75. end;
  76. function Create_Timer(theUnit : longint) : integer;
  77. begin
  78. result := -1;
  79. end;
  80. Procedure Delete_Timer();
  81. begin
  82. end;
  83. function set_new_time(secs, micro : longint): longint;
  84. begin
  85. result := -1;
  86. end;
  87. function get_sys_time(): longint;
  88. begin
  89. result := -1;
  90. end;
  91. procedure GetDate(Var Year, Month, MDay, WDay: Word);
  92. begin
  93. end;
  94. procedure SetDate(Year, Month, Day: Word);
  95. begin
  96. end;
  97. procedure GetTime(Var Hour, Minute, Second, Sec100: Word);
  98. begin
  99. end;
  100. Procedure SetTime(Hour, Minute, Second, Sec100: Word);
  101. begin
  102. end;
  103. {******************************************************************************
  104. --- Exec ---
  105. ******************************************************************************}
  106. procedure Exec(const Path: PathStr; const ComLine: ComStr);
  107. begin
  108. end;
  109. {******************************************************************************
  110. --- Disk ---
  111. ******************************************************************************}
  112. Function DiskFree(Drive: Byte): int64;
  113. Begin
  114. result := -1;
  115. end;
  116. Function DiskSize(Drive: Byte): int64;
  117. Begin
  118. result := -1;
  119. end;
  120. procedure FindFirst(const Path: PathStr; Attr: Word; Var f: SearchRec);
  121. begin
  122. end;
  123. procedure FindNext(Var f: SearchRec);
  124. begin
  125. end;
  126. procedure FindClose(Var f: SearchRec);
  127. begin
  128. end;
  129. {******************************************************************************
  130. --- File ---
  131. ******************************************************************************}
  132. function FSearch(path: PathStr; dirlist: String) : PathStr;
  133. begin
  134. result := '';
  135. end;
  136. Procedure getftime (var f; var time : longint);
  137. begin
  138. end;
  139. Procedure setftime(var f; time : longint);
  140. Begin
  141. End;
  142. procedure getfattr(var f; var attr : word);
  143. begin
  144. End;
  145. procedure setfattr(var f; attr : word);
  146. begin
  147. end;
  148. {******************************************************************************
  149. --- Environment ---
  150. ******************************************************************************}
  151. function getpathstring: string;
  152. begin
  153. result := '';
  154. end;
  155. function EnvCount: Longint;
  156. begin
  157. result := -1;
  158. end;
  159. function EnvStr(Index: LongInt): String;
  160. begin
  161. result := '';
  162. end;
  163. function GetEnv(envvar : String): String;
  164. begin
  165. result := '';
  166. end;
  167. procedure AddDevice(str : String);
  168. begin
  169. end;
  170. function MakeDeviceName(str : pchar): string;
  171. begin
  172. result := '';
  173. end;
  174. function IsInDeviceList(str : string): boolean;
  175. begin
  176. result := false;
  177. end;
  178. procedure ReadInDevices;
  179. begin
  180. end;
  181. begin
  182. // DosError:=0;
  183. // numberofdevices := 0;
  184. // StrOfPaths := '';
  185. // ReadInDevices;
  186. end.