forked from github/server
fix compilation
This commit is contained in:
parent
965c8ce990
commit
0c6ec47598
7 changed files with 16 additions and 8 deletions
|
@ -257,7 +257,7 @@ building *findbuilding(int i)
|
|||
|
||||
static local_names *bnames;
|
||||
|
||||
static void free_bnames() {
|
||||
static void free_bnames(void) {
|
||||
while (bnames) {
|
||||
local_names *bn = bnames;
|
||||
bnames = bnames->next;
|
||||
|
|
|
@ -395,11 +395,11 @@ static void test_unit_limit(CuTest * tc)
|
|||
static void test_findparam_ex(CuTest *tc)
|
||||
{
|
||||
struct locale *lang;
|
||||
struct building_type *btype;
|
||||
|
||||
test_setup();
|
||||
lang = test_create_locale();
|
||||
locale_setstring(lang, "temple", "TEMPEL");
|
||||
btype = test_create_buildingtype("temple");
|
||||
test_create_buildingtype("temple");
|
||||
|
||||
CuAssertIntEquals(tc, P_GEBAEUDE, findparam_ex("TEMPEL", lang));
|
||||
CuAssertIntEquals(tc, P_GEBAEUDE, findparam_ex(
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#include <stdlib.h>
|
||||
#include "move.h"
|
||||
|
||||
#include "keyword.h"
|
||||
#include "lighthouse.h"
|
||||
|
||||
#include <kernel/config.h>
|
||||
#include <kernel/attrib.h>
|
||||
#include <kernel/ally.h>
|
||||
#include <kernel/building.h>
|
||||
#include <kernel/config.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/region.h>
|
||||
#include <kernel/ship.h>
|
||||
|
@ -17,7 +17,7 @@
|
|||
#include <kernel/race.h>
|
||||
#include <kernel/order.h>
|
||||
|
||||
#include <kernel/attrib.h>
|
||||
#include "util/keyword.h"
|
||||
#include <util/language.h>
|
||||
#include <util/message.h>
|
||||
#include <util/base36.h>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "util/order_parser.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include "report.h"
|
||||
#include "move.h"
|
||||
#include "travelthru.h"
|
||||
#include "keyword.h"
|
||||
|
||||
#include <kernel/building.h>
|
||||
#include <kernel/faction.h>
|
||||
|
@ -15,6 +14,8 @@
|
|||
#include <kernel/spell.h>
|
||||
#include <kernel/spellbook.h>
|
||||
|
||||
#include "util/keyword.h"
|
||||
#include "util/param.h"
|
||||
#include <util/language.h>
|
||||
#include <util/lists.h>
|
||||
#include <util/message.h>
|
||||
|
|
|
@ -14,7 +14,7 @@ struct OrderParserStruct {
|
|||
OP_FactionHandler m_factionHandler;
|
||||
OP_UnitHandler m_unitHandler;
|
||||
OP_OrderHandler m_orderHandler;
|
||||
enum CR_Error m_errorCode;
|
||||
enum OP_Error m_errorCode;
|
||||
int m_lineNumber;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ enum OP_Status {
|
|||
OP_STATUS_OK = 1
|
||||
};
|
||||
|
||||
enum OP_Error {
|
||||
OP_ERROR_NONE,
|
||||
OP_ERROR_NO_MEMORY,
|
||||
OP_ERROR_SYNTAX
|
||||
};
|
||||
|
||||
typedef void(*OP_FactionHandler) (void *userData, int no, const char *password);
|
||||
typedef void(*OP_UnitHandler) (void *userData, int no);
|
||||
typedef void(*OP_OrderHandler) (void *userData, const char *str);
|
||||
|
|
Loading…
Reference in a new issue