From: PatR Date: Wed, 13 Jan 2016 02:00:43 +0000 (-0800) Subject: silly thing bit X-Git-Tag: NetHack-3.6.1_RC01~1033 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04c39f9e91505379250f1a42934b1a3948f77610;p=nethack silly thing bit Simplify some conditionally excluded, obsolete but not yet discarded code. This is something else I thought I'd checked in a long time ago. I must have clobbered pending changes to invent.c at some point. --- diff --git a/src/invent.c b/src/invent.c index 6bbd89ca5..6a2a910bd 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1450306195 2015/12/16 22:49:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.180 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1452650438 2016/01/13 02:00:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.188 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1325,7 +1325,7 @@ struct obj *otmp; #if 1 /* 'P','R' vs 'W','T' handling is obsolete */ nhUse(otmp); #else - const char *s1, *s2, *s3, *what; + const char *s1, *s2, *s3; int ocls = otmp->oclass, otyp = otmp->otyp; s1 = s2 = s3 = 0; @@ -1344,14 +1344,10 @@ struct obj *otmp; else if (!strcmp(word, "take off")) s1 = "R", s2 = "remove", s3 = ""; } - if (s1) { - what = "that"; - /* quantity for armor and accessory objects is always 1, - but some things should be referred to as plural */ - if (otyp == LENSES || is_gloves(otmp) || is_boots(otmp)) - what = "those"; - pline("Use the '%s' command to %s %s%s.", s1, s2, what, s3); - } else + if (s1) + pline("Use the '%s' command to %s %s%s.", s1, s2, + !is_plural(otmp) ? "that" : "those", s3); + else #endif pline(silly_thing_to, word); }