aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/top.h
blob: 5538ab8db13457f3d9b8619dd79601788997531f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
/* top.h -- Public #include File (module.h template V1.0)
   Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
   Contributed by James Craig Burley.

This file is part of GNU Fortran.

GNU Fortran is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU Fortran is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Fortran; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.

   Owning Modules:
      top.c

   Modifications:
*/

/* Allow multiple inclusion to work. */

#ifndef GCC_F_TOP_H
#define GCC_F_TOP_H

/* Simple definitions and enumerations. */

enum _ffe_case_
  {
    FFE_caseNONE,		/* No case conversion, match
				   case-insensitive. */
    FFE_caseUPPER,		/* Convert lowercase to uppercase, match
				   upper. */
    FFE_caseLOWER,		/* Convert uppercase to lowercase, match
				   lower. */
    FFE_caseINITCAP,		/* Match InitialCap (no meaning for
				   conversion). */
    FFE_case
  };
typedef enum _ffe_case_ ffeCase;

enum _ffeintrinsic_state_
  {				/* State of a family of intrinsics. NOTE:
				   order IS important, see
				   ffe_intrinsic_state_max (). */
    FFE_intrinsicstateDELETED,	/* Doesn't exist at all. */
    FFE_intrinsicstateDISABLED,	/* Diagnostic if used as intrinsic. */
    FFE_intrinsicstateHIDDEN,	/* Exists only if INTRINSIC stmt. */
    FFE_intrinsicstateENABLED,	/* Exists as normal. */
    FFE_intrinsicstate
  };
typedef enum _ffeintrinsic_state_ ffeIntrinsicState;

/* Typedefs. */

typedef unsigned long ffeCounter;
#define ffeCounter_f "l"
typedef unsigned int ffeKwIndex;
typedef unsigned long int ffeTokenLength;
#define ffeTokenLength_f "l"
typedef void *ffeUnionLongPtr;	/* unused type to cover union of long and
				   ptr. */

/* Include files needed by this one. */

#include "malloc.h"
#include "where.h"

/* Structure definitions. */


/* Global objects accessed by users of this module. */

extern bool ffe_is_do_internal_checks_;
extern bool ffe_is_90_;
extern bool ffe_is_automatic_;
extern bool ffe_is_backslash_;
extern bool ffe_is_emulate_complex_;
extern bool ffe_is_underscoring_;
extern bool ffe_is_second_underscore_;
extern bool ffe_is_debug_kludge_;
extern bool ffe_is_dollar_ok_;
extern bool ffe_is_f2c_;
extern bool ffe_is_f2c_library_;
extern bool ffe_is_ffedebug_;
extern bool ffe_is_flatten_arrays_;
extern bool ffe_is_free_form_;
extern bool ffe_is_globals_;
extern bool ffe_is_init_local_zero_;
extern bool ffe_is_mainprog_;
extern bool ffe_is_onetrip_;
extern bool ffe_is_silent_;
extern bool ffe_is_typeless_boz_;
extern bool ffe_is_pedantic_;
extern bool ffe_is_saveall_;
extern bool ffe_is_ugly_args_;
extern bool ffe_is_ugly_assign_;
extern bool ffe_is_ugly_assumed_;
extern bool ffe_is_ugly_comma_;
extern bool ffe_is_ugly_complex_;
extern bool ffe_is_ugly_init_;
extern bool ffe_is_ugly_logint_;
extern bool ffe_is_version_;
extern bool ffe_is_vxt_;
extern bool ffe_is_warn_globals_;
extern bool ffe_is_warn_implicit_;
extern bool ffe_is_warn_surprising_;
extern bool ffe_is_zeros_;
extern ffeCase ffe_case_intrin_;
extern ffeCase ffe_case_match_;
extern ffeCase ffe_case_source_;
extern ffeCase ffe_case_symbol_;
extern ffeIntrinsicState ffe_intrinsic_state_badu77_;
extern ffeIntrinsicState ffe_intrinsic_state_gnu_;
extern ffeIntrinsicState ffe_intrinsic_state_f2c_;
extern ffeIntrinsicState ffe_intrinsic_state_f90_;
extern ffeIntrinsicState ffe_intrinsic_state_mil_;
extern ffeIntrinsicState ffe_intrinsic_state_unix_;
extern ffeIntrinsicState ffe_intrinsic_state_vxt_;
extern int ffe_fixed_line_length_;
extern mallocPool ffe_file_pool_;
extern mallocPool ffe_any_unit_pool_;
extern mallocPool ffe_program_unit_pool_;
extern ffeCounter ffe_count_0;
extern ffeCounter ffe_count_1;
extern ffeCounter ffe_count_2;
extern ffeCounter ffe_count_3;
extern ffeCounter ffe_count_4;
extern bool ffe_in_0;
extern bool ffe_in_1;
extern bool ffe_in_2;
extern bool ffe_in_3;
extern bool ffe_in_4;

/* Declare functions with prototypes. */

unsigned int ffe_init_options (unsigned int, const char **);
int ffe_handle_option (size_t code, const char *arg, int on);
void ffe_file (ffewhereFile wf, FILE *f);
void ffe_init_0 (void);
void ffe_init_1 (void);
void ffe_init_2 (void);
void ffe_init_3 (void);
void ffe_init_4 (void);
void ffe_terminate_0 (void);
void ffe_terminate_1 (void);
void ffe_terminate_2 (void);
void ffe_terminate_3 (void);
void ffe_terminate_4 (void);

/* Define macros. */

#define ffe_case_intrin() ffe_case_intrin_
#define ffe_case_match() ffe_case_match_
#define ffe_case_source() ffe_case_source_
#define ffe_case_symbol() ffe_case_symbol_
#define ffe_intrinsic_state_badu77() ffe_intrinsic_state_badu77_
#define ffe_intrinsic_state_f2c() ffe_intrinsic_state_f2c_
#define ffe_intrinsic_state_f90() ffe_intrinsic_state_f90_
#define ffe_intrinsic_state_gnu() ffe_intrinsic_state_gnu_
#define ffe_intrinsic_state_mil() ffe_intrinsic_state_mil_
#define ffe_intrinsic_state_unix() ffe_intrinsic_state_unix_
#define ffe_intrinsic_state_vxt() ffe_intrinsic_state_vxt_
#define ffe_is_90() ffe_is_90_
#define ffe_is_automatic() ffe_is_automatic_
#define ffe_is_backslash() ffe_is_backslash_
#define ffe_is_debug_kludge() ffe_is_debug_kludge_
#define ffe_is_do_internal_checks() ffe_is_do_internal_checks_
#define ffe_is_dollar_ok() ffe_is_dollar_ok_
#define ffe_is_emulate_complex() ffe_is_emulate_complex_
#define ffe_is_f2c() ffe_is_f2c_
#define ffe_is_f2c_library() ffe_is_f2c_library_
#define ffe_is_ffedebug() ffe_is_ffedebug_
#define ffe_is_flatten_arrays() ffe_is_flatten_arrays_
#define ffe_is_free_form() ffe_is_free_form_
#define ffe_is_globals() ffe_is_globals_
#define ffe_is_init_local_zero() ffe_is_init_local_zero_
#define ffe_is_mainprog() ffe_is_mainprog_
#define ffe_is_onetrip() ffe_is_onetrip_
#define ffe_is_pedantic() ffe_is_pedantic_
#define ffe_is_pedantic_not_90() (ffe_is_pedantic_ && !ffe_is_90_)
#define ffe_is_saveall() ffe_is_saveall_
#define ffe_is_second_underscore() ffe_is_second_underscore_
#define ffe_is_silent() ffe_is_silent_
#define ffe_is_typeless_boz() ffe_is_typeless_boz_
#define ffe_is_ugly_args() ffe_is_ugly_args_
#define ffe_is_ugly_assign() ffe_is_ugly_assign_
#define ffe_is_ugly_assumed() ffe_is_ugly_assumed_
#define ffe_is_ugly_comma() ffe_is_ugly_comma_
#define ffe_is_ugly_complex() ffe_is_ugly_complex_
#define ffe_is_ugly_init() ffe_is_ugly_init_
#define ffe_is_ugly_logint() ffe_is_ugly_logint_
#define ffe_is_underscoring() ffe_is_underscoring_
#define ffe_is_version() ffe_is_version_
#define ffe_is_vxt() ffe_is_vxt_
#define ffe_is_warn_globals() ffe_is_warn_globals_
#define ffe_is_warn_implicit() ffe_is_warn_implicit_
#define ffe_is_warn_surprising() ffe_is_warn_surprising_
#define ffe_is_zeros() ffe_is_zeros_
#define ffe_fixed_line_length() ffe_fixed_line_length_
#define ffe_pool_file() (ffe_file_pool_)
#define ffe_pool_any_unit() (ffe_any_unit_pool_)
#define ffe_pool_program_unit() (ffe_program_unit_pool_)
#define ffe_set_case_intrin(f) (ffe_case_intrin_ = (f))
#define ffe_set_case_match(f) (ffe_case_match_ = (f))
#define ffe_set_case_source(f) (ffe_case_source_ = (f))
#define ffe_set_case_symbol(f) (ffe_case_symbol_ = (f))
#define ffe_set_intrinsic_state_badu77(s) (ffe_intrinsic_state_badu77_ = (s))
#define ffe_set_intrinsic_state_f2c(s) (ffe_intrinsic_state_f2c_ = (s))
#define ffe_set_intrinsic_state_f90(s) (ffe_intrinsic_state_f90_ = (s))
#define ffe_set_intrinsic_state_gnu(s) (ffe_intrinsic_state_gnu_ = (s))
#define ffe_set_intrinsic_state_mil(s) (ffe_intrinsic_state_mil_ = (s))
#define ffe_set_intrinsic_state_unix(s) (ffe_intrinsic_state_unix_ = (s))
#define ffe_set_intrinsic_state_vxt(s) (ffe_intrinsic_state_vxt_ = (s))
#define ffe_set_is_90(f) (ffe_is_90_ = (f))
#define ffe_set_is_automatic(f) (ffe_is_automatic_ = (f))
#define ffe_set_is_backslash(f) (ffe_is_backslash_ = (f))
#define ffe_set_is_debug_kludge(f) (ffe_is_debug_kludge_ = (f))
#define ffe_set_is_do_internal_checks(f) (ffe_is_do_internal_checks_ = (f))
#define ffe_set_is_dollar_ok(f) (ffe_is_dollar_ok_ = (f))
#define ffe_set_is_emulate_complex(f) (ffe_is_emulate_complex_ = (f))
#define ffe_set_is_f2c(f) (ffe_is_f2c_ = (f))
#define ffe_set_is_f2c_library(f) (ffe_is_f2c_library_ = (f))
#define ffe_set_is_ffedebug(f) (ffe_is_ffedebug_ = (f))
#define ffe_set_is_flatten_arrays(f) (ffe_is_flatten_arrays_ = (f))
#define ffe_set_is_free_form(f) (ffe_is_free_form_ = (f))
#define ffe_set_is_globals(f) (ffe_is_globals_ = (f))
#define ffe_set_is_init_local_zero(f) (ffe_is_init_local_zero_ = (f))
#define ffe_set_is_mainprog(f) (ffe_is_mainprog_ = (f))
#define ffe_set_is_onetrip(f) (ffe_is_onetrip_ = (f))
#define ffe_set_is_pedantic(f) (ffe_is_pedantic_ = (f))
#define ffe_set_is_saveall(f) (ffe_is_saveall_ = (f))
#define ffe_set_is_second_underscore(f) (ffe_is_second_underscore_ = (f))
#define ffe_set_is_silent(f) (ffe_is_silent_ = (f))
#define ffe_set_is_typeless_boz(f) (ffe_is_typeless_boz_ = (f))
#define ffe_set_is_ugly_args(f) (ffe_is_ugly_args_ = (f))
#define ffe_set_is_ugly_assign(f) (ffe_is_ugly_assign_ = (f))
#define ffe_set_is_ugly_assumed(f) (ffe_is_ugly_assumed_ = (f))
#define ffe_set_is_ugly_comma(f) (ffe_is_ugly_comma_ = (f))
#define ffe_set_is_ugly_complex(f) (ffe_is_ugly_complex_ = (f))
#define ffe_set_is_ugly_init(f) (ffe_is_ugly_init_ = (f))
#define ffe_set_is_ugly_logint(f) (ffe_is_ugly_logint_ = (f))
#define ffe_set_is_underscoring(f) (ffe_is_underscoring_ = (f))
#define ffe_set_is_version(f) (ffe_is_version_ = (f))
#define ffe_set_is_vxt(f) (ffe_is_vxt_ = (f))
#define ffe_set_is_warn_globals(f) (ffe_is_warn_globals_ = (f))
#define ffe_set_is_warn_implicit(f) (ffe_is_warn_implicit_ = (f))
#define ffe_set_is_warn_surprising(f) (ffe_is_warn_surprising_ = (f))
#define ffe_set_is_zeros(f) (ffe_is_zeros_ = (f))
#define ffe_set_fixed_line_length(l) (ffe_fixed_line_length_ = (l))
#define ffe_state_max(s1,s2) ((s1) > (s2) ? (s1) : (s2))

/* End of #include file. */

#endif /* ! GCC_F_TOP_H */