sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit a2da9edb9950366e2267ffa9274753a9eb26449c
parent d965985a5219ed5dbe09fc83177beb5bb56f73fd
Author: Jakob Kramer <jakob.kramer@gmx.de>
Date:   Sat,  3 May 2014 20:39:45 +0200

sort: simplify skip_columns

Diffstat:
Msort.c | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/sort.c b/sort.c @@ -206,16 +206,10 @@ skip_columns(char *s, size_t n) size_t i; for(i = 0; i < n; i++) { - if(bflag) { - if(i != 0) - s = next_blank(s); + if(i > 0) + s = end_column(s); + if(bflag) s = next_nonblank(s); - } else { - if(i == 0) - continue; - s = next_nonblank(s); - s = next_blank(s); - } } return s;