textrec.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. 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. {$ifdef linux}
  18. textrecnamelength = 255;
  19. {$else}
  20. {$ifdef Win32}
  21. textrecnamelength = 255;
  22. {$else}
  23. textrecnamelength = 79;
  24. {$endif}
  25. {$endif}
  26. type
  27. textbuf = array[0..127] of char;
  28. {$PACKRECORDS 2}
  29. textrec = record
  30. {$ifdef win32}
  31. handle : longint;
  32. {$else win32}
  33. handle : word;
  34. {$endif win32}
  35. mode : word;
  36. bufsize,
  37. _private,
  38. bufpos,
  39. bufend : word;
  40. bufptr : ^textbuf;
  41. openfunc,
  42. inoutfunc,
  43. flushfunc,
  44. closefunc : pointer;
  45. userdata : array[1..16] of byte;
  46. name : array[0..textrecnamelength] of char;
  47. buffer : textbuf;
  48. end;
  49. {
  50. $Log$
  51. Revision 1.1 1998-03-25 11:18:43 root
  52. Initial revision
  53. Revision 1.9 1998/02/05 12:08:55 pierre
  54. * added packrecords to about dword alignment
  55. for structures used in dos calls
  56. Revision 1.8 1998/01/26 12:00:01 michael
  57. + Added log at the end
  58. Working file: rtl/inc/textrec.inc
  59. description:
  60. ----------------------------
  61. revision 1.7
  62. date: 1998/01/06 00:29:33; author: michael; state: Exp; lines: +21 -23
  63. Implemented a system independent sequence of reset/rewrite/append fileopenfunc etc system \n (from Peter Vreman)
  64. ----------------------------
  65. revision 1.6
  66. date: 1997/12/01 12:08:06; author: michael; state: Exp; lines: +13 -0
  67. + added copyright reference header.
  68. ----------------------------
  69. revision 1.5
  70. date: 1997/11/28 19:45:22; author: pierre; state: Exp; lines: +13 -9
  71. * one more bug fix with namelength
  72. + fixed math in fixed_math define (does not compile yet)
  73. ----------------------------
  74. revision 1.4
  75. date: 1997/11/28 19:15:50; author: pierre; state: Exp; lines: +0 -3
  76. * forgot to remove the const statement
  77. ----------------------------
  78. revision 1.3
  79. date: 1997/11/28 18:56:17; author: pierre; state: Exp; lines: +9 -10
  80. bug fix in ifdef win32
  81. ----------------------------
  82. revision 1.2
  83. date: 1997/11/27 22:49:05; author: florian; state: Exp; lines: +4 -0
  84. - CPU.PP added
  85. - some bugs in DOS fixed (espsecially for go32v1)
  86. - the win32 system unit is now compilable
  87. ----------------------------
  88. revision 1.1
  89. date: 1997/11/27 08:33:47; author: michael; state: Exp;
  90. Initial revision
  91. ----------------------------
  92. revision 1.1.1.1
  93. date: 1997/11/27 08:33:47; author: michael; state: Exp; lines: +0 -0
  94. FPC RTL CVS start
  95. =============================================================================
  96. }