fix build, missing limits.h include

This commit is contained in:
Enno Rehling 2015-07-07 09:44:24 +02:00
parent 1e669472a6
commit d7e5876c62
2 changed files with 15 additions and 14 deletions

View File

@ -53,6 +53,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
/* in spy steht der Unterschied zwischen Wahrnehmung des Opfers und
* Spionage des Spions */
@ -61,7 +62,7 @@ void spy_message(int spy, const unit * u, const unit * target)
const char *str = report_kampfstatus(target, u->faction->locale);
ADDMSG(&u->faction->msgs, msg_message("spyreport", "spy target status", u,
target, str));
target, str));
if (spy > 20) {
sc_mage *mage = get_mage(target);
/* for mages, spells and magic school */

View File

@ -68,9 +68,9 @@ static void test_simple_spy_message(CuTest *tc) {
static void set_factionstealth(unit *u, faction *f) {
attrib *a = a_find(u->attribs, &at_otherfaction);
if (!a)
a = a_add(&u->attribs, make_otherfaction(f));
a = a_add(&u->attribs, make_otherfaction(f));
else
a->data.v = f;
a->data.v = f;
}
static void test_all_spy_message(CuTest *tc) {
@ -92,11 +92,11 @@ static void test_all_spy_message(CuTest *tc) {
spy_message(99, fix.spy, fix.victim);
assert_messages(tc, fix.spy->faction->msgs->begin, fix.msg_types, 5, true,
M_BASE,
M_MAGE,
M_FACTION,
M_SKILLS,
M_ITEMS);
M_BASE,
M_MAGE,
M_FACTION,
M_SKILLS,
M_ITEMS);
test_cleanup();
}
@ -116,7 +116,7 @@ static void test_sabotage_self(CuTest *tc) {
r = test_create_region(0, 0, NULL);
assert(r);
u = test_create_unit(test_create_faction(NULL), r);
assert(u && u->faction && u->region==r);
assert(u && u->faction && u->region == r);
u->ship = test_create_ship(r, test_create_shiptype("boat"));
assert(u->ship);
ord = create_order(K_SABOTAGE, lang, "SCHIFF");
@ -128,9 +128,9 @@ static void test_sabotage_self(CuTest *tc) {
CuSuite *get_spy_suite(void)
{
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_simple_spy_message);
SUITE_ADD_TEST(suite, test_all_spy_message);
SUITE_ADD_TEST(suite, test_sabotage_self);
return suite;
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_simple_spy_message);
SUITE_ADD_TEST(suite, test_all_spy_message);
SUITE_ADD_TEST(suite, test_sabotage_self);
return suite;
}