2013-11-13 22:50:38 +04:00
|
|
|
#ifndef OPTION_LIST_H
|
|
|
|
#define OPTION_LIST_H
|
|
|
|
#include "list.h"
|
|
|
|
|
2014-02-14 22:26:31 +04:00
|
|
|
typedef struct{
|
|
|
|
char *key;
|
|
|
|
char *val;
|
|
|
|
int used;
|
|
|
|
} kvp;
|
|
|
|
|
|
|
|
|
2015-10-09 22:50:43 +03:00
|
|
|
int read_option(char *s, list *options);
|
2013-11-13 22:50:38 +04:00
|
|
|
void option_insert(list *l, char *key, char *val);
|
|
|
|
char *option_find(list *l, char *key);
|
|
|
|
char *option_find_str(list *l, char *key, char *def);
|
|
|
|
int option_find_int(list *l, char *key, int def);
|
2015-03-05 01:56:38 +03:00
|
|
|
int option_find_int_quiet(list *l, char *key, int def);
|
2014-01-29 04:28:42 +04:00
|
|
|
float option_find_float(list *l, char *key, float def);
|
2014-08-08 23:04:15 +04:00
|
|
|
float option_find_float_quiet(list *l, char *key, float def);
|
2013-11-13 22:50:38 +04:00
|
|
|
void option_unused(list *l);
|
|
|
|
|
|
|
|
#endif
|