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