textrec.inc 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. Textrec 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 textrec record.
  13. It is put separately, so it is available outside the system
  14. unit without sacrificing TP compatibility.
  15. }
  16. const
  17. TextRecNameLength = 256;
  18. TextRecBufSize = 256;
  19. type
  20. TLineEndStr = string [3];
  21. TextBuf = array[0..TextRecBufSize-1] of char;
  22. TextRec = Packed Record
  23. Handle : THandle;
  24. Mode : longint;
  25. bufsize : SizeInt;
  26. {$IFDEF FPC_LINEEND_IN_TEXTREC}
  27. _private : SizeInt;
  28. {$ELSE FPC_LINEEND_IN_TEXTREC}
  29. LineEnd : TLineEndStr;
  30. {$ENDIF FPC_LINEEND_IN_TEXTREC}
  31. bufpos,
  32. bufend : SizeInt;
  33. bufptr : ^textbuf;
  34. openfunc,
  35. inoutfunc,
  36. flushfunc,
  37. closefunc : pointer;
  38. {$ifndef FPC_HASUSERDATA32}
  39. UserData : array[1..16] of byte;
  40. {$else FPC_HASUSERDATA32}
  41. UserData : array[1..32] of byte;
  42. {$endif FPC_HASUSERDATA32}
  43. name : array[0..textrecnamelength-1] of char;
  44. {$IFDEF FPC_LINEEND_IN_TEXTREC}
  45. LineEnd : TLineEndStr;
  46. {$ENDIF FPC_LINEEND_IN_TEXTREC}
  47. buffer : textbuf;
  48. End;
  49. {
  50. $Log: textrec.inc,v $
  51. Revision 1.9 2005/02/26 15:42:45 florian
  52. * userdata in file/textrecs now 32 bytes
  53. Revision 1.8 2005/02/14 17:13:29 peter
  54. * truncate log
  55. }