]> gcc.gnu.org Git - gcc.git/blame - libchill/ioerror.h
* cpplib.c (do_pragma): Accept #pragma without consecutive token.
[gcc.git] / libchill / ioerror.h
CommitLineData
b79f73df
JL
1/* Implement Input/Output runtime actions for CHILL.
2 Copyright (C) 1992,1993 Free Software Foundation, Inc.
3 Author: Wilfried Moser, et al
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU CC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU CC; see the file COPYING. If not, write to
201853b4
JL
19the Free Software Foundation, 59 Temple Place - Suite 330,
20Boston, MA 02111-1307, USA. */
b79f73df 21
502b941f
JL
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. */
28
b79f73df
JL
29#ifndef _ioerror_h_
30#define _ioerror_h_
31
32#include <setjmp.h>
33
34/* Note: numbers must be in the same order as
35 strings in ioerror.c */
36typedef enum
37{ NOTASSOCIATED = 1,
38 ASSOCIATEFAIL,
39 CREATEFAIL,
40 DELETEFAIL,
41 MODIFYFAIL,
42 CONNECTFAIL,
43 NOTCONNECTED,
44 EMPTY,
45 RANGEFAIL,
46 SPACEFAIL,
47 READFAIL,
48 WRITEFAIL,
49 TEXTFAIL
50} io_exceptions_t;
51
52#ifndef FIRST_IO_ERROR_NUMBER
53#define FIRST_IO_ERROR_NUMBER 0
54#endif
55
56typedef enum {
57 FIRST_AND_UNUSED = FIRST_IO_ERROR_NUMBER,
58 INTERNAL_ERROR,
59 INVALID_IO_LIST,
60 REPFAC_OVERFLOW,
61 CLAUSE_WIDTH_OVERFLOW,
62 UNMATCHED_CLOSING_PAREN,
63 UNMATCHED_OPENING_PAREN,
64 BAD_FORMAT_SPEC_CHAR,
65 NO_PAD_CHAR,
66 IO_CONTROL_NOT_VALID,
67 DUPLICATE_QUALIFIER,
68 NO_FRACTION_WIDTH,
69 NO_EXPONENT_WIDTH,
70 FRACTION_WIDTH_OVERFLOW,
71 EXPONENT_WIDTH_OVERFLOW,
72 NO_FRACTION,
73 NO_EXPONENT,
74 NEGATIVE_FIELD_WIDTH,
75 TEXT_LOC_OVERFLOW,
76 IOLIST_EXHAUSTED,
77 CONVCODE_MODE_MISFIT,
78 SET_CONVERSION_ERROR,
79 BOOL_CONVERSION_ERROR,
80 NON_INT_FIELD_WIDTH,
81 EXCESS_IOLIST_ELEMENTS,
82 NOT_ENOUGH_CHARS,
83 NO_CHARS_FOR_INT,
84 NO_CHARS_FOR_FLOAT,
85 NO_EXPONENT_VAL,
86 INT_VAL_OVERFLOW,
87 REAL_OVERFLOW,
88 NO_DIGITS_FOR_INT,
89 NO_DIGITS_FOR_FLOAT,
90 NO_CHARS_FOR_SET,
91 NO_CHARS_FOR_CHAR,
92 NO_CHARS_FOR_BOOLS,
93 NO_CHARS_FOR_CHARS,
94 NO_CHARS_FOR_TEXT,
95 NO_CHARS_FOR_EDIT,
96 NO_SPACE_TO_SKIP,
97 FORMAT_TEXT_MISMATCH,
98 INTEGER_RANGE_ERROR,
99 SET_RANGE_ERROR,
100 CHAR_RANGE_ERROR,
101 INVALID_CHAR,
102/* end of formatting errors */
103 NULL_ASSOCIATION,
104 NULL_ACCESS,
105 NULL_TEXT,
106 IS_NOT_ASSOCIATED,
107 IS_ASSOCIATED,
108 GETCWD_FAILS,
109 INVALID_ASSOCIATION_MODE,
110 FILE_EXISTING,
111 CREATE_FAILS,
112 DELETE_FAILS,
113 RENAME_FAILS,
114 IMPL_RESTRICTION,
115 NOT_EXISTING,
116 NOT_READABLE,
117 NOT_WRITEABLE,
118 NOT_INDEXABLE,
119 NOT_SEQUENCIBLE,
120 NO_CURRENT_POS,
121 NOT_VARIABLE,
122 NOT_FIXED,
123 NOT_INDEXED,
124 LENGTH_CHANGE,
125 LSEEK_FAILS,
126 BUFFER_ALLOC,
127 OPEN_FAILS,
128 NO_ACCESS_SUBLOCATION,
129 BAD_INDEX,
130 IS_NOT_CONNECTED,
131 NO_PATH_NAME,
132 PATHNAME_ALLOC,
133 BAD_USAGE,
134 OUT_OF_FILE,
135 NULL_STORE_LOC,
136 STORE_LOC_ALLOC,
137 OS_IO_ERROR,
138 RECORD_TOO_LONG,
139 RECORD_TOO_SHORT,
140 BAD_TEXTINDEX,
141 NULL_TEXTREC
142} io_info_word_t;
143
144
145extern
146char* io_info_text [];
147
148extern
149char* exc_text [];
150
151extern
152jmp_buf __io_exception;
153
154extern
155jmp_buf __rw_exception;
156
157void __cause_exception (char *ex, char* f, int line, int info);
158extern char * __IO_exception_names[];
159
160#define IOEXCEPTION(EXC,INFO) \
161 longjmp( __io_exception, (EXC<<16) + INFO )
162
163#define RWEXCEPTION(EXC,INFO) \
164 longjmp( __rw_exception, (EXC<<16) + INFO )
165
166#define CHILLEXCEPTION(FILE,LINE,EXC,INFO) \
167 __cause_exception (__IO_exception_names[EXC], FILE, LINE, INFO);
168
169#endif
This page took 0.116192 seconds and 5 git commands to generate.