patch-1.3.76 linux/scripts/Menuconfig

Next file: linux/scripts/README.Menuconfig
Previous file: linux/net/ipv4/ip_fw.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.75/linux/scripts/Menuconfig linux/scripts/Menuconfig
@@ -78,10 +78,10 @@
 	if extract_help $1 >help.out
 	then
 		$DIALOG	--backtitle "$backtitle" --title "$2"\
-			--textbox help.out 20 75
+			--textbox help.out $LINES $COLS
 	else
 		$DIALOG	--backtitle "$backtitle" \
-			--textbox help.out 20 75
+			--textbox help.out $LINES $COLS
 	fi
 	rm help.out
 }
@@ -91,7 +91,7 @@
 #
 function show_readme() {
 	$DIALOG --backtitle "$backtitle" \
-		--textbox scripts/README.Menuconfig 21 75
+		--textbox scripts/README.Menuconfig $LINES $COLS
 }
 
 #
@@ -102,7 +102,8 @@
 	echo -ne "$DIALOG --title '$1'\
 			--backtitle '$backtitle' \
 			--menu '$menu_instructions' \
-			21 75 11 '$default' " >MCmenu
+			$LINES $COLS $((LINES-10)) \
+			'$default' " >MCmenu
 	>MCradiolists
 }
 
@@ -840,6 +841,19 @@
 cleanup2 () {
 	rm -f .tmpconfig .tmpconfig.h
 }
+
+x=`stty -a`
+case $x in
+*\ rows\ *\;*)
+	LINES=${x##*rows}    LINES=${LINES%%;*} LINES=$((${LINES:-25}-4))
+	COLS=${x##*columns}  COLS=${COLS%%;*}   COLS=$((${COLS:-80}-5))
+	;;
+*)
+	LINES=21
+	COLS=75
+	;;
+esac
+	
 
 menu_instructions="\
 Arrow keys navigate the menu.  \

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this