1 /* bad.h -- Public #include File (module.h template V1.0)
2 Copyright (C) 1995, 2002 Free Software Foundation, Inc.
3 Contributed by James Craig Burley.
5 This file is part of GNU Fortran.
7 GNU Fortran 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 Fortran 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 Fortran; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
28 /* Allow multiple inclusion to work. */
33 /* Simple definitions and enumerations. */
37 #define FFEBAD_MSG(KWD,SEV,MSG) KWD,
46 /* Order important; must be increasing severity. */
48 FFEBAD_severityINFORMATIONAL
, /* User notice. */
49 FFEBAD_severityTRIVIAL
, /* Internal notice. */
50 FFEBAD_severityWARNING
, /* User warning. */
51 FFEBAD_severityPECULIAR
, /* Internal warning. */
52 FFEBAD_severityPEDANTIC
, /* Pedantic, could be warning or error. */
53 FFEBAD_severityFATAL
, /* User error. */
54 FFEBAD_severityWEIRD
, /* Internal error. */
55 FFEBAD_severitySEVERE
, /* User error, cannot continue. */
56 FFEBAD_severityDISASTER
, /* Internal error, cannot continue. */
62 typedef unsigned char ffebadIndex
;
64 /* Include files needed by this one. */
68 /* Structure definitions. */
71 /* Global objects accessed by users of this module. */
73 extern bool ffebad_is_inhibited_
;
75 /* Declare functions with prototypes. */
77 void ffebad_finish (void);
78 void ffebad_here (ffebadIndex i
, ffewhereLine wl
, ffewhereColumn wc
);
79 void ffebad_init_0 (void);
80 bool ffebad_is_fatal (ffebad errnum
);
81 ffebadSeverity
ffebad_severity (ffebad errnum
);
82 bool ffebad_start_ (bool lex_override
, ffebad errnum
, ffebadSeverity sev
,
84 void ffebad_string (const char *string
);
88 #define ffebad_inhibit() (ffebad_is_inhibited_)
89 #define ffebad_init_1()
90 #define ffebad_init_2()
91 #define ffebad_init_3()
92 #define ffebad_init_4()
93 #define ffebad_set_inhibit(f) (ffebad_is_inhibited_ = (f))
94 #define ffebad_start(e) ffebad_start_ (FALSE, (e), FFEBAD_severity, NULL)
95 #define ffebad_start_lex(e) ffebad_start_ (TRUE, (e), FFEBAD_severity, NULL)
96 #define ffebad_start_msg(msgid,s) ffebad_start_ (FALSE, FFEBAD, (s), (msgid))
97 #define ffebad_start_msg_lex(msgid,s) ffebad_start_ (TRUE, FFEBAD, (s), (msgid))
98 #define ffebad_terminate_0()
99 #define ffebad_terminate_1()
100 #define ffebad_terminate_2()
101 #define ffebad_terminate_3()
102 #define ffebad_terminate_4()
104 /* End of #include file. */
106 #endif /* ! GCC_F_BAD_H */