1 /* bad.h -- Public #include File (module.h template V1.0)
2 Copyright (C) 1995 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_MSGS1(KWD,SEV,MSG) KWD,
38 #define FFEBAD_MSGS2(KWD,SEV,LMSG,SMSG) KWD,
48 /* Order important; must be increasing severity. */
50 FFEBAD_severityINFORMATIONAL
, /* User notice. */
51 FFEBAD_severityTRIVIAL
, /* Internal notice. */
52 FFEBAD_severityWARNING
, /* User warning. */
53 FFEBAD_severityPECULIAR
, /* Internal warning. */
54 FFEBAD_severityPEDANTIC
, /* Pedantic, could be warning or error. */
55 FFEBAD_severityFATAL
, /* User error. */
56 FFEBAD_severityWEIRD
, /* Internal error. */
57 FFEBAD_severitySEVERE
, /* User error, cannot continue. */
58 FFEBAD_severityDISASTER
, /* Internal error, cannot continue. */
64 typedef unsigned char ffebadIndex
;
66 /* Include files needed by this one. */
70 /* Structure definitions. */
73 /* Global objects accessed by users of this module. */
75 extern bool ffebad_is_inhibited_
;
77 /* Declare functions with prototypes. */
79 void ffebad_finish (void);
80 void ffebad_here (ffebadIndex i
, ffewhereLine wl
, ffewhereColumn wc
);
81 void ffebad_init_0 (void);
82 bool ffebad_is_fatal (ffebad errnum
);
83 ffebadSeverity
ffebad_severity (ffebad errnum
);
84 bool ffebad_start_ (bool lex_override
, ffebad errnum
, ffebadSeverity sev
,
86 void ffebad_string (const char *string
);
90 #define ffebad_inhibit() (ffebad_is_inhibited_)
91 #define ffebad_init_1()
92 #define ffebad_init_2()
93 #define ffebad_init_3()
94 #define ffebad_init_4()
95 #define ffebad_set_inhibit(f) (ffebad_is_inhibited_ = (f))
96 #define ffebad_start(e) ffebad_start_ (FALSE, (e), FFEBAD_severity, NULL)
97 #define ffebad_start_lex(e) ffebad_start_ (TRUE, (e), FFEBAD_severity, NULL)
98 #define ffebad_start_msg(m,s) ffebad_start_ (FALSE, FFEBAD, (s), (m))
99 #define ffebad_start_msg_lex(m,s) ffebad_start_ (TRUE, FFEBAD, (s), (m))
100 #define ffebad_terminate_0()
101 #define ffebad_terminate_1()
102 #define ffebad_terminate_2()
103 #define ffebad_terminate_3()
104 #define ffebad_terminate_4()
106 /* End of #include file. */