parseconf.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #ifndef VSF_PARSECONF_H
  2. #define VSF_PARSECONF_H
  3. /* vsf_parseconf_load_file()
  4. * PURPOSE
  5. * Parse the given file as a vsftpd config file. If the file cannot be
  6. * opened for whatever reason, a fatal error is raised. If the file contains
  7. * any syntax errors, a fatal error is raised.
  8. * If the call returns (no fatal error raised), then the config file was
  9. * parsed and the global config settings will have been updated.
  10. * PARAMETERS
  11. * p_filename - the name of the config file to parse
  12. * errs_fatal - errors will cause the calling process to exit if not 0
  13. * NOTES
  14. * If p_filename is NULL, then the last filename passed to this function is
  15. * used to reload the configuration details.
  16. */
  17. void vsf_parseconf_load_file(const char* p_filename, int errs_fatal);
  18. /* vsf_parseconf_parse_setting()
  19. * PURPOSE
  20. * Handle a given name=value setting and apply it. Any whitespace at the
  21. * beginning is skipped.
  22. * PARAMETERS
  23. * p_settings - the name=value pair to apply
  24. * errs_fatal - errors will cause the calling process to exit if not 0
  25. */
  26. void vsf_parseconf_load_setting(const char* p_setting, int errs_fatal);
  27. #endif /* VSF_PARSECONF_H */