From 85f1119b7b81b9661d3f7e47d6f42d9939bcaad1 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 17 Jul 2008 11:49:45 +0000 Subject: * Revamp documentation for Cygwin 1.7, part 1. --- winsup/doc/textbinary.sgml | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'winsup/doc/textbinary.sgml') diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml index 1e74c5861..674c39ef2 100644 --- a/winsup/doc/textbinary.sgml +++ b/winsup/doc/textbinary.sgml @@ -1,6 +1,6 @@ Text and Binary modes - The Issue + The Issue On a UNIX system, when an application reads from a file it gets exactly what's in the file on disk and the converse is true for writing. @@ -28,7 +28,7 @@ other programs (such as cat, cmp, -The default Cygwin behavior +The default Cygwin behavior The Cygwin system gives us some flexibility in deciding how files are to be opened when the mode is not specified explicitly. @@ -49,22 +49,8 @@ backslash or a colon), the default is binary. Pipes and non-file devices are opened in binary mode, except if the CYGWIN environment variable contains -nobinmode. -Warning!In b20.1 of 12/98, a file will be opened -in binary mode if any of the following conditions hold: - -binary mode is specified in the open call - -the filename is a MS-DOS filename - -the file resides on a binary mounted partition - -CYGWIN contains binmode - -the file is not a disk file - - - +nobinmode. Sockets are always opened in binary +mode. @@ -79,7 +65,7 @@ and program < filename are not equivalent when -Example +Example To illustrate the various rules, we provide scripts to delete CRs from files by using the tr program, which can only write to standard output. @@ -115,7 +101,7 @@ In the second case we rely on the DOS shell to redirect in binary mode. -Binary or text? +Binary or text? UNIX programs that have been written for maximum portability will know the difference between text and binary files and act @@ -150,7 +136,7 @@ in binary mode. -Programming +Programming In the open() function call, binary mode can be specified with the flag O_BINARY and text mode with -- cgit v1.2.3