system.pp 1.6 KB

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