]> gcc.gnu.org Git - gcc.git/blob - libchill/ioerror.h
* Add library exception clause to the copyright notice for all
[gcc.git] / libchill / ioerror.h
1 /* Implement Input/Output runtime actions for CHILL.
2 Copyright (C) 1992,1993 Free Software Foundation, Inc.
3 Author: Wilfried Moser, et al
4
5 This file is part of GNU CC.
6
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)
10 any later version.
11
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.
16
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. */
20
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. */
27
28 #ifndef _ioerror_h_
29 #define _ioerror_h_
30
31 #include <setjmp.h>
32
33 /* Note: numbers must be in the same order as
34 strings in ioerror.c */
35 typedef enum
36 { NOTASSOCIATED = 1,
37 ASSOCIATEFAIL,
38 CREATEFAIL,
39 DELETEFAIL,
40 MODIFYFAIL,
41 CONNECTFAIL,
42 NOTCONNECTED,
43 EMPTY,
44 RANGEFAIL,
45 SPACEFAIL,
46 READFAIL,
47 WRITEFAIL,
48 TEXTFAIL
49 } io_exceptions_t;
50
51 #ifndef FIRST_IO_ERROR_NUMBER
52 #define FIRST_IO_ERROR_NUMBER 0
53 #endif
54
55 typedef enum {
56 FIRST_AND_UNUSED = FIRST_IO_ERROR_NUMBER,
57 INTERNAL_ERROR,
58 INVALID_IO_LIST,
59 REPFAC_OVERFLOW,
60 CLAUSE_WIDTH_OVERFLOW,
61 UNMATCHED_CLOSING_PAREN,
62 UNMATCHED_OPENING_PAREN,
63 BAD_FORMAT_SPEC_CHAR,
64 NO_PAD_CHAR,
65 IO_CONTROL_NOT_VALID,
66 DUPLICATE_QUALIFIER,
67 NO_FRACTION_WIDTH,
68 NO_EXPONENT_WIDTH,
69 FRACTION_WIDTH_OVERFLOW,
70 EXPONENT_WIDTH_OVERFLOW,
71 NO_FRACTION,
72 NO_EXPONENT,
73 NEGATIVE_FIELD_WIDTH,
74 TEXT_LOC_OVERFLOW,
75 IOLIST_EXHAUSTED,
76 CONVCODE_MODE_MISFIT,
77 SET_CONVERSION_ERROR,
78 BOOL_CONVERSION_ERROR,
79 NON_INT_FIELD_WIDTH,
80 EXCESS_IOLIST_ELEMENTS,
81 NOT_ENOUGH_CHARS,
82 NO_CHARS_FOR_INT,
83 NO_CHARS_FOR_FLOAT,
84 NO_EXPONENT_VAL,
85 INT_VAL_OVERFLOW,
86 REAL_OVERFLOW,
87 NO_DIGITS_FOR_INT,
88 NO_DIGITS_FOR_FLOAT,
89 NO_CHARS_FOR_SET,
90 NO_CHARS_FOR_CHAR,
91 NO_CHARS_FOR_BOOLS,
92 NO_CHARS_FOR_CHARS,
93 NO_CHARS_FOR_TEXT,
94 NO_CHARS_FOR_EDIT,
95 NO_SPACE_TO_SKIP,
96 FORMAT_TEXT_MISMATCH,
97 INTEGER_RANGE_ERROR,
98 SET_RANGE_ERROR,
99 CHAR_RANGE_ERROR,
100 INVALID_CHAR,
101 /* end of formatting errors */
102 NULL_ASSOCIATION,
103 NULL_ACCESS,
104 NULL_TEXT,
105 IS_NOT_ASSOCIATED,
106 IS_ASSOCIATED,
107 GETCWD_FAILS,
108 INVALID_ASSOCIATION_MODE,
109 FILE_EXISTING,
110 CREATE_FAILS,
111 DELETE_FAILS,
112 RENAME_FAILS,
113 IMPL_RESTRICTION,
114 NOT_EXISTING,
115 NOT_READABLE,
116 NOT_WRITEABLE,
117 NOT_INDEXABLE,
118 NOT_SEQUENCIBLE,
119 NO_CURRENT_POS,
120 NOT_VARIABLE,
121 NOT_FIXED,
122 NOT_INDEXED,
123 LENGTH_CHANGE,
124 LSEEK_FAILS,
125 BUFFER_ALLOC,
126 OPEN_FAILS,
127 NO_ACCESS_SUBLOCATION,
128 BAD_INDEX,
129 IS_NOT_CONNECTED,
130 NO_PATH_NAME,
131 PATHNAME_ALLOC,
132 BAD_USAGE,
133 OUT_OF_FILE,
134 NULL_STORE_LOC,
135 STORE_LOC_ALLOC,
136 OS_IO_ERROR,
137 RECORD_TOO_LONG,
138 RECORD_TOO_SHORT,
139 BAD_TEXTINDEX,
140 NULL_TEXTREC
141 } io_info_word_t;
142
143
144 extern
145 char* io_info_text [];
146
147 extern
148 char* exc_text [];
149
150 extern
151 jmp_buf __io_exception;
152
153 extern
154 jmp_buf __rw_exception;
155
156 void __cause_exception (char *ex, char* f, int line, int info);
157 extern char * __IO_exception_names[];
158
159 #define IOEXCEPTION(EXC,INFO) \
160 longjmp( __io_exception, (EXC<<16) + INFO )
161
162 #define RWEXCEPTION(EXC,INFO) \
163 longjmp( __rw_exception, (EXC<<16) + INFO )
164
165 #define CHILLEXCEPTION(FILE,LINE,EXC,INFO) \
166 __cause_exception (__IO_exception_names[EXC], FILE, LINE, INFO);
167
168 #endif
This page took 0.044077 seconds and 5 git commands to generate.