[hackers] [sbase] unexpand: spaces to tabs || Hiltjo Posthuma
commit 2f709f1b1a8ac2a195ed9261f59758d8005a3b2e
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Fri Feb 20 13:26:36 2015 +0100
unexpand: spaces to tabs
diff --git a/unexpand.c b/unexpand.c
index 8d23a05..feb965e 100644
--- a/unexpand.c
+++ b/unexpand.c
_AT_@ -12,20 +12,20 @@ static int tablistlen = 8;
static size_t
parselist(const char *s)
{
- size_t i;
- char *p, *tmp;
+ size_t i;
+ char *p, *tmp;
- tmp = estrdup(s);
- for (i = 0; (p = strsep(&tmp, " ,")); i++) {
- if (*p == '\0')
- eprintf("empty field in tablist\n");
- tablist = erealloc(tablist, (i + 1) * sizeof(*tablist));
- tablist[i] = estrtonum(p, 1, MIN(LLONG_MAX, SIZE_MAX));
- if (i > 0 && tablist[i - 1] >= tablist[i])
- eprintf("tablist must be ascending\n");
- }
- tablist = erealloc(tablist, (i + 1) * sizeof(*tablist));
- return i;
+ tmp = estrdup(s);
+ for (i = 0; (p = strsep(&tmp, " ,")); i++) {
+ if (*p == '\0')
+ eprintf("empty field in tablist\n");
+ tablist = erealloc(tablist, (i + 1) * sizeof(*tablist));
+ tablist[i] = estrtonum(p, 1, MIN(LLONG_MAX, SIZE_MAX));
+ if (i > 0 && tablist[i - 1] >= tablist[i])
+ eprintf("tablist must be ascending\n");
+ }
+ tablist = erealloc(tablist, (i + 1) * sizeof(*tablist));
+ return i;
}
static void
Received on Fri Feb 20 2015 - 14:30:26 CET
This archive was generated by hypermail 2.3.0
: Fri Feb 20 2015 - 14:36:08 CET