- misc.c, misc.h: removed unused clean()
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Fri, 26 Dec 2014 17:36:14 +0000 (17:36 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Fri, 26 Dec 2014 17:36:14 +0000 (17:36 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@5162 82007160-df01-0410-b94d-b575c5fd34c7

src/misc.c
src/misc.h

index b7693481cbe86f470ee2bbb77d239ead28a3c966..6ce29474911e54e1710855e50e0438f780eac75e 100644 (file)
@@ -128,43 +128,3 @@ char *dissect_time(time_t time)
 
    return(buf);
 }
-
-/*
- * Strip leading/tailing characters from null terminated str and return a
- * pointer to the new string.
- */
-
-char *clean(char *str)
-{
-   size_t i;
-   /* Position of last non space. */
-   int ln;
-   /* Position of first non space. */
-   int fn;
-   int gf;
-
-   ln = 0;
-   fn = 0;
-   gf = 0;
-
-   /* Dont need to deal with 1 character */
-   if (strlen(str) <= 1)
-      return str;
-
-   for (i = 0; i < strlen(str); i++)
-   {
-      if (fn == 0 && str[i] != ' ' && !gf)
-      {
-         fn = i;
-         gf = 1;
-      }
-      if (str[i] != ' ')
-         ln = i;
-   }
-
-   /* Null terminate before the tailing spaces. */
-   str[ln + 1] = 0;
-
-   /* Return pointer to point after leading spaces. */
-   return(str + (fn));
-}
index 144aff60bf25bc2f3e1dcc3796edcc48b784123c..9ecd1aef6ac331cb588a28c529460a054e2ccb51 100644 (file)
@@ -2,5 +2,4 @@
 #define MISC_H
 
 extern char *dissect_time(time_t);
-extern char *clean(char *);
 #endif