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, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* As a special exception, if you link this library with other files,
22 some of which are compiled with GCC, to produce an executable,
23 this library does not by itself cause the resulting executable
24 to be covered by the GNU General Public License.
25 This exception does not however invalidate any other reasons why
26 the executable file might be covered by the GNU General Public License. */
33 typedef enum { ReadOnly, WriteOnly, ReadWrite
36 typedef enum { First, Same, Last
39 typedef enum { None, Fixed, VaryingChars
42 /* association flags */
43 #define IO_ISASSOCIATED 0x00000001
44 #define IO_EXISTING 0x00000002
45 #define IO_READABLE 0x00000004
46 #define IO_WRITEABLE 0x00000008
47 #define IO_INDEXABLE 0x00000010
48 #define IO_SEQUENCIBLE 0x00000020
49 #define IO_VARIABLE 0x00000040
50 #define IO_FIRSTLINE 0x00000100
51 #define IO_FORCE_PAGE 0x00000200
55 #define READBUFLEN 512
63 typedef struct Association_Mode {
64 unsigned long flags; /* INIT = 0 */
66 struct Access_Mode* access;
76 rectype indexed max. reclength act. reclength
77 ---------------------------------------------------
79 Fixed T/F SIZE(recmode) = SIZE(recmode)
80 Varying F SIZE(recmode) >= length
83 /* access/text flags */
84 #define IO_TEXTLOCATION 0x80000000
85 #define IO_INDEXED 0x00000001
86 #define IO_TEXTIO 0x00000002
87 #define IO_OUTOFFILE 0x00010000
89 typedef struct Access_Mode {
90 unsigned long flags; /* INIT */
91 unsigned long reclength; /* INIT */
92 signed long lowindex; /* INIT */
93 signed long highindex; /* INIT */
94 Association_Mode* association;
97 Record_t rectype; /* INIT */
100 typedef struct Text_Mode {
101 unsigned long flags; /* INIT */
102 VarString* text_record; /* INIT */
103 Access_Mode* access_sub; /* INIT */
104 unsigned long actual_index;
160 } __tmp_IO_enum_table_type;
165 __tmp_IO_enum_table_type* name_table;
173 } __tmp_IO_charrange;
193 } __tmp_RIO_boolrange;
199 __tmp_IO_enum_table_type* name_table;
206 __tmp_IO_enum_table_type* name_table;
209 } __tmp_RIO_setrange;
215 } __tmp_IO_charstring;
220 unsigned char __valubyte;
222 unsigned short __valuint;
224 unsigned long __valulong;
226 __tmp_IO_intrange __locintrange;
228 unsigned char __valbool;
229 unsigned char* __locbool;
230 __tmp_RIO_boolrange __locboolrange;
232 __tmp_WIO_set __valset;
233 __tmp_RIO_set __locset;
234 __tmp_RIO_setrange __locsetrange;
236 unsigned char __valchar;
237 unsigned char* __locchar;
238 __tmp_IO_charrange __loccharrange;
240 __tmp_IO_charstring __loccharstring;
244 double __vallongreal;
245 double* __loclongreal;
249 * CAUTION: The longest variant of __tmp_IO_union is 5 words long.
250 * Together with __descr this caters for double alignment where required.
255 __tmp_IO_enum __descr;