Main Page | Data Structures | File List | Data Fields | Globals

iparser.c File Reference

#include "iparser.h"

Functions

IOptsioption_init (void)
void ioption_add (IOpts *opts, char *sw, IOptType iot, void *var)
void ioption_allowfrees_set (IOpts *opts, int allowfrees)
int ioption_parse (IOpts *opts, char *filename)
int ioption_write (IOpts *opts, char *filename)
void ioption_done (IOpts *opts)

Detailed Description

INI file type parser v0.3

Function Documentation

void ioption_add IOpts opts,
char *  sw,
IOptType  iot,
void *  var
 

Parameters:
opts The options list to append to.
sw The word to search for.
iot The data type.
var The variable to be modified.
Description:
Adds a new search word to a list of options to search for.

void ioption_allowfrees_set IOpts opts,
int  allowfrees
 

Parameters:
opts The options list to modify.
allowfrees To allow frees internally or not.
Description:
Allows internal freeing of strings and DStrings. Could cause problems if parent program is using memory wrapping code.

void ioption_done IOpts opts  ) 
 

Parameters:
opts The options list to free.
Description:
Frees a list of options (an IOpts struct).

IOpts* ioption_init void   ) 
 

Return values:
#IOpts * The newly allocated IOpts.
NULL when out of memory.
Description:
Allocates a new link list for options to be added to.

int ioption_parse IOpts opts,
char *  filename
 

Parameters:
opts The options list to use during parsing.
filename The name of the file to parse.
Return values:
#TRUE on success.
#FALSE if file not found or a required argument is missing.
Description:
Parses a file searching for the options in the supplied list.

int ioption_write IOpts opts,
char *  filename
 

Parameters:
opts The options list to be used for writing.
filename The name of the file to write to.
Return values:
#TRUE on success.
#FALSE if file could not be opened or a required argument is missing. Saves the data present in a list of options to a specific file.
Note:
Currently the file specified will be overwritten.


Generated on Fri Jun 4 18:35:18 2004 for cuf by doxygen 1.3.6