Tcl Source Code

Artifact [45370da070]
Login

Artifact 45370da0708041b4d7ca7327a67e2f8397ee7a63:

Attachment "None" to ticket [402680ffff] added by dkf 2000-12-06 17:11:44.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.352
diff -c -r1.352 ChangeLog
*** ChangeLog	2000/11/24 15:29:51	1.352
--- ChangeLog	2000/12/06 10:06:37
***************
*** 1,3 ****
--- 1,9 ----
+ 2000-12-06  Donal K. Fellows  <[email protected]>
+ 
+ 	* doc/open.n: Added xref to fconfigure and advice on the opening
+ 	  of binary files.  Should help prevent a recurrence of bugs like
+ 	  #124558
+ 
  2000-11-24  Donal K. Fellows  <[email protected]>
  
  	* generic/tclExecute.c (TclExecuteByteCode): Logical negation "!"
Index: doc/open.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/open.n,v
retrieving revision 1.10
diff -c -r1.10 open.n
*** doc/open.n	2000/09/07 14:27:50	1.10
--- doc/open.n	2000/12/06 10:06:39
***************
*** 108,113 ****
--- 108,125 ----
  (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
+ '\" Not versioned as advice applies to all recent versions of Tcl.
+ '\" Prior to that, Tcl didn't really support binary files anyway...
+ .VS
+ 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\fI 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.
+ .VE
  .SH "COMMAND PIPELINES"
  .PP
  If the first character of \fIfileName\fR is ``|'' then the
***************
*** 253,259 ****
  applications on the various platforms
  
  .SH "SEE ALSO"
! file(n), close(n), filename(n), gets(n), read(n), puts(n), exec(n), fopen(1)
  
  .SH KEYWORDS
  access mode, append, create, file, non-blocking, open, permissions,
--- 265,272 ----
  applications on the various platforms
  
  .SH "SEE ALSO"
! file(n), close(n), filename(n), fconfigure(n), gets(n), read(n),
! puts(n), exec(n), fopen(1)
  
  .SH KEYWORDS
  access mode, append, create, file, non-blocking, open, permissions,