diff options
author | Jim Meyering <jim@meyering.net> | 1996-02-22 00:58:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-02-22 00:58:12 +0000 |
commit | 756fe67e6043488110c6a8592adfbe0a80d5bbfb (patch) | |
tree | 40e7474f028b3cffc209f691f175c13cbcf99ee3 | |
parent | 23d07a32b22b297e5bf9799c4935d9aad914941e (diff) | |
download | coreutils-756fe67e6043488110c6a8592adfbe0a80d5bbfb.tar.xz |
(xfields) [without -t]: Ignore leading blanks.
From David Dyck (dcd@tc.fluke.COM).
-rw-r--r-- | src/join.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/join.c b/src/join.c index 16446eb58..4c9c71b39 100644 --- a/src/join.c +++ b/src/join.c @@ -246,6 +246,13 @@ xfields (struct line *line) ptr = line->beg; lim = line->lim; + if (!tab) + { + /* Skip leading blanks before the first field. */ + while (ptr < lim && ISSPACE (*ptr)) + ++ptr; + } + for (i = 0; ptr < lim; ++i) { if (tab) |