shk.c formatting

Mostly wrapping wide lines.  No change in behavior except one
impossible warning now ends in "?" instead of "??".
This commit is contained in:
PatR
2021-08-20 15:01:36 -07:00
parent 3736f2ba4c
commit f1fa497556

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 shk.c $NHDT-Date: 1625277130 2021/07/03 01:52:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.202 $ */
/* NetHack 3.7 shk.c $NHDT-Date: 1629496872 2021/08/20 22:01:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.204 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -347,7 +347,8 @@ call_kops(register struct monst* shkp, register boolean nearshop)
stairway *stway = g.stairs;
while (stway) {
if (!stway->isladder && !stway->up && stway->tolev.dnum == u.uz.dnum)
if (!stway->isladder && !stway->up
&& stway->tolev.dnum == u.uz.dnum)
break;
stway = stway->next;
}
@@ -845,7 +846,8 @@ shop_keeper(char rmno)
(int) rmno,
(int) g.rooms[rmno - ROOMOFFSET].rtype,
shkp->mnum,
/* [real shopkeeper name is kept in ESHK, not MGIVENNAME] */
/* [real shopkeeper name is kept in ESHK,
not MGIVENNAME] */
has_mgivenname(shkp) ? MGIVENNAME(shkp) : "anonymous");
/* not sure if this is appropriate, because it does nothing to
correct the underlying g.rooms[].resident issue but... */
@@ -951,11 +953,12 @@ obfree(register struct obj* obj, register struct obj* merge)
if (!bpm) {
/* this used to be a rename */
/* !merge already returned */
impossible("obfree: not on bill, %s = (%d,%d,%ld,%d) (%d,%d,%ld,%d)??",
"otyp,where,quan,unpaid",
obj->otyp, obj->where, obj->quan, obj->unpaid ? 1 : 0,
merge->otyp, merge->where, merge->quan,
merge->unpaid ? 1 : 0);
impossible(
"obfree: not on bill, %s = (%d,%d,%ld,%d) (%d,%d,%ld,%d)?",
"otyp,where,quan,unpaid",
obj->otyp, obj->where, obj->quan, obj->unpaid ? 1 : 0,
merge->otyp, merge->where, merge->quan,
merge->unpaid ? 1 : 0);
return;
} else {
/* this was a merger */
@@ -1850,7 +1853,8 @@ inherits(struct monst* shkp, int numsk, int croaked, boolean silently)
if (!silently)
pline("%s %s the %ld %s %sowed %s.", Shknam(shkp),
takes, loss, currency(loss),
strncmp(eshkp->customer, g.plname, PL_NSIZ) ? "" : "you ",
strncmp(eshkp->customer, g.plname, PL_NSIZ) ? ""
: "you ",
noit_mhim(shkp));
/* shopkeeper has now been paid in full */
pacify_shk(shkp);
@@ -2203,7 +2207,7 @@ contained_cost(
long
contained_gold(
struct obj *obj,
boolean even_if_unknown) /* True: all gold; False: limit to known contents */
boolean even_if_unknown) /* T: all gold; F: limit to known contents */
{
register struct obj *otmp;
register long value = 0L;
@@ -2557,7 +2561,8 @@ shk_names_obj(
/* decide whether a shopkeeper thinks an item belongs to her */
boolean
billable(
struct monst **shkpp, /* in: non-null if shk has been validated; out: shk */
struct monst **shkpp, /* in: non-null if shk has been validated;
* out: shk */
struct obj *obj,
char roomno,
boolean reset_nocharge)
@@ -2974,7 +2979,7 @@ void
donate_gold(
long gltmp,
struct monst *shkp,
boolean selling) /* True: dropped in shop; False: kicked and landed in shop */
boolean selling) /* T: dropped in shop; F: kicked and landed in shop */
{
struct eshk *eshkp = ESHK(shkp);
@@ -3991,11 +3996,11 @@ shopdig(register int fall)
if (!Deaf && !muteshk(shkp)) {
if (u.utraptype == TT_PIT)
verbalize(
"Be careful, %s, or you might fall through the floor.",
flags.female ? "madam" : "sir");
"Be careful, %s, or you might fall through the floor.",
flags.female ? "madam" : "sir");
else
verbalize("%s, do not damage the floor here!",
flags.female ? "Madam" : "Sir");
flags.female ? "Madam" : "Sir");
}
}
if (Role_if(PM_KNIGHT)) {
@@ -4501,7 +4506,7 @@ static long
cost_per_charge(
struct monst *shkp,
struct obj *otmp,
boolean altusage) /* some items have an "alternate" use with different cost */
boolean altusage) /* some items have "alternate" use with different cost */
{
long tmp = 0L;