diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
commit | dcec8a13bf565e47942a1751a9cec21bec5648fe (patch) | |
tree | 548b69625b18cc2e88c3e68d0923be546c9ebb03 /scripts | |
parent | 2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff) |
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash.
o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Configure | 17 | ||||
-rw-r--r-- | scripts/Menuconfig | 19 | ||||
-rw-r--r-- | scripts/header.tk | 33 | ||||
-rw-r--r-- | scripts/tail.tk | 20 | ||||
-rw-r--r-- | scripts/tkgen.c | 13 |
5 files changed, 64 insertions, 38 deletions
diff --git a/scripts/Configure b/scripts/Configure index 5ca0e8366..a2b90f910 100644 --- a/scripts/Configure +++ b/scripts/Configure @@ -50,6 +50,13 @@ # 300397 Phil Blundell (pjb27@cam.ac.uk) - added support for min/max # arguments to "int", allow dep_tristate to take a list of dependencies # rather than just one. +# +# 090398 Axel Boldt (boldt@math.ucsb.edu) - allow for empty lines in help +# texts. +# +# 100498 Riley Williams (rhw@bigfoot.com) - added ability to display +# blank lines in help texts: Any line consisting only of a single dot +# will be displayed blank. # # Make sure we're really running bash. @@ -89,16 +96,18 @@ function help () { var=$(echo "$1"|sed 's/[][\/.^$*]/\\&/g') #now pick out the right help text: text=$(sed -n "/^$var[ ]*\$/,\${ - /^$var[ ]*\$/b - /^#.*/b - /^[ ]*\$/q + /^$var[ ]*\$/c\\ +${var}:\\ + + /^#/b + /^[^ ]/q p }" Documentation/Configure.help) if [ -z "$text" ] then echo; echo " Sorry, no help available for this option yet.";echo else - (echo; echo "$text"; echo) | ${PAGER:-more} + (echo; echo "$text") | sed 's/^\.$//' | ${PAGER:-more} fi else echo; diff --git a/scripts/Menuconfig b/scripts/Menuconfig index 0679ae8cf..f96b75070 100644 --- a/scripts/Menuconfig +++ b/scripts/Menuconfig @@ -44,6 +44,15 @@ # # 160198 Michael Chastain (mec@shout.net) - fix bug with 'c' command # (complement existing value) when used on virgin uninitialized variables. +# +# 090398 Axel Boldt (boldt@math.ucsb.edu) - allow for empty lines in help +# texts. +#---------------------------------------------------------------------------- +# +# 10 Apr 1998 - Added ability to display blank lines in help text: Any line +# which only contains a single dot will be displayed blank. +# Author: Riley Williams <rhw@bigfoot.com> +# #---------------------------------------------------------------------------- @@ -278,9 +287,11 @@ function extract_help () { var=$(echo "$1"|sed 's/[][\/.^$*]/\\&/g') #now pick out the right help text: text=$(sed -n "/^$var[ ]*\$/,\${ - /^$var[ ]*\$/d - /^#.*/d - /^[ ]*\$/q + /^$var[ ]*\$/c\\ +${var}:\\ + + /^#/b + /^[^ ]/q s/^ // p }" Documentation/Configure.help) @@ -290,7 +301,7 @@ function extract_help () { echo "There is no help available for this kernel option." return 1 else - echo "$text" + echo "$text" | sed 's/^\.$//' fi else echo "There is no help available for this kernel option." diff --git a/scripts/header.tk b/scripts/header.tk index 6e4a1f2cc..76b576097 100644 --- a/scripts/header.tk +++ b/scripts/header.tk @@ -36,14 +36,14 @@ if { [cget .ref -disabledforeground] == "" } { # Define some macros we will need to parse the config.in file. # proc mainmenu_name { text } { - message .header.message -width 400 -relief raised -text "$text" - pack .header.label .header.message -side left -padx 15 - wm title . "$text" + message .header.message -width 400 -text "$text" + pack .header.message -side left -padx 15 + wm title . "$text" } proc menu_option { w menu_num text } { button .f0.x$menu_num -text "$text" -width 50 -command "$w .$w \"$text\"" - pack .f0.x$menu_num -pady 1 -expand on + pack .f0.x$menu_num -pady 0 -expand on } # @@ -370,21 +370,19 @@ proc dohelp {w var } { 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\\ ${var}:\\ - /^#.*/d - /^\[ \]*\$/bL - H + /^#/b + /^\[^ \]/q + s/^ // + p } - d - :L x - s/\\n // - s/\\n / /g - p - q " Documentation/Configure.help] set found [expr [string length "$message"] > 0] } @@ -402,8 +400,10 @@ ${var}:\\ label $w.f1.bm -bitmap error wm title $w "RTFM" } else { - message $w.f1.m -width 400 -aspect 300 -text $message \ - -relief flat + text $w.f1.m -width 73 -relief flat -wrap word + $w.f1.m insert 0.0 $message + $w.f1.m conf -state disabled -height [$w.f1.m index end] + label $w.f1.bm -bitmap info wm title $w "Configuration help" } @@ -416,7 +416,7 @@ ${var}:\\ frame $w.f2 button $w.f2.ok -text "OK" \ -width 10 -command "destroy $w; focus $oldFocus" - pack $w.f2.ok -side bottom -pady 10 -anchor s + pack $w.f2.ok -side bottom -pady 6 -anchor n pack $w.f2 -side bottom -padx 10 -anchor s # Finish off the window @@ -454,7 +454,6 @@ proc wrapup {w } { # buttons which we will stick down at the bottom. # frame .header -label .header.label frame .f0 diff --git a/scripts/tail.tk b/scripts/tail.tk index ee2edae7e..2a727fe89 100644 --- a/scripts/tail.tk +++ b/scripts/tail.tk @@ -1,7 +1,3 @@ - -pack .header -side top -padx 10 -pady 10 -expand on -pack .f0 -side top -padx 15 -pady 10 -fill y -expand on - # # Misc buttons to save/restore state and so forth. # @@ -46,13 +42,19 @@ button .f0_bot.l.load -text "Load Configuration from File" -width 25 -command { load_configfile .load "Load Configuration from file" read_config_file } -pack .f0_bot.r.save .f0_bot.r.quit -padx 25 -ipadx 10 -ipady 2 -expand on -pack .f0_bot.l.load .f0_bot.l.store -padx 25 -ipadx 10 -ipady 2 -expand on +# +# Now pack everything, important things first because of small screens. +# +pack .f0_bot.r.save .f0_bot.r.quit -padx 25 -ipadx 10 -expand on +pack .f0_bot.l.load .f0_bot.l.store -padx 25 -ipadx 10 -expand on + +pack .f0_bot.r -side left -padx 15 -expand on -fill y +pack .f0_bot.l -side right -padx 15 -expand on -fill y -pack .f0_bot.r -side left -padx 15 -pady 10 -expand on -fill y -pack .f0_bot.l -side right -padx 15 -pady 10 -expand on -fill y +pack .f0_bot -side bottom -fill both -expand on -pady 4 +pack .f0 -side bottom -padx 15 -pady 0 -fill y -expand on +pack .header -padx 10 -pady 7 -expand on -pack .f0_bot -fill both -expand on # # If we cannot write our config files, disable the write button. diff --git a/scripts/tkgen.c b/scripts/tkgen.c index dcf025e2e..040c1fe80 100644 --- a/scripts/tkgen.c +++ b/scripts/tkgen.c @@ -61,6 +61,14 @@ * user switches from one configuration method to * another. * + * 1998 03 09 + * Axel Boldt - Smaller layout of main menu - it's still too big for 800x600. + * - Display help in text window to allow for cut and paste. + * - Allow for empty lines in help texts. + * - update_define should not set all variables unconditionally to + * 0: they may have been set to 1 elsewhere. CONFIG_NETLINK is + * an example. + * * TO DO: * - clean up - there are useless ifdef's everywhere. * - better comments throughout - C code generating tcl is really cryptic. @@ -73,9 +81,6 @@ * - make choice and int/hex input types line up vertically with * bool/tristate. * - general speedups - how? The canvas seems to slow it down a lot. - * - choice buttons should default to the first menu option, rather than a - * blank. Also look up the right variable when the help button - * is pressed. * - clean up +/- 16 confusion for enabling/disabling variables; causes * (theoretical, at the moment) problems with dependencies. * @@ -1124,7 +1129,7 @@ void dump_tk_script(struct kconfig *scfg) for(cfg = scfg; cfg != NULL; cfg = cfg->next) { if( cfg->tok != tok_define ) continue; - printf("\tglobal %s; set %s 0\n", cfg->optionname, cfg->optionname); + printf("\tglobal %s\n", cfg->optionname); cfg->flags |= GLOBAL_WRITTEN; } for(cfg = scfg; cfg != NULL; cfg = cfg->next) |