1
0
mirror of https://github.com/cc65/cc65.git synced 2025-02-25 16:29:08 +00:00

Dropped VER_PATCH (and VER_RC) and added build date.

This commit is contained in:
Oliver Schmidt 2014-03-09 17:40:51 +01:00
parent a178c44acb
commit f12fbc4a3b

View File

@ -46,9 +46,6 @@
#define VER_MAJOR 2U #define VER_MAJOR 2U
#define VER_MINOR 14U #define VER_MINOR 14U
#define VER_PATCH 0U
#define VER_RC 0U
@ -61,12 +58,8 @@
const char* GetVersionAsString (void) const char* GetVersionAsString (void)
/* Returns the version number as a string in a static buffer */ /* Returns the version number as a string in a static buffer */
{ {
static char Buf[20]; static char Buf[40];
#if defined(VER_RC) && (VER_RC > 0U) xsnprintf (Buf, sizeof (Buf), "%u.%u - %s", VER_MAJOR, VER_MINOR, __DATE__);
xsnprintf (Buf, sizeof (Buf), "%u.%u.%u-rc%u", VER_MAJOR, VER_MINOR, VER_PATCH, VER_RC);
#else
xsnprintf (Buf, sizeof (Buf), "%u.%u.%u", VER_MAJOR, VER_MINOR, VER_PATCH);
#endif
return Buf; return Buf;
} }
@ -75,5 +68,5 @@ const char* GetVersionAsString (void)
unsigned GetVersionAsNumber (void) unsigned GetVersionAsNumber (void)
/* Returns the version number as a combined unsigned for use in a #define */ /* Returns the version number as a combined unsigned for use in a #define */
{ {
return ((VER_MAJOR * 0x100) + (VER_MINOR * 0x10) + VER_PATCH); return ((VER_MAJOR * 0x100) + (VER_MINOR * 0x10));
} }