1*47943Sbostic /*- 2*47943Sbostic * Copyright (c) 1980 The Regents of the University of California. 3*47943Sbostic * All rights reserved. 424098Sjerry * 5*47943Sbostic * %sccs.include.proprietary.c% 6*47943Sbostic * 7*47943Sbostic * @(#)nmlio.h 5.2 (Berkeley) 04/12/91 824098Sjerry */ 924098Sjerry 1024098Sjerry /* header for namelist I/O */ 1124098Sjerry 1224098Sjerry #define ERRNM(x) if(n=(x)) return(n); 1324098Sjerry #define VL 16 /* variable name length from f77pass1/defs.h */ 1424098Sjerry 1524098Sjerry extern char namelistkey_; 1624098Sjerry 1724098Sjerry typedef struct 1824098Sjerry { 1924098Sjerry char namelistname[VL+4]; /* 4 for padding */ 2024098Sjerry struct namelistentry 2124098Sjerry { 2224098Sjerry char varname[VL+4]; /* 4 for padding */ 2324098Sjerry char *varaddr; 2424098Sjerry short int type; 2524098Sjerry short int typelen; 2624098Sjerry /* 2724098Sjerry * If dimp is not null, then the corner element of the array is 2824098Sjerry * at varaddr. However, the element with subscripts: 2924098Sjerry * (i1,...,in) is at 3024098Sjerry * 3124098Sjerry * varaddr - dimp->baseoffset + sizeoftype * 3224098Sjerry * ((i1-1)+span[0]*((i2-1)+span[1]*...) 3324098Sjerry */ 3424098Sjerry int *dimp; /* dimension info: (null means scalar) 3524098Sjerry *dimp: numb. of dim., 3624098Sjerry dimp[0]: number of dimensions 3724098Sjerry dimp[1]: total number of elements, 3824098Sjerry dimp[2]: base offset, 3924098Sjerry dimp[3]: span of 1st dimension 4024098Sjerry dimp[4]: span of 2nd dimension 4124098Sjerry ... */ 4224098Sjerry } names[1]; /* actually one per name in the namelist */ 4324098Sjerry } Namelist; 4424098Sjerry 4524098Sjerry typedef struct 4624098Sjerry { flag cierr; 4724098Sjerry ftnint ciunit; 4824098Sjerry flag ciend; 4924098Sjerry Namelist *namelist; 5024098Sjerry } namelist_arglist; 51