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 local_names *bnames;
|
||||||
|
|
||||||
static void free_bnames() {
|
static void free_bnames(void) {
|
||||||
while (bnames) {
|
while (bnames) {
|
||||||
local_names *bn = bnames;
|
local_names *bn = bnames;
|
||||||
bnames = bnames->next;
|
bnames = bnames->next;
|
||||||
|
|
|
@ -395,11 +395,11 @@ static void test_unit_limit(CuTest * tc)
|
||||||
static void test_findparam_ex(CuTest *tc)
|
static void test_findparam_ex(CuTest *tc)
|
||||||
{
|
{
|
||||||
struct locale *lang;
|
struct locale *lang;
|
||||||
struct building_type *btype;
|
|
||||||
test_setup();
|
test_setup();
|
||||||
lang = test_create_locale();
|
lang = test_create_locale();
|
||||||
locale_setstring(lang, "temple", "TEMPEL");
|
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("TEMPEL", lang));
|
||||||
CuAssertIntEquals(tc, P_GEBAEUDE, findparam_ex(
|
CuAssertIntEquals(tc, P_GEBAEUDE, findparam_ex(
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
|
|
||||||
#include "keyword.h"
|
|
||||||
#include "lighthouse.h"
|
#include "lighthouse.h"
|
||||||
|
|
||||||
#include <kernel/config.h>
|
#include <kernel/attrib.h>
|
||||||
#include <kernel/ally.h>
|
#include <kernel/ally.h>
|
||||||
#include <kernel/building.h>
|
#include <kernel/building.h>
|
||||||
|
#include <kernel/config.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
#include <kernel/region.h>
|
#include <kernel/region.h>
|
||||||
#include <kernel/ship.h>
|
#include <kernel/ship.h>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
#include <kernel/race.h>
|
#include <kernel/race.h>
|
||||||
#include <kernel/order.h>
|
#include <kernel/order.h>
|
||||||
|
|
||||||
#include <kernel/attrib.h>
|
#include "util/keyword.h"
|
||||||
#include <util/language.h>
|
#include <util/language.h>
|
||||||
#include <util/message.h>
|
#include <util/message.h>
|
||||||
#include <util/base36.h>
|
#include <util/base36.h>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "util/order_parser.h"
|
#include "util/order_parser.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include "report.h"
|
#include "report.h"
|
||||||
#include "move.h"
|
#include "move.h"
|
||||||
#include "travelthru.h"
|
#include "travelthru.h"
|
||||||
#include "keyword.h"
|
|
||||||
|
|
||||||
#include <kernel/building.h>
|
#include <kernel/building.h>
|
||||||
#include <kernel/faction.h>
|
#include <kernel/faction.h>
|
||||||
|
@ -15,6 +14,8 @@
|
||||||
#include <kernel/spell.h>
|
#include <kernel/spell.h>
|
||||||
#include <kernel/spellbook.h>
|
#include <kernel/spellbook.h>
|
||||||
|
|
||||||
|
#include "util/keyword.h"
|
||||||
|
#include "util/param.h"
|
||||||
#include <util/language.h>
|
#include <util/language.h>
|
||||||
#include <util/lists.h>
|
#include <util/lists.h>
|
||||||
#include <util/message.h>
|
#include <util/message.h>
|
||||||
|
|
|
@ -14,7 +14,7 @@ struct OrderParserStruct {
|
||||||
OP_FactionHandler m_factionHandler;
|
OP_FactionHandler m_factionHandler;
|
||||||
OP_UnitHandler m_unitHandler;
|
OP_UnitHandler m_unitHandler;
|
||||||
OP_OrderHandler m_orderHandler;
|
OP_OrderHandler m_orderHandler;
|
||||||
enum CR_Error m_errorCode;
|
enum OP_Error m_errorCode;
|
||||||
int m_lineNumber;
|
int m_lineNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,12 @@ enum OP_Status {
|
||||||
OP_STATUS_OK = 1
|
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_FactionHandler) (void *userData, int no, const char *password);
|
||||||
typedef void(*OP_UnitHandler) (void *userData, int no);
|
typedef void(*OP_UnitHandler) (void *userData, int no);
|
||||||
typedef void(*OP_OrderHandler) (void *userData, const char *str);
|
typedef void(*OP_OrderHandler) (void *userData, const char *str);
|
||||||
|
|
Loading…
Reference in a new issue