yet more src reformatting

Last of the suspicious block comments, plus the usual miscellaneous
stuff in files that hadn't been subjected to it before.
This commit is contained in:
PatR
2015-11-06 18:03:13 -08:00
parent a975287467
commit e322623210
7 changed files with 476 additions and 517 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wield.c $NHDT-Date: 1445126432 2015/10/18 00:00:32 $ $NHDT-Branch: master $:$NHDT-Revision: 1.45 $ */
/* NetHack 3.6 wield.c $NHDT-Date: 1446861774 2015/11/07 02:02:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.46 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -87,9 +87,9 @@ register struct obj *obj;
if (obj == uwep)
return; /* necessary to not set unweapon */
/* This message isn't printed in the caller because it happens
* *whenever* Sunsword is unwielded, from whatever cause.
*/
/* This message isn't printed in the caller because it happens
* *whenever* Sunsword is unwielded, from whatever cause.
*/
setworn(obj, W_WEP);
if (uwep == obj && artifact_light(olduwep) && olduwep->lamplit) {
end_burn(olduwep, FALSE);
@@ -211,7 +211,7 @@ struct obj *wep;
}
}
}
return (res);
return res;
}
void
@@ -249,35 +249,35 @@ dowield()
multi = 0;
if (cantwield(youmonst.data)) {
pline("Don't be ridiculous!");
return (0);
return 0;
}
/* Prompt for a new weapon */
if (!(wep = getobj(wield_objs, "wield")))
/* Cancelled */
return (0);
return 0;
else if (wep == uwep) {
You("are already wielding that!");
if (is_weptool(wep) || is_wet_towel(wep))
unweapon = FALSE; /* [see setuwep()] */
return (0);
return 0;
} else if (welded(uwep)) {
weldmsg(uwep);
/* previously interrupted armor removal mustn't be resumed */
reset_remarm();
return (0);
return 0;
}
/* Handle no object, or object in other slot */
if (wep == &zeroobj)
wep = (struct obj *) 0;
else if (wep == uswapwep)
return (doswapweapon());
return doswapweapon();
else if (wep == uquiver)
setuqwep((struct obj *) 0);
else if (wep->owornmask & (W_ARMOR | W_ACCESSORY | W_SADDLE)) {
You("cannot wield that!");
return (0);
return 0;
}
/* Set your new primary weapon */
@@ -287,7 +287,7 @@ dowield()
setuswapwep(oldwep);
untwoweapon();
return (result);
return result;
}
int
@@ -300,11 +300,11 @@ doswapweapon()
multi = 0;
if (cantwield(youmonst.data)) {
pline("Don't be ridiculous!");
return (0);
return 0;
}
if (welded(uwep)) {
weldmsg(uwep);
return (0);
return 0;
}
/* Unwield your current secondary weapon */
@@ -330,7 +330,7 @@ doswapweapon()
if (u.twoweap && !can_twoweapon())
untwoweapon();
return (result);
return result;
}
int
@@ -350,7 +350,7 @@ dowieldquiver()
/* Prompt for a new quiver */
if (!(newquiver = getobj(quivee_types, "ready")))
/* Cancelled */
return (0);
return 0;
/* Handle no object, or object in other slot */
/* Any type is okay, since we give no intrinsics anyways */
@@ -361,19 +361,19 @@ dowieldquiver()
setuqwep(newquiver = (struct obj *) 0);
} else {
You("already have no ammunition readied!");
return (0);
return 0;
}
} else if (newquiver == uquiver) {
pline("That ammunition is already readied!");
return (0);
return 0;
} else if (newquiver == uwep) {
/* Prevent accidentally readying the main weapon */
pline("%s already being used as a weapon!",
!is_plural(uwep) ? "That is" : "They are");
return (0);
return 0;
} else if (newquiver->owornmask & (W_ARMOR | W_ACCESSORY | W_SADDLE)) {
You("cannot ready that!");
return (0);
return 0;
} else {
long dummy;
@@ -393,7 +393,7 @@ dowieldquiver()
/* Finally, place it in the quiver */
setuqwep(newquiver);
/* Take no time since this is a convenience slot */
return (0);
return 0;
}
/* used for #rub and for applying pick-axe, whip, grappling hook or polearm */
@@ -507,8 +507,8 @@ can_twoweapon()
uswapwep->bknown = TRUE;
drop_uswapwep();
} else
return (TRUE);
return (FALSE);
return TRUE;
return FALSE;
}
void
@@ -531,7 +531,7 @@ dotwoweapon()
You("switch to your primary weapon.");
u.twoweap = 0;
update_inventory();
return (0);
return 0;
}
/* May we use two weapons? */
@@ -542,7 +542,7 @@ dotwoweapon()
update_inventory();
return (rnd(20) > ACURR(A_DEX));
}
return (0);
return 0;
}
/*** Functions to empty a given slot ***/
@@ -612,7 +612,7 @@ register int amount;
(amount >= 0) ? "twitch" : "itch");
strange_feeling(otmp, buf);
exercise(A_DEX, (boolean)(amount >= 0));
return (0);
return 0;
}
if (otmp && otmp->oclass == SCROLL_CLASS)
@@ -663,7 +663,7 @@ register int amount;
if (amount < 0 && uwep->oartifact && restrict_name(uwep, wepname)) {
if (!Blind)
pline("%s %s.", Yobjnam2(uwep, "faintly glow"), color);
return (1);
return 1;
}
/* there is a (soft) upper and lower limit to uwep->spe */
if (((uwep->spe > 5 && amount >= 0) || (uwep->spe < -5 && amount < 0))
@@ -676,7 +676,7 @@ register int amount;
pline("%s.", Yobjnam2(uwep, "evaporate"));
useupall(uwep); /* let all of them disappear */
return (1);
return 1;
}
if (!Blind) {
xtime = (amount * amount == 1) ? "moment" : "while";
@@ -714,7 +714,7 @@ register int amount;
&& (is_elven_weapon(uwep) || uwep->oartifact || !rn2(7)))
pline("%s unexpectedly.", Yobjnam2(uwep, "suddenly vibrate"));
return (1);
return 1;
}
int