|
20 | 20 | # script.
|
21 | 21 | #
|
22 | 22 | # William Roadcap was the original author of Menuconfig.
|
23 |
| -# Jody Bruchon ([email protected]) is the current maintainer. |
| 23 | +# Michael Elizabeth Chastain ([email protected]) is the current maintainer. |
24 | 24 | #
|
25 | 25 | # 07 Apr 1997 Bernhard Kaindl <[email protected]>
|
26 | 26 | # - get default values for new bool, tristate and dep_tristate
|
@@ -305,6 +305,12 @@ function hex () {
|
305 | 305 | # Add a menu item which will call our local string function.
|
306 | 306 |
|
307 | 307 | function string () {
|
| 308 | + set_x_info "$2" "$3" |
| 309 | + echo -ne "'$2' '[$x] $1$info' " >>MCmenu |
| 310 | + echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists |
| 311 | +} |
| 312 | + |
| 313 | +function string_broken () { |
308 | 314 | set_x_info "$2" "$3"
|
309 | 315 | echo -ne "'$2' ' $1: \"$x\"$info' " >>MCmenu
|
310 | 316 | echo -e "function $2 () { l_string '$1' '$2' '$3' '$x' ;}" >>MCradiolists
|
@@ -641,6 +647,21 @@ function l_hex_broken () {
|
641 | 647 | # Create a dialog for entering a string into a kernel option.
|
642 | 648 |
|
643 | 649 | function l_string () {
|
| 650 | + while true ; do |
| 651 | + if $DIALOG --title "$1" --backtitle "$backtitle" \ |
| 652 | + --inputbox "$inputbox_instructions_string" \ |
| 653 | + 10 75 "$4" 2>MCdialog.out |
| 654 | + then |
| 655 | + answer="`cat MCdialog.out`" |
| 656 | + answer="${answer:-$3}" |
| 657 | + eval $2='${answer}' |
| 658 | + break |
| 659 | + fi |
| 660 | + help "$2" "$1" |
| 661 | + done |
| 662 | +} |
| 663 | + |
| 664 | +function l_string_broken () { |
644 | 665 | while true ; do
|
645 | 666 | if $DIALOG --title "$1" --inputbox "$inputbox_instructions_string" \
|
646 | 667 | --backtitle "$backtitle" 10 75 "$4" 2>MCdialog.out
|
@@ -1108,8 +1129,13 @@ save_configuration () {
|
1108 | 1129 |
|
1109 | 1130 | function string () {
|
1110 | 1131 | set_x_info "$2" "$3"
|
1111 |
| - echo "$2=\"$x\"" >> $CONFIG |
1112 |
| - echo "#define $2 \"$x\"" >> $CFG_H |
| 1132 | + if [ "$x" != "" ]; then |
| 1133 | + echo "$2=\"$x\"" >> $CONFIG |
| 1134 | + echo "#define $2 \"$x\"" >> $CFG_H |
| 1135 | + else |
| 1136 | + #echo "# $2 is not set" >>$CONFIG |
| 1137 | + echo "#undef $2" >>$CFG_H |
| 1138 | + fi |
1113 | 1139 | }
|
1114 | 1140 |
|
1115 | 1141 | function define_hex () {
|
|
0 commit comments