From 25e98c6d2bcf1a17484a2953329ffcfffbb169b2 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 18 Mar 2024 22:13:13 -0400 Subject: Move collapse_whitespace to utils.c / utils.h --- src/ini.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/ini.c') diff --git a/src/ini.c b/src/ini.c index 6716a07..ada0701 100644 --- a/src/ini.c +++ b/src/ini.c @@ -229,17 +229,6 @@ char *unquote(char *s) { return s; } -char *collapse_whitespace(char **s) { - size_t len = strlen(*s); - size_t i; - for (i = 0; isblank((int)*s[i]); i++); - memmove(*s, *s + i, strlen(*s)); - if (i) { - *s[len - i] = '\0'; - } - return *s; -} - void ini_free(struct INIFILE **ini) { for (size_t section = 0; section < (*ini)->section_count; section++) { for (size_t data = 0; data < (*ini)->section[section]->data_count; data++) { -- cgit