TBCI Numerical high perf. C++ Library  2.8.0
f2c.h
Go to the documentation of this file.
1 
5 /* $Id: f2c.h,v 1.2.2.6 2019/05/28 11:13:02 garloff Exp $ */
6 
12 #ifndef F2C_INCLUDE
13 #define F2C_INCLUDE
14 
15 #ifdef HAVE_TBCICONFIG_H
16 # include "tbci/tbciconfig.h"
17 #else
18 # include "tbci/config_manual.h"
19 /* # if defined(__GNUC__)
20  * # define HAVE_LONG_LONG
21  * # endif
22  */
23 #endif
24 
25 /* F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems */
26 /* we assume short, float are OK */
27 typedef int /* long int */ integer;
28 typedef unsigned int /* long */ uinteger;
29 typedef char *address;
30 typedef short int shortint;
31 typedef float real;
32 typedef double doublereal;
33 typedef struct { real r, i; } complex;
34 typedef struct { doublereal r, i; } doublecomplex;
35 typedef int /* long int */ logical;
36 typedef short int shortlogical;
37 typedef char logical1;
38 typedef char integer1;
39 #ifdef HAVE_LONG_LONG /* system-dependent */
40 typedef long long int longint;
41 typedef unsigned long long int ulongint;
42 #else
43 typedef long int longint;
44 typedef unsigned long int ulongint;
45 #endif
46 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
47 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
48 
49 #define TRUE_ (1)
50 #define FALSE_ (0)
51 
52 /* Extern is for use with -E */
53 #ifndef Extern
54 #define Extern extern
55 #endif
56 
57 /* I/O stuff */
58 
59 #ifdef f2c_i2
60 #error "f2c_i2 will not work with g77!!!!"
61 /* for -i2 */
62 typedef short flag;
63 typedef short ftnlen;
64 typedef short ftnint;
65 #else
66 typedef long int /* long int */ flag;
67 typedef long int /* long int */ ftnlen;
68 typedef long int /* long int */ ftnint;
69 #endif
70 
71 /*external read, write*/
72 typedef struct
76  char *cifmt;
78 } cilist;
79 
80 /*internal read, write*/
81 typedef struct
83  char *iciunit;
85  char *icifmt;
88 } icilist;
89 
90 /*open*/
91 typedef struct
94  char *ofnm;
96  char *osta;
97  char *oacc;
98  char *ofm;
100  char *oblnk;
101 } olist;
102 
103 /*close*/
104 typedef struct
107  char *csta;
108 } cllist;
109 
110 /*rewind, backspace, endfile*/
111 typedef struct
114 } alist;
115 
116 /* inquire */
117 typedef struct
120  char *infile;
122  ftnint *inex; /*parameters in standard's order*/
126  char *inname;
128  char *inacc;
130  char *inseq;
132  char *indir;
134  char *infmt;
136  char *inform;
138  char *inunf;
142  char *inblank;
144 } inlist;
145 
146 #define VOID void
147 
148 union Multitype { /* for multiple entry points */
152  /* longint j; */
157  };
158 
159 typedef union Multitype Multitype;
160 
161 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
162 
163 struct Vardesc { /* for Namelist */
164  char *name;
165  char *addr;
167  int type;
168  };
169 typedef struct Vardesc Vardesc;
170 
171 struct Namelist {
172  char *name;
174  int nvars;
175  };
176 typedef struct Namelist Namelist;
177 
178 #define abs(x) ((x) >= 0 ? (x) : -(x))
179 #define dabs(x) (doublereal)abs(x)
180 #define min(a,b) ((a) <= (b) ? (a) : (b))
181 #define max(a,b) ((a) >= (b) ? (a) : (b))
182 #define dmin(a,b) (doublereal)min(a,b)
183 #define dmax(a,b) (doublereal)max(a,b)
184 #define bit_test(a,b) ((a) >> (b) & 1)
185 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
186 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
187 
188 /* procedure parameter types for -A and -C++ */
189 
190 #define F2C_proc_par_types 1
191 #ifdef __cplusplus
192 typedef int /* Unknown procedure type */ (*U_fp)(...);
193 typedef shortint (*J_fp)(...);
194 typedef integer (*I_fp)(...);
195 typedef real (*R_fp)(...);
196 typedef doublereal (*D_fp)(...), (*E_fp)(...);
197 typedef /* Complex */ VOID (*C_fp)(...);
198 typedef /* Double Complex */ VOID (*Z_fp)(...);
199 typedef logical (*L_fp)(...);
200 typedef shortlogical (*K_fp)(...);
201 typedef /* Character */ VOID (*H_fp)(...);
202 typedef /* Subroutine */ int (*S_fp)(...);
203 #else
204 typedef int /* Unknown procedure type */ (*U_fp)();
205 typedef shortint (*J_fp)();
206 typedef integer (*I_fp)();
207 typedef real (*R_fp)();
208 typedef doublereal (*D_fp)(), (*E_fp)();
209 typedef /* Complex */ VOID (*C_fp)();
210 typedef /* Double Complex */ VOID (*Z_fp)();
211 typedef logical (*L_fp)();
212 typedef shortlogical (*K_fp)();
213 typedef /* Character */ VOID (*H_fp)();
214 typedef /* Subroutine */ int (*S_fp)();
215 #endif
216 /* E_fp is for real functions when -R is not specified */
217 typedef VOID C_f; /* complex function */
218 typedef VOID H_f; /* character function */
219 typedef VOID Z_f; /* double complex function */
220 typedef doublereal E_f; /* real function with -R not specified */
221 
222 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
223 
224 #ifndef Skip_f2c_Undefs
225 /* (No such symbols should be defined in a strict ANSI C compiler.
226  We can avoid trouble with f2c-translated code by using
227  gcc -ansi [-traditional].) */
228 #undef cray
229 #undef gcos
230 #undef mc68010
231 #undef mc68020
232 #undef mips
233 #undef pdp11
234 #undef sgi
235 #undef sparc
236 #undef sun
237 #undef sun2
238 #undef sun3
239 #undef sun4
240 #undef u370
241 #undef u3b
242 #undef u3b2
243 #undef u3b5
244 /* #undef unix */
245 #undef vax
246 #endif
247 #endif
ftnint icirnum
Definition: f2c.h:87
char * oblnk
Definition: f2c.h:100
char * inblank
Definition: f2c.h:142
char * name
Definition: f2c.h:164
ftnint * inrecl
Definition: f2c.h:140
char * inacc
Definition: f2c.h:128
ftnlen inacclen
Definition: f2c.h:129
integer(* I_fp)(...)
Definition: f2c.h:194
ftnlen inunflen
Definition: f2c.h:139
char * icifmt
Definition: f2c.h:85
ftnlen infilen
Definition: f2c.h:121
char * iciunit
Definition: f2c.h:83
char * address
Definition: f2c.h:29
ftnint icirlen
Definition: f2c.h:86
char * infmt
Definition: f2c.h:134
ftnint ounit
Definition: f2c.h:93
Definition: f2c.h:81
flag icierr
Definition: f2c.h:82
char * infile
Definition: f2c.h:120
ftnlen * dims
Definition: f2c.h:166
Vardesc ** vars
Definition: f2c.h:173
unsigned int uinteger
Definition: f2c.h:28
ftnlen ofnmlen
Definition: f2c.h:95
logical(* L_fp)(...)
Definition: f2c.h:199
ftnint cirec
Definition: f2c.h:77
ftnint * innum
Definition: f2c.h:124
ftnint * innamed
Definition: f2c.h:125
doublereal(*)(* E_fp)(...)
Definition: f2c.h:196
shortint(* J_fp)(...)
Definition: f2c.h:193
flag ciend
Definition: f2c.h:75
char * csta
Definition: f2c.h:107
char * name
Definition: f2c.h:172
flag oerr
Definition: f2c.h:92
char * ofm
Definition: f2c.h:98
doublereal(* D_fp)(...)
Definition: f2c.h:196
shortlogical(* K_fp)(...)
Definition: f2c.h:200
void H_f
Definition: f2c.h:218
ftnlen indirlen
Definition: f2c.h:133
doublereal r
Definition: f2c.h:34
Definition: f2c.h:117
ftnint inunit
Definition: f2c.h:119
Definition: f2c.h:91
Definition: f2c.h:171
int type
Definition: f2c.h:167
char integer1
Definition: f2c.h:38
char * oacc
Definition: f2c.h:97
char logical1
Definition: f2c.h:37
flag cerr
Definition: f2c.h:105
void(* H_fp)(...)
Definition: f2c.h:201
short int shortlogical
Definition: f2c.h:36
complex c
Definition: f2c.h:155
void(* C_fp)(...)
Definition: f2c.h:197
flag cierr
Definition: f2c.h:73
ftnlen innamlen
Definition: f2c.h:127
real(* R_fp)(...)
Definition: f2c.h:195
void(* Z_fp)(...)
Definition: f2c.h:198
flag iciend
Definition: f2c.h:84
real r
Definition: f2c.h:153
void Z_f
Definition: f2c.h:219
char * inname
Definition: f2c.h:126
#define VOID
Definition: f2c.h:146
Definition: f2c.h:72
int logical
Definition: f2c.h:35
integer1 g
Definition: f2c.h:149
shortint h
Definition: f2c.h:150
char * cifmt
Definition: f2c.h:76
Definition: f2c.h:111
char * ofnm
Definition: f2c.h:94
double doublereal
Definition: f2c.h:32
char * inform
Definition: f2c.h:136
char * indir
Definition: f2c.h:132
doublecomplex z
Definition: f2c.h:156
ftnint * inopen
Definition: f2c.h:123
ftnlen inseqlen
Definition: f2c.h:131
int integer
barf [ba:rf] 2.
Definition: f2c.h:27
char * inunf
Definition: f2c.h:138
short int shortint
Definition: f2c.h:30
ftnint * inex
Definition: f2c.h:122
int nvars
Definition: f2c.h:174
long int flag
Definition: f2c.h:66
Definition: f2c.h:163
ftnint informlen
Definition: f2c.h:137
ftnint * innrec
Definition: f2c.h:141
ftnlen infmtlen
Definition: f2c.h:135
Definition: f2c.h:104
ftnlen inblanklen
Definition: f2c.h:143
int i
Definition: LM_fit.h:71
#define real
char * addr
Definition: f2c.h:165
ftnint cunit
Definition: f2c.h:106
#define doublecomplex
ftnint aunit
Definition: f2c.h:113
char * osta
Definition: f2c.h:96
void C_f
Definition: f2c.h:217
Definition: f2c.h:148
float real
Definition: f2c.h:31
Definition: f2c.h:33
doublereal E_f
Definition: f2c.h:220
flag aerr
Definition: f2c.h:112
ftnint ciunit
Definition: f2c.h:74
long int ftnint
Definition: f2c.h:68
long int longint
Definition: f2c.h:43
doublereal d
Definition: f2c.h:154
integer i
Definition: f2c.h:151
flag inerr
Definition: f2c.h:118
long int ftnlen
Definition: f2c.h:67
ftnint orl
Definition: f2c.h:99
real r
Definition: f2c.h:33
#define complex
unsigned long int ulongint
Definition: f2c.h:44
int(* S_fp)(...)
Definition: f2c.h:202
char * inseq
Definition: f2c.h:130