1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)nmlio.h 5.1.1 1/1/94
7: */
8:
9: /* header for namelist I/O */
10:
11: #define ERRNM(x) if(n=(x)) return(n);
12: #define VL 16 /* variable name length from f77pass1/defs.h */
13:
14: extern char namelistkey_;
15:
16: typedef struct
17: {
18: char namelistname[VL+4]; /* 4 for padding */
19: struct namelistentry
20: {
21: char varname[VL+4]; /* 4 for padding */
22: char *varaddr;
23: short int type;
24: short int typelen;
25: /*
26: * If dimp is not null, then the corner element of the array is
27: * at varaddr. However, the element with subscripts:
28: * (i1,...,in) is at
29: *
30: * varaddr - dimp->baseoffset + sizeoftype *
31: * ((i1-1)+span[0]*((i2-1)+span[1]*...)
32: */
33: int *dimp; /* dimension info: (null means scalar)
34: *dimp: numb. of dim.,
35: dimp[0]: number of dimensions
36: dimp[1]: total number of elements,
37: dimp[2]: base offset,
38: dimp[3]: span of 1st dimension
39: dimp[4]: span of 2nd dimension
40: ... */
41: } names[1]; /* actually one per name in the namelist */
42: } Namelist;
43:
44: typedef struct
45: { flag cierr;
46: ftnint ciunit;
47: flag ciend;
48: Namelist *namelist;
49: } namelist_arglist;
Defined struct's
Defined macros
ERRNM
defined in line
11; used 5 times
VL
defined in line
12; used 4 times
Usage of this include