nuclear@0: #ifndef OPT_H_ nuclear@0: #define OPT_H_ nuclear@0: nuclear@0: enum opt_type { OTYPE_INT, OTYPE_FLOAT }; nuclear@0: nuclear@0: struct option { nuclear@0: enum opt_type type; nuclear@0: int ival; nuclear@0: float fval; nuclear@0: }; nuclear@0: nuclear@0: void *create_options(void); nuclear@0: void destroy_options(void *optdb); nuclear@0: nuclear@0: void set_option_int(void *optdb, const char *key, int val); nuclear@0: void set_option_float(void *optdb, const char *key, float val); nuclear@0: nuclear@0: int get_option_int(void *optdb, const char *key, int *val); nuclear@0: int get_option_float(void *optdb, const char *key, float *val); nuclear@0: nuclear@0: #endif /* OPT_H_ */