Describe how xargs handles trailing blanks

This commit is contained in:
James Youngman
2007-02-24 14:12:50 +00:00
parent 2e7f7a33ca
commit 5aeeed8a2f
2 changed files with 17 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
2007-02-24 James Youngman <jay@gnu.org>
* doc/find.texi (Multiple Files): Describe how trailing blanks are
handled when -L is in effect.
* xargs/xargs.c (read_line): Use an enum rather than
preprocessor macro values for the lexer state.

View File

@@ -184,6 +184,9 @@ static int lineno = 0;
static struct buildcmd_state bc_state;
static struct buildcmd_control bc_ctl;
/* Did we already complain about NUL characters in the input? */
static int nullwarning_given = 0;
/* If nonzero, when this string is read on stdin it is treated as
end of file.
@@ -886,6 +889,17 @@ read_line (void)
state = NORM;
break;
}
if ( (0 == c) && !nullwarning_given )
{
/* This is just a warning message. We only issue it once. */
error (0, 0,
_("warning: a NUL character occurred in the input. "
"It cannot be passed through in the argument list. "
"Did you mean to use the --null option?"));
nullwarning_given = 1;
}
#if 1
if (p >= endbuf)
{