diff --git a/src/reports.c b/src/reports.c index 55ecdafdd..a52d7c90c 100644 --- a/src/reports.c +++ b/src/reports.c @@ -164,16 +164,6 @@ void report_status(const unit * u, const struct locale *lang, struct sbstring *s } } -size_t report_status_depr(const unit * u, const struct locale *lang, char *fsbuf, size_t buflen) -{ - sbstring sbs; - - sbs_init(&sbs, fsbuf, buflen); - report_status(u, lang, &sbs); - return sbs_length(&sbs); -} - - const char *hp_status(const unit * u) { double p; @@ -2276,13 +2266,6 @@ void report_race_skills(const race *rc, const struct locale *lang, sbstring *sbp } } -void report_race_skills_depr(const race *rc, char *zText, size_t length, const struct locale *lang) -{ - sbstring sbs; - sbs_init(&sbs, zText, length); - report_race_skills(rc, lang, &sbs); -} - static void eval_direction(struct opstack **stack, const void *userdata) { const faction *report = (const faction *)userdata; diff --git a/src/reports.h b/src/reports.h index 13ae89b87..fb27f96bc 100644 --- a/src/reports.h +++ b/src/reports.h @@ -78,8 +78,6 @@ extern "C" { const char *trailinto(const struct region *r, const struct locale *lang); - size_t report_status_depr(const struct unit *u, - const struct locale *lang, char *buf, size_t siz); void report_battle_start(struct battle * b); void register_reports(void); @@ -102,8 +100,9 @@ extern "C" { int report_items(const struct unit *u, struct item *result, int size, const struct unit *owner, const struct faction *viewer); void report_warnings(struct faction *f, int now); + void report_status(const struct unit * u, const struct locale *lang, struct sbstring *sbp); void report_raceinfo(const struct race *rc, const struct locale *lang, struct sbstring *sbp); - void report_race_skills_depr(const struct race *rc, char *zText, size_t length, const struct locale *lang); + void report_race_skills(const struct race *rc, const struct locale *lang, struct sbstring *sbp); void report_item(const struct unit *owner, const struct item *i, const struct faction *viewer, const char **name, const char **basename, int *number, bool singular); diff --git a/src/spells.c b/src/spells.c index 13a63fe9c..f665aa47f 100644 --- a/src/spells.c +++ b/src/spells.c @@ -560,6 +560,7 @@ static int sp_summon_familiar(castorder * co) const race *rc; message *msg; char zText[2048]; + sbstring sbs; if (get_familiar(caster) != NULL) { cmistake(caster, co->order, 199, MSG_MAGIC); @@ -600,7 +601,8 @@ static int sp_summon_familiar(castorder * co) msg_release(msg); make_familiar(caster, r, rc, zText); - report_race_skills_depr(rc, zText, sizeof(zText), caster->faction->locale); + sbs_init(&sbs, zText, sizeof(zText)); + report_race_skills(rc, caster->faction->locale, &sbs); ADDMSG(&caster->faction->msgs, msg_message("familiar_describe", "mage race skills", caster, rc, zText)); return cast_level; diff --git a/src/spy.c b/src/spy.c index 8233f5eb2..530607a37 100644 --- a/src/spy.c +++ b/src/spy.c @@ -48,8 +48,10 @@ void spy_message(int spy, const unit * u, const unit * target) { char status[32]; + sbstring sbs; - report_status_depr(target, u->faction->locale, status, sizeof(status)); + sbs_init(&sbs, status, sizeof(status)); + report_status(u, u->faction->locale, &sbs); ADDMSG(&u->faction->msgs, msg_message("spyreport", "spy target status", u, target, status));