Functions | |
const char * | option_find (list *l, const char *key) |
float | option_find_float (list *l, const char *key, float def) |
float | option_find_float_quiet (list *l, const char *key, float def) |
int | option_find_int (list *l, const char *key, int def) |
int | option_find_int_quiet (list *l, const char *key, int def) |
const char * | option_find_str (list *l, const char *key, const char *def) |
const char * | option_find_str_quiet (list *l, const char *key, const char *def) |
void | option_insert (list *l, const char *key, const char *val) |
void | option_unused (list *l) |
list * | read_data_cfg (const char *filename) |
Read the .data file. | |
int | read_option (char *s, list *options) |
Parse a key-value pair from a single line of text that came from a .cfg or .data file. | |
const char * option_find | ( | list * | l, |
const char * | key | ||
) |
float option_find_float | ( | list * | l, |
const char * | key, | ||
float | def | ||
) |
float option_find_float_quiet | ( | list * | l, |
const char * | key, | ||
float | def | ||
) |
int option_find_int | ( | list * | l, |
const char * | key, | ||
int | def | ||
) |
int option_find_int_quiet | ( | list * | l, |
const char * | key, | ||
int | def | ||
) |
const char * option_find_str | ( | list * | l, |
const char * | key, | ||
const char * | def | ||
) |
const char * option_find_str_quiet | ( | list * | l, |
const char * | key, | ||
const char * | def | ||
) |
void option_insert | ( | list * | l, |
const char * | key, | ||
const char * | val | ||
) |
void option_unused | ( | list * | l | ) |
list * read_data_cfg | ( | const char * | filename | ) |
Read the .data file.
int read_option | ( | char * | s, |
list * | options | ||
) |
Parse a key-value pair from a single line of text that came from a .cfg or
.data file.
0
if the line does not contain a key-value pair. 1
if a key-value pair was parsed and stored in options
.