]> git.pond.sub.org Git - empserver/blobdiff - src/lib/gen/plur.c
Remove unused plurize()
[empserver] / src / lib / gen / plur.c
index 8bea201c3ead3409fa82f003877fe9cbda64986b..57733128deaf77d6aaa88a3ad924d9d56d8c3813 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,9 +26,9 @@
  *  ---
  *
  *  plur.c: Pluralize (is that a word?) something
- * 
+ *
  *  Known contributors to this file:
- *     
+ *
  */
 
 #include <config.h>
@@ -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;
-}