From 9605fe27aebe4f3d0f5dc36ac5b061a631d405fc Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 11 Jun 2014 07:01:06 -0700 Subject: [PATCH] add a version number header for release management. add build number to creport. --- src/bind_faction.c | 4 ---- src/build.h | 3 +++ src/creport.c | 2 ++ src/main.c | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 src/build.h diff --git a/src/bind_faction.c b/src/bind_faction.c index 0c7a7dfed..5d39b15c2 100644 --- a/src/bind_faction.c +++ b/src/bind_faction.c @@ -322,10 +322,6 @@ static int tolua_faction_create(lua_State * L) struct locale *loc = find_locale(lang); faction *f = NULL; const struct race *frace = rc_find(racename); - if (frace == NULL) - frace = findrace(racename, find_locale("de")); - if (frace == NULL) - frace = findrace(racename, find_locale("en")); if (frace != NULL) { f = addfaction(email, NULL, frace, loc, 0); } diff --git a/src/build.h b/src/build.h new file mode 100644 index 000000000..7e6f1aef8 --- /dev/null +++ b/src/build.h @@ -0,0 +1,3 @@ +#define VERSION_MAJOR 3 +#define VERSION_MINOR 0 +#define VERSION_BUILD 675 diff --git a/src/creport.c b/src/creport.c index 338cfe156..56a740e66 100644 --- a/src/creport.c +++ b/src/creport.c @@ -9,6 +9,7 @@ without prior permission by the authors of Eressea. #include #include +#include "build.h" #include "creport.h" /* tweakable features */ @@ -1496,6 +1497,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, "%d;Build\n", VERSION_BUILD); if (mailto != NULL) { fprintf(F, "\"%s\";mailto\n", mailto); fprintf(F, "\"%s\";mailcmd\n", locale_string(f->locale, "mailcmd")); diff --git a/src/main.c b/src/main.c index 5862cad43..de1a09770 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "eressea.h" #include "gmtool.h" +#include "build.h" #include "bindings.h" #include "races/races.h" #include "spells/spells.h" @@ -102,8 +103,8 @@ static int parse_args(int argc, char **argv, int *exitcode) if (strcmp(argv[i] + 2, "version") == 0) { 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: %d\n\n", - global.gamename, RELEASE_VERSION); + "Compilation: " __DATE__ " at " __TIME__ "\nVersion: %d.%d.%d\n\n", + global.gamename, VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD); } else if (strcmp(argv[i] + 2, "color") == 0) { /* force the editor to have colors */ force_color = 1;