cfgfile.h 637 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * cfgfile.h:
  3. *
  4. * Copyright (c) 2003 DecisionSoft Ltd.
  5. *
  6. */
  7. #ifndef __CFGFILE_H_ /* include guard */
  8. #define __CFGFILE_H_
  9. typedef struct {
  10. char *name;
  11. int value;
  12. } config_enumeration_type;
  13. int read_config();
  14. char *config_get_string(const char *directive);
  15. int config_get_bool(const char *directive);
  16. int config_get_int(const char *directive, int *value);
  17. int config_get_float(const char *directive, float *value);
  18. int config_init();
  19. void config_set_string(const char *directive, const char* s);
  20. int config_get_enum(const char *directive, config_enumeration_type *enumeration, int *value);
  21. #endif /* __CFGFILE_H_ */