diff options
author | Jim Meyering <jim@meyering.net> | 1999-07-04 09:40:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-07-04 09:40:46 +0000 |
commit | fb71ae4c86c258d2f19c9b35e5aa00d69d95b6d9 (patch) | |
tree | c055e42d6f61abb45f205aa33d4db491a7103988 /src | |
parent | 5b09432a60720f08d1d1cf09d738ae73946260fc (diff) | |
download | coreutils-fb71ae4c86c258d2f19c9b35e5aa00d69d95b6d9.tar.xz |
(xfields): Only <blank>s separate fields, not <space>s.
Diffstat (limited to 'src')
-rw-r--r-- | src/join.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/join.c b/src/join.c index 34bdd1ce1..d71fe8bf0 100644 --- a/src/join.c +++ b/src/join.c @@ -200,7 +200,7 @@ xfields (struct line *line) if (!tab) { /* Skip leading blanks before the first field. */ - while (ptr < lim && ISSPACE (*ptr)) + while (ptr < lim && ISBLANK (*ptr)) ++ptr; } @@ -222,15 +222,15 @@ xfields (struct line *line) unsigned char *beg; beg = ptr; - while (ptr < lim && !ISSPACE (*ptr)) + while (ptr < lim && !ISBLANK (*ptr)) ++ptr; ADD_FIELD (line, beg, ptr - beg); - while (ptr < lim && ISSPACE (*ptr)) + while (ptr < lim && ISBLANK (*ptr)) ++ptr; } } - if (ptr > line->beg && ((!tab && ISSPACE (ptr[-1])) || ptr[-1] == tab)) + if (ptr > line->beg && ((!tab && ISBLANK (ptr[-1])) || ptr[-1] == tab)) { /* Add one more (empty) field because the last character of the line was a delimiter. */ |