textrec.inc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by the Free Pascal development team
  5. Textrec 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 textrec record.
  14. It is put separately, so it is available outside the system
  15. unit without sacrificing TP compatibility.
  16. }
  17. const
  18. TextRecNameLength = 256;
  19. TextRecBufSize = 256;
  20. type
  21. TLineEndStr = string [3];
  22. TextBuf = array[0..TextRecBufSize-1] of char;
  23. TextRec = Packed Record
  24. Handle : THandle;
  25. Mode : longint;
  26. bufsize : SizeInt;
  27. {$IFDEF FPC_LINEEND_IN_TEXTREC}
  28. _private : SizeInt;
  29. {$ELSE FPC_LINEEND_IN_TEXTREC}
  30. LineEnd : TLineEndStr;
  31. {$ENDIF FPC_LINEEND_IN_TEXTREC}
  32. bufpos,
  33. bufend : SizeInt;
  34. bufptr : ^textbuf;
  35. openfunc,
  36. inoutfunc,
  37. flushfunc,
  38. closefunc : pointer;
  39. UserData : array[1..16] of byte;
  40. name : array[0..textrecnamelength-1] of char;
  41. {$IFDEF FPC_LINEEND_IN_TEXTREC}
  42. LineEnd : TLineEndStr;
  43. {$ENDIF FPC_LINEEND_IN_TEXTREC}
  44. buffer : textbuf;
  45. End;
  46. {
  47. $Log$
  48. Revision 1.7 2004-09-21 23:36:51 hajny
  49. * SetTextLineEnding implemented, FileRec.Name position alignment for CPU64
  50. Revision 1.6 2004/05/18 20:16:23 peter
  51. * unix thandle is always 32bit
  52. * textrec fixed for 64bit
  53. Revision 1.5 2004/02/05 01:16:12 florian
  54. + completed x86-64/linux system unit
  55. Revision 1.4 2003/11/03 09:42:28 marco
  56. * Peter's Cardinal<->Longint fixes patch
  57. Revision 1.3 2002/09/07 15:07:46 peter
  58. * old logs removed and tabs fixed
  59. }