eliminate deprecated reporting function, static variable

This commit is contained in:
Enno Rehling 2015-10-27 12:37:52 +01:00
parent e3572ef14e
commit feb915fe4a

View file

@ -143,13 +143,6 @@ size_t report_status(const unit * u, const struct locale *lang, char *fsbuf, siz
return len; return len;
} }
const char * report_kampfstatus(const unit * u, const struct locale *lang) {
static char fsbuf[64]; // FIXME: static variable.
report_status(u, lang, fsbuf, sizeof(fsbuf));
return fsbuf;
}
const char *hp_status(const unit * u) const char *hp_status(const unit * u)
{ {
double p; double p;
@ -571,8 +564,7 @@ size_t size)
const char *c = hp_status(u); const char *c = hp_status(u);
c = c ? LOC(f->locale, c) : 0; c = c ? LOC(f->locale, c) : 0;
bufp = STRLCPY(bufp, ", ", size); bufp = STRLCPY(bufp, ", ", size);
// FIXME: use report_status bufp += report_status(u, f->locale, bufp, size);
bufp = STRLCPY(bufp, report_kampfstatus(u, f->locale), size);
if (c || fval(u, UFL_HUNGER)) { if (c || fval(u, UFL_HUNGER)) {
bufp = STRLCPY(bufp, " (", size); bufp = STRLCPY(bufp, " (", size);
if (c) { if (c) {