compilation fixes

This commit is contained in:
Enno Rehling 2007-06-27 01:03:46 +00:00
parent 588c136071
commit 0a997cadcd
2 changed files with 18 additions and 19 deletions

View File

@ -815,7 +815,6 @@ build_building(unit * u, const building_type * btype, int want, order * ord)
int n = want, built = 0, id;
building * b = NULL;
/* einmalige Korrektur */
static char buffer[8 + IDSIZE + 1 + NAMESIZE + 1];
const xmlChar * btname;
order * new_order = NULL;
const struct locale * lang = u->faction->locale;
@ -994,7 +993,6 @@ build_ship(unit * u, ship * sh, int want)
void
create_ship(region * r, unit * u, const struct ship_type * newtype, int want, order * ord)
{
static char buffer[IDSIZE + 2 * KEYWORDSIZE + 3];
ship *sh;
int msize;
const construction * cons = newtype->construction;

View File

@ -430,24 +430,25 @@ add_buildinglist(building_list **blist, building *b)
building *
new_building(const struct building_type * btype, region * r, const struct locale * lang)
{
building *b = (building *) calloc(1, sizeof(building));
building *b = (building *) calloc(1, sizeof(building));
b->no = newcontainerid();
bhash(b);
b->type = btype;
b->region = r;
addlist(&r->buildings, b);
{
static char buffer[IDSIZE + 1 + NAMESIZE + 1];
if (b->type->name)
sprintf(buffer, "%s", locale_string(lang, btype->_name));
else
sprintf(buffer, "%s", LOC(lang, buildingtype(btype, b, 0)));
set_string(&b->name, buffer);
}
return b;
b->no = newcontainerid();
bhash(b);
b->type = btype;
b->region = r;
addlist(&r->buildings, b);
{
const xmlChar * bname;
if (b->type->name==NULL) {
bname = LOC(lang, btype->_name);
} else {
bname = LOC(lang, buildingtype(btype, b, 0));
}
set_string(&b->name, bname);
}
return b;
}
void