subs: De-duplicate formatting in intelligence_report()

Every piece is formatted either with pr(), or with sprintf() for later
sending with wu().  The output is actually identical.  Format with
sprintf() always, and then either pr() or wu() the results.

While there, change the first parameter's type from int to natid.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2015-01-11 13:38:40 +01:00
parent 61fc526b5d
commit c8e5b4fc50
2 changed files with 15 additions and 37 deletions

View file

@ -192,7 +192,7 @@ extern int lnd_take_casualty(int, struct ulist *, int);
extern void lnd_submil(struct lndstr *, int);
extern void lnd_takemob(struct emp_qelem *, double);
extern int lnd_spyval(struct lndstr *);
extern void intelligence_report(int, struct lndstr *, int, char *);
extern void intelligence_report(natid, struct lndstr *, int, char *);
extern void lnd_mar_stay_behind(struct emp_qelem *, natid);
extern void lnd_mar_put(struct emp_qelem *, natid);
extern void lnd_put(struct emp_qelem *);