diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-07-11 18:29:21 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-07-11 18:29:21 +0000 |
commit | d045e55b7c7c36025e4ca5a7157baa4f48f50772 (patch) | |
tree | 355f825bb0bdcf3982f17f97425c705316a600b6 | |
parent | 44f0501d4fb2fe7dfdd8a6471f4052fa39f2aac4 (diff) | |
download | coreutils-d045e55b7c7c36025e4ca5a7157baa4f48f50772.tar.xz |
(unexpand): Always copy in text mode. POSIX says
the input and output must be text.
-rw-r--r-- | src/unexpand.c | 5 |
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) { |