Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-06 05:46:54 +0300
committerChristopher Faylor <me@cgf.cx>2005-03-06 05:46:54 +0300
commit57a64c15da30be80bb7c9cec0f040fa720cd60f4 (patch)
treea542eec0e4b33d37f344e2559ee35e2c2906392b /winsup/doc
parent3016669b4b99c161cd0a8c83e2607627f2aeabbb (diff)
* pathnames.sgml: Clarify binmode/textmode behavior slightly.
* textbinary.sgml: Ditto.
Diffstat (limited to 'winsup/doc')
-rw-r--r--winsup/doc/ChangeLog5
-rw-r--r--winsup/doc/pathnames.sgml12
-rw-r--r--winsup/doc/textbinary.sgml26
3 files changed, 25 insertions, 18 deletions
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index fdd3ce22d..22daea03a 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-05 Christopher Faylor <cgf@timesys.com>
+
+ * pathnames.sgml: Clarify binmode/textmode behavior slightly.
+ * textbinary.sgml: Ditto.
+
2005-03-03 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
* how-api.texinfo: Add Pierre's security text.
diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml
index fe9133901..4447a0cf1 100644
--- a/winsup/doc/pathnames.sgml
+++ b/winsup/doc/pathnames.sgml
@@ -17,7 +17,7 @@ make it be the <filename>/disk2</filename> directory).</para>
the existance of a single unified POSIX file system structure, Cygwin
maintains a special internal POSIX view of the Win32 file system
that allows these programs to successfully run under Windows. Cygwin
-uses this mapping to translate between Win32 and POSIX paths as
+uses this mapping to translate from POSIX to Win32 paths as
necessary.</para>
</sect2>
@@ -38,7 +38,7 @@ information will be retrieved next time the user logs in. Because it
is sometimes desirable to have system-wide as well as user-specific
mounts, there is also a system-wide mount table that all Cygwin users
inherit. The system-wide table may only be modified by a user with
-the appropriate priviledges (Administrator priviledges in Windows
+the appropriate privileges (Administrator privileges in Windows
NT).</para>
<para>The current user's table is located under
@@ -56,11 +56,15 @@ Without a <filename>/</filename> mount, Cygwin processes cannot
distinguish between the Windows CurrentDrive and SystemDrive.
</para>
-<para>Whenever Cygwin generates a POSIX path from a Win32 one, it uses
+<para>Whenever Cygwin generates a Win32 path from a POSIX one, it uses
the longest matching prefix in the mount table. Thus, if
<filename>C:</filename> is mounted as <filename>/c</filename> and also
as <filename>/</filename>, then Cygwin would translate
-<filename>C:/foo/bar</filename> to <filename>/c/foo/bar</filename>.</para>
+<filename>C:/foo/bar</filename> to <filename>/c/foo/bar</filename>.
+This translation is normally only used when trying to derive the
+POSIX equivalent current directory. Otherwise, the handling of MS-DOS
+filenames bypasses the mount table.
+</para>
<para>Invoking <command>mount</command> without any arguments displays
Cygwin's current set of mount points.
diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml
index 24b2a4c96..15994185a 100644
--- a/winsup/doc/textbinary.sgml
+++ b/winsup/doc/textbinary.sgml
@@ -35,15 +35,15 @@ are to be opened when the mode is not specified explicitly.
The rules are evolving, this section gives the design goals.</para>
<orderedlist numeration="loweralpha">
<listitem>
-<para>If the file appears to reside on a file system that is mounted
-(i.e. if its pathname starts with a directory displayed by
-<command>mount</command>), then the default is specified by the mount
-flag. If the file is a symbolic link, the mode of the target file system
-applies.</para>
+<para>If the filename is specified as a POSIX path and it appears to
+reside on a file system that is mounted (i.e. if its pathname starts
+with a directory displayed by <command>mount</command>), then the
+default is specified by the mount flag. If the file is a symbolic link,
+the mode of the target file system applies.</para>
</listitem>
<listitem>
-<para>If the file appears to reside on a file system that is not mounted
-(as can happen when the path contains a drive letter), the default is binary.
+<para>If the file is specified via a MS-DOS pathname (i.e., it contains a
+backslash or a colon), the default is binary.
</para>
</listitem>
<listitem>
@@ -55,9 +55,11 @@ in binary mode if any of the following conditions hold:</para>
<orderedlist numeration="arabic" spacing="compact">
<listitem><para>binary mode is specified in the open call</para>
</listitem>
-<listitem><para><envar>CYGWIN</envar> contains <literal>binmode</literal></para>
+<listitem><para>the filename is a MS-DOS filename
+</listitem>
+<listitem><para>the file resides on a binary mounted partition</para>
</listitem>
-<listitem><para>the file resides in a binary mounted partition</para>
+<listitem><para><envar>CYGWIN</envar> contains <literal>binmode</literal></para>
</listitem>
<listitem><para>the file is not a disk file</para>
</listitem>
@@ -66,11 +68,7 @@ in binary mode if any of the following conditions hold:</para>
</listitem>
<listitem>
-<para>When a Cygwin program is launched by a shell, its standard input,
-output and error are in binary mode if the <envar>CYGWIN</envar> variable
-contains <literal>tty</literal>, else in text mode, except if they are piped
-or redirected.</para>
-<para> When redirecting, the Cygwin shells uses rules (a-c). For
+<para> When redirecting, the Cygwin shells uses rules (a-e). For
these shells the relevant value of <envar>CYGWIN</envar> is that at the time
the shell was launched and not that at the time the program is executed.
Non-Cygwin shells always pipe and redirect with binary mode. With