summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-05-11 00:16:52 (GMT)
committerhobbs <hobbs>2000-05-11 00:16:52 (GMT)
commit49819cda899108c1cfefcbbbc112bfb30ba8a065 (patch)
treebc3c22720f5fddd042f51e076a16faacb5a8aef3 /generic/tclIOUtil.c
parenta413d4af1ac75229c582599b811c275f1aea186e (diff)
downloadtcl-49819cda899108c1cfefcbbbc112bfb30ba8a065.zip
tcl-49819cda899108c1cfefcbbbc112bfb30ba8a065.tar.gz
tcl-49819cda899108c1cfefcbbbc112bfb30ba8a065.tar.bz2
* doc/source.n:
* doc/Eval.3: * tests/source.test: * generic/tclIOUtil.c (Tcl_EvalFile): added explicit \32 (^Z) eofchar (affects Tcl_EvalFile in C, "source" in Tcl). This was implicit on Windows already, and is now cross-platform to allow for scripted documents.
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r--generic/tclIOUtil.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 65dca78..41db745 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.9 1999/11/10 02:51:56 hobbs Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.10 2000/05/11 00:16:53 hobbs Exp $
*/
#include "tclInt.h"
@@ -306,6 +306,12 @@ Tcl_EvalFile(interp, fileName)
"\": ", Tcl_PosixError(interp), (char *) NULL);
goto end;
}
+ /*
+ * The eofchar is \32 (^Z). This is the usual on Windows, but we
+ * effect this cross-platform to allow for scripted documents.
+ * [Bug: 2040]
+ */
+ Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");
if (Tcl_ReadChars(chan, objPtr, -1, 0) < 0) {
Tcl_Close(interp, chan);
Tcl_AppendResult(interp, "couldn't read file \"", fileName,