* dbxout.c (dbxout_source_line): Remove extra tab.
[gcc.git] / gcc / f / bad.h
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.
4
5 This file is part of GNU Fortran.
6
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)
10 any later version.
11
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.
16
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
20 02111-1307, USA.
21
22 Owning Modules:
23 bad.c
24
25 Modifications:
26 */
27
28 /* Allow multiple inclusion to work. */
29
30 #ifndef _H_f_bad
31 #define _H_f_bad
32
33 /* Simple definitions and enumerations. */
34
35 typedef enum
36 {
37 #define FFEBAD_MSGS1(KWD,SEV,MSG) KWD,
38 #define FFEBAD_MSGS2(KWD,SEV,LMSG,SMSG) KWD,
39 #include "bad.def"
40 #undef FFEBAD_MSGS1
41 #undef FFEBAD_MSGS2
42 FFEBAD
43 } ffebad;
44
45 typedef enum
46 {
47
48 /* Order important; must be increasing severity. */
49
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. */
59 FFEBAD_severity
60 } ffebadSeverity;
61
62 /* Typedefs. */
63
64 typedef unsigned char ffebadIndex;
65
66 /* Include files needed by this one. */
67
68 #include "where.h"
69
70 /* Structure definitions. */
71
72
73 /* Global objects accessed by users of this module. */
74
75 extern bool ffebad_is_inhibited_;
76
77 /* Declare functions with prototypes. */
78
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,
85 const char *message);
86 void ffebad_string (const char *string);
87
88 /* Define macros. */
89
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()
105
106 /* End of #include file. */
107
108 #endif