filerec.inc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by the Free Pascal development team
  4. FileRec record definition
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {
  12. This file contains the definition of the filerec record.
  13. It is put separately, so it is available outside the system
  14. unit without sacrificing TP compatibility.
  15. }
  16. const
  17. {$ifdef CPUAVR}
  18. filerecnamelength = 15;
  19. {$else CPUAVR}
  20. filerecnamelength = 255;
  21. {$endif CPUAVR}
  22. type
  23. { using packed makes the compiler to generate ugly code on some CPUs, further
  24. using packed causes the compiler to handle arrays of text wrongly, see see tw0754 e.g. on arm }
  25. FileRec = {$ifdef VER2_6} packed {$endif} Record
  26. Handle : THandle;
  27. {$if defined(CPU8) or defined(CPU16)}
  28. Mode : Word;
  29. {$else}
  30. Mode : longint;
  31. {$endif}
  32. RecSize : SizeInt;
  33. _private : array[1..3 * SizeOf(SizeInt) + 5 * SizeOf (pointer)] of byte;
  34. UserData : array[1..32] of byte;
  35. name : array[0..filerecnamelength] of TFileTextRecChar;
  36. End;