diff options
| author | Michael Elizabeth Chastain <mec@shout.net> | 2002-02-05 00:36:50 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-05 00:36:50 -0800 |
| commit | 0fbfdf4b36c5f7df6f21eee6d25678b413994d7a (patch) | |
| tree | 4b9c288fdcbaf068d8f38385009aeac4a8900698 /scripts/header.tk | |
| parent | 1c9eee2c9c782a319487dfcaf3885f7e93b19d9b (diff) | |
[PATCH] fix xconfig for new help system
Here is a patch to enhance xconfig to read the new Config.help files.
Olaf Dietsche wrote this, and Steven Cole passed it on to me.
Testing: Steven Cole tested it, and I tested it.
Diffstat (limited to 'scripts/header.tk')
| -rw-r--r-- | scripts/header.tk | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/scripts/header.tk b/scripts/header.tk index 2cc9c7e534e9..959cc2ffd9c8 100644 --- a/scripts/header.tk +++ b/scripts/header.tk @@ -449,29 +449,24 @@ proc dohelp {w var parent} { catch {destroy $w} toplevel $w -class Dialog - set filefound 0 set found 0 - set lineno 0 - - if { [file readable Documentation/Configure.help] == 1} then { - set filefound 1 - # First escape sed regexp special characters in var: - set var [exec echo "$var" | sed s/\[\]\[\/.^$*\]/\\\\&/g] - # Now pick out right help text: - set message [exec sed -n " - /^$var\[ \]*\$/,\${ - /^$var\[ \]*\$/c\\ + + # First escape sed regexp special characters in var: + set var [exec echo "$var" | sed s/\[\]\[\/.^$*\]/\\\\&/g] + # Now pick out right help text: + set message [exec find . -name Config.help | xargs sed -n " + /^$var\[ \]*\$/,\${ + /^$var\[ \]*\$/c\\ ${var}:\\ - /^#/b - /^\[^ \]/q - s/^ // - /<file:\\(\[^>\]*\\)>/s//\\1/g - p - } - " Documentation/Configure.help] - set found [expr [string length "$message"] > 0] - } + /^#/b + /^\[^ \]/q + s/^ // + /<file:\\(\[^>\]*\\)>/s//\\1/g + p + } + " /dev/null ] + set found [expr [string length "$message"] > 0] frame $w.f1 pack $w.f1 -fill both -expand on @@ -494,13 +489,8 @@ ${var}:\\ pack $w.f1.canvas -side right -fill y -expand on if { $found == 0 } then { - if { $filefound == 0 } then { - message $w.f1.f.m -width 750 -aspect 300 -relief flat -text \ - "No help available - unable to open file Documentation/Configure.help. This file should have come with your kernel." - } else { message $w.f1.f.m -width 400 -aspect 300 -relief flat -text \ "No help available for $var" - } label $w.f1.bm -bitmap error wm title $w "RTFM" } else { |
