]> granicus.if.org Git - nethack/commitdiff
Revert "more pluralization"
authornhmall <nhmall@nethack.org>
Sat, 16 Nov 2019 15:13:49 +0000 (10:13 -0500)
committernhmall <nhmall@nethack.org>
Sat, 16 Nov 2019 15:13:49 +0000 (10:13 -0500)
This reverts commit 6a3dcc6a382f69fbd6fe990e163cc69ddb8ca95e.

src/objnam.c

index 3eea10d94d03334e50fd026f60e76d920811b1cb..ba301b9cf8185a8d95525341f7150290d38a7bb2 100644 (file)
@@ -2205,11 +2205,6 @@ const char *const *alt_as_is; /* another set like as_is[] */
         }
     }
 
-    /* Leave "craft" as a suffix as-is (aircraft, hovercraft);
-       "craft" itself is (arguably) not included in our likely context */
-    if ((baselen > 5) && (!BSTRCMPI(basestr, endstring - 5, "craft")))
-        return TRUE;
-
     /* avoid false hit on one_off[].plur == "lice" or .sing == "goose";
        if more of these turn up, one_off[] entries will need to flagged
        as to which are whole words and which are matchable as suffices
@@ -2220,7 +2215,6 @@ const char *const *alt_as_is; /* another set like as_is[] */
             Strcasecpy(endstring, "s");
         return TRUE;
     }
-
     /* skip "ox" -> "oxen" entry when pluralizing "<something>ox"
        unless it is muskox */
     if (to_plural && baselen > 2 && !strcmpi(endstring - 2, "ox")
@@ -2441,7 +2435,10 @@ const char *oldstr;
 
     /* Ends in z, x, s, ch, sh; add an "es" */
     if (index("zxs", lo_c)
-        || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1))))
+        || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1)))
+            /* 21st century k-sound */
+            && !(len >= 4 && !strcmpi(spot - 2, "ech")
+                && index("tm", lowc(*(spot - 4)))))
         /* Kludge to get "tomatoes" and "potatoes" right */
         || (len >= 4 && !strcmpi(spot - 2, "ato"))
         || (len >= 5 && !strcmpi(spot - 4, "dingo"))) {