LAR Library: ini.h Source File

LAR Library

ini.h
Go to the documentation of this file.
1 #ifndef LARLIB_INIPARSE_H
2 #define LARLIB_INIPARSE_H
3 
77 #include <larlib/base.h>
78 
79 /*
80  * Typedef for struct iniElement_t
81  */
82 typedef struct iniElement_t iniElement_t;
83 
88 struct iniElement_t {
96  char *group;
97 
102  char *key;
103 
116  int (*handler)(iniElement_t *ini, const char *group, const char *key,
117  const char *value);
118 
123  void *param;
124 };
125 
139 typedef char* (*iniLineReader_t)(void *p, char *line, int maxline);
140 
160 int iniParse(iniElement_t elements[], const char *fileName);
161 
177 int iniParseString(iniElement_t elements[], const char *contents);
178 
198 int iniParseLines(iniElement_t elements[], iniLineReader_t readLine, void *p);
199 
200 /* @} */
201 
202 #endif
char *(* iniLineReader_t)(void *p, char *line, int maxline)
Signature of function used by iniParseLines() to read next line from input file.
Definition: ini.h:139
int iniParseString(iniElement_t elements[], const char *contents)
Process a previously INI file loaded in memory.
char * key
Name of element.
Definition: ini.h:102
int iniParse(iniElement_t elements[], const char *fileName)
Process the given INI file and calls handler functions according to the element table given...
void * param
An optional user-defined parameter that is not touched by the iniParse() function.
Definition: ini.h:123
Descriptor of elements allowed in an INI file.
Definition: ini.h:88
int iniParseLines(iniElement_t elements[], iniLineReader_t readLine, void *p)
Process the lines of an INI file returned from repeated calls to readLine.
Larlib basic definitions.
int(* handler)(iniElement_t *ini, const char *group, const char *key, const char *value)
Function that must be called to handle this element.
Definition: ini.h:116
char * group
Is this entry allowed inside which group?
Definition: ini.h:96
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by   doxygen 1.8.9.1