Messages in this thread Patch in this message | | | Date | Sat, 31 Jul 1999 12:57:04 -0400 | From | John Hassey <> | Subject | Menuconfig missing functions |
| |
I noticed that define_int, define_hex and define_string are missing in Menuconfig. Looks like none of the config files use anything but define_bool so no one has noticed....
Attached is the patch.
john. --- Menuconfig.orig Sat Jul 31 12:48:08 1999 +++ Menuconfig Sat Jul 31 12:50:24 1999 @@ -198,6 +198,17 @@ } # +# define_int sets the value of a integer argument +# +# define_int define value +# +function define_int () { + echo "$1=$2" >>$CONFIG + echo "#define $1 ($2)" >>$CONFIG_H + eval "$1=$2" +} + +# # Add a menu item which will call our local int function. # function int () { @@ -209,6 +220,17 @@ } # +# define_hex sets the value of a hexadecimal argument +# +# define_hex define value +# +function define_hex () { + echo "$1=$2" >>$CONFIG + echo "#define $1 0x${2#*[x,X]}" >>$CONFIG_H + eval "$1=$2" +} + +# # Add a menu item which will call our local hex function. # function hex () { @@ -218,6 +240,18 @@ echo -ne "'$2' '($x) $1$info' " >>MCmenu echo -e "function $2 () { l_hex '$1' '$2' '$3' '$x' ;}" >>MCradiolists +} + + +# +# define_string sets the value of a string argument +# +# define_string define value +# +function define_string () { + echo "$1="'"'$2'"' >>$CONFIG + echo "#define $1 "'"'$2'"' >>$CONFIG_H + eval "$1=$2" } # | |