1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/usr.sbin/bsdconfig/share
Devin Teske 74036c4de9 Improve portion of the dialog(1) API in dialog.subr responsible for
calculating widget sizes. Instead of forking a sub-shell to calculate the
optimum size for a widget, use a byRef style call-out to set variables in
the parent namespace. For example, instead of:

	size=$( f_dialog_buttonbox_size title btitle msg )
	$DIALOG --title title --backtitle btitle --msgbox msg $size

The new API replaces the above with the following:

	f_dialog_buttonbox_size height width title btitle msg
	$DIALOG --title title --backtitle btitle --msgbox msg $height $width

This reduces the number of forks, improves performance, and makes the code
more readable by revealing the argument-order for widget sizing. It also
makes performing minor adjustments to the calculated values easier as
you no longer have to split-out the response (which required knowledge of
ordering so was counter-intuitive).
2013-05-31 19:07:17 +00:00
..
media Improve portion of the dialog(1) API in dialog.subr responsible for 2013-05-31 19:07:17 +00:00
packages Comment. 2013-05-12 00:50:18 +00:00
common.subr Centralize standard getopts arguments, both for convenience and to correct 2013-05-14 03:21:13 +00:00
device.subr Improve portion of the dialog(1) API in dialog.subr responsible for 2013-05-31 19:07:17 +00:00
dialog.subr Improve portion of the dialog(1) API in dialog.subr responsible for 2013-05-31 19:07:17 +00:00
Makefile Commit first portion of package module -- this includes the ability to view 2013-05-07 05:40:20 +00:00
mustberoot.subr Improve portion of the dialog(1) API in dialog.subr responsible for 2013-05-31 19:07:17 +00:00
script.subr Commit first portion of package module -- this includes the ability to view 2013-05-07 05:40:20 +00:00
strings.subr Fix a typo in a comment. 2013-05-16 16:51:52 +00:00
struct.subr Import media selection/preparation framework (sysinstall inspired). Makes 2013-02-25 19:55:32 +00:00
sysrc.subr Add more debugging to help with diagnosis of program-flow when needed. 2012-12-25 10:47:45 +00:00
variable.subr Commit first portion of package module -- this includes the ability to view 2013-05-07 05:40:20 +00:00