all code review nitpicks fixed.

This commit is contained in:
Enno Rehling 2016-09-16 16:54:41 +02:00
parent b0799bd152
commit 55df24ffb8
8 changed files with 19 additions and 15 deletions

View File

@ -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

View File

@ -12,7 +12,6 @@ fi
set -e
[ -z $BUILD ] && BUILD=Debug ; export BUILD
cmake --version
s/cmake-init
s/build
cd $ROOT

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.6)
project (server C)
include_directories (${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -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;

View File

@ -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);

View File

@ -5,6 +5,7 @@
#include <attributes/key.h>
#include "save.h"
#include "version.h"
#include "unit.h"
#include "group.h"
#include "ally.h"

View File

@ -1,5 +1,6 @@
#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 +9,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;
}

View File

@ -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