system.pp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. unit system;
  2. interface
  3. {$DEFINE FPCRTL_FILESYSTEM_SINGLE_BYTE_API}
  4. {$I systemh.inc}
  5. var
  6. argc:longint=0;
  7. argv:PPAnsiChar;
  8. envp:PPAnsiChar;
  9. implementation
  10. procedure _InitHeap(p: pdword; l: dword); external name 'InitHeap2';
  11. procedure _free(p: pointer); external name 'free2';
  12. function _malloc(l: dword): pointer; external name 'malloc2';
  13. const
  14. maxExitCode = 255;
  15. AllowDirectorySeparators : set of AnsiChar = ['\','/'];
  16. DirectorySeparator = '/';
  17. { Default filehandles }
  18. UnusedHandle = $ffff;{ instead of -1, as it is a word value}
  19. StdInputHandle = 0;
  20. StdOutputHandle = 1;
  21. StdErrorHandle = 2;
  22. CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
  23. DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCR;
  24. LineEnding = #10;
  25. PathSeparator = '/';
  26. MaxPathLen = 255;
  27. LFNSupport = true;
  28. FileNameCaseSensitive = true;
  29. sLineBreak = #13;
  30. {I ../mips/setjump.inc}
  31. {$I system.inc}
  32. procedure Randomize;
  33. begin
  34. randseed:= 1234;
  35. end;
  36. function GetProcessID: LongWord;
  37. begin
  38. result:= 0;
  39. end;
  40. function ParamCount: LongInt;
  41. begin
  42. ParamCount:= 0;
  43. end;
  44. function ParamStr(l: LongInt): ShortString;
  45. begin
  46. result:='';
  47. end;
  48. procedure SysInitStdIO;
  49. begin
  50. end;
  51. function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
  52. begin
  53. result:= stklen;
  54. end;
  55. procedure system_exit;
  56. begin
  57. repeat
  58. until false;
  59. end;
  60. begin
  61. InOutRes:= 0;
  62. _InitHeap(pdword($800F8000), $00100000);
  63. end.