Lines 539-545
Link Here
|
539 |
proc manMenuFit {m} { |
539 |
proc manMenuFit {m} { |
540 |
global man manx |
540 |
global man manx |
541 |
|
541 |
|
542 |
if {[winfo class $m]!="Menu"} {puts stderr "$m not of Menu class"; exit 1} |
542 |
if {[winfo class $m]!="Menu"} {puts stderr "$m not of Menu class"; CLEANUP; exit 1} |
543 |
if {[$m index last] eq "none"} return |
543 |
if {[$m index last] eq "none"} return |
544 |
|
544 |
|
545 |
set sh [winfo screenheight $m] |
545 |
set sh [winfo screenheight $m] |
Lines 1827-1833
Link Here
|
1827 |
if {$inx<[llength $manx(binvars)]} { |
1827 |
if {$inx<[llength $manx(binvars)]} { |
1828 |
after 1000 manBinCheck $inx $err |
1828 |
after 1000 manBinCheck $inx $err |
1829 |
} else { |
1829 |
} else { |
1830 |
if {$err} {exit 1} |
1830 |
if {$err} {CLEANUP; exit 1} |
1831 |
.occ entryconfigure "Statistics*" -state normal |
1831 |
.occ entryconfigure "Statistics*" -state normal |
1832 |
} |
1832 |
} |
1833 |
|
1833 |
|
Lines 1850-1855
Link Here
|
1850 |
} |
1850 |
} |
1851 |
puts -nonewline "tkman" |
1851 |
puts -nonewline "tkman" |
1852 |
foreach line [split [textmanip::linebreak $helptxt 70] "\n"] { puts "\t$line" } |
1852 |
foreach line [split [textmanip::linebreak $helptxt 70] "\n"] { puts "\t$line" } |
|
|
1853 |
CLEANUP |
1853 |
exit 0 |
1854 |
exit 0 |
1854 |
} |
1855 |
} |
1855 |
-M {set env(MANPATH) $val; incr i} |
1856 |
-M {set env(MANPATH) $val; incr i} |
Lines 1868-1878
Link Here
|
1868 |
-start* {set manx(startup) $val; incr i} |
1869 |
-start* {set manx(startup) $val; incr i} |
1869 |
-data* {puts stderr "-database option obsolete: database kept in memory"; incr i} |
1870 |
-data* {puts stderr "-database option obsolete: database kept in memory"; incr i} |
1870 |
--v* - |
1871 |
--v* - |
1871 |
-v* {puts stdout "TkMan v$manx(version) of $manx(date)"; exit 0} |
1872 |
-v* {puts stdout "TkMan v$manx(version) of $manx(date)"; CLEANUP; exit 0} |
1872 |
-t* {set manx(title) $val; incr i} |
1873 |
-t* {set manx(title) $val; incr i} |
1873 |
-d* {set manx(debug) 1; set manx(quit) 0; set manx(iconify) 0} |
1874 |
-d* {set manx(debug) 1; set manx(quit) 0; set manx(iconify) 0} |
1874 |
-nod* {set manx(debug) 0} |
1875 |
-nod* {set manx(debug) 0} |
1875 |
-* {puts stdout "[file tail $argv0]: unrecognized option: $arg"; exit 1} |
1876 |
-* {puts stdout "[file tail $argv0]: unrecognized option: $arg"; CLEANUP; exit 1} |
1876 |
default { |
1877 |
default { |
1877 |
after 2000 manShowMan $arg {{}} .man |
1878 |
after 2000 manShowMan $arg {{}} .man |
1878 |
# permit several??? add extras to History? |
1879 |
# permit several??? add extras to History? |
Lines 1888-1893
Link Here
|
1888 |
proc ASSERT {args} { |
1889 |
proc ASSERT {args} { |
1889 |
if {![uplevel 1 eval $args]} { |
1890 |
if {![uplevel 1 eval $args]} { |
1890 |
puts "ASSERTION VIOLATED: $args" |
1891 |
puts "ASSERTION VIOLATED: $args" |
|
|
1892 |
CLEANUP |
1891 |
exit 1 |
1893 |
exit 1 |
1892 |
} |
1894 |
} |
1893 |
} |
1895 |
} |
Lines 1906-1912
Link Here
|
1906 |
set manx(lastclick) $clicknow |
1908 |
set manx(lastclick) $clicknow |
1907 |
} |
1909 |
} |
1908 |
|
1910 |
|
1909 |
|
1911 |
proc CLEANUP {} { |
|
|
1912 |
global manx |
1913 |
if { [file exists $manx(longtmp)] == 1 } { file delete $manx(longtmp) } |
1914 |
} |
1910 |
|
1915 |
|
1911 |
|
1916 |
|
1912 |
################################################## |
1917 |
################################################## |
Lines 1919-1924
Link Here
|
1919 |
if {[package vcompare [info tclversion] $manx(mintcl)]==-1 || [package vcompare $tk_version $manx(mintk)]==-1} { |
1924 |
if {[package vcompare [info tclversion] $manx(mintcl)]==-1 || [package vcompare $tk_version $manx(mintk)]==-1} { |
1920 |
puts -nonewline stderr "Tcl $manx(mintcl)/Tk $manx(mintk) minimum versions required. " |
1925 |
puts -nonewline stderr "Tcl $manx(mintcl)/Tk $manx(mintk) minimum versions required. " |
1921 |
puts stderr "You have Tcl [info tclversion]/Tk $tk_version" |
1926 |
puts stderr "You have Tcl [info tclversion]/Tk $tk_version" |
|
|
1927 |
CLEANUP |
1922 |
exit 1 |
1928 |
exit 1 |
1923 |
} elseif {int([info tclversion])-int($manx(mintcl))>=1 || int($tk_version)-int($manx(mintk))>=1} { |
1929 |
} elseif {int([info tclversion])-int($manx(mintcl))>=1 || int($tk_version)-int($manx(mintk))>=1} { |
1924 |
puts stderr "New major versions of Tcl and/or Tk may have introduced\nincompatibilies in TkMan.\nCheck the TkMan home site for a possible new version.\n" |
1930 |
puts stderr "New major versions of Tcl and/or Tk may have introduced\nincompatibilies in TkMan.\nCheck the TkMan home site for a possible new version.\n" |
Lines 2111-2117
Link Here
|
2111 |
set manx(line-scale) 1; set manx(screen-scale) 45; set manx(page-scale) [expr int(60*1.5)] |
2117 |
set manx(line-scale) 1; set manx(screen-scale) 45; set manx(page-scale) [expr int(60*1.5)] |
2112 |
set man(error-effect) "bell & flash"; set manx(error-effect-v) [set manx(error-effect-t) {"bell & flash" "bell" "flash" "none"}] |
2118 |
set man(error-effect) "bell & flash"; set manx(error-effect-v) [set manx(error-effect-t) {"bell & flash" "bell" "flash" "none"}] |
2113 |
set man(columns) 65; set manx(columns-v) {65 90 130 5000}; set manx(columns-t) {"65 (most compatible)" 90 130 "wrap to screen width"}; # no one would want shorter lines |
2119 |
set man(columns) 65; set manx(columns-v) {65 90 130 5000}; set manx(columns-t) {"65 (most compatible)" 90 130 "wrap to screen width"}; # no one would want shorter lines |
2114 |
set manx(longtmp) /tmp/ll |
|
|
2115 |
set man(volcol) 4.0c; set manx(volcol-v) {0 1.5c 2.0c 2.5c 3.0c 3.5c 4.0c 4.5c 5.0c 7.5c 10.0c}; set manx(volcol-t) {"no columns" "1.5 cm" "2 cm" "2.5 cm/~1 inch" "3 cm" "3.5 cm" "4 cm" "4.5 cm" "5.0 cm/~2 inches" "7.5 cm" "10 cm"} |
2120 |
set man(volcol) 4.0c; set manx(volcol-v) {0 1.5c 2.0c 2.5c 3.0c 3.5c 4.0c 4.5c 5.0c 7.5c 10.0c}; set manx(volcol-t) {"no columns" "1.5 cm" "2 cm" "2.5 cm/~1 inch" "3 cm" "3.5 cm" "4 cm" "4.5 cm" "5.0 cm/~2 inches" "7.5 cm" "10 cm"} |
2116 |
set man(apropostab) "4.5c"; set manx(apropostab-v) {0 3.0c 4.0c 4.5c 5.0c 5.5c 6.0c 7.5c 10.0c}; set manx(apropostab-t) {"none" "3 cm" "4 cm" "4.5 cm" "5 cm" "5.5 cm" "6 cm" "7.5 cm" "10 cm"} |
2121 |
set man(apropostab) "4.5c"; set manx(apropostab-v) {0 3.0c 4.0c 4.5c 5.0c 5.5c 6.0c 7.5c 10.0c}; set manx(apropostab-t) {"none" "3 cm" "4 cm" "4.5 cm" "5 cm" "5.5 cm" "6 cm" "7.5 cm" "10 cm"} |
2117 |
#set man(showoutsub) "" |
2122 |
#set man(showoutsub) "" |
Lines 2258-2264
Link Here
|
2258 |
regexp {(\d\d\d\d)/(\d\d)/(\d\d)} {$Date: 2003/04/01 23:02:52 $} manx(date) y m d |
2263 |
regexp {(\d\d\d\d)/(\d\d)/(\d\d)} {$Date: 2003/04/01 23:02:52 $} manx(date) y m d |
2259 |
set manx(mtime) [clock scan "$m/$d/$y"] |
2264 |
set manx(mtime) [clock scan "$m/$d/$y"] |
2260 |
set manx(stray-warnings) "" |
2265 |
set manx(stray-warnings) "" |
2261 |
if {[catch {set default(manList) 0}]} {puts "\aBLT conflicts with TkMan."; exit 1} |
2266 |
if {[catch {set default(manList) 0}]} {puts "\aBLT conflicts with TkMan."; CLEANUP; exit 1} |
2262 |
set manx(manList) $man(manList) |
2267 |
set manx(manList) $man(manList) |
2263 |
set manx(manTitleList) $man(manTitleList) |
2268 |
set manx(manTitleList) $man(manTitleList) |
2264 |
set manx(userconfig) "### your additions go below" |
2269 |
set manx(userconfig) "### your additions go below" |
Lines 2385-2390
Link Here
|
2385 |
if {[string match "#!*" [gets $fid line]]} { |
2390 |
if {[string match "#!*" [gets $fid line]]} { |
2386 |
puts stderr "$manx(startup) looks like an executable." |
2391 |
puts stderr "$manx(startup) looks like an executable." |
2387 |
puts stderr "You should delete it, probably." |
2392 |
puts stderr "You should delete it, probably." |
|
|
2393 |
CLEANUP |
2388 |
exit 1 |
2394 |
exit 1 |
2389 |
} |
2395 |
} |
2390 |
|
2396 |
|
Lines 2613-2618
Link Here
|
2613 |
|
2619 |
|
2614 |
if {[llength $man(manList)]!=[llength $man(manTitleList)]} { |
2620 |
if {[llength $man(manList)]!=[llength $man(manTitleList)]} { |
2615 |
puts stderr "Length of section abbreviations differs from length of section titles:\n\nlength [llength $man(manList)]:\t$man(manList)\n\nlength [llength $man(manTitleList)]:\t$man(manTitleList)" |
2621 |
puts stderr "Length of section abbreviations differs from length of section titles:\n\nlength [llength $man(manList)]:\t$man(manList)\n\nlength [llength $man(manTitleList)]:\t$man(manTitleList)" |
|
|
2622 |
CLEANUP |
2616 |
exit 1 |
2623 |
exit 1 |
2617 |
} |
2624 |
} |
2618 |
|
2625 |
|