[hackers] [sbase] sort: simplify skip_columns || Jakob Kramer

From: <git_AT_suckless.org>
Date: Sun, 04 May 2014 01:16:05 +0200

commit a2da9edb9950366e2267ffa9274753a9eb26449c
Author: Jakob Kramer <jakob.kramer_AT_gmx.de>
Date: Sat May 3 20:39:45 2014 +0200

    sort: simplify skip_columns

diff --git a/sort.c b/sort.c
index 5af81d2..9ab58d8 100644
--- a/sort.c
+++ b/sort.c
_AT_@ -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;
Received on Sun May 04 2014 - 01:16:05 CEST

This archive was generated by hypermail 2.3.0 : Sun May 04 2014 - 01:24:13 CEST