ref: 38edf321981b365fe199f9b2607cc7b88e329714
parent: f723862e5e5d3b70b1db0e91ced9077899686f21
author: cbagwell <cbagwell>
date: Sat Nov 18 18:21:25 EST 2000
Change version of libst to be binary encoded.
--- a/src/misc.c
+++ b/src/misc.c
@@ -442,7 +442,10 @@
{
static char versionstr[20];
- sprintf(versionstr, "Version %s", ST_LIB_VERSION);
+ sprintf(versionstr, "Version %d.%d.%d",
+ (ST_LIB_VERSION_CODE & 0xff0000) >> 16,
+ (ST_LIB_VERSION_CODE & 0x00ff00) >> 8,
+ (ST_LIB_VERSION_CODE & 0x0000ff));
return(versionstr);
}
--- a/src/st.h
+++ b/src/st.h
@@ -24,10 +24,9 @@
#include <byteswap.h>
#endif
-/* Warning. The format of this version string could change in the
- * future to allow better parsing.
- */
-#define ST_LIB_VERSION "12.17.1"
+/* Release 12.17.1 of libst */
+#define ST_LIB_VERSION_CODE 0x0c1101
+#define ST_LIB_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
/* SJB: these may be changed to assist fail-recovery in libST */
#define st_malloc malloc