Minor style changes to sort

This commit is contained in:
sin 2014-04-18 17:21:31 +01:00
parent 98a12cc146
commit 1d5663672e

6
sort.c
View File

@ -198,6 +198,7 @@ columns(char *line, const struct keydef *kd)
char *rest; char *rest;
char *start, *end; char *start, *end;
unsigned i; unsigned i;
for(rest = line, i = 0; i < kd->start_column; i++) { for(rest = line, i = 0; i < kd->start_column; i++) {
if(i != 0) if(i != 0)
rest = next_blank(rest); rest = next_blank(rest);
@ -212,11 +213,10 @@ columns(char *line, const struct keydef *kd)
rest = next_blank(rest); rest = next_blank(rest);
rest = next_nonblank(rest); rest = next_nonblank(rest);
} }
if(kd->end_char) { if(kd->end_char)
for(i = 1; i < kd->end_char && *rest && !isblank(*rest); i++, rest++); for(i = 1; i < kd->end_char && *rest && !isblank(*rest); i++, rest++);
} else { else
rest = next_blank(rest); rest = next_blank(rest);
}
end = rest; end = rest;
} else { } else {
end = rest + strlen(rest); end = rest + strlen(rest);