Skip to content

Commit

Permalink
remove deprecated report functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Aug 16, 2020
1 parent d4400bb commit 11ce5a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
17 changes: 0 additions & 17 deletions src/reports.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/reports.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/spells.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/spy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 11ce5a2

Please sign in to comment.