forked from github/server
more boring macros removed.
This commit is contained in:
parent
303eb86399
commit
27605f18ba
|
@ -426,7 +426,7 @@ building *new_building(const struct building_type * btype, region * r,
|
||||||
bname = parameters[P_GEBAEUDE];
|
bname = parameters[P_GEBAEUDE];
|
||||||
}
|
}
|
||||||
assert(bname);
|
assert(bname);
|
||||||
slprintf(buffer, sizeof(buffer), "%s %s", bname, buildingid(b));
|
slprintf(buffer, sizeof(buffer), "%s %s", bname, itoa36(b->no));
|
||||||
b->name = _strdup(bname);
|
b->name = _strdup(bname);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,9 +45,6 @@ struct param;
|
||||||
bool isparam(const char *s, const struct locale * lang, param_t param);
|
bool isparam(const char *s, const struct locale * lang, param_t param);
|
||||||
param_t getparam(const struct locale *lang);
|
param_t getparam(const struct locale *lang);
|
||||||
|
|
||||||
#define buildingid(x) itoa36((x)->no)
|
|
||||||
#define shipid(x) itoa36((x)->no)
|
|
||||||
|
|
||||||
const char * game_name(void);
|
const char * game_name(void);
|
||||||
int game_id(void);
|
int game_id(void);
|
||||||
int lovar(double xpct_x2);
|
int lovar(double xpct_x2);
|
||||||
|
|
|
@ -201,7 +201,7 @@ ship *new_ship(const ship_type * stype, region * r, const struct locale *lang)
|
||||||
sname = parameters[P_SHIP];
|
sname = parameters[P_SHIP];
|
||||||
}
|
}
|
||||||
assert(sname);
|
assert(sname);
|
||||||
slprintf(buffer, sizeof(buffer), "%s %s", sname, shipid(sh));
|
slprintf(buffer, sizeof(buffer), "%s %s", sname, itoa36(sh->no));
|
||||||
sh->name = _strdup(buffer);
|
sh->name = _strdup(buffer);
|
||||||
shash(sh);
|
shash(sh);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
|
|
@ -1479,7 +1479,7 @@ report_template(const char *filename, report_context * ctx, const char *charset)
|
||||||
}
|
}
|
||||||
if (wrptr(&bufp, &size, bytes) != 0)
|
if (wrptr(&bufp, &size, bytes) != 0)
|
||||||
WARN_STATIC_BUFFER();
|
WARN_STATIC_BUFFER();
|
||||||
bytes = (int)strlcpy(bufp, shipid(u->ship), size);
|
bytes = (int)strlcpy(bufp, itoa36(u->ship->no), size);
|
||||||
if (wrptr(&bufp, &size, bytes) != 0)
|
if (wrptr(&bufp, &size, bytes) != 0)
|
||||||
WARN_STATIC_BUFFER();
|
WARN_STATIC_BUFFER();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6298,14 +6298,14 @@ int sp_q_antimagie(castorder * co)
|
||||||
{
|
{
|
||||||
building *b = pa->param[0]->data.b;
|
building *b = pa->param[0]->data.b;
|
||||||
ap = &b->attribs;
|
ap = &b->attribs;
|
||||||
ts = buildingid(b);
|
ts = itoa36(b->no);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPP_SHIP:
|
case SPP_SHIP:
|
||||||
{
|
{
|
||||||
ship *sh = pa->param[0]->data.sh;
|
ship *sh = pa->param[0]->data.sh;
|
||||||
ap = &sh->attribs;
|
ap = &sh->attribs;
|
||||||
ts = shipid(sh);
|
ts = itoa36(sh->no);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -6391,14 +6391,14 @@ int sp_break_curse(castorder * co)
|
||||||
{
|
{
|
||||||
building *b = pa->param[0]->data.b;
|
building *b = pa->param[0]->data.b;
|
||||||
ap = &b->attribs;
|
ap = &b->attribs;
|
||||||
ts = buildingid(b);
|
ts = itoa36(b->no);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPP_SHIP:
|
case SPP_SHIP:
|
||||||
{
|
{
|
||||||
ship *sh = pa->param[0]->data.sh;
|
ship *sh = pa->param[0]->data.sh;
|
||||||
ap = &sh->attribs;
|
ap = &sh->attribs;
|
||||||
ts = shipid(sh);
|
ts = itoa36(sh->no);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue