Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 247540 | Differences between
and this patch

Collapse All | Expand All

(-)tkman-2.2~/Makefile (-2 / +3 lines)
Lines 97-103 Link Here
97
# at the closest DPI in this list
97
# at the closest DPI in this list
98
dpis = "75 100"
98
dpis = "75 100"
99
99
100
100
manxlongtmp = [exec mktemp -p /tmp tkman.XXXXXXXXXX]
101
# # # MACHINE DEPENDENCIES # # #
101
# # # MACHINE DEPENDENCIES # # #
102
102
103
#manformat = {tbl | neqn | nroff -man }
103
#manformat = {tbl | neqn | nroff -man }
Lines 113-119 Link Here
113
# Lines are cached in .../man/cat<n>@<line-length>; 
113
# Lines are cached in .../man/cat<n>@<line-length>; 
114
#   that is, the line length is appended to the usual cache directory names
114
#   that is, the line length is appended to the usual cache directory names
115
#manformat = {groff -te -Tascii -man /tmp/ll -}
115
#manformat = {groff -te -Tascii -man /tmp/ll -}
116
manformat = {groff -te -Tlatin1 -man /tmp/ll -}
116
manformat = "groff -te -Tlatin1 -mandoc $$manx(longtmp) -"
117
# Ultrix users should uncomment the following line (you don't have eqn)
117
# Ultrix users should uncomment the following line (you don't have eqn)
118
#manformat = {tbl | nroff -man }
118
#manformat = {tbl | nroff -man }
119
# HP-UX uses a number of macros that groff doesn't define, so use the builtin nroff
119
# HP-UX uses a number of macros that groff doesn't define, so use the builtin nroff
Lines 362-367 Link Here
362
	echo 'set man(texinfodir) $(texinfodir)' >> tkman
362
	echo 'set man(texinfodir) $(texinfodir)' >> tkman
363
	echo 'set man(gzgrep) $(gzgrep)' >> tkman
363
	echo 'set man(gzgrep) $(gzgrep)' >> tkman
364
	echo 'set man(rfcdir) $(rfcdir)' >> tkman
364
	echo 'set man(rfcdir) $(rfcdir)' >> tkman
365
	echo 'set manx(longtmp) $(manxlongtmp)' >> tkman
365
	echo 'set man(format) $(manformat)' >> tkman
366
	echo 'set man(format) $(manformat)' >> tkman
366
	echo 'set man(printers) $(printers)' >> tkman
367
	echo 'set man(printers) $(printers)' >> tkman
367
	echo 'set manx(dpis) $(dpis)' >> tkman
368
	echo 'set manx(dpis) $(dpis)' >> tkman
(-)tkman-2.2~/contrib/outline.tcl (-1 / +1 lines)
Lines 71-77 Link Here
71
71
72
	text [set t .inv] -font {Times 12 {}} -wrap word -borderwidth 3 -padx 5 -pady 5 -yscrollcommand "[set v .v] set"
72
	text [set t .inv] -font {Times 12 {}} -wrap word -borderwidth 3 -padx 5 -pady 5 -yscrollcommand "[set v .v] set"
73
	set finv [expr 1-[catch {$t tag configure invis -elide 1}]]
73
	set finv [expr 1-[catch {$t tag configure invis -elide 1}]]
74
	if !$finv { puts "you must apply the elided text patches first"; exit 0 }
74
	if !$finv { puts "you must apply the elided text patches first"; CLEANUP; exit 0 }
75
75
76
	scrollbar $v -orient vertical -command "$t yview"
76
	scrollbar $v -orient vertical -command "$t yview"
77
77
(-)tkman-2.2~/contrib/remote.tcl (+1 lines)
Lines 26-31 Link Here
26
				if {$res=="1"} {set ready 1}
26
				if {$res=="1"} {set ready 1}
27
			} elseif {[string match "*insecure*" info]} {
27
			} elseif {[string match "*insecure*" info]} {
28
				puts stderr "can't talk to an insecure server -- see send(n)"
28
				puts stderr "can't talk to an insecure server -- see send(n)"
29
				CLEANUP
29
				exit 1
30
				exit 1
30
			}
31
			}
31
		}
32
		}
(-)tkman-2.2~/contrib/tkmanclient (-1 / +1 lines)
Lines 60-66 Link Here
60
}
60
}
61
61
62
set tkman [ check_for_tkman ]
62
set tkman [ check_for_tkman ]
63
if { $tkman == 0 } { puts stderr "couldnt start tkman!"; exit 1; }
63
if { $tkman == 0 } { puts stderr "couldnt start tkman!"; CLEANUP; exit 1; }
64
64
65
set apropos 0
65
set apropos 0
66
set instNew 0
66
set instNew 0
(-)tkman-2.2~/database.tcl (+1 lines)
Lines 41-46 Link Here
41
	if {![llength $manx(manList)]} {
41
	if {![llength $manx(manList)]} {
42
		puts stderr "Can't find any man pages!"
42
		puts stderr "Can't find any man pages!"
43
		puts stderr "MANPATH = $env(MANPATH)"
43
		puts stderr "MANPATH = $env(MANPATH)"
44
		CLEANUP
44
		exit 1
45
		exit 1
45
	}
46
	}
46
47
(-)tkman-2.2~/gui.tcl (-4 / +4 lines)
Lines 66-72 Link Here
66
		wm protocol $w WM_SAVE_YOURSELF "manSave"
66
		wm protocol $w WM_SAVE_YOURSELF "manSave"
67
		wm command $w [concat $argv0 $argv]
67
		wm command $w [concat $argv0 $argv]
68
		# aborts without saving .tkman
68
		# aborts without saving .tkman
69
		wm protocol $w WM_DELETE_WINDOW {exit 0}
69
		wm protocol $w WM_DELETE_WINDOW {CLEANUP; exit 0}
70
70
71
		# some braindead window managers ignore iconposition requests after window is iconified, so special setting here
71
		# some braindead window managers ignore iconposition requests after window is iconified, so special setting here
72
		if {[regexp $manx(posnregexp) $manx(iconposition) all x y]} {wm iconposition $w $x $y}
72
		if {[regexp $manx(posnregexp) $manx(iconposition) all x y]} {wm iconposition $w $x $y}
Lines 221-227 Link Here
221
		-command "incr stat(checkpoint); manSave; manWinstdout \$curwin {[bolg $manx(startup) ~] updated}"
221
		-command "incr stat(checkpoint); manSave; manWinstdout \$curwin {[bolg $manx(startup) ~] updated}"
222
#	if {!$dup} { ... but menu shared!
222
#	if {!$dup} { ... but menu shared!
223
		$m add separator
223
		$m add separator
224
		$m add command -label "Quit, don't update $manx(startup-short)" -command "exit 0"
224
		$m add command -label "Quit, don't update $manx(startup-short)" -command "CLEANUP; exit 0"
225
#	}
225
#	}
226
	}
226
	}
227
227
Lines 537-544 Link Here
537
		"
537
		"
538
538
539
	### quit
539
	### quit
540
	button $w.quit -text "Quit" -command "manSave; exit 0" -padx 4
540
	button $w.quit -text "Quit" -command "manSave; CLEANUP; exit 0" -padx 4
541
	if {!$manx(quit)} {$w.quit configure -command "exit 0"}
541
	if {!$manx(quit)} {$w.quit configure -command "CLEANUP; exit 0"}
542
	if {$dup} {
542
	if {$dup} {
543
		$w.quit configure -text "Close" -command "
543
		$w.quit configure -text "Close" -command "
544
			destroy $w; incr manx(outcnt) -1; manOutput
544
			destroy $w; incr manx(outcnt) -1; manOutput
(-)tkman-2.2~/manpath.tcl (+1 lines)
Lines 138-143 Link Here
138
	if {![llength $manx(paths)]} {
138
	if {![llength $manx(paths)]} {
139
		if {$manx(manpath-warnings) ne ""} {puts stderr $manx(manpath-warnings)}
139
		if {$manx(manpath-warnings) ne ""} {puts stderr $manx(manpath-warnings)}
140
		puts stderr "NO VALID DIRECTORIES IN MANPATH!\a"
140
		puts stderr "NO VALID DIRECTORIES IN MANPATH!\a"
141
		CLEANUP
141
		exit 1
142
		exit 1
142
	}
143
	}
143
}
144
}
(-)tkman-2.2~/prefs.tcl (-2 / +2 lines)
Lines 365-371 Link Here
365
	pack $g.nroffsave $g.columns $g.fsstnd-always $g.texinfodir $g.recentdays $g.preferTexinfo $g.tryfuzzy $g.preferGNU \
365
	pack $g.nroffsave $g.columns $g.fsstnd-always $g.texinfodir $g.recentdays $g.preferTexinfo $g.tryfuzzy $g.preferGNU \
366
		$g.maxglimpse $g.maxglimpseexcerpt $g.indexglimpse $g.glimpsestrays $g.indexalso \
366
		$g.maxglimpse $g.maxglimpseexcerpt $g.indexglimpse $g.glimpsestrays $g.indexalso \
367
		-fill x -pady 3 -padx 4
367
		-fill x -pady 3 -padx 4
368
	if {![string match "*groff*/tmp/ll -*" $man(format)]} {pack forget $g.columns}
368
	if {![string match "*groff*$manx(longtmp) -*" $man(format)]} {pack forget $g.columns}
369
369
370
370
371
371
Lines 791-797 Link Here
791
		bold {set weight "bold"}
791
		bold {set weight "bold"}
792
		italics {set slant "italic"}
792
		italics {set slant "italic"}
793
		bold-italics {set weight "bold"; set slant "italic"}
793
		bold-italics {set weight "bold"; set slant "italic"}
794
		default {puts stderr "nonexistent style: $style"; exit 1}
794
		default {puts stderr "nonexistent style: $style"; CLEANUP; exit 1}
795
	}
795
	}
796
796
797
	# specify s,m,l within small,medium,large; or set absolute point size
797
	# specify s,m,l within small,medium,large; or set absolute point size
(-)tkman-2.2~/taputils.tcl (-1 / +1 lines)
Lines 98-104 Link Here
98
proc assert {bool msg {boom 0}} {
98
proc assert {bool msg {boom 0}} {
99
	if {!$bool} {
99
	if {!$bool} {
100
		puts stderr $msg
100
		puts stderr $msg
101
		if {$boom} {exit 1}
101
		if {$boom} {CLEANUP; exit 1}
102
	}
102
	}
103
}
103
}
104
104
(-)tkman-2.2~/tkman.tcl (-7 / +14 lines)
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
(-)tkman-2.2~/tkmandesc.tcl (+1 lines)
Lines 152-157 Link Here
152
	foreach n [concat $from $to] {
152
	foreach n [concat $from $to] {
153
		if {[lsearch $mani(manList) $n]==-1} {
153
		if {[lsearch $mani(manList) $n]==-1} {
154
			puts stderr "$cmd: Section letter `$n' doesn't exist."
154
			puts stderr "$cmd: Section letter `$n' doesn't exist."
155
			CLEANUP
155
			exit 1
156
			exit 1
156
		}
157
		}
157
	}
158
	}
(-)tkman-2.2~/version.tcl (-1 / +1 lines)
Lines 80-86 Link Here
80
80
81
		### collect diffs
81
		### collect diffs
82
		# diff needs at least one of them to be a real file.  want text of previous version around anyhow
82
		# diff needs at least one of them to be a real file.  want text of previous version around anyhow
83
		set tmpf /tmp/tkman[pid]
83
		set tmpf [exec mktemp -p /tmp tkman.XXXXXXXXXX]
84
# $man(changeleft) $man(zaphy) -- obsolete options
84
# $man(changeleft) $man(zaphy) -- obsolete options
85
		set format "$man(format) | $manx(rman) -f ASCII -N"
85
		set format "$man(format) | $manx(rman) -f ASCII -N"
86
#puts "creating $tmpf (old)"
86
#puts "creating $tmpf (old)"

Return to bug 247540