From: Paul Eggert Date: Mon, 11 Jul 2005 18:29:21 +0000 (+0000) Subject: (unexpand): Always copy in text mode. POSIX says X-Git-Tag: CPPI-1_12~260 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d045e55b7c7c36025e4ca5a7157baa4f48f50772;p=thirdparty%2Fcoreutils.git (unexpand): Always copy in text mode. POSIX says the input and output must be text. --- diff --git a/src/unexpand.c b/src/unexpand.c index e347d654c0..e88efcfe10 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) {