45 #ifndef INI_HANDLER_LINENO
46 #define INI_HANDLER_LINENO 0
50 #if INI_HANDLER_LINENO
51 typedef int (*
ini_handler)(
void* user,
const char* section,
52 const char* name,
const char* value,
56 const char* name,
const char* value);
60 typedef char* (*ini_reader)(
char* str,
int num,
void* stream);
95 #ifndef INI_ALLOW_MULTILINE
96 #define INI_ALLOW_MULTILINE 1
101 #ifndef INI_ALLOW_BOM
102 #define INI_ALLOW_BOM 1
107 #ifndef INI_START_COMMENT_PREFIXES
108 #define INI_START_COMMENT_PREFIXES ";#"
114 #ifndef INI_ALLOW_INLINE_COMMENTS
115 #define INI_ALLOW_INLINE_COMMENTS 1
117 #ifndef INI_INLINE_COMMENT_PREFIXES
118 #define INI_INLINE_COMMENT_PREFIXES ";"
122 #ifndef INI_USE_STACK
123 #define INI_USE_STACK 1
129 #define INI_MAX_LINE 200
135 #ifndef INI_ALLOW_REALLOC
136 #define INI_ALLOW_REALLOC 0
141 #ifndef INI_INITIAL_ALLOC
142 #define INI_INITIAL_ALLOC 200
146 #ifndef INI_STOP_ON_FIRST_ERROR
147 #define INI_STOP_ON_FIRST_ERROR 0
int ini_parse(const char *filename, ini_handler handler, void *user)
char *(* ini_reader)(char *str, int num, void *stream)
int(* ini_handler)(void *user, const char *section, const char *name, const char *value)
int ini_parse_file(FILE *file, ini_handler handler, void *user)
int ini_parse_stream(ini_reader reader, void *stream, ini_handler handler, void *user)
int ini_parse_string(const char *string, ini_handler handler, void *user)