diff --git a/src/creport.c b/src/creport.c index 98ce770df..51169ef0c 100644 --- a/src/creport.c +++ b/src/creport.c @@ -1509,7 +1509,7 @@ report_computer(const char *filename, report_context * ctx, const char *charset) fprintf(F, "%d;Basis\n", 36); fprintf(F, "%d;Runde\n", turn); fprintf(F, "%d;Zeitalter\n", era); - fprintf(F, "\"%s\";Build\n", ERESSEA_VERSION); + fprintf(F, "\"%s\";Build\n", eressea_version()); if (mailto != NULL) { fprintf(F, "\"%s\";mailto\n", mailto); fprintf(F, "\"%s\";mailcmd\n", LOC(f->locale, "mailcmd")); diff --git a/src/kernel/save.c b/src/kernel/save.c index 5121e02ed..bffc339f9 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -1898,7 +1898,7 @@ int writegame(const char *filename) fstream_init(&strm, F); binstore_init(&store, &strm); - WRITE_INT(&store, version_no(ERESSEA_VERSION)); + WRITE_INT(&store, version_no(eressea_version())); n = write_game(&gdata); binstore_done(&store); fstream_done(&strm); diff --git a/src/kernel/version.c b/src/kernel/version.c new file mode 100644 index 000000000..95d61f014 --- /dev/null +++ b/src/kernel/version.c @@ -0,0 +1,10 @@ +#include "version.h" + +#ifndef ERESSEA_VERSION +// the version number, if it was not passed to make with -D +#define ERESSEA_VERSION "3.10.0-devel" +#endif + +const char *eressea_version(void) { + return ERESSEA_VERSION; +} diff --git a/src/kernel/version.h b/src/kernel/version.h index 5b3bf0cf6..f71177f9f 100644 --- a/src/kernel/version.h +++ b/src/kernel/version.h @@ -10,7 +10,4 @@ without prior permission by the authors of Eressea. */ -#ifndef ERESSEA_VERSION -// the version number, if it was not passed to make with -D -#define ERESSEA_VERSION "3.10.0-devel" -#endif +const char *eressea_version(void); diff --git a/src/main.c b/src/main.c index d3d2cbe50..58a15edc0 100644 --- a/src/main.c +++ b/src/main.c @@ -166,7 +166,7 @@ static int parse_args(int argc, char **argv, int *exitcode) printf("\n%s PBEM host\n" "Copyright (C) 1996-2005 C. Schlittchen, K. Zedel, E. Rehling, H. Peters.\n\n" "Compilation: " __DATE__ " at " __TIME__ "\nVersion: %s\n\n", - game_name(), ERESSEA_VERSION); + game_name(), eressea_version()); #ifdef USE_CURSES } else if (strcmp(argi + 2, "color") == 0) {