#include "brttutil.h" int pf2struc (Pf *pf, int ndefs, Pf2strucDefs *defs, void *struc)
The parameter file object to be parsed is specified in pf. The C structure that will contain the results is referenced by struc. It is the responsibility of the user to allocate and initialize the C structure before calling this subroutine. The structure definition is specified through an array of ndefs PfstrucDefs structures oin a single linear array referenced by defs. The Pf2strucDefs structures are defined here:
typedef struct pf2struc_def_ { char *name; /* pf name */ int pftype; /* pf type, same as parse_param(3) */ int required; /* if set, then this parameter is required */ int struc_offset; /* byte offset to the parameter in the C structure */ } Pf2strucDef;