From: Jim Meyering Date: Sun, 4 Jul 1999 09:40:46 +0000 (+0000) Subject: (xfields): Only s separate fields, not s. X-Git-Tag: TEXTUTILS-1_22n~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb71ae4c86c258d2f19c9b35e5aa00d69d95b6d9;p=thirdparty%2Fcoreutils.git (xfields): Only s separate fields, not s. --- diff --git a/src/join.c b/src/join.c index 34bdd1ce1e..d71fe8bf02 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. */