summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-07-11 18:29:21 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-07-11 18:29:21 +0000
commitd045e55b7c7c36025e4ca5a7157baa4f48f50772 (patch)
tree355f825bb0bdcf3982f17f97425c705316a600b6 /src
parent44f0501d4fb2fe7dfdd8a6471f4052fa39f2aac4 (diff)
downloadcoreutils-d045e55b7c7c36025e4ca5a7157baa4f48f50772.tar.xz
(unexpand): Always copy in text mode. POSIX says
the input and output must be text.
Diffstat (limited to 'src')
-rw-r--r--src/unexpand.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/unexpand.c b/src/unexpand.c
index e347d654c..e88efcfe1 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -302,9 +302,6 @@ unexpand (void)
if (!fp)
return;
- /* Binary I/O will preserve the original EOL style (DOS/Unix) of files. */
- SET_BINARY2 (fileno (fp), STDOUT_FILENO);
-
/* The worst case is a non-blank character, then one blank, then a
tab stop, then MAX_COLUMN_WIDTH - 1 blanks, then a non-blank; so
allocate MAX_COLUMN_WIDTH bytes to store the blanks. */
@@ -348,7 +345,7 @@ unexpand (void)
do
{
while ((c = getc (fp)) < 0 && (fp = next_file (fp)))
- SET_BINARY2 (fileno (fp), STDOUT_FILENO);
+ continue;
if (convert)
{