[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #36652] read_string() is wrongly documented to check for logical eo
From: |
anonymous |
Subject: |
[bug #36652] read_string() is wrongly documented to check for logical eof. |
Date: |
Wed, 13 Jun 2012 21:15:49 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:10.0.4) Gecko/20120421 Firefox/10.0.4 TenFourFox/G5 |
URL:
<http://savannah.gnu.org/bugs/?36652>
Summary: read_string() is wrongly documented to check for
logical eof.
Project: findutils
Submitted by: None
Submitted on: Wed 13 Jun 2012 09:15:49 PM UTC
Category: xargs
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: Samuel Bronson
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
The documentation comment for the read_string() function in xargs.c is:
/* Read a null-terminated string from the input and add it to the list of
arguments to pass to the command.
Return -1 if eof (either physical or logical) is reached,
otherwise the length of the string read (including the null). */
But, there does not appear to be any place where "logical" eof (input matching
eof_str) could be checked for (nor is it really desirable that it be checked
for in -0 mode, since the whole point of -0 is to allow *any* filename).
(It might also be a good idea to state in the documentation that -e/-E have no
effect in -0 mode. Emacs' grep.el actually tries to use "xargs -0 -e", and if
that doesn't work -- for example, with BSD xargs -- it falls back to "find
-exec" ...)
And, nitpicking further, this function actually only returns -1 when it hits
an EOF *before* it manages to read any characters into the buffer; otherwise,
EOF is treated basically the same way as the seperator character (which, by
the way, might not be NUL).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36652>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #36652] read_string() is wrongly documented to check for logical eof.,
anonymous <=