unexpand: spaces to tabs

This commit is contained in:
Hiltjo Posthuma 2015-02-20 13:26:36 +01:00
parent 36dc38acf6
commit 5a6715c0cf
1 changed files with 13 additions and 13 deletions

View File

@ -12,20 +12,20 @@ static int tablistlen = 8;
static size_t static size_t
parselist(const char *s) parselist(const char *s)
{ {
size_t i; size_t i;
char *p, *tmp; char *p, *tmp;
tmp = estrdup(s); tmp = estrdup(s);
for (i = 0; (p = strsep(&tmp, " ,")); i++) { for (i = 0; (p = strsep(&tmp, " ,")); i++) {
if (*p == '\0') if (*p == '\0')
eprintf("empty field in tablist\n"); eprintf("empty field in tablist\n");
tablist = erealloc(tablist, (i + 1) * sizeof(*tablist)); tablist = erealloc(tablist, (i + 1) * sizeof(*tablist));
tablist[i] = estrtonum(p, 1, MIN(LLONG_MAX, SIZE_MAX)); tablist[i] = estrtonum(p, 1, MIN(LLONG_MAX, SIZE_MAX));
if (i > 0 && tablist[i - 1] >= tablist[i]) if (i > 0 && tablist[i - 1] >= tablist[i])
eprintf("tablist must be ascending\n"); eprintf("tablist must be ascending\n");
} }
tablist = erealloc(tablist, (i + 1) * sizeof(*tablist)); tablist = erealloc(tablist, (i + 1) * sizeof(*tablist));
return i; return i;
} }
static void static void