1
0
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:
Jim Meyering
1996-07-26 04:31:29 +00:00
parent 7ce576ff06
commit b294dd43a1
+9 -8
View File
@@ -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')