mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-05-30 06:16:58 +02:00
(unexpand): Move EOF check to follow code that
processes and generates output for pending spaces. Before `printf ' ' |unexpand -t 1,2' generated no output.
This commit is contained in:
+9
-8
@@ -249,14 +249,6 @@ unexpand (void)
|
||||
for (;;)
|
||||
{
|
||||
c = getc (fp);
|
||||
if (c == EOF)
|
||||
{
|
||||
fp = next_file (fp);
|
||||
if (fp == NULL)
|
||||
break; /* No more files. */
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == ' ' && convert)
|
||||
{
|
||||
@@ -334,6 +326,15 @@ unexpand (void)
|
||||
}
|
||||
}
|
||||
|
||||
if (c == EOF)
|
||||
{
|
||||
fp = next_file (fp);
|
||||
if (fp == NULL)
|
||||
break; /* No more files. */
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (convert)
|
||||
{
|
||||
if (c == '\b')
|
||||
|
||||
Reference in New Issue
Block a user