From fc0c1e121a21c892bc0e2ead1a81c419a2875fa8 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 12 Oct 2022 02:19:38 -0700 Subject: [PATCH] couple of reformatting bits Some reformatting done while working on ATTRMAX(). --- src/attrib.c | 11 ++++++----- src/insight.c | 8 +++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/attrib.c b/src/attrib.c index 23747bf59..1151a88d9 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -308,11 +308,12 @@ poisontell(int typ, /* which attribute */ /* called when an attack or trap has poisoned hero (used to be in mon.c) */ void -poisoned(const char *reason, /* controls what messages we display */ - int typ, - const char *pkiller, /* for score+log file if fatal */ - int fatal, /* if fatal is 0, limit damage to adjattrib */ - boolean thrown_weapon) /* thrown weapons are less deadly */ +poisoned( + const char *reason, /* controls what messages we display */ + int typ, + const char *pkiller, /* for score+log file if fatal */ + int fatal, /* if fatal is 0, limit damage to adjattrib */ + boolean thrown_weapon) /* thrown weapons are less deadly */ { int i, loss, kprefix = KILLED_BY_AN; boolean blast = !strcmp(reason, "blast"); diff --git a/src/insight.c b/src/insight.c index cdc4ec412..d7958b576 100644 --- a/src/insight.c +++ b/src/insight.c @@ -260,14 +260,16 @@ cause_known( /* format a characteristic value, accommodating Strength's strangeness */ static char * -attrval(int attrindx, int attrvalue, - char resultbuf[]) /* should be at least [7] to hold "18/100\0" */ +attrval( + int attrindx, + int attrvalue, + char resultbuf[]) /* should be at least [7] to hold "18/100\0" */ { if (attrindx != A_STR || attrvalue <= 18) Sprintf(resultbuf, "%d", attrvalue); else if (attrvalue > STR18(100)) /* 19 to 25 */ Sprintf(resultbuf, "%d", attrvalue - 100); - else /* simplify "18/ **" to be "18/100" */ + else /* simplify "18/\**" to be "18/100" */ Sprintf(resultbuf, "18/%02d", attrvalue - 18); return resultbuf; } -- 2.49.0