Skip to content
Snippets Groups Projects
Commit 8c5271fd authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix VERSION_NUM and VERSION_HEX encoding of updated version number (32100).

Use math to compute the value of VERSION_NUM and VERSION_HEX so we don't have
mutliple sources of truth for the integer-encoded version number any longer.
parent fa00a7fa
No related branches found
No related tags found
No related merge requests found
Pipeline #8812 passed
...@@ -34,10 +34,11 @@ ...@@ -34,10 +34,11 @@
/* Constants */ /* Constants */
/*************/ /*************/
#define VERSION "3.21" /* Version: Major.minor */ #define VERSION "3.21" /* Version: Major.minor as 4-char string */
#define VERSION_INT 321 /* Version: Major and minor as every-increasing 3-decimal-digit integer value */
#define REVISION 'a' /* Revision: lowercase letter */ #define REVISION 'a' /* Revision: lowercase letter */
#define VERSION_NUM (32000 + (tolower(REVISION) - 'a')) #define VERSION_NUM (((VERSION_INT) * 100) + (tolower(REVISION) - 'a'))
#define VERSION_HEX (0x32000 + (tolower(REVISION) - 'a')) #define VERSION_HEX (((VERSION_INT / 100) * 0x10000) + (((VERSION_INT % 100) / 10) * 0x1000) + ((VERSION_INT % 10) * 0x100) + (tolower(REVISION) - 'a'))
#define VERSION_NOTICE "Synchronet BBS for " PLATFORM_DESC \ #define VERSION_NOTICE "Synchronet BBS for " PLATFORM_DESC \
" Version " VERSION " Version " VERSION
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment