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