40 |
|
char *hrem; /* header remarks */ |
41 |
|
IDF_PARAMETER *pfirst; /* first parameter in file */ |
42 |
|
IDF_PARAMETER *plast; /* last parameter loaded */ |
43 |
< |
LUTAB ptab; /* parameter table */ |
43 |
> |
LUTAB ptab; /* parameter hash table */ |
44 |
|
} IDF_LOADED; |
45 |
|
|
46 |
< |
/* Create a new parameter with empty field list (comment optional) */ |
46 |
> |
/* Create a new parameter with empty field list (comment & prev optional) */ |
47 |
|
extern IDF_PARAMETER *idf_newparam(IDF_LOADED *idf, const char *pname, |
48 |
< |
const char *comm, |
49 |
< |
IDF_PARAMETER *prev); |
48 |
> |
const char *comm, IDF_PARAMETER *prev); |
49 |
|
|
50 |
|
/* Add a field to the given parameter and follow with the given text */ |
51 |
|
extern int idf_addfield(IDF_PARAMETER *param, const char *fval, |
52 |
|
const char *comm); |
53 |
|
|
54 |
< |
/* Delete the specified parameter from our IDF */ |
54 |
> |
/* Retrieve the indexed field from parameter (first field index is 1) */ |
55 |
> |
extern IDF_FIELD *idf_getfield(IDF_PARAMETER *param, int fn); |
56 |
> |
|
57 |
> |
/* Delete the specified parameter from the IDF */ |
58 |
|
extern int idf_delparam(IDF_LOADED *idf, IDF_PARAMETER *param); |
59 |
|
|
60 |
+ |
/* Move the specified parameter to the given position in the IDF */ |
61 |
+ |
extern int idf_movparam(IDF_LOADED *idf, IDF_PARAMETER *param, |
62 |
+ |
IDF_PARAMETER *prev); |
63 |
+ |
|
64 |
|
/* Get a named parameter list */ |
65 |
|
extern IDF_PARAMETER *idf_getparam(IDF_LOADED *idf, const char *pname); |
66 |
|
|
70 |
|
/* Initialize an IDF struct */ |
71 |
|
extern IDF_LOADED *idf_create(const char *hdrcomm); |
72 |
|
|
73 |
+ |
/* Add comment(s) to header */ |
74 |
+ |
extern int idf_add2hdr(IDF_LOADED *idf, const char *hdrcomm); |
75 |
+ |
|
76 |
|
/* Load an Input Data File */ |
77 |
|
extern IDF_LOADED *idf_load(const char *fname); |
78 |
|
|
79 |
|
/* Write a parameter and fields to an open file */ |
80 |
< |
int idf_writeparam(IDF_PARAMETER *param, FILE *fp); |
80 |
> |
int idf_writeparam(IDF_PARAMETER *param, FILE *fp, |
81 |
> |
int incl_comm); |
82 |
|
|
83 |
|
/* Write out an Input Data File */ |
84 |
< |
extern int idf_write(IDF_LOADED *idf, const char *fname); |
84 |
> |
extern int idf_write(IDF_LOADED *idf, const char *fname, |
85 |
> |
int incl_comm); |
86 |
|
|
87 |
|
/* Free a loaded IDF */ |
88 |
|
extern void idf_free(IDF_LOADED *idf); |