filerec.inc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by the Free Pascal development team
  5. FileRec record definition
  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. {
  13. This file contains the definition of the filerec record.
  14. It is put separately, so it is available outside the system
  15. unit without sacrificing TP compatibility.
  16. }
  17. {$ifndef VER0_99_5}
  18. {$ifndef VER0_99_6}
  19. {$define UNIFORM_FILEREC}
  20. {$endif}
  21. {$endif}
  22. {$ifdef UNIFORM_FILEREC}
  23. const
  24. filerecnamelength = 255;
  25. type
  26. FileRec = Packed Record
  27. Handle,
  28. Mode,
  29. RecSize : longint;
  30. _private : array[1..32] of byte;
  31. UserData : array[1..16] of byte;
  32. name : array[0..filerecnamelength] of char;
  33. End;
  34. {$else UNIFORM_FILEREC}
  35. {**********************************
  36. Old style for 0.99.5/0.99.6
  37. **********************************}
  38. const
  39. {$ifdef linux}
  40. filerecnamelength = 255;
  41. {$endif}
  42. {$ifdef Win32}
  43. filerecnamelength = 255;
  44. {$endif}
  45. {$ifdef MACOS}
  46. filerecnamelength = 255;
  47. {$endif}
  48. {$ifdef AMIGA}
  49. filerecnamelength = 255;
  50. {$endif}
  51. {$ifdef OS2}
  52. filerecnamelength = 79;
  53. {$endif}
  54. {$ifdef GO32V2}
  55. filerecnamelength = 79;
  56. {$endif GO32V2}
  57. {$ifdef GO32V1}
  58. filerecnamelength = 79;
  59. {$endif Go32v1}
  60. {$ifdef ATARI}
  61. filerecnamelength = 79;
  62. {$endif}
  63. Type
  64. {$PACKRECORDS 2}
  65. FileRec = Record
  66. {$ifdef win32}
  67. handle : longint;
  68. {$endif win32}
  69. {$ifdef amiga}
  70. handle : longint;
  71. {$endif amiga}
  72. {$ifdef macos}
  73. handle : longint;
  74. {$endif macos}
  75. {$ifdef linux}
  76. handle : word;
  77. {$endif}
  78. {$ifdef go32v1}
  79. handle : word;
  80. {$endif go32v1}
  81. {$ifdef go32v2}
  82. handle : word;
  83. {$endif go32v2}
  84. {$ifdef atari}
  85. handle : word;
  86. {$endif atari}
  87. {$ifdef os2}
  88. handle : word;
  89. {$endif os2}
  90. Mode : word;
  91. RecSize : word;
  92. _private : array[1..26] of byte;
  93. UserData : array[1..16] of byte;
  94. name : array[0..filerecnamelength] of char;
  95. End;
  96. {$endif UNIFORM_FILEREC}
  97. {
  98. $Log$
  99. Revision 1.4 1998-09-04 18:16:13 peter
  100. * uniform filerec/textrec (with recsize:longint and name:0..255)
  101. Revision 1.3 1998/05/21 11:55:59 carl
  102. * works with all OS
  103. }