hversion.h 774 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef HV_VERSION_H_
  2. #define HV_VERSION_H_
  3. #include "hexport.h"
  4. #include "hdef.h"
  5. BEGIN_EXTERN_C
  6. #define HV_VERSION_MAJOR 1
  7. #define HV_VERSION_MINOR 3
  8. #define HV_VERSION_PATCH 4
  9. #define HV_VERSION_STRING STRINGIFY(HV_VERSION_MAJOR) "." \
  10. STRINGIFY(HV_VERSION_MINOR) "." \
  11. STRINGIFY(HV_VERSION_PATCH)
  12. #define HV_VERSION_NUMBER ((HV_VERSION_MAJOR << 16) | (HV_VERSION_MINOR << 8) | HV_VERSION_PATCH)
  13. HV_INLINE const char* hv_version() {
  14. return HV_VERSION_STRING;
  15. }
  16. HV_EXPORT const char* hv_compile_version();
  17. // 1.2.3.4 => 0x01020304
  18. HV_EXPORT int version_atoi(const char* str);
  19. // 0x01020304 => 1.2.3.4
  20. HV_EXPORT void version_itoa(int hex, char* str);
  21. END_EXTERN_C
  22. #endif // HV_VERSION_H_