Import Tcl 8.6.12
This commit is contained in:
19
tools/README
19
tools/README
@@ -9,17 +9,12 @@ uniClass.tcl -- Script for generating regexp class tables from the Tcl
|
||||
"string is" classes
|
||||
|
||||
Generating HTML files.
|
||||
The tcl-tk-man-html.tcl script from Robert Critchlow
|
||||
generates a nice set of HTML with good cross references.
|
||||
Use it like
|
||||
tclsh tcl-tk-man-html.tcl --htmldir=/tmp/tcl8.2
|
||||
The tcltk-man2html.tcl script generates a nice set of HTML with
|
||||
good cross references. Use it like
|
||||
cd unix
|
||||
./configure
|
||||
make html
|
||||
This script is very picky about the organization of man pages,
|
||||
effectively acting as a style enforcer.
|
||||
|
||||
Generating Windows Help Files:
|
||||
1) Build tcl in the ../unix directory
|
||||
2) On UNIX, (after autoconf and configure), do
|
||||
make
|
||||
this converts the Nroff to RTF files.
|
||||
2) On Windows, convert the RTF to a Help doc, do
|
||||
nmake helpfile
|
||||
The resulting documentation can be found at
|
||||
/tmp/dist/tcl<version>/html
|
||||
|
||||
2
tools/configure
vendored
2
tools/configure
vendored
@@ -1220,6 +1220,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Recover information that Tcl computed with its configure script.
|
||||
@@ -1262,6 +1263,7 @@ CC=$TCL_CC
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile tcl.hpj"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
dnl This file is an input file used by the GNU "autoconf" program to
|
||||
dnl generate the file "configure", which is run to configure the
|
||||
dnl Makefile in this directory.
|
||||
AC_INIT(man2tcl.c)
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([man2tcl.c])
|
||||
AC_PREREQ([2.59])
|
||||
|
||||
# Recover information that Tcl computed with its configure script.
|
||||
|
||||
@@ -32,4 +33,5 @@ AC_SUBST(TCL_PATCH_LEVEL)
|
||||
AC_SUBST(TCL_SRC_DIR)
|
||||
AC_SUBST(TCL_BIN_DIR)
|
||||
|
||||
AC_OUTPUT(Makefile tcl.hpj)
|
||||
AC_CONFIG_FILES([Makefile tcl.hpj])
|
||||
AC_OUTPUT
|
||||
|
||||
@@ -257,8 +257,9 @@ proc genStubs::rewriteFile {file text} {
|
||||
return
|
||||
}
|
||||
set in [open ${file} r]
|
||||
fconfigure $in -eofchar "\032 {}" -encoding utf-8
|
||||
set out [open ${file}.new w]
|
||||
fconfigure $out -translation lf
|
||||
fconfigure $out -translation lf -encoding utf-8
|
||||
|
||||
while {![eof $in]} {
|
||||
set line [gets $in]
|
||||
@@ -1100,7 +1101,7 @@ proc genStubs::emitInit {name textVar} {
|
||||
}
|
||||
foreach intf [array names interfaces] {
|
||||
if {[info exists hooks($intf)]} {
|
||||
if {[lsearch -exact $hooks($intf) $name] >= 0} {
|
||||
if {$name in $hooks($intf)} {
|
||||
set root 0
|
||||
break
|
||||
}
|
||||
@@ -1191,7 +1192,7 @@ proc genStubs::init {} {
|
||||
set outDir [lindex $argv 0]
|
||||
|
||||
foreach file [lrange $argv 1 end] {
|
||||
source $file
|
||||
source -encoding utf-8 $file
|
||||
}
|
||||
|
||||
foreach name [lsort [array names interfaces]] {
|
||||
@@ -1213,7 +1214,7 @@ proc genStubs::init {} {
|
||||
# Results:
|
||||
# Returns any values that were not assigned to variables.
|
||||
|
||||
if {[string length [namespace which lassign]] == 0} {
|
||||
if {[namespace which lassign] ne ""} {
|
||||
proc lassign {valueList args} {
|
||||
if {[llength $args] == 0} {
|
||||
error "wrong # args: should be \"lassign list varName ?varName ...?\""
|
||||
|
||||
@@ -130,8 +130,8 @@ proc htmlize-text {text {charmap {}}} {
|
||||
\" {"} \
|
||||
{<} {<} \
|
||||
{>} {>} \
|
||||
\u201c "“" \
|
||||
\u201d "”"
|
||||
\u201C "“" \
|
||||
\u201D "”"
|
||||
|
||||
return [string map $charmap $text]
|
||||
}
|
||||
@@ -1303,8 +1303,8 @@ proc make-manpage-section {outputDir sectionDescriptor} {
|
||||
global manual overall_title tcltkdesc verbose
|
||||
global excluded_pages forced_index_pages process_first_patterns
|
||||
|
||||
set LQ \u201c
|
||||
set RQ \u201d
|
||||
set LQ \u201C
|
||||
set RQ \u201D
|
||||
|
||||
lassign $sectionDescriptor \
|
||||
manual(wing-glob) \
|
||||
@@ -1314,6 +1314,7 @@ proc make-manpage-section {outputDir sectionDescriptor} {
|
||||
set manual(wing-copyrights) {}
|
||||
makedirhier $outputDir/$manual(wing-file)
|
||||
set manual(wing-toc-fp) [open $outputDir/$manual(wing-file)/[indexfile] w]
|
||||
fconfigure $manual(wing-toc-fp) -translation lf -encoding utf-8
|
||||
# whistle
|
||||
puts stderr "scanning section $manual(wing-name)"
|
||||
# put the entry for this section into the short table of contents
|
||||
@@ -1364,6 +1365,7 @@ proc make-manpage-section {outputDir sectionDescriptor} {
|
||||
continue
|
||||
}
|
||||
set manual(infp) [open $manual(page)]
|
||||
fconfigure $manual(infp) -encoding utf-8
|
||||
set manual(text) {}
|
||||
set manual(partial-text) {}
|
||||
foreach p {.RS .DS .CS .SO} {
|
||||
|
||||
@@ -116,7 +116,7 @@ proc parse_command_line {} {
|
||||
}
|
||||
|
||||
if {$build_tcl} {
|
||||
# Find Tcl.
|
||||
# Find Tcl
|
||||
set tcldir [lindex [lsort [glob -nocomplain -tails -type d \
|
||||
-directory $tcltkdir tcl$useversion]] end]
|
||||
if {$tcldir eq ""} {
|
||||
@@ -127,7 +127,7 @@ proc parse_command_line {} {
|
||||
}
|
||||
|
||||
if {$build_tk} {
|
||||
# Find Tk.
|
||||
# Find Tk
|
||||
set tkdir [lindex [lsort [glob -nocomplain -tails -type d \
|
||||
-directory $tcltkdir tk$useversion]] end]
|
||||
if {$tkdir eq ""} {
|
||||
@@ -168,7 +168,7 @@ proc css-style args {
|
||||
append style $tokens " \{" $body "\}\n"
|
||||
}
|
||||
proc css-stylesheet {} {
|
||||
set hBd "1px dotted #11577b"
|
||||
set hBd "1px dotted #11577B"
|
||||
|
||||
css-style body div p th td li dd ul ol dl dt blockquote {
|
||||
font-family: Verdana, sans-serif;
|
||||
@@ -177,7 +177,7 @@ proc css-stylesheet {} {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
}
|
||||
css-style pre {
|
||||
background-color: #f6fcec;
|
||||
background-color: #F6FCEC;
|
||||
border-top: 1px solid #6A6A6A;
|
||||
border-bottom: 1px solid #6A6A6A;
|
||||
padding: 1em;
|
||||
@@ -197,20 +197,20 @@ proc css-stylesheet {} {
|
||||
}
|
||||
css-style h1 {
|
||||
font-size: 18px;
|
||||
color: #11577b;
|
||||
color: #11577B;
|
||||
border-bottom: $hBd;
|
||||
margin-top: 0px;
|
||||
}
|
||||
css-style h2 {
|
||||
font-size: 14px;
|
||||
color: #11577b;
|
||||
background-color: #c5dce8;
|
||||
color: #11577B;
|
||||
background-color: #C5DCE8;
|
||||
padding-left: 1em;
|
||||
border: 1px solid #6A6A6A;
|
||||
}
|
||||
css-style h3 h4 {
|
||||
color: #1674A4;
|
||||
background-color: #e8f2f6;
|
||||
background-color: #E8F2F6;
|
||||
border-bottom: $hBd;
|
||||
border-top: $hBd;
|
||||
}
|
||||
@@ -224,16 +224,16 @@ proc css-stylesheet {} {
|
||||
width: 20em;
|
||||
float: left;
|
||||
padding: 2px;
|
||||
border-top: 1px solid #999;
|
||||
border-top: 1px solid #999999;
|
||||
}
|
||||
css-style ".keylist dt" { font-weight: bold; }
|
||||
css-style ".keylist dd" ".arguments dd" {
|
||||
margin-left: 20em;
|
||||
padding: 2px;
|
||||
border-top: 1px solid #999;
|
||||
border-top: 1px solid #999999;
|
||||
}
|
||||
css-style .copy {
|
||||
background-color: #f6fcfc;
|
||||
background-color: #F6FCFC;
|
||||
white-space: pre;
|
||||
font-size: 80%;
|
||||
border-top: 1px solid #6A6A6A;
|
||||
@@ -257,10 +257,12 @@ proc make-man-pages {html args} {
|
||||
|
||||
makedirhier $html
|
||||
set cssfd [open $html/$::CSSFILE w]
|
||||
fconfigure $cssfd -translation lf -encoding utf-8
|
||||
puts $cssfd [css-stylesheet]
|
||||
close $cssfd
|
||||
set manual(short-toc-n) 1
|
||||
set manual(short-toc-fp) [open $html/[indexfile] w]
|
||||
fconfigure $manual(short-toc-fp) -translation lf -encoding utf-8
|
||||
puts $manual(short-toc-fp) [htmlhead $overall_title $overall_title]
|
||||
puts $manual(short-toc-fp) "<DL class=\"keylist\">"
|
||||
set manual(merge-copyrights) {}
|
||||
@@ -298,6 +300,7 @@ proc make-man-pages {html args} {
|
||||
file delete -force -- $html/Keywords
|
||||
makedirhier $html/Keywords
|
||||
set keyfp [open $html/Keywords/[indexfile] w]
|
||||
fconfigure $keyfp -translation lf -encoding utf-8
|
||||
puts $keyfp [htmlhead "$tcltkdesc Keywords" "$tcltkdesc Keywords" \
|
||||
$overall_title "../[indexfile]"]
|
||||
set letters {A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}
|
||||
@@ -321,6 +324,7 @@ proc make-man-pages {html args} {
|
||||
}
|
||||
# Per-keyword page
|
||||
set afp [open $html/Keywords/$a.htm w]
|
||||
fconfigure $afp -translation lf -encoding utf-8
|
||||
puts $afp [htmlhead "$tcltkdesc Keywords - $a" \
|
||||
"$tcltkdesc Keywords - $a" \
|
||||
$overall_title "../[indexfile]"]
|
||||
@@ -397,6 +401,7 @@ proc make-man-pages {html args} {
|
||||
puts -nonewline stderr .
|
||||
}
|
||||
set outfd [open $html/$manual(wing-file)/$manual(name).htm w]
|
||||
fconfigure $outfd -translation lf -encoding utf-8
|
||||
puts $outfd [htmlhead "$manual($manual(wing-file)-$manual(name)-title)" \
|
||||
$manual(name) $wing_name "[indexfile]" \
|
||||
$overall_title "../[indexfile]"]
|
||||
@@ -439,6 +444,7 @@ proc plus-base {var root glob name dir desc} {
|
||||
if {$var} {
|
||||
if {[file exists $tcltkdir/$root/README]} {
|
||||
set f [open $tcltkdir/$root/README]
|
||||
fconfigure $f -encoding utf-8
|
||||
set d [read $f]
|
||||
close $f
|
||||
if {[regexp {This is the \w+ (\S+) source distribution} $d -> version]} {
|
||||
@@ -674,6 +680,7 @@ try {
|
||||
} trap {POSIX ENOENT} {} {
|
||||
set f [open [file join $pkgsDir $dir configure.ac]]
|
||||
}
|
||||
fconfigure $f -encoding utf-8
|
||||
foreach line [split [read $f] \n] {
|
||||
if {2 == [scan $line \
|
||||
{ AC_INIT ( [%[^]]] , [%[^]]] ) } n v]} {
|
||||
@@ -698,6 +705,7 @@ try {
|
||||
set packageDirNameMap {}
|
||||
if {$build_tcl} {
|
||||
set f [open $tcltkdir/$tcldir/pkgs/package.list.txt]
|
||||
fconfigure $f -encoding utf-8
|
||||
try {
|
||||
foreach line [split [read $f] \n] {
|
||||
if {[string trim $line] eq ""} continue
|
||||
|
||||
@@ -177,7 +177,7 @@ proc uni::main {} {
|
||||
puts "shift = $shift, space = $size"
|
||||
|
||||
set f [open [file join [lindex $argv 1] tclUniData.c] w]
|
||||
fconfigure $f -translation lf
|
||||
fconfigure $f -translation lf -encoding utf-8
|
||||
puts $f "/*
|
||||
* tclUniData.c --
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user