oops - omitted from previous delta fixing UNIQUE_SECTION
[official-gcc.git] / gcc / f / top.h
blob3c92c2692267175b25a814be7896c895c7658a13
1 /* top.h -- Public #include File (module.h template V1.0)
2 Copyright (C) 1995-1997, 1999 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)
10 any later version.
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
20 02111-1307, USA.
22 Owning Modules:
23 top.c
25 Modifications:
28 /* Allow multiple inclusion to work. */
30 #ifndef _H_f_parse
31 #define _H_f_parse
33 /* Simple definitions and enumerations. */
35 enum _ffe_case_
37 FFE_caseNONE, /* No case conversion, match
38 case-insensitive. */
39 FFE_caseUPPER, /* Convert lowercase to uppercase, match
40 upper. */
41 FFE_caseLOWER, /* Convert uppercase to lowercase, match
42 lower. */
43 FFE_caseINITCAP, /* Match InitialCap (no meaning for
44 conversion). */
45 FFE_case
47 typedef enum _ffe_case_ ffeCase;
49 enum _ffeintrinsic_state_
50 { /* State of a family of intrinsics. NOTE:
51 order IS important, see
52 ffe_intrinsic_state_max (). */
53 FFE_intrinsicstateDELETED, /* Doesn't exist at all. */
54 FFE_intrinsicstateDISABLED, /* Diagnostic if used as intrinsic. */
55 FFE_intrinsicstateHIDDEN, /* Exists only if INTRINSIC stmt. */
56 FFE_intrinsicstateENABLED, /* Exists as normal. */
57 FFE_intrinsicstate
59 typedef enum _ffeintrinsic_state_ ffeIntrinsicState;
61 /* Typedefs. */
63 typedef unsigned long ffeCounter;
64 #define ffeCounter_f "l"
65 typedef unsigned int ffeKwIndex;
66 typedef unsigned long int ffeTokenLength;
67 #define ffeTokenLength_f "l"
68 typedef void *ffeUnionLongPtr; /* unused type to cover union of long and
69 ptr. */
71 /* Include files needed by this one. */
73 #include "malloc.h"
74 #include "where.h"
76 /* Structure definitions. */
79 /* Global objects accessed by users of this module. */
81 extern bool ffe_is_do_internal_checks_;
82 extern bool ffe_is_90_;
83 extern bool ffe_is_automatic_;
84 extern bool ffe_is_backslash_;
85 extern bool ffe_is_emulate_complex_;
86 extern bool ffe_is_underscoring_;
87 extern bool ffe_is_second_underscore_;
88 extern bool ffe_is_debug_kludge_;
89 extern bool ffe_is_dollar_ok_;
90 extern bool ffe_is_f2c_;
91 extern bool ffe_is_f2c_library_;
92 extern bool ffe_is_ffedebug_;
93 extern bool ffe_is_flatten_arrays_;
94 extern bool ffe_is_free_form_;
95 extern bool ffe_is_globals_;
96 extern bool ffe_is_init_local_zero_;
97 extern bool ffe_is_mainprog_;
98 extern bool ffe_is_null_version_;
99 extern bool ffe_is_onetrip_;
100 extern bool ffe_is_silent_;
101 extern bool ffe_is_typeless_boz_;
102 extern bool ffe_is_pedantic_;
103 extern bool ffe_is_saveall_;
104 extern bool ffe_is_ugly_args_;
105 extern bool ffe_is_ugly_assign_;
106 extern bool ffe_is_ugly_assumed_;
107 extern bool ffe_is_ugly_comma_;
108 extern bool ffe_is_ugly_complex_;
109 extern bool ffe_is_ugly_init_;
110 extern bool ffe_is_ugly_logint_;
111 extern bool ffe_is_version_;
112 extern bool ffe_is_vxt_;
113 extern bool ffe_is_warn_globals_;
114 extern bool ffe_is_warn_implicit_;
115 extern bool ffe_is_warn_surprising_;
116 extern bool ffe_is_zeros_;
117 extern ffeCase ffe_case_intrin_;
118 extern ffeCase ffe_case_match_;
119 extern ffeCase ffe_case_source_;
120 extern ffeCase ffe_case_symbol_;
121 extern ffeIntrinsicState ffe_intrinsic_state_badu77_;
122 extern ffeIntrinsicState ffe_intrinsic_state_gnu_;
123 extern ffeIntrinsicState ffe_intrinsic_state_f2c_;
124 extern ffeIntrinsicState ffe_intrinsic_state_f90_;
125 extern ffeIntrinsicState ffe_intrinsic_state_mil_;
126 extern ffeIntrinsicState ffe_intrinsic_state_unix_;
127 extern ffeIntrinsicState ffe_intrinsic_state_vxt_;
128 extern int ffe_fixed_line_length_;
129 extern mallocPool ffe_file_pool_;
130 extern mallocPool ffe_any_unit_pool_;
131 extern mallocPool ffe_program_unit_pool_;
132 extern ffeCounter ffe_count_0;
133 extern ffeCounter ffe_count_1;
134 extern ffeCounter ffe_count_2;
135 extern ffeCounter ffe_count_3;
136 extern ffeCounter ffe_count_4;
137 extern bool ffe_in_0;
138 extern bool ffe_in_1;
139 extern bool ffe_in_2;
140 extern bool ffe_in_3;
141 extern bool ffe_in_4;
143 /* Declare functions with prototypes. */
145 int ffe_decode_option (int argc, char **argv);
146 void ffe_file (ffewhereFile wf, FILE *f);
147 void ffe_init_0 (void);
148 void ffe_init_1 (void);
149 void ffe_init_2 (void);
150 void ffe_init_3 (void);
151 void ffe_init_4 (void);
152 void ffe_terminate_0 (void);
153 void ffe_terminate_1 (void);
154 void ffe_terminate_2 (void);
155 void ffe_terminate_3 (void);
156 void ffe_terminate_4 (void);
158 /* Define macros. */
160 #define ffe_case_intrin() ffe_case_intrin_
161 #define ffe_case_match() ffe_case_match_
162 #define ffe_case_source() ffe_case_source_
163 #define ffe_case_symbol() ffe_case_symbol_
164 #define ffe_intrinsic_state_badu77() ffe_intrinsic_state_badu77_
165 #define ffe_intrinsic_state_f2c() ffe_intrinsic_state_f2c_
166 #define ffe_intrinsic_state_f90() ffe_intrinsic_state_f90_
167 #define ffe_intrinsic_state_gnu() ffe_intrinsic_state_gnu_
168 #define ffe_intrinsic_state_mil() ffe_intrinsic_state_mil_
169 #define ffe_intrinsic_state_unix() ffe_intrinsic_state_unix_
170 #define ffe_intrinsic_state_vxt() ffe_intrinsic_state_vxt_
171 #define ffe_is_90() ffe_is_90_
172 #define ffe_is_automatic() ffe_is_automatic_
173 #define ffe_is_backslash() ffe_is_backslash_
174 #define ffe_is_debug_kludge() ffe_is_debug_kludge_
175 #define ffe_is_do_internal_checks() ffe_is_do_internal_checks_
176 #define ffe_is_dollar_ok() ffe_is_dollar_ok_
177 #define ffe_is_emulate_complex() ffe_is_emulate_complex_
178 #define ffe_is_f2c() ffe_is_f2c_
179 #define ffe_is_f2c_library() ffe_is_f2c_library_
180 #define ffe_is_ffedebug() ffe_is_ffedebug_
181 #define ffe_is_flatten_arrays() ffe_is_flatten_arrays_
182 #define ffe_is_free_form() ffe_is_free_form_
183 #define ffe_is_globals() ffe_is_globals_
184 #define ffe_is_init_local_zero() ffe_is_init_local_zero_
185 #define ffe_is_mainprog() ffe_is_mainprog_
186 #define ffe_is_null_version() ffe_is_null_version_
187 #define ffe_is_onetrip() ffe_is_onetrip_
188 #define ffe_is_pedantic() ffe_is_pedantic_
189 #define ffe_is_pedantic_not_90() (ffe_is_pedantic_ && !ffe_is_90_)
190 #define ffe_is_saveall() ffe_is_saveall_
191 #define ffe_is_second_underscore() ffe_is_second_underscore_
192 #define ffe_is_silent() ffe_is_silent_
193 #define ffe_is_typeless_boz() ffe_is_typeless_boz_
194 #define ffe_is_ugly_args() ffe_is_ugly_args_
195 #define ffe_is_ugly_assign() ffe_is_ugly_assign_
196 #define ffe_is_ugly_assumed() ffe_is_ugly_assumed_
197 #define ffe_is_ugly_comma() ffe_is_ugly_comma_
198 #define ffe_is_ugly_complex() ffe_is_ugly_complex_
199 #define ffe_is_ugly_init() ffe_is_ugly_init_
200 #define ffe_is_ugly_logint() ffe_is_ugly_logint_
201 #define ffe_is_underscoring() ffe_is_underscoring_
202 #define ffe_is_version() ffe_is_version_
203 #define ffe_is_vxt() ffe_is_vxt_
204 #define ffe_is_warn_globals() ffe_is_warn_globals_
205 #define ffe_is_warn_implicit() ffe_is_warn_implicit_
206 #define ffe_is_warn_surprising() ffe_is_warn_surprising_
207 #define ffe_is_zeros() ffe_is_zeros_
208 #define ffe_fixed_line_length() ffe_fixed_line_length_
209 #define ffe_pool_file() (ffe_file_pool_)
210 #define ffe_pool_any_unit() (ffe_any_unit_pool_)
211 #define ffe_pool_program_unit() (ffe_program_unit_pool_)
212 #define ffe_set_case_intrin(f) (ffe_case_intrin_ = (f))
213 #define ffe_set_case_match(f) (ffe_case_match_ = (f))
214 #define ffe_set_case_source(f) (ffe_case_source_ = (f))
215 #define ffe_set_case_symbol(f) (ffe_case_symbol_ = (f))
216 #define ffe_set_intrinsic_state_badu77(s) (ffe_intrinsic_state_badu77_ = (s))
217 #define ffe_set_intrinsic_state_f2c(s) (ffe_intrinsic_state_f2c_ = (s))
218 #define ffe_set_intrinsic_state_f90(s) (ffe_intrinsic_state_f90_ = (s))
219 #define ffe_set_intrinsic_state_gnu(s) (ffe_intrinsic_state_gnu_ = (s))
220 #define ffe_set_intrinsic_state_mil(s) (ffe_intrinsic_state_mil_ = (s))
221 #define ffe_set_intrinsic_state_unix(s) (ffe_intrinsic_state_unix_ = (s))
222 #define ffe_set_intrinsic_state_vxt(s) (ffe_intrinsic_state_vxt_ = (s))
223 #define ffe_set_is_90(f) (ffe_is_90_ = (f))
224 #define ffe_set_is_automatic(f) (ffe_is_automatic_ = (f))
225 #define ffe_set_is_backslash(f) (ffe_is_backslash_ = (f))
226 #define ffe_set_is_debug_kludge(f) (ffe_is_debug_kludge_ = (f))
227 #define ffe_set_is_do_internal_checks(f) (ffe_is_do_internal_checks_ = (f))
228 #define ffe_set_is_dollar_ok(f) (ffe_is_dollar_ok_ = (f))
229 #define ffe_set_is_emulate_complex(f) (ffe_is_emulate_complex_ = (f))
230 #define ffe_set_is_f2c(f) (ffe_is_f2c_ = (f))
231 #define ffe_set_is_f2c_library(f) (ffe_is_f2c_library_ = (f))
232 #define ffe_set_is_ffedebug(f) (ffe_is_ffedebug_ = (f))
233 #define ffe_set_is_flatten_arrays(f) (ffe_is_flatten_arrays_ = (f))
234 #define ffe_set_is_free_form(f) (ffe_is_free_form_ = (f))
235 #define ffe_set_is_globals(f) (ffe_is_globals_ = (f))
236 #define ffe_set_is_init_local_zero(f) (ffe_is_init_local_zero_ = (f))
237 #define ffe_set_is_mainprog(f) (ffe_is_mainprog_ = (f))
238 #define ffe_set_is_null_version(f) (ffe_is_null_version_ = (f))
239 #define ffe_set_is_onetrip(f) (ffe_is_onetrip_ = (f))
240 #define ffe_set_is_pedantic(f) (ffe_is_pedantic_ = (f))
241 #define ffe_set_is_saveall(f) (ffe_is_saveall_ = (f))
242 #define ffe_set_is_second_underscore(f) (ffe_is_second_underscore_ = (f))
243 #define ffe_set_is_silent(f) (ffe_is_silent_ = (f))
244 #define ffe_set_is_typeless_boz(f) (ffe_is_typeless_boz_ = (f))
245 #define ffe_set_is_ugly_args(f) (ffe_is_ugly_args_ = (f))
246 #define ffe_set_is_ugly_assign(f) (ffe_is_ugly_assign_ = (f))
247 #define ffe_set_is_ugly_assumed(f) (ffe_is_ugly_assumed_ = (f))
248 #define ffe_set_is_ugly_comma(f) (ffe_is_ugly_comma_ = (f))
249 #define ffe_set_is_ugly_complex(f) (ffe_is_ugly_complex_ = (f))
250 #define ffe_set_is_ugly_init(f) (ffe_is_ugly_init_ = (f))
251 #define ffe_set_is_ugly_logint(f) (ffe_is_ugly_logint_ = (f))
252 #define ffe_set_is_underscoring(f) (ffe_is_underscoring_ = (f))
253 #define ffe_set_is_version(f) (ffe_is_version_ = (f))
254 #define ffe_set_is_vxt(f) (ffe_is_vxt_ = (f))
255 #define ffe_set_is_warn_globals(f) (ffe_is_warn_globals_ = (f))
256 #define ffe_set_is_warn_implicit(f) (ffe_is_warn_implicit_ = (f))
257 #define ffe_set_is_warn_surprising(f) (ffe_is_warn_surprising_ = (f))
258 #define ffe_set_is_zeros(f) (ffe_is_zeros_ = (f))
259 #define ffe_set_fixed_line_length(l) (ffe_fixed_line_length_ = (l))
260 #define ffe_state_max(s1,s2) ((s1) > (s2) ? (s1) : (s2))
262 /* End of #include file. */
264 #endif