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