--- ray/src/util/eplus_idf.h 2014/02/10 04:51:26 2.6 +++ ray/src/util/eplus_idf.h 2014/02/12 17:40:07 2.7 @@ -1,4 +1,4 @@ -/* RCSid $Id: eplus_idf.h,v 2.6 2014/02/10 04:51:26 greg Exp $ */ +/* RCSid $Id: eplus_idf.h,v 2.7 2014/02/12 17:40:07 greg Exp $ */ /* * eplus_idf.h * @@ -19,54 +19,54 @@ extern "C" { #define IDF_MAXLINE 512 /* maximum line length */ #define IDF_MAXARGL 104 /* maximum argument length */ -/* Input Data File parameter argument list */ +/* Input Data File object argument list */ typedef struct s_idf_field { - struct s_idf_field *next; /* next in parameter list */ + struct s_idf_field *next; /* next in object list */ char *rem; /* string following argument */ char val[2]; /* value (extends struct) */ } IDF_FIELD; -/* Input Data File parameter */ -typedef struct s_idf_parameter { - const char *pname; /* parameter name (type) */ - struct s_idf_parameter *pnext; /* next parameter same type */ - struct s_idf_parameter *dnext; /* next parameter in IDF */ +/* Input Data File object */ +typedef struct s_idf_object { + const char *pname; /* object name (type) */ + struct s_idf_object *pnext; /* next object same type */ + struct s_idf_object *dnext; /* next object in IDF */ int nfield; /* field count */ IDF_FIELD *flist; /* field list */ char rem[1]; /* comment (extends struct) */ -} IDF_PARAMETER; +} IDF_OBJECT; /* Input Data File w/ dictionary */ typedef struct { char *hrem; /* header remarks */ - IDF_PARAMETER *pfirst; /* first parameter in file */ - IDF_PARAMETER *plast; /* last parameter loaded */ - LUTAB ptab; /* parameter hash table */ + IDF_OBJECT *pfirst; /* first object in file */ + IDF_OBJECT *plast; /* last object loaded */ + LUTAB ptab; /* object hash table */ } IDF_LOADED; -/* Create a new parameter with empty field list (comment & prev optional) */ -extern IDF_PARAMETER *idf_newparam(IDF_LOADED *idf, const char *pname, - const char *comm, IDF_PARAMETER *prev); +/* Create a new object with empty field list (comment & prev optional) */ +extern IDF_OBJECT *idf_newobject(IDF_LOADED *idf, const char *pname, + const char *comm, IDF_OBJECT *prev); -/* Add a field to the given parameter and follow with the given text */ -extern int idf_addfield(IDF_PARAMETER *param, const char *fval, +/* Add a field to the given object and follow with the given text */ +extern int idf_addfield(IDF_OBJECT *param, const char *fval, const char *comm); -/* Retrieve the indexed field from parameter (first field index is 1) */ -extern IDF_FIELD *idf_getfield(IDF_PARAMETER *param, int fn); +/* Retrieve the indexed field from object (first field index is 1) */ +extern IDF_FIELD *idf_getfield(IDF_OBJECT *param, int fn); -/* Delete the specified parameter from the IDF */ -extern int idf_delparam(IDF_LOADED *idf, IDF_PARAMETER *param); +/* Delete the specified object from the IDF */ +extern int idf_delobject(IDF_LOADED *idf, IDF_OBJECT *param); -/* Move the specified parameter to the given position in the IDF */ -extern int idf_movparam(IDF_LOADED *idf, IDF_PARAMETER *param, - IDF_PARAMETER *prev); +/* Move the specified object to the given position in the IDF */ +extern int idf_movobject(IDF_LOADED *idf, IDF_OBJECT *param, + IDF_OBJECT *prev); -/* Get a named parameter list */ -extern IDF_PARAMETER *idf_getparam(IDF_LOADED *idf, const char *pname); +/* Get a named object list */ +extern IDF_OBJECT *idf_getobject(IDF_LOADED *idf, const char *pname); -/* Read a parameter and fields from an open file and add to end of list */ -extern IDF_PARAMETER *idf_readparam(IDF_LOADED *idf, FILE *fp); +/* Read a object and fields from an open file and add to end of list */ +extern IDF_OBJECT *idf_readobject(IDF_LOADED *idf, FILE *fp); /* Initialize an IDF struct */ extern IDF_LOADED *idf_create(const char *hdrcomm); @@ -77,8 +77,8 @@ extern int idf_add2hdr(IDF_LOADED *idf, const char *h /* Load an Input Data File */ extern IDF_LOADED *idf_load(const char *fname); -/* Write a parameter and fields to an open file */ -int idf_writeparam(IDF_PARAMETER *param, FILE *fp, +/* Write a object and fields to an open file */ +int idf_writeparam(IDF_OBJECT *param, FILE *fp, int incl_comm); /* Write out an Input Data File */