summaryrefslogtreecommitdiff
path: root/doc/sed-in.texi
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2006-08-07 17:08:37 +0000
committerPaolo Bonzini <bonzini@gnu.org>2008-01-09 16:12:11 +0100
commit3a8e165ab02487c372df217c1989e287625ce0ae (patch)
tree4fbd6691b82c6272248133177e8ca946362e631c /doc/sed-in.texi
parent3ca529fbe25706387200425b2a99012d6008f26c (diff)
downloadsed-3a8e165ab02487c372df217c1989e287625ce0ae.tar.gz
treat cygwin CR/LF correctly (and by design, not by chance)
2006-08-03 Paolo Bonzini <bonzini@gnu.org> Corinna Vinschen <vinschen@redhat.com> * lib/getline.c (getline): Remove Windows special casing. * lib/utils.c (register_open_file, ck_fdopen): New. (ck_fopen, ck_mkstemp): Use register_open_file. * lib/utils.h (ck_fdopen): New. * sed/execute.c (open_next_file): Reopen stdin. * sed/sed.h (read_mode): New. * sed/sed.c (read_mode): New. (main): Set it on --binary. (usage): Document --binary. * sed/compile.c (get_openfile): Change second argument to char and turn it into a string within the function. Adjust callers. * sed/execute.c (dump_append_queue, open_next_file): Use it as mode for ck_fopen. git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-71
Diffstat (limited to 'doc/sed-in.texi')
-rw-r--r--doc/sed-in.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/sed-in.texi b/doc/sed-in.texi
index 4fa64da..02ba9eb 100644
--- a/doc/sed-in.texi
+++ b/doc/sed-in.texi
@@ -277,6 +277,19 @@ standard. If you want to disable only the latter kind of
extension, you can set the @code{POSIXLY_CORRECT} variable
to a non-empty value.
+@item -b
+@itemx --binary
+@opindex -b
+@opindex --binary
+This option is available on any platforms, but is only effective where the
+operating system makes a distinction between text files and binary files.
+When such a distinction is made---as is the case for MS-DOS, Windows,
+Cygwin---text files are composed of lines separated by a carriage return
+@emph{and} a line feed character, and @command{sed} does not see the
+ending CR. When this option is specified, @command{sed} will open
+input files in binary mode, thus not requesting this special processing
+and considering lines to end at a line feed.
+
@item -r
@itemx --regexp-extended
@opindex -r