iniutil.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __LOGINI_H__
  2. #define __LOGINI_H__
  3. #pragma once
  4. #include "config.h"
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #include <stdarg.h>
  9. #include "array.h"
  10. TOOLKIT_API char *inifile_read_str(const char *file, const char *section, const char *key, const char *defval);
  11. TOOLKIT_API int inifile_read_int(const char *file, const char *section, const char *key, int defval);
  12. TOOLKIT_API array_header_t* inifile_read_section_all(const char *file);
  13. TOOLKIT_API array_header_t* inifile_read_section_key_all(const char *file, const char *section);
  14. TOOLKIT_API int inifile_format_readv(const char *file, const char *section, const char *key, const char *fmt, va_list arg);
  15. TOOLKIT_API int inifile_format_read(const char *file, const char *section, const char *key, const char *fmt, ...);
  16. TOOLKIT_API int inifile_write_str(const char *file, const char *section, const char *key, const char *value);
  17. TOOLKIT_API int inifile_write_int(const char *file, const char *section, const char *key, int value);
  18. TOOLKIT_API int inifile_format_writev(const char *file, const char *section, const char *key, const char *fmt, va_list arg);
  19. TOOLKIT_API int inifile_format_write(const char *file, const char *section, const char *key, const char *fmt, ...);
  20. #ifdef __cplusplus
  21. } // extern "C" {
  22. #endif
  23. #endif //__LOGINI_H__