Define simple configuration on INI files.
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.

55 lines
1.3 KiB

  1. #ifndef INI_CONFIG_TYPES_INT_H
  2. #define INI_CONFIG_TYPES_INT_H
  3. #include "ini-config.h"
  4. INI_CONFIG_DECLARE_TYPE(U8);
  5. #define INI_CONFIG_TYPE_U8 (INI_ConfigType) { \
  6. .size = sizeof(uint8_t), \
  7. .load = INI_ConfigLoadU8, \
  8. .save = INI_ConfigSaveU8, \
  9. .override = INI_ConfigOverrideU8, \
  10. }
  11. INI_CONFIG_DECLARE_TYPE(U16);
  12. #define INI_CONFIG_TYPE_U16 (INI_ConfigType) { \
  13. .size = sizeof(uint16_t), \
  14. .load = INI_ConfigLoadU16, \
  15. .save = INI_ConfigSaveU16, \
  16. .override = INI_ConfigOverrideU16, \
  17. }
  18. INI_CONFIG_DECLARE_TYPE(U32);
  19. #define INI_CONFIG_TYPE_U32 (INI_ConfigType) { \
  20. .size = sizeof(uint32_t), \
  21. .load = INI_ConfigLoadU32, \
  22. .save = INI_ConfigSaveU32, \
  23. .override = INI_ConfigOverrideU32, \
  24. }
  25. INI_CONFIG_DECLARE_TYPE(I8);
  26. #define INI_CONFIG_TYPE_I8 (INI_ConfigType) { \
  27. .size = sizeof(int8_t), \
  28. .load = INI_ConfigLoadI8, \
  29. .save = INI_ConfigSaveI8, \
  30. .override = INI_ConfigOverrideI8, \
  31. }
  32. INI_CONFIG_DECLARE_TYPE(I16);
  33. #define INI_CONFIG_TYPE_I16 (INI_ConfigType) { \
  34. .size = sizeof(int16_t), \
  35. .load = INI_ConfigLoadI16, \
  36. .save = INI_ConfigSaveI16, \
  37. .override = INI_ConfigOverrideI16, \
  38. }
  39. INI_CONFIG_DECLARE_TYPE(I32);
  40. #define INI_CONFIG_TYPE_I32 (INI_ConfigType) { \
  41. .size = sizeof(int32_t), \
  42. .load = INI_ConfigLoadI32, \
  43. .save = INI_ConfigSaveI32, \
  44. .override = INI_ConfigOverrideI32, \
  45. }
  46. #endif