summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-09-14 18:37:38 -0400
committerAllan McRae <allan@archlinux.org>2015-09-20 17:36:27 +1000
commitedbe6c2bdc6a3011e5aea208c44be5eee02f120b (patch)
treebee3474adf643e425f5482813b50fec8db19fc28 /src/util
parent75fe6ef104b1071bf763354177f3c4339c1c7854 (diff)
downloadpacman-edbe6c2bdc6a3011e5aea208c44be5eee02f120b.tar.xz
move strtrim to util-common
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/pactree.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/util/pactree.c b/src/util/pactree.c
index 11ad7cae..6969995c 100644
--- a/src/util/pactree.c
+++ b/src/util/pactree.c
@@ -123,42 +123,6 @@ int searchsyncs = 0;
const char *dbpath = DBPATH;
const char *configfile = CONFFILE;
-static size_t strtrim(char *str)
-{
- char *end, *pch = str;
-
- if(str == NULL || *str == '\0') {
- /* string is empty, so we're done. */
- return 0;
- }
-
- while(isspace((unsigned char)*pch)) {
- pch++;
- }
- if(pch != str) {
- size_t len = strlen(pch);
- if(len) {
- memmove(str, pch, len + 1);
- pch = str;
- } else {
- *str = '\0';
- }
- }
-
- /* check if there wasn't anything but whitespace in the string. */
- if(*str == '\0') {
- return 0;
- }
-
- end = (str + strlen(str) - 1);
- while(isspace((unsigned char)*end)) {
- end--;
- }
- *++end = '\0';
-
- return end - pch;
-}
-
static int register_syncs(void)
{
FILE *fp;