summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-06-06 23:45:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-06-06 23:45:37 (GMT)
commite9429305435f6edac06ba3dc914e5658705e160a (patch)
tree374c84c5df35cf33d6fe30319969eb01c100c078 /library
parent6580b2352407aa1b0f314552899f301558bc3113 (diff)
downloadtcl-e9429305435f6edac06ba3dc914e5658705e160a.zip
tcl-e9429305435f6edac06ba3dc914e5658705e160a.tar.gz
tcl-e9429305435f6edac06ba3dc914e5658705e160a.tar.bz2
TIP#208 implementation
It's crude (especially in the tests and docs department) and incomplete (no truncation on non-POSIX platforms).
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl22
1 files changed, 21 insertions, 1 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 0623488..d93a653 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# RCS: @(#) $Id: init.tcl,v 1.76 2005/05/24 19:13:45 dgp Exp $
+# RCS: @(#) $Id: init.tcl,v 1.77 2005/06/06 23:45:46 dkf Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -72,6 +72,26 @@ namespace eval tcl {
lappend Path $Dir
unsupported::EncodingDirs $Path
}
+
+ # Set up the 'chan' ensemble
+ namespace eval chan {
+ namespace ensemble create -command ::chan -map {
+ blocked ::fblocked
+ close ::close
+ configure ::fconfigure
+ copy ::fcopy
+ eof ::eof
+ event ::fileevent
+ flush ::flush
+ gets ::gets
+ names {::file channels}
+ puts ::puts
+ read ::read
+ seek ::seek
+ tell ::tell
+ truncate ::tcl::chan::Truncate
+ }
+ }
}
# Windows specific end of initialization