summaryrefslogtreecommitdiffstats
path: root/tools/man2help.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/man2help.tcl')
-rw-r--r--tools/man2help.tcl17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/man2help.tcl b/tools/man2help.tcl
index 7982e37..018fa84 100644
--- a/tools/man2help.tcl
+++ b/tools/man2help.tcl
@@ -5,15 +5,13 @@
# entries.
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
-#
-# RCS: @(#) $Id: man2help.tcl,v 1.11 2002/03/28 21:52:41 davygrvy Exp $
-#
#
# PASS 1
#
-set man2tclprog [file join [file dirname [info script]] man2tcl.exe]
+set man2tclprog [file join [file dirname [info script]] \
+ man2tcl[file extension [info nameofexecutable]]]
proc generateContents {basename version files} {
global curID topics
@@ -28,7 +26,13 @@ proc generateContents {basename version files} {
puts $fd ":Base $basename$version.hlp"
foreach package [getPackages] {
foreach section [getSections $package] {
+ if {![info exists lastSection]} {
+ set lastSection {}
+ }
+ if {[string compare $lastSection $section]} {
puts $fd "1 $section"
+ }
+ set lastSection $section
set lastTopic {}
foreach topic [getTopics $package $section] {
if {[string compare $lastTopic $topic]} {
@@ -59,7 +63,7 @@ proc generateHelp {basename files} {
set file [open [file join [file dirname [info script]] $basename.rtf] w]
fconfigure $file -translation crlf
- puts $file "\{\\rtf1\\ansi \\deff0\\deflang1033\{\\fonttbl\{\\f0\\froman\\fcharset0\\fprq2 Times New Roman\;\}\}"
+ puts $file "\{\\rtf1\\ansi \\deff0\\deflang1033\{\\fonttbl\{\\f0\\froman\\fcharset0\\fprq2 Times New Roman\;\}\{\\f1\\fmodern\\fcharset0\\fprq1 Courier New\;\}\}"
foreach f $files {
puts "Pass 2 -- $f"
flush stdout
@@ -116,8 +120,9 @@ set arg 0
if {![string compare [lindex $argv $arg] "-bitmap"]} {
set bitmap [lindex $argv [incr arg]]
+ incr arg
}
-set baseName [lindex $argv [incr arg]]
+set baseName [lindex $argv $arg]
set version [lindex $argv [incr arg]]
set files {}
foreach i [lrange $argv [incr arg] end] {