Everything except report.c compiles.

Not that I'm not claiming that it works.
This commit is contained in:
Enno Rehling 2016-09-13 17:02:51 +02:00
parent 20578da0e9
commit acfb06392a
7 changed files with 6 additions and 7 deletions

View File

@ -59,7 +59,7 @@ without prior permission by the authors of Eressea.
static int tolua_bufunit(lua_State * L) {
char buf[8192];
unit *self = (unit *)tolua_tousertype(L, 1, 0);
int mode = (int)tolua_tonumber(L, 2, see_unit);
int mode = (int)tolua_tonumber(L, 2, (int)seen_unit);
if (!self) return 0;
bufunit(self->faction, self, 0, mode, buf, sizeof(buf));

View File

@ -974,7 +974,7 @@ static int tolua_report_unit(lua_State * L)
char buffer[512];
unit *u = (unit *)tolua_tousertype(L, 1, 0);
faction *f = (faction *)tolua_tousertype(L, 2, 0);
bufunit(f, u, 0, see_unit, buffer, sizeof(buffer));
bufunit(f, u, 0, seen_unit, buffer, sizeof(buffer));
tolua_pushstring(L, buffer);
return 1;
}

View File

@ -734,7 +734,7 @@ static void cr_output_spells(stream *out, const unit * u, int maxlevel)
* @param u unit to report
*/
void cr_output_unit(stream *out, const region * r, const faction * f,
const unit * u, int mode)
const unit * u, seen_mode mode)
{
/* Race attributes are always plural and item attributes always
* singular */

View File

@ -24,7 +24,8 @@ extern "C" {
void register_cr(void);
int crwritemap(const char *filename);
void cr_output_unit(struct stream *out, const struct region * r, const struct faction * f, const struct unit * u, int mode);
void cr_output_unit(struct stream *out, const struct region * r,
const struct faction * f, const struct unit * u, seen_mode mode);
#ifdef __cplusplus
}

View File

@ -194,7 +194,7 @@ static void test_cr_unit(CuTest *tc) {
renumber_unit(u, 1234);
mstream_init(&strm);
cr_output_unit(&strm, r, f, u, see_unit);
cr_output_unit(&strm, r, f, u, seen_unit);
strm.api->rewind(strm.handle);
CuAssertIntEquals(tc, 0, strm.api->readln(strm.handle, line, sizeof(line)));
CuAssertStrEquals(tc, line, "EINHEIT 1234");

View File

@ -61,7 +61,6 @@ int RunAllTests(int argc, char *argv[])
/* self-test */
ADD_SUITE(tests);
ADD_SUITE(callback);
ADD_SUITE(seen);
ADD_SUITE(json);
ADD_SUITE(jsonconf);
ADD_SUITE(direction);

View File

@ -179,7 +179,6 @@ static void test_reset(void) {
free_shiptypes();
free_races();
free_spellbooks();
free_seen();
free_prefixes();
mt_clear();
for (i = 0; i != MAXSKILLS; ++i) {