Add "sc" suffix to version number

master
Lassi Kortela 7 months ago
parent b4e5414a11
commit 4d6110812c

@ -23,6 +23,7 @@
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define VERSION_SUFFIX "sc" /* Scheme Conservatory */
/* Hack: __GNUC_MINOR__ was introduced together with __attribute__ */

@ -53,7 +53,7 @@ Object p_substitute(int ac, Object *av) {
} else if (strcmp(t, "tmpname") == 0) {
s = tmpnam(0);
} else if (strcmp(t, "version") == 0) {
sprintf(buf, "%d.%d", MAJOR_VERSION, MINOR_VERSION);
sprintf(buf, "%s", get_version_string());
s = buf;
} else if (strcmp(t, "weekday") == 0) {
fmt = "%a";

@ -17,6 +17,14 @@ static int got_filename;
static int did_ev_start;
static int tflag;
const char *get_version_string(void) {
static char buf[8];
snprintf(buf, sizeof(buf), "%d.%d%s",
MAJOR_VERSION, MINOR_VERSION, VERSION_SUFFIX);
return buf;
}
static void usage(void) {
fprintf(stderr, "Usage: %s [options] [file...]\n\n", get_progname());
fprintf(stderr, " -mname name of troff macro package (e.g. -ms)\n");

@ -58,3 +58,5 @@ extern void Load_Source_Port(Object);
#include "scmtable.h"
#include "stream.h"
#include "subst.h"
const char *get_version_string(void);

Loading…
Cancel
Save