system.pp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$define PALMOS}
  13. {$ASMMODE DIRECT}
  14. unit {$ifdef VER1_0}syspalm{$else}system{$endif};
  15. {$I os.inc}
  16. Interface
  17. {Platform specific information}
  18. const
  19. LineEnding = #10;
  20. LFNSupport = false;
  21. DirectorySeparator = '/';
  22. DriveSeparator = ':';
  23. PathSeparator = ';';
  24. FileNameCaseSensitive = false;
  25. CtrlZMarksEOF: boolean = false; (* #26 not considered as end of file *)
  26. maxExitCode = 255; {$ERROR TODO: CONFIRM THIS}
  27. MaxPathLen = 256;
  28. Type
  29. { type and constant declartions doesn't hurt }
  30. LongInt = $80000000..$7fffffff;
  31. Integer = -32768..32767;
  32. ShortInt = -128..127;
  33. Byte = 0..255;
  34. Word = 0..65535;
  35. { !!!!
  36. DWord = Cardinal;
  37. LongWord = Cardinal;
  38. }
  39. { The Cardinal data type isn't currently implemented for the m68k }
  40. DWord = LongInt;
  41. LongWord = LongInt;
  42. { Zero - terminated strings }
  43. PChar = ^Char;
  44. PPChar = ^PChar;
  45. { procedure type }
  46. TProcedure = Procedure;
  47. const
  48. { max. values for longint and int }
  49. MaxLongint = High(LongInt);
  50. MaxInt = High(Integer);
  51. { Must be determined at startup for both }
  52. Test68000 : byte = 0;
  53. Test68881 : byte = 0;
  54. { Palm specific data types }
  55. type
  56. Ptr = ^Char;
  57. var
  58. ExitCode : DWord;
  59. { this variables are passed to PilotMain by the PalmOS }
  60. cmd : Word;
  61. cmdPBP : Ptr;
  62. launchFlags : Word;
  63. implementation
  64. { mimic the C start code }
  65. function PilotMain(_cmd : Word;_cmdPBP : Ptr;_launchFlags : Word) : DWord;cdecl;public;
  66. begin
  67. cmd:=_cmd;
  68. cmdPBP:=_cmdPBP;
  69. launchFlags:=_launchFlags;
  70. asm
  71. bsr PASCALMAIN
  72. end;
  73. PilotMain:=ExitCode;
  74. end;
  75. {*****************************************************************************
  76. System Dependent Exit code
  77. *****************************************************************************}
  78. Procedure system_exit;
  79. begin
  80. end;
  81. function GetProcessID: SizeUInt;
  82. begin
  83. GetProcessID := 1;
  84. end;
  85. begin
  86. ExitCode:=0;
  87. end.
  88. {
  89. $Log$
  90. Revision 1.9 2005-05-12 20:29:04 michael
  91. + Added maxpathlen constant (maximum length of filename path)
  92. Revision 1.8 2005/04/03 21:10:59 hajny
  93. * EOF_CTRLZ conditional define replaced with CtrlZMarksEOF, #26 handling made more consistent (fix for bug 2453)
  94. Revision 1.7 2005/02/14 17:13:31 peter
  95. * truncate log
  96. }