From: Markus Armbruster Date: Sun, 18 Jul 2010 13:14:41 +0000 (+0200) Subject: Remove unused plurize() X-Git-Tag: v4.3.27~170 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=91302d36ddebb327efd8a955583152109f31572c Remove unused plurize() Unused since commit 44c36fa, v4.3.23. --- diff --git a/include/prototypes.h b/include/prototypes.h index 6c38ab285..560f17789 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -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 diff --git a/src/lib/gen/plur.c b/src/lib/gen/plur.c index aee136a3a..57733128d 100644 --- a/src/lib/gen/plur.c +++ b/src/lib/gen/plur.c @@ -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; -}