From ce9986a680127539554c2031d7f85312b3619315 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 12 Nov 2004 09:02:29 +0000 Subject: * doc/clock.n: * doc/registry.n: * doc/upvar.n: fixed *roff errors uncovered by running 'make html'. * tools/tcltk-man2html.tcl: added faked support for bullet point lists, i.e. *nroff ".IP \(bu" syntax. Synced other changes from HEAD. --- ChangeLog | 10 ++++++++++ doc/clock.n | 8 ++++---- doc/registry.n | 4 ++-- doc/upvar.n | 18 +++++++++--------- tools/tcltk-man2html.tcl | 31 +++++++++++++++++++++---------- 5 files changed, 46 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ac03ac..3ed3cba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-11-12 Daniel Steffen + + * doc/clock.n: + * doc/registry.n: + * doc/upvar.n: fixed *roff errors uncovered by running 'make html'. + + * tools/tcltk-man2html.tcl: added faked support for bullet point + lists, i.e. *nroff ".IP \(bu" syntax. + Synced other changes from HEAD. + 2004-11-11 Daniel Steffen * tests/fCmd.test: diff --git a/doc/clock.n b/doc/clock.n index 436e7da..aab3dae 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -10,7 +10,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: clock.n,v 1.11.2.4 2004/10/27 14:23:41 dkf Exp $ +'\" RCS: @(#) $Id: clock.n,v 1.11.2.5 2004/11/12 09:02:30 das Exp $ '\" .so man.macros .TH clock n 8.4 Tcl "Tcl Built-In Commands" @@ -29,8 +29,8 @@ or manipulate strings or values that represent some notion of time. The \fIoption\fR argument determines what action is carried out by the command. The legal \fIoptions\fR (which may be abbreviated) are: -.TP .VS 8.3 +.TP \fBclock clicks\fR ?\fB\-milliseconds\fR? Return a high-resolution time value as a system-dependent integer value. The unit of the value is system-dependent but should be the @@ -268,10 +268,10 @@ different results will be given for \fBclock scan "1 day"\fR and \fBclock scan "24 hours"\fR: .CS .ta 6c -\fB% \fBclock scan\fR "1 day" -base [\fBclock scan\fR 1999-10-31] +% \fBclock scan\fR "1 day" -base [\fBclock scan\fR 1999-10-31] 941443200 % \fBclock scan\fR "24 hours" -base [\fBclock scan\fR 1999-10-31] -941439600\fR +941439600 .CE .RE .TP diff --git a/doc/registry.n b/doc/registry.n index 549a2e1..de31bfa 100644 --- a/doc/registry.n +++ b/doc/registry.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: registry.n,v 1.8.2.1 2004/10/27 14:23:58 dkf Exp $ +'\" RCS: @(#) $Id: registry.n,v 1.8.2.2 2004/11/12 09:02:30 das Exp $ '\" .so man.macros .TH registry n 1.1 registry "Tcl Bundled Packages" @@ -50,8 +50,8 @@ registry key names separated by backslash (\fB\e\fR) characters. \fIOption\fR indicates what to do with the registry key name. Any unique abbreviation for \fIoption\fR is acceptable. The valid options are: -.TP .VS 8.4 +.TP \fBregistry broadcast \fIkeyName\fR ?\fI-timeout milliseconds\fR? . Sends a broadcast message to the system and running programs to notify them diff --git a/doc/upvar.n b/doc/upvar.n index b73d6a4..795629f 100644 --- a/doc/upvar.n +++ b/doc/upvar.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: upvar.n,v 1.5.18.1 2004/10/27 14:43:15 dkf Exp $ +'\" RCS: @(#) $Id: upvar.n,v 1.5.18.2 2004/11/12 09:02:30 das Exp $ '\" .so man.macros .TH upvar n "" Tcl "Tcl Built-In Commands" @@ -46,12 +46,12 @@ procedure calling and also makes it easier to build new control constructs as Tcl procedures. For example, consider the following procedure: .CS -\fBproc add2 name { +proc add2 name { \fBupvar\fR $name x set x [expr $x+2] -}\fR +} .CE -\fBAdd2\fR is invoked with an argument giving the name of a variable, +\fBadd2\fR is invoked with an argument giving the name of a variable, and it adds two to the value of that variable. Although \fBadd2\fR could have been implemented using \fBuplevel\fR instead of \fBupvar\fR, \fBupvar\fR makes it simpler for \fBadd2\fR @@ -84,17 +84,17 @@ the trace procedure will be passed the name of \fImyVar\fR, rather than the name of \fIotherVar\fR. Thus, the output of the following code will be \fBlocalVar\fR rather than \fBoriginalVar\fR: .CS -\fBproc traceproc { name index op } { +proc \fBtraceproc\fR { name index op } { puts $name } -proc setByUpvar { name value } { +proc \fBsetByUpvar\fR { name value } { \fBupvar\fR $name localVar set localVar $value } set originalVar 1 -trace variable originalVar w traceproc -setByUpvar originalVar 2 -}\fR +trace variable originalVar w \fBtraceproc\fR +\fBsetByUpvar\fR originalVar 2 +} .CE .PP If \fIotherVar\fR refers to an element of an array, then variable diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 30e11d3..b9c8280 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -230,6 +230,7 @@ proc process-text {text} { {\(+-} {±} \ {\fP} {\fR} \ {\.} . \ + {\(bu} {•} \ ] $text] regsub -all {\\o'o\^'} $text {\ô} text; # o-circumflex in re_syntax.n regsub -all {\\-\\\|\\-} $text -- text; # two hyphens @@ -488,7 +489,7 @@ proc output-RS-list {} { .RE { break } - .SH { + .SH - .SS { manerror "unbalanced .RS at section end" backup-text 1 break @@ -534,7 +535,10 @@ proc output-IP-list {context code rest} { man-puts } else { # labelled list, make contents - if {[string compare $context ".SH"]} { + if { + [string compare $context ".SH"] && + [string compare $context ".SS"] + } then { man-puts

} man-puts

@@ -555,6 +559,8 @@ proc output-IP-list {context code rest} { if {[string equal $manual(section) "ARGUMENTS"] || \ [regexp {^\[\d+\]$} $rest]} { man-puts "$para
$rest
" + } elseif {[string equal {•} $rest]} { + man-puts "$para
$rest " } else { man-puts "$para
[long-toc $rest]
" } @@ -954,14 +960,18 @@ proc output-directive {line} { .BE { # man-puts
} - .SH { + .SH - .SS { # drain any open lists # announce the subject set manual(section) $rest # start our own stack of stuff set manual($manual(name)-$manual(section)) {} lappend manual(has-$manual(section)) $manual(name) - man-puts "

[long-toc $manual(section)]

" + if {[string compare .SS $code]} { + man-puts "

[long-toc $manual(section)]

" + } else { + man-puts "

[long-toc $manual(section)]

" + } # some sections can simply free wheel their way through the text # some sections can be processed in their own loops switch -exact $manual(section) { @@ -994,6 +1004,7 @@ proc output-directive {line} { continue } if {[next-op-is .SH rest] + || [next-op-is .SS rest] || [next-op-is .BE rest] || [next-op-is .SO rest]} { backup-text 1 @@ -1022,7 +1033,7 @@ proc output-directive {line} { } {SEE ALSO} { while {[more-text]} { - if {[next-op-is .SH rest]} { + if {[next-op-is .SH rest] || [next-op-is .SS rest]} { backup-text 1 return } @@ -1049,7 +1060,7 @@ proc output-directive {line} { } KEYWORDS { while {[more-text]} { - if {[next-op-is .SH rest]} { + if {[next-op-is .SH rest] || [next-op-is .SS rest]} { backup-text 1 return } @@ -1072,7 +1083,7 @@ proc output-directive {line} { } } if {[next-op-is .IP rest]} { - output-IP-list .SH .IP $rest + output-IP-list $code .IP $rest return } if {[next-op-is .PP rest]} { @@ -1377,11 +1388,11 @@ proc make-man-pages {html args} { set manual(partial-text) {} } switch -exact $code { - .SH { + .SH - .SS { if {[llength $rest] == 0} { gets $manual(infp) rest } - lappend manual(text) ".SH [unquote $rest]" + lappend manual(text) "$code [unquote $rest]" } .TH { lappend manual(text) "$code [unquote $rest]" @@ -1601,7 +1612,7 @@ proc make-man-pages {html args} { } puts $afp "
" foreach k $keys { - if {[regexp -nocase -- "^keyword-$a" $k]} { + if {[string match -nocase "keyword-${a}*" $k]} { set k [string range $k 8 end] puts $afp "
$k
" set refs {} -- cgit v0.12