summaryrefslogtreecommitdiffstats
path: root/doc/open.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-27 18:48:21 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-27 18:48:21 (GMT)
commit7842c9275791d34656b40014d43e8177a94010ad (patch)
treeaa7be44c0131f5a0a25dbcef7634100323b8a039 /doc/open.n
parentec3f17501d816894810d4d4ea984e4f60e6217fe (diff)
downloadtcl-7842c9275791d34656b40014d43e8177a94010ad.zip
tcl-7842c9275791d34656b40014d43e8177a94010ad.tar.gz
tcl-7842c9275791d34656b40014d43e8177a94010ad.tar.bz2
TIP#183 IMPLEMENTATION [Patch 577093]
* generic/tclIOUtil.c (TclGetOpenModeEx): New routine. * generic/tclInt.h: * generic/tclIO.c (Tcl_OpenObjCmd): Support for "b" and * doc/open.n: "BINARY" in "access" argument to [open]. * tests/ioCmd.test:
Diffstat (limited to 'doc/open.n')
-rw-r--r--doc/open.n23
1 files changed, 14 insertions, 9 deletions
diff --git a/doc/open.n b/doc/open.n
index 8751834..81335a1 100644
--- a/doc/open.n
+++ b/doc/open.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: open.n,v 1.23 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: open.n,v 1.24 2005/04/27 18:48:24 dgp Exp $
'\"
.so man.macros
.TH open n 8.3 Tcl "Tcl Built-In Commands"
@@ -61,6 +61,14 @@ Set the initial access position to the end of the file.
Open the file for reading and writing. If the file doesn't exist,
create a new empty file.
Set the initial access position to the end of the file.
+.VS 8.5
+.PP
+All of the legal \fIaccess\fR values above may have the character
+\fBb\fR added as the second or third character in the value to
+indicate that the opened channel should be configured with the
+\fB-translation binary\fR option, making the channel suitable for
+reading or writing of binary data.
+.VE 8.5
.PP
In the second form, \fIaccess\fR consists of a list of any of the
following flags, all of which have the standard POSIX meanings.
@@ -78,6 +86,11 @@ Open the file for both reading and writing.
\fBAPPEND\fR
Set the file pointer to the end of the file prior to each write.
.TP 15
+.VS 8.5
+\fBBINARY\fR
+Configure the opened channed with the \fB-translation binary\fR option.
+.VE 8.5
+.TP 15
\fBCREAT\fR
Create the file if it doesn't already exist (without this flag it
is an error for the file not to exist).
@@ -106,14 +119,6 @@ If a new file is created as part of opening it, \fIpermissions\fR
(an integer) is used to set the permissions for the new file in
conjunction with the process's file mode creation mask.
\fIPermissions\fR defaults to 0666.
-.PP
-Note that if you are going to be reading or writing binary data from
-the channel created by this command, you should use the
-\fBfconfigure\fR command to change the \fB-translation\fR option of
-the channel to \fBbinary\fR before transferring any binary data. This
-is in contrast to the ``b'' character passed as part of the equivalent
-of the \fIaccess\fR parameter to some versions of the C library
-\fIfopen()\fR function.
.SH "COMMAND PIPELINES"
.PP