mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
74036c4de9
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). |
||
---|---|---|
.. | ||
media | ||
packages | ||
common.subr | ||
device.subr | ||
dialog.subr | ||
Makefile | ||
mustberoot.subr | ||
script.subr | ||
strings.subr | ||
struct.subr | ||
sysrc.subr | ||
variable.subr |