diff -r c5ff5a4704dd -r d8ecf07a76cf sources/version.cpp --- a/sources/version.cpp Mon Jan 11 16:27:53 2016 +0200 +++ b/sources/version.cpp Mon Jan 11 16:33:08 2016 +0200 @@ -35,9 +35,32 @@ #include #include +#include "basics.h" #include "version.h" #include "hginfo.h" +#define VERSION_MAJOR 1 +#define VERSION_MINOR 2 +#define VERSION_PATCH 0 + +#if VERSION_PATCH == 0 +# define VERSION_STRING \ + MACRO_TO_STRING (VERSION_MAJOR) \ + "." MACRO_TO_STRING (VERSION_MINOR) +#else +# define VERSION_STRING \ + MACRO_TO_STRING (VERSION_MAJOR) \ + "." MACRO_TO_STRING (VERSION_MINOR) \ + "." MACRO_TO_STRING (VERSION_PATCH) +#endif + +// ------------------------------------------------------------------------------------------------- +// +const char* version_string() +{ + return VERSION_STRING; +} + // ------------------------------------------------------------------------------------------------- // const char* full_version_string()