From 2f2cd5d43ebb2609eb2fbc56bb0bc7fd68cc1161 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 26 Dec 2014 17:36:28 +0000 Subject: [PATCH] - misc.c, misc.h: removed unused clean() git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5163 82007160-df01-0410-b94d-b575c5fd34c7 --- src/misc.c | 40 ---------------------------------------- src/misc.h | 1 - 2 files changed, 41 deletions(-) diff --git a/src/misc.c b/src/misc.c index b769348..6ce2947 100644 --- a/src/misc.c +++ b/src/misc.c @@ -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)); -} diff --git a/src/misc.h b/src/misc.h index 144aff6..9ecd1ae 100644 --- a/src/misc.h +++ b/src/misc.h @@ -2,5 +2,4 @@ #define MISC_H extern char *dissect_time(time_t); -extern char *clean(char *); #endif -- 2.30.2