[hackers] [sbase] unexpand: spaces to tabs || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Tue, 24 Mar 2015 23:53:57 +0100 (CET)

commit 5a6715c0cf8de7022d7f7c2e0772412518c65356
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 Tue Mar 24 2015 - 23:53:57 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 25 2015 - 00:11:02 CET