forked from github/server
Merge branch 'develop' into kill-seen-region
Conflicts: src/kernel/version.c src/kernel/version.h
This commit is contained in:
commit
ad4377c0e7
|
@ -20,6 +20,6 @@ $ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests.lua
|
|||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e2.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua
|
||||
$ROOT/$BUILD/eressea/eressea -v0 scripts/run-tests-e4.lua
|
||||
rm -rf data reports orders.txt score score.alliances
|
||||
rm -rf data reports orders.txt score score.alliances datum turn
|
||||
|
||||
cd $OLDWPD
|
||||
|
|
|
@ -1858,12 +1858,6 @@ static void clear_npc_orders(faction *f)
|
|||
}
|
||||
}
|
||||
|
||||
int version_no(const char *str) {
|
||||
int maj = 0, min = 0, bld = 0;
|
||||
sscanf(str, "%d.%d.%d", &maj, &min, &bld);
|
||||
return (maj << 16) | (min << 8) | bld;
|
||||
}
|
||||
|
||||
int writegame(const char *filename)
|
||||
{
|
||||
int n;
|
||||
|
|
|
@ -79,7 +79,6 @@ extern "C" {
|
|||
|
||||
int write_game(struct gamedata *data);
|
||||
int read_game(struct gamedata *data);
|
||||
int version_no(const char *str);
|
||||
|
||||
/* test-only functions that give access to internal implementation details (BAD) */
|
||||
void _test_write_password(struct gamedata *data, const struct faction *f);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <attributes/key.h>
|
||||
|
||||
#include "save.h"
|
||||
#include "version.h"
|
||||
#include "unit.h"
|
||||
#include "group.h"
|
||||
#include "ally.h"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "version.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef ERESSEA_VERSION
|
||||
// the version number, if it was not passed to make with -D
|
||||
#define ERESSEA_VERSION "3.10.0-devel"
|
||||
|
@ -8,3 +10,9 @@
|
|||
const char *eressea_version(void) {
|
||||
return ERESSEA_VERSION;
|
||||
}
|
||||
|
||||
int version_no(const char *str) {
|
||||
int maj = 0, min = 0, bld = 0;
|
||||
sscanf(str, "%d.%d.%d", &maj, &min, &bld);
|
||||
return (maj << 16) | (min << 8) | bld;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#pragma once
|
||||
/*
|
||||
+-------------------+
|
||||
| | Enno Rehling <enno@eressea.de>
|
||||
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
||||
| (c) 1998 - 2007 | Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
| |
|
||||
| (c) 1998 - 2016 | Christian Schlittchen <corwin@amber.kn-bremen.de>
|
||||
| | https://github.com/eressea/server
|
||||
+-------------------+
|
||||
|
||||
This program may not be used, modified or distributed
|
||||
without prior permission by the authors of Eressea.
|
||||
*/
|
||||
|
||||
#ifndef H_KERNEL_VERSION
|
||||
#define H_KERNEL_VERSION
|
||||
|
||||
const char *eressea_version(void);
|
||||
int version_no(const char *str);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue