]> granicus.if.org Git - nethack/commitdiff
fix other way to get "silly thing to wear"
authornethack.allison <nethack.allison>
Fri, 31 Jan 2003 13:19:09 +0000 (13:19 +0000)
committernethack.allison <nethack.allison>
Fri, 31 Jan 2003 13:19:09 +0000 (13:19 +0000)
It was possible for the code to end up in do_wear.c
to put out the "silly thing to wear" message.

include/extern.h
src/do_wear.c
src/invent.c

index 232375adb08d6d8e50f93931901715d8ded21ebe..88126ba27ce7dedfe1e168c4fe3cea6042e97da3 100644 (file)
@@ -807,6 +807,7 @@ E int FDECL(count_unpaid, (struct obj *));
 E int FDECL(count_buc, (struct obj *,int));
 E void FDECL(carry_obj_effects, (struct obj *));
 E const char *FDECL(currency, (long));
+E void FDECL(silly_thing, (const char *,struct obj *));
 
 /* ### ioctl.c ### */
 
index a5738fef2a13a2e2d866eddd16fb92367217209e..d4889e97aee2a7f5549f0bbe0f1505036dac65e7 100644 (file)
@@ -1296,7 +1296,7 @@ boolean noisy;
        /* getobj can't do this after setting its allow_all flag; that
           happens if you have armor for slots that are covered up or
           extra armor for slots that are filled */
-       if (noisy) pline(silly_thing_to, "wear");
+       if (noisy) silly_thing("wear", otmp);
        err++;
     }
 /* Unnecessary since now only weapons and special items like pick-axes get
index c8224d63aba3d61e39a6722eec80c7b3bd15fc62..0ac4fbb455a8f5bb9c696da5d8cfa5feca2e11c0 100644 (file)
@@ -20,7 +20,6 @@ STATIC_DCL boolean FDECL(putting_on, (const char *));
 STATIC_PTR int FDECL(ckunpaid,(struct obj *));
 STATIC_PTR int FDECL(ckvalidcat,(struct obj *));
 static char FDECL(display_pickinv, (const char *,BOOLEAN_P, long *));
-STATIC_DCL void FDECL(silly_thing, (const char *,const char *,struct obj *));
 #ifdef OVLB
 STATIC_DCL boolean FDECL(this_type_only, (struct obj *));
 STATIC_DCL void NDECL(dounpaid);
@@ -1059,7 +1058,7 @@ register const char *let,*word;
           && !(usegold && otmp->oclass == COIN_CLASS)
 #endif
           ) {
-               silly_thing(let, word, otmp);
+               silly_thing(word, otmp);
                return((struct obj *)0);
        }
        if(allowcnt == 2) {     /* cnt given */
@@ -1078,9 +1077,9 @@ register const char *let,*word;
        return(otmp);
 }
 
-STATIC_OVL void
-silly_thing(let, word, otmp)
-const char *let, *word;
+void
+silly_thing(word, otmp)
+const char *word;
 struct obj *otmp;
 {
        int otyp = otmp->otyp;