TBCI Numerical high perf. C++ Library 2.8.0
f2c.h
Go to the documentation of this file.
1
4
5/* $Id: f2c.h,v 1.2.2.6 2019/05/28 11:13:02 garloff Exp $ */
6
11
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 */
27typedef int /* long int */ integer;
28typedef unsigned int /* long */ uinteger;
29typedef char *address;
30typedef short int shortint;
31typedef float real;
32typedef double doublereal;
33typedef struct { real r, i; } complex;
34typedef struct { doublereal r, i; } doublecomplex;
35typedef int /* long int */ logical;
36typedef short int shortlogical;
37typedef char logical1;
38typedef char integer1;
39#ifdef HAVE_LONG_LONG /* system-dependent */
40typedef long long int longint;
41typedef unsigned long long int ulongint;
42#else
43typedef long int longint;
44typedef 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 */
62typedef short flag;
63typedef short ftnlen;
64typedef short ftnint;
65#else
66typedef long int /* long int */ flag;
67typedef long int /* long int */ ftnlen;
68typedef long int /* long int */ ftnint;
69#endif
70
71/*external read, write*/
79
80/*internal read, write*/
89
90/*open*/
91typedef struct
94 char *ofnm;
96 char *osta;
97 char *oacc;
98 char *ofm;
100 char *oblnk;
101} olist;
102
103/*close*/
104typedef struct
107 char *csta;
108} cllist;
109
110/*rewind, backspace, endfile*/
111typedef struct
114} alist;
115
116/* inquire */
145
146#define VOID void
147
148union Multitype { /* for multiple entry points */
152 /* longint j; */
157 };
158
159typedef union Multitype Multitype;
160
161/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
162
163struct Vardesc { /* for Namelist */
164 char *name;
165 char *addr;
167 int type;
168 };
169typedef struct Vardesc Vardesc;
170
171struct Namelist {
172 char *name;
174 int nvars;
175 };
176typedef 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
192typedef int /* Unknown procedure type */ (*U_fp)(...);
193typedef shortint (*J_fp)(...);
194typedef integer (*I_fp)(...);
195typedef real (*R_fp)(...);
196typedef doublereal (*D_fp)(...), (*E_fp)(...);
197typedef /* Complex */ VOID (*C_fp)(...);
198typedef /* Double Complex */ VOID (*Z_fp)(...);
199typedef logical (*L_fp)(...);
200typedef shortlogical (*K_fp)(...);
201typedef /* Character */ VOID (*H_fp)(...);
202typedef /* Subroutine */ int (*S_fp)(...);
203#else
204typedef int /* Unknown procedure type */ (*U_fp)();
205typedef shortint (*J_fp)();
206typedef integer (*I_fp)();
207typedef real (*R_fp)();
208typedef doublereal (*D_fp)(), (*E_fp)();
209typedef /* Complex */ VOID (*C_fp)();
210typedef /* Double Complex */ VOID (*Z_fp)();
211typedef logical (*L_fp)();
212typedef shortlogical (*K_fp)();
213typedef /* Character */ VOID (*H_fp)();
214typedef /* Subroutine */ int (*S_fp)();
215#endif
216/* E_fp is for real functions when -R is not specified */
217typedef VOID C_f; /* complex function */
218typedef VOID H_f; /* character function */
219typedef VOID Z_f; /* double complex function */
220typedef 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
float real
Definition f2c.h:31
int(* S_fp)(...)
Definition f2c.h:202
double doublereal
Definition f2c.h:32
char * address
Definition f2c.h:29
long int ftnlen
Definition f2c.h:67
int integer
barf [ba:rf] 2.
Definition f2c.h:27
void Z_f
Definition f2c.h:219
unsigned int uinteger
Definition f2c.h:28
int logical
Definition f2c.h:35
void(* C_fp)(...)
Definition f2c.h:197
doublereal(* D_fp)(...)
Definition f2c.h:196
doublereal(* E_fp)(...)
Definition f2c.h:196
integer(* I_fp)(...)
Definition f2c.h:194
void(* Z_fp)(...)
Definition f2c.h:198
#define VOID
Definition f2c.h:146
unsigned long int ulongint
Definition f2c.h:44
short int shortint
Definition f2c.h:30
long int ftnint
Definition f2c.h:68
shortint(* J_fp)(...)
Definition f2c.h:193
real(* R_fp)(...)
Definition f2c.h:195
logical(* L_fp)(...)
Definition f2c.h:199
char integer1
Definition f2c.h:38
long int flag
Definition f2c.h:66
void(* H_fp)(...)
Definition f2c.h:201
short int shortlogical
Definition f2c.h:36
char logical1
Definition f2c.h:37
void C_f
Definition f2c.h:217
void H_f
Definition f2c.h:218
doublereal E_f
Definition f2c.h:220
long int longint
Definition f2c.h:43
shortlogical(* K_fp)(...)
Definition f2c.h:200
#define complex
#define doublereal
#define integer
#define real
#define doublecomplex
int nvars
Definition f2c.h:174
char * name
Definition f2c.h:172
Vardesc ** vars
Definition f2c.h:173
Definition f2c.h:163
ftnlen * dims
Definition f2c.h:166
char * name
Definition f2c.h:164
char * addr
Definition f2c.h:165
int type
Definition f2c.h:167
Definition f2c.h:112
ftnint aunit
Definition f2c.h:113
flag aerr
Definition f2c.h:112
Definition f2c.h:73
ftnint ciunit
Definition f2c.h:74
char * cifmt
Definition f2c.h:76
flag cierr
Definition f2c.h:73
ftnint cirec
Definition f2c.h:77
flag ciend
Definition f2c.h:75
Definition f2c.h:105
ftnint cunit
Definition f2c.h:106
char * csta
Definition f2c.h:107
flag cerr
Definition f2c.h:105
real r
Definition f2c.h:33
real i
Definition f2c.h:33
doublereal i
Definition f2c.h:34
doublereal r
Definition f2c.h:34
Definition f2c.h:82
char * icifmt
Definition f2c.h:85
char * iciunit
Definition f2c.h:83
flag iciend
Definition f2c.h:84
ftnint icirnum
Definition f2c.h:87
ftnint icirlen
Definition f2c.h:86
flag icierr
Definition f2c.h:82
Definition f2c.h:118
ftnint * innamed
Definition f2c.h:125
ftnint * innum
Definition f2c.h:124
ftnlen infilen
Definition f2c.h:121
ftnint * innrec
Definition f2c.h:141
ftnlen indirlen
Definition f2c.h:133
ftnlen inblanklen
Definition f2c.h:143
char * inseq
Definition f2c.h:130
char * infile
Definition f2c.h:120
char * inblank
Definition f2c.h:142
char * infmt
Definition f2c.h:134
ftnlen inunflen
Definition f2c.h:139
ftnlen inseqlen
Definition f2c.h:131
flag inerr
Definition f2c.h:118
ftnint * inex
Definition f2c.h:122
ftnint inunit
Definition f2c.h:119
ftnlen inacclen
Definition f2c.h:129
ftnint * inopen
Definition f2c.h:123
char * inform
Definition f2c.h:136
char * inacc
Definition f2c.h:128
ftnint informlen
Definition f2c.h:137
char * indir
Definition f2c.h:132
char * inname
Definition f2c.h:126
ftnint * inrecl
Definition f2c.h:140
ftnlen innamlen
Definition f2c.h:127
char * inunf
Definition f2c.h:138
ftnlen infmtlen
Definition f2c.h:135
Definition f2c.h:92
char * osta
Definition f2c.h:96
ftnlen ofnmlen
Definition f2c.h:95
ftnint orl
Definition f2c.h:99
char * ofnm
Definition f2c.h:94
char * oblnk
Definition f2c.h:100
char * ofm
Definition f2c.h:98
flag oerr
Definition f2c.h:92
char * oacc
Definition f2c.h:97
ftnint ounit
Definition f2c.h:93
complex c
Definition f2c.h:155
shortint h
Definition f2c.h:150
integer1 g
Definition f2c.h:149
integer i
Definition f2c.h:151
doublecomplex z
Definition f2c.h:156
real r
Definition f2c.h:153
doublereal d
Definition f2c.h:154