summaryrefslogtreecommitdiffstats
path: root/library/auto.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2020-12-06 18:24:00 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2020-12-06 18:24:00 (GMT)
commit0f93742804d047a8de0fe3acda7b019daae7b273 (patch)
tree18bed9fa65dbe84ebb028ca81c52ae123e9b3867 /library/auto.tcl
parent7dd7fe1b6c5348772912a64134334358a39f8211 (diff)
parentfcee72d2c7daddae9dd63e4eb14746b7bd319aa9 (diff)
downloadtcl-0f93742804d047a8de0fe3acda7b019daae7b273.zip
tcl-0f93742804d047a8de0fe3acda7b019daae7b273.tar.gz
tcl-0f93742804d047a8de0fe3acda7b019daae7b273.tar.bz2
merge core-8-branch
Diffstat (limited to 'library/auto.tcl')
-rw-r--r--library/auto.tcl26
1 files changed, 15 insertions, 11 deletions
diff --git a/library/auto.tcl b/library/auto.tcl
index 7ef5681..7c9f38c 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -3,8 +3,8 @@
# utility procs formerly in init.tcl dealing with auto execution of commands
# and can be auto loaded themselves.
#
-# Copyright (c) 1991-1993 The Regents of the University of California.
-# Copyright (c) 1994-1998 Sun Microsystems, Inc.
+# Copyright © 1991-1993 The Regents of the University of California.
+# Copyright © 1994-1998 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -265,6 +265,7 @@ proc auto_mkindex {dir args} {
auto_mkindex_parser::cleanup
set fid [open "tclIndex" w]
+ fconfigure $fid -translation lf
puts -nonewline $fid $index
close $fid
cd $oldDir
@@ -291,6 +292,7 @@ proc auto_mkindex_old {dir args} {
set f ""
set error [catch {
set f [open $file]
+ fconfigure $f -eofchar \032
while {[gets $f line] >= 0} {
if {[regexp {^proc[ ]+([^ ]*)} $line match procName]} {
set procName [lindex [auto_qualify $procName "::"] 0]
@@ -309,6 +311,7 @@ proc auto_mkindex_old {dir args} {
set f ""
set error [catch {
set f [open tclIndex w]
+ fconfigure $f -translation lf
puts -nonewline $f $index
close $f
cd $oldDir
@@ -401,6 +404,7 @@ proc auto_mkindex_parser::mkindex {file} {
set scriptFile $file
set fid [open $file]
+ fconfigure $fid -eofchar \032
set contents [read $fid]
close $fid
@@ -427,10 +431,10 @@ proc auto_mkindex_parser::mkindex {file} {
# auto_mkindex_parser::hook command
#
-# Registers a Tcl command to evaluate when initializing the slave interpreter
-# used by the mkindex parser. The command is evaluated in the master
+# Registers a Tcl command to evaluate when initializing the child interpreter
+# used by the mkindex parser. The command is evaluated in the parent
# interpreter, and can use the variable auto_mkindex_parser::parser to get to
-# the slave
+# the child
proc auto_mkindex_parser::hook {cmd} {
variable initCommands
@@ -438,16 +442,16 @@ proc auto_mkindex_parser::hook {cmd} {
lappend initCommands $cmd
}
-# auto_mkindex_parser::slavehook command
+# auto_mkindex_parser::childhook command
#
-# Registers a Tcl command to evaluate when initializing the slave interpreter
-# used by the mkindex parser. The command is evaluated in the slave
+# Registers a Tcl command to evaluate when initializing the child interpreter
+# used by the mkindex parser. The command is evaluated in the child
# interpreter.
-proc auto_mkindex_parser::slavehook {cmd} {
+proc auto_mkindex_parser::childhook {cmd} {
variable initCommands
- # The $parser variable is defined to be the name of the slave interpreter
+ # The $parser variable is defined to be the name of the child interpreter
# when this command is used later.
lappend initCommands "\$parser eval [list $cmd]"
@@ -601,7 +605,7 @@ auto_mkindex_parser::command proc {name args} {
# Conditionally add support for Tcl byte code files. There are some tricky
# details here. First, we need to get the tbcload library initialized in the
-# current interpreter. We cannot load tbcload into the slave until we have
+# current interpreter. We cannot load tbcload into the child until we have
# done so because it needs access to the tcl_patchLevel variable. Second,
# because the package index file may defer loading the library until we invoke
# a command, we need to explicitly invoke auto_load to force it to be loaded.