Broadcast forwarder for ip-bound gameservers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configfile.h 889B

12345678910111213141516171819202122232425262728
  1. #ifndef _CONFIG_H_
  2. #define _CONFIG_H_
  3. int config_parse(const char *config);
  4. void config_free(void);
  5. const char * config_get_string(const char *section_str, const char *option, const char *def);
  6. int config_get_int(const char *section, const char *option, int *value, int def);
  7. int config_get_strings(const char *section_str, const char *option,
  8. int (*callback)(const char *value, void *privdata),
  9. void *privdata);
  10. struct strtoken {
  11. int count;
  12. char *field[0];
  13. };
  14. struct strtoken * strtokenize(const char *input, const char *delim, int maxfields);
  15. struct strtoken * config_get_strtoken(const char *section_str, const char *option, const char *delim, int maxfields);
  16. int config_get_strtokens(const char *section_str, const char *option, const char *delim, int maxfields,
  17. int (*callback)(struct strtoken *tokens, void *privdata),
  18. void *privdata);
  19. #endif /* _CONFIG_H_ */