Asterisk - The Open Source Telephony Project GIT-master-f3e88d3
f2c.h
Go to the documentation of this file.
1/*
2
3$Log$
4Revision 1.15 2004/06/26 03:50:14 markster
5Merge source cleanups (bug #1911)
6
7Revision 1.14 2003/02/12 13:59:15 matteo
8mer feb 12 14:56:57 CET 2003
9
10Revision 1.1.1.1 2003/02/12 13:59:15 matteo
11mer feb 12 14:56:57 CET 2003
12
13Revision 1.2 2000/01/05 08:20:39 markster
14Some OSS fixes and a few lpc changes to make it actually work
15
16 * Revision 1.2 1996/08/20 20:26:28 jaf
17 * Any typedef defining a type that was used in lpc10_encoder_state or
18 * lpc10_decoder_state struct's was commented out here and added to
19 * lpc10.h.
20 *
21 * Revision 1.1 1996/08/19 22:32:13 jaf
22 * Initial revision
23 *
24
25*/
26
27/*
28 * f2c.h
29 *
30 * SCCS ID: @(#)f2c.h 1.2 96/05/19
31 */
32
33/* f2c.h -- Standard Fortran to C header file */
34
35/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
36
37 - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
38
39#ifndef F2C_INCLUDE
40#define F2C_INCLUDE
41
42#include "lpc10.h"
43
44/*typedef long int integer;*/
45/*typedef INT32 integer;*/
46/*typedef short int shortint;*/
47/*typedef INT16 shortint;*/
48/*typedef float real;*/
49/* doublereal only used for function arguments to sqrt, exp, etc. */
50typedef double doublereal;
51/* 32 bits seems wasteful, but there really aren't that many logical
52 * variables around, and making them 32 bits could avoid word
53 * alignment problems, perhaps. */
54/*typedef long int logical;*/
55/*typedef INT32 logical;*/
56/* The following types are not used in the translated C code for the
57 * LPC-10 coder, but they might be needed by the definitions down
58 * below, so they don't cause compilation errors. */
59typedef char *address;
60typedef struct { real r, i; } complex;
61typedef struct { doublereal r, i; } doublecomplex;
62typedef short int shortlogical;
63typedef char logical1;
64typedef char integer1;
65/* typedef long long longint; */ /* system-dependent */
66
67#define TRUE_ (1)
68#define FALSE_ (0)
69
70/* Extern is for use with -E */
71#ifndef Extern
72#define Extern extern
73#endif
74
75/* I/O stuff */
76
77#ifdef f2c_i2
78/* for -i2 */
79typedef short flag;
80typedef short ftnlen;
81typedef short ftnint;
82#else
83typedef long int flag;
84typedef long int ftnlen;
85typedef long int ftnint;
86#endif
87
88/*external read, write*/
89typedef struct
93 char *cifmt;
95} cilist;
96
97/*internal read, write*/
98typedef struct
100 char *iciunit;
102 char *icifmt;
105} icilist;
106
107/*open*/
108typedef struct
111 char *ofnm;
113 char *osta;
114 char *oacc;
115 char *ofm;
117 char *oblnk;
118} olist;
119
120/*close*/
121typedef struct
124 char *csta;
125} cllist;
126
127/*rewind, backspace, endfile*/
128typedef struct
131} alist;
132
133/* inquire */
134typedef struct
137 char *infile;
139 ftnint *inex; /*parameters in standard's order*/
143 char *inname;
145 char *inacc;
147 char *inseq;
149 char *indir;
151 char *infmt;
153 char *inform;
155 char *inunf;
159 char *inblank;
161} inlist;
162
163#define VOID void
164
165union Multitype { /* for multiple entry points */
169 /* longint j; */
174 };
175
176typedef union Multitype Multitype;
177
178/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
179
180struct Vardesc { /* for Namelist */
181 char *name;
182 char *addr;
184 int type;
185 };
186typedef struct Vardesc Vardesc;
187
188struct Namelist {
189 char *name;
191 int nvars;
192 };
193typedef struct Namelist Namelist;
194
195#define abs(x) ((x) >= 0 ? (x) : -(x))
196#define dabs(x) (doublereal)abs(x)
197#define min(a,b) ((a) <= (b) ? (a) : (b))
198#define max(a,b) ((a) >= (b) ? (a) : (b))
199#define dmin(a,b) (doublereal)min(a,b)
200#define dmax(a,b) (doublereal)max(a,b)
201
202/* procedure parameter types for -A and -C++ */
203
204#define F2C_proc_par_types 1
205#ifdef __cplusplus
206typedef int /* Unknown procedure type */ (*U_fp)(...);
207typedef shortint (*J_fp)(...);
208typedef integer (*I_fp)(...);
209typedef real (*R_fp)(...);
210typedef doublereal (*D_fp)(...), (*E_fp)(...);
211typedef /* Complex */ VOID (*C_fp)(...);
212typedef /* Double Complex */ VOID (*Z_fp)(...);
213typedef logical (*L_fp)(...);
214typedef shortlogical (*K_fp)(...);
215typedef /* Character */ VOID (*H_fp)(...);
216typedef /* Subroutine */ int (*S_fp)(...);
217#else
218typedef int /* Unknown procedure type */ (*U_fp)(VOID);
219typedef shortint (*J_fp)(VOID);
220typedef integer (*I_fp)(VOID);
221typedef real (*R_fp)(VOID);
222typedef doublereal (*D_fp)(VOID), (*E_fp)(VOID);
223typedef /* Complex */ VOID (*C_fp)(VOID);
224typedef /* Double Complex */ VOID (*Z_fp)(VOID);
225typedef logical (*L_fp)(VOID);
227typedef /* Character */ VOID (*H_fp)(VOID);
228typedef /* Subroutine */ int (*S_fp)(VOID);
229#endif
230/* E_fp is for real functions when -R is not specified */
231typedef VOID C_f; /* complex function */
232typedef VOID H_f; /* character function */
233typedef VOID Z_f; /* double complex function */
234typedef doublereal E_f; /* real function with -R not specified */
235
236/* undef any lower-case symbols that your C compiler predefines, e.g.: */
237
238#ifndef Skip_f2c_Undefs
239#undef cray
240#undef gcos
241#undef mc68010
242#undef mc68020
243#undef mips
244#undef pdp11
245#undef sgi
246#undef sparc
247#undef sun
248#undef sun2
249#undef sun3
250#undef sun4
251#undef u370
252#undef u3b
253#undef u3b2
254#undef u3b5
255#undef unix
256#undef vax
257#endif
258
259#ifdef KR_headers
260extern integer pow_ii(ap, bp);
261extern double r_sign(a,b);
262extern integer i_nint(x);
263#else
264extern integer pow_ii(integer *ap, integer *bp);
265extern double r_sign(real *a, real *b);
266extern integer i_nint(real *x);
267
268#endif
269#ifdef P_R_O_T_O_T_Y_P_E_S
270extern int bsynz_(real *coef, integer *ip, integer *iv,
271 real *sout, real *rms, real *ratio, real *g2pass,
272 struct lpc10_decoder_state *st);
273extern int chanwr_(integer *order, integer *ipitv, integer *irms,
274 integer *irc, integer *ibits, struct lpc10_encoder_state *st);
275extern int chanrd_(integer *order, integer *ipitv, integer *irms,
276 integer *irc, integer *ibits);
277extern int chanwr_0_(int n__, integer *order, integer *ipitv,
278 integer *irms, integer *irc, integer *ibits,
279 struct lpc10_encoder_state *st);
280extern int dcbias_(integer *len, real *speech, real *sigout);
281extern int decode_(integer *ipitv, integer *irms, integer *irc,
282 integer *voice, integer *pitch, real *rms,
283 real *rc, struct lpc10_decoder_state *st);
284extern int deemp_(real *x, integer *n, struct lpc10_decoder_state *st);
285extern int difmag_(real *speech, integer *lpita, integer *tau, integer *ltau,
286 integer *maxlag, real *amdf, integer *minptr, integer *maxptr);
287extern int dyptrk_(real *amdf, integer *ltau, integer *
288 minptr, integer *voice, integer *pitch, integer *midx,
289 struct lpc10_encoder_state *st);
290extern int encode_(integer *voice, integer *pitch, real *rms, real *rc,
291 integer *ipitch, integer *irms, integer *irc);
292extern int energy_(integer *len, real *speech, real *rms);
293extern int ham84_(integer *input, integer *output, integer *errcnt);
294extern int hp100_(real *speech, integer *start, integer *end,
295 struct lpc10_encoder_state *st);
296extern int inithp100_(void);
297extern int invert_(integer *order, real *phi, real *psi, real *rc);
298extern int irc2pc_(real *rc, real *pc, integer *order, real *gprime, real *g2pass);
299extern int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real *ivrc);
300extern int lpcdec_(integer *bits, real *speech);
301extern int initlpcdec_(void);
302extern int lpcenc_(real *speech, integer *bits);
303extern int initlpcenc_(void);
304extern int lpfilt_(real *inbuf, real *lpbuf, integer *len, integer *nsamp);
305extern integer median_(integer *d1, integer *d2, integer *d3);
306extern int mload_(integer *order, integer *awins, integer *awinf, real *speech, real *phi, real *psi);
307extern int onset_(real *pebuf, integer *osbuf, integer *osptr, integer *oslen, integer *sbufl, integer *sbufh, integer *lframe, struct lpc10_encoder_state *st);
308extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv, integer *ipiti, real *rmsi, real *rci, integer *nout, real *ratio, struct lpc10_decoder_state *st);
309extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *af, integer *vwin, integer *awin, integer *ewin, integer *lframe, integer *maxwin);
310extern int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obound, integer *vwin, integer *af, integer *lframe, integer *minwin, integer *maxwin, integer *dvwinl, integer *dvwinh);
311extern int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z__);
312extern int prepro_(real *speech, integer *length,
313 struct lpc10_encoder_state *st);
314extern int decode_(integer *ipitv, integer *irms, integer *irc, integer *voice, integer *pitch, real *rms, real *rc, struct lpc10_decoder_state *st);
315extern integer random_(struct lpc10_decoder_state *st);
316extern int rcchk_(integer *order, real *rc1f, real *rc2f);
317extern int synths_(integer *voice, integer *pitch, real *rms, real *rc, real *speech, integer *k, struct lpc10_decoder_state *st);
318extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real *amdf, integer *minptr, integer *maxptr, integer *mintau);
319extern int voicin_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd, integer *mintau, real *ivrc, integer *obound, integer *voibuf, integer *af, struct lpc10_encoder_state *st);
320extern int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *dither, integer *mintau, integer *zc, integer *lbe, integer *fbe, real *qs, real *rc1, real *ar_b__, real *ar_f__);
321
322#endif
323
324
325#endif /* ! defined F2C_INCLUDE */
integer lframe
Definition: analys.c:66
integer order
Definition: analys.c:66
static int input(yyscan_t yyscanner)
Definition: ast_expr2f.c:1570
char * end
Definition: eagi_proxy.c:73
int synths_(integer *voice, integer *pitch, real *rms, real *rc, real *speech, integer *k, struct lpc10_decoder_state *st)
Definition: synths.c:170
int difmag_(real *speech, integer *lpita, integer *tau, integer *ltau, integer *maxlag, real *amdf, integer *minptr, integer *maxptr)
Definition: difmag.c:90
double r_sign(real *a, real *b)
Definition: f2clib.c:64
int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z__)
Definition: preemp.c:82
int mload_(integer *order, integer *awins, integer *awinf, real *speech, real *phi, real *psi)
Definition: mload.c:99
VOID(* Z_fp)(VOID)
Definition: f2c.h:224
int initlpcdec_(void)
shortint(* J_fp)(VOID)
Definition: f2c.h:219
int chanwr_(integer *order, integer *ipitv, integer *irms, integer *irc, integer *ibits, struct lpc10_encoder_state *st)
Definition: chanwr.c:223
double doublereal
Definition: f2c.h:50
logical(* L_fp)(VOID)
Definition: f2c.h:225
char * address
Definition: f2c.h:59
VOID(* C_fp)(VOID)
Definition: f2c.h:223
int(* S_fp)(VOID)
Definition: f2c.h:228
shortlogical(* K_fp)(VOID)
Definition: f2c.h:226
long int ftnlen
Definition: f2c.h:84
int decode_(integer *ipitv, integer *irms, integer *irc, integer *voice, integer *pitch, real *rms, real *rc, struct lpc10_decoder_state *st)
Definition: lpc10/decode.c:147
int energy_(integer *len, real *speech, real *rms)
Definition: energy.c:78
int voicin_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd, integer *mintau, real *ivrc, integer *obound, integer *voibuf, integer *af, struct lpc10_encoder_state *st)
Definition: voicin.c:258
integer pow_ii(integer *ap, integer *bp)
Definition: f2clib.c:30
real(* R_fp)(VOID)
Definition: f2c.h:221
integer i_nint(real *x)
Definition: f2clib.c:80
int onset_(real *pebuf, integer *osbuf, integer *osptr, integer *oslen, integer *sbufl, integer *sbufh, integer *lframe, struct lpc10_encoder_state *st)
Definition: onset.c:129
integer(* I_fp)(VOID)
Definition: f2c.h:220
VOID(* H_fp)(VOID)
Definition: f2c.h:227
int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obound, integer *vwin, integer *af, integer *lframe, integer *minwin, integer *maxwin, integer *dvwinl, integer *dvwinh)
Definition: placev.c:112
int rcchk_(integer *order, real *rc1f, real *rc2f)
Definition: rcchk.c:82
int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real *ivrc)
Definition: ivfilt.c:89
int lpcenc_(real *speech, integer *bits)
int prepro_(real *speech, integer *length, struct lpc10_encoder_state *st)
Definition: prepro.c:101
VOID C_f
Definition: f2c.h:231
int invert_(integer *order, real *phi, real *psi, real *rc)
Definition: invert.c:93
VOID Z_f
Definition: f2c.h:233
int initlpcenc_(void)
#define VOID
Definition: f2c.h:163
int chanrd_(integer *order, integer *ipitv, integer *irms, integer *irc, integer *ibits)
Definition: chanwr.c:229
integer random_(struct lpc10_decoder_state *st)
Definition: random.c:93
int irc2pc_(real *rc, real *pc, integer *order, real *gprime, real *g2pass)
Definition: irc2pc.c:82
int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv, integer *ipiti, real *rmsi, real *rci, integer *nout, real *ratio, struct lpc10_decoder_state *st)
Definition: pitsyn.c:132
int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *dither, integer *mintau, integer *zc, integer *lbe, integer *fbe, real *qs, real *rc1, real *ar_b__, real *ar_f__)
Definition: vparms.c:134
int deemp_(real *x, integer *n, struct lpc10_decoder_state *st)
Definition: deemp.c:106
long int ftnint
Definition: f2c.h:85
integer median_(integer *d1, integer *d2, integer *d3)
Definition: median.c:69
int inithp100_(void)
char integer1
Definition: f2c.h:64
long int flag
Definition: f2c.h:83
int dyptrk_(real *amdf, integer *ltau, integer *minptr, integer *voice, integer *pitch, integer *midx, struct lpc10_encoder_state *st)
Definition: dyptrk.c:129
int dcbias_(integer *len, real *speech, real *sigout)
Definition: dcbias.c:79
doublereal(*)(* E_fp)(VOID)
Definition: f2c.h:222
doublereal(* D_fp)(VOID)
Definition: f2c.h:222
int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *af, integer *vwin, integer *awin, integer *ewin, integer *lframe, integer *maxwin)
Definition: placea.c:116
int chanwr_0_(int n__, integer *order, integer *ipitv, integer *irms, integer *irc, integer *ibits, struct lpc10_encoder_state *st)
Definition: chanwr.c:132
short int shortlogical
Definition: f2c.h:62
int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real *amdf, integer *minptr, integer *maxptr, integer *mintau)
Definition: tbdm.c:94
int bsynz_(real *coef, integer *ip, integer *iv, real *sout, real *rms, real *ratio, real *g2pass, struct lpc10_decoder_state *st)
Definition: bsynz.c:122
char logical1
Definition: f2c.h:63
int hp100_(real *speech, integer *start, integer *end, struct lpc10_encoder_state *st)
Definition: hp100.c:113
int lpcdec_(integer *bits, real *speech)
doublereal E_f
Definition: f2c.h:234
int ham84_(integer *input, integer *output, integer *errcnt)
Definition: ham84.c:85
VOID H_f
Definition: f2c.h:232
int lpfilt_(real *inbuf, real *lpbuf, integer *len, integer *nsamp)
Definition: lpfilt.c:83
int encode_(integer *voice, integer *pitch, real *rms, real *rc, integer *ipitch, integer *irms, integer *irc)
Definition: encode.c:111
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
float real
Definition: lpc10.h:79
INT32 integer
Definition: lpc10.h:80
INT32 logical
Definition: lpc10.h:81
INT16 shortint
Definition: lpc10.h:82
Definition: f2c.h:188
Vardesc ** vars
Definition: f2c.h:190
char * name
Definition: f2c.h:189
int nvars
Definition: f2c.h:191
Definition: f2c.h:180
char * name
Definition: f2c.h:181
ftnlen * dims
Definition: f2c.h:183
char * addr
Definition: f2c.h:182
int type
Definition: f2c.h:184
Definition: f2c.h:129
flag aerr
Definition: f2c.h:129
ftnint aunit
Definition: f2c.h:130
Definition: f2c.h:90
ftnint cirec
Definition: f2c.h:94
flag ciend
Definition: f2c.h:92
char * cifmt
Definition: f2c.h:93
flag cierr
Definition: f2c.h:90
ftnint ciunit
Definition: f2c.h:91
Definition: f2c.h:122
ftnint cunit
Definition: f2c.h:123
char * csta
Definition: f2c.h:124
flag cerr
Definition: f2c.h:122
Definition: f2c.h:60
real i
Definition: f2c.h:60
doublereal i
Definition: f2c.h:61
Definition: f2c.h:99
flag icierr
Definition: f2c.h:99
char * iciunit
Definition: f2c.h:100
flag iciend
Definition: f2c.h:101
char * icifmt
Definition: f2c.h:102
ftnint icirnum
Definition: f2c.h:104
ftnint icirlen
Definition: f2c.h:103
Definition: f2c.h:135
char * inacc
Definition: f2c.h:145
ftnlen inacclen
Definition: f2c.h:146
ftnint * innamed
Definition: f2c.h:142
char * inunf
Definition: f2c.h:155
ftnint * inrecl
Definition: f2c.h:157
char * inname
Definition: f2c.h:143
char * infmt
Definition: f2c.h:151
ftnlen inblanklen
Definition: f2c.h:160
ftnlen inseqlen
Definition: f2c.h:148
ftnint informlen
Definition: f2c.h:154
ftnint inunit
Definition: f2c.h:136
char * inseq
Definition: f2c.h:147
flag inerr
Definition: f2c.h:135
ftnint * innrec
Definition: f2c.h:158
ftnint * innum
Definition: f2c.h:141
ftnlen infilen
Definition: f2c.h:138
ftnlen inunflen
Definition: f2c.h:156
ftnlen infmtlen
Definition: f2c.h:152
ftnint * inex
Definition: f2c.h:139
ftnint * inopen
Definition: f2c.h:140
ftnlen indirlen
Definition: f2c.h:150
ftnlen innamlen
Definition: f2c.h:144
char * indir
Definition: f2c.h:149
char * inform
Definition: f2c.h:153
char * inblank
Definition: f2c.h:159
char * infile
Definition: f2c.h:137
Definition: f2c.h:109
char * oacc
Definition: f2c.h:114
char * ofm
Definition: f2c.h:115
ftnlen ofnmlen
Definition: f2c.h:112
char * osta
Definition: f2c.h:113
ftnint orl
Definition: f2c.h:116
flag oerr
Definition: f2c.h:109
char * oblnk
Definition: f2c.h:117
ftnint ounit
Definition: f2c.h:110
char * ofnm
Definition: f2c.h:111
static struct test_val b
static struct test_val a
Definition: f2c.h:165
real r
Definition: f2c.h:170
complex c
Definition: f2c.h:172
doublereal d
Definition: f2c.h:171
integer1 g
Definition: f2c.h:166
shortint h
Definition: f2c.h:167
integer i
Definition: f2c.h:168
doublecomplex z
Definition: f2c.h:173
static int inbuf(struct baseio *bio, FILE *fi)
utility used by inchar(), for base_encode()
Definition: utils.c:590