1 /* Implement Input/Output runtime actions for CHILL.
2 Copyright (C) 1992,1993 Free Software Foundation, Inc.
3 Author: Wilfried Moser, et al
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* As a special exception, if you link this library with other files,
23 some of which are compiled with GCC, to produce an executable,
24 this library does not by itself cause the resulting executable
25 to be covered by the GNU General Public License.
26 This exception does not however invalidate any other reasons why
27 the executable file might be covered by the GNU General Public License. */
34 typedef enum { ReadOnly
, WriteOnly
, ReadWrite
37 typedef enum { First
, Same
, Last
40 typedef enum { None
, Fixed
, VaryingChars
43 /* association flags */
44 #define IO_ISASSOCIATED 0x00000001
45 #define IO_EXISTING 0x00000002
46 #define IO_READABLE 0x00000004
47 #define IO_WRITEABLE 0x00000008
48 #define IO_INDEXABLE 0x00000010
49 #define IO_SEQUENCIBLE 0x00000020
50 #define IO_VARIABLE 0x00000040
51 #define IO_FIRSTLINE 0x00000100
52 #define IO_FORCE_PAGE 0x00000200
56 #define READBUFLEN 512
64 typedef struct Association_Mode
{
65 unsigned long flags
; /* INIT = 0 */
67 struct Access_Mode
* access
;
77 rectype indexed max. reclength act. reclength
78 ---------------------------------------------------
80 Fixed T/F SIZE(recmode) = SIZE(recmode)
81 Varying F SIZE(recmode) >= length
84 /* access/text flags */
85 #define IO_TEXTLOCATION 0x80000000
86 #define IO_INDEXED 0x00000001
87 #define IO_TEXTIO 0x00000002
88 #define IO_OUTOFFILE 0x00010000
90 typedef struct Access_Mode
{
91 unsigned long flags
; /* INIT */
92 unsigned long reclength
; /* INIT */
93 signed long lowindex
; /* INIT */
94 signed long highindex
; /* INIT */
95 Association_Mode
* association
;
98 Record_t rectype
; /* INIT */
101 typedef struct Text_Mode
{
102 unsigned long flags
; /* INIT */
103 VarString
* text_record
; /* INIT */
104 Access_Mode
* access_sub
; /* INIT */
105 unsigned long actual_index
;
161 } __tmp_IO_enum_table_type
;
166 __tmp_IO_enum_table_type
* name_table
;
174 } __tmp_IO_charrange
;
194 } __tmp_RIO_boolrange
;
200 __tmp_IO_enum_table_type
* name_table
;
207 __tmp_IO_enum_table_type
* name_table
;
210 } __tmp_RIO_setrange
;
216 } __tmp_IO_charstring
;
221 unsigned char __valubyte
;
223 unsigned short __valuint
;
225 unsigned long __valulong
;
227 __tmp_IO_intrange __locintrange
;
229 unsigned char __valbool
;
230 unsigned char* __locbool
;
231 __tmp_RIO_boolrange __locboolrange
;
233 __tmp_WIO_set __valset
;
234 __tmp_RIO_set __locset
;
235 __tmp_RIO_setrange __locsetrange
;
237 unsigned char __valchar
;
238 unsigned char* __locchar
;
239 __tmp_IO_charrange __loccharrange
;
241 __tmp_IO_charstring __loccharstring
;
245 double __vallongreal
;
246 double* __loclongreal
;
250 * CAUTION: The longest variant of __tmp_IO_union is 5 words long.
251 * Together with __descr this caters for double alignment where required.
256 __tmp_IO_enum __descr
;