]> git.pond.sub.org Git - empserver/commitdiff
Remove unused plurize()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 18 Jul 2010 13:14:41 +0000 (15:14 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 9 Jan 2011 14:21:39 +0000 (15:21 +0100)
Unused since commit 44c36fa, v4.3.23.

include/prototypes.h
src/lib/gen/plur.c

index 6c38ab2850dbc41ab29c94cabcbb6be2da2dd936..560f1778910d80cca89397cb7adc0f6e789f27b7 100644 (file)
@@ -337,8 +337,6 @@ extern char *numstr(char buf[], int n);
 extern char *esplur(int n);
 extern char *splur(int n);
 extern char *iesplur(int n);
-extern char *plurize(char *buf, int max_len, int n);
-/* more in misc.h */
 
 /*
  * src/lib/global/ *.c
index aee136a3a6b195ba5ef367e1c3b800fba83c820b..57733128deaf77d6aaa88a3ad924d9d56d8c3813 100644 (file)
@@ -52,31 +52,3 @@ iesplur(int n)
 {
     return n == 1 ? "y" : "ies";
 }
-
-/*
- * Change suffix of BUF to English plural if N > 1.
- * Best effort, not 100% accurate English.
- * Array BUF[SIZE] contains a zero-terminated string.
- * If there's not enough space for changed suffix, it is truncated.
- */
-char *
-plurize(char *buf, int size, int n)
-{
-    size_t len = strlen(buf);
-
-    if (!len || n <= 1)
-       return buf;
-
-    switch (buf[len - 1]) {
-    case 'y':
-       buf[len - 1] = '\0';
-       strncat(buf, "ies", size - len);
-       break;
-    case 's':
-       strncat(buf, "es", size - len - 1);
-       break;
-    default:
-       strncat(buf, "s", size - len - 1);
-    }
-    return buf;
-}