To dump the internal structures to a file or to standard output several functions exist. The most powerful among them is ipdDumpRec. All other dumping functions are based on it.
void ipdDumpRec(void *fOut, ipdTreeNode_t *tn, bool recursive, bool onlyValues, ipdPrintf_f thisPrintf)
The first parameter is a file handle to a valid output stream or a pointer to a text buffer. If set to 0 standard output is used. The second parameter tn is the item to be dumped which can be obtained by a call to ipdExistItemByName (see Section B.1). It is of type ipdTreeNode_t which is the generic Input Deck database data structure. If the parameter recursive is set to true the whole hierarchy stored in a section item is dumped. If it is set to false the contents of subsections of the section to be written are not dumped. When onlyValues is set expressions of variables are not printed. Instead, the expressions are evaluated and only the calculated values are dumped. This feature is useful to check expressions. The last parameter thisPrintf specifies the print function to use. The function must be of a similar type as ipdPrintf_f.
typedef int (*ipdPrintf_f)(void *, const char *, ...);
which is fprintf for dumping in files or sprintf to print in a text buffer.
Several other dumping functions are based on ipdDumpRec and are self-explaining:
void ipdDumpAll2File (FILE *fOut, bool onlyValues); void ipdDumpAll2String(char *str, bool onlyValues); void ipdDump2String (char *str, ipdTreeNode_t *tn, bool recursive, bool onlyValues);
Robert Klima 2003-02-06