From 5a97d360676d0bec88f40c49b95d16e9d858e0ad Mon Sep 17 00:00:00 2001 From: Devin Teske Date: Tue, 18 Jun 2013 08:54:02 +0000 Subject: [PATCH] Change the f_dialog_msgbox() arguments in `dialog.subr' to accomodate an $hline argument for setting the --hline parameter value. This change does not effect any current modules as it turns out that not one single usage of f_dialog_msgbox() relied on accepting more than a first argument (read: all occurrences quoted the first parameter; so $* was never depended upon). This will allow some custom invocations of --msgbox to roll over to this function (for example, in `mouse/disable'). --- usr.sbin/bsdconfig/share/dialog.subr | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsdconfig/share/dialog.subr b/usr.sbin/bsdconfig/share/dialog.subr index 43a78ed49c8e..86e4373c4c5e 100644 --- a/usr.sbin/bsdconfig/share/dialog.subr +++ b/usr.sbin/bsdconfig/share/dialog.subr @@ -1501,7 +1501,7 @@ f_xdialog_info() ############################################################ MSGBOX FUNCTIONS -# f_dialog_msgbox $msg_text ... +# f_dialog_msgbox $msg_text [$hline] # # Throw up a dialog(1) msgbox. The msgbox remains until the user presses ENTER # or ESC, acknowledging the modal dialog. @@ -1511,12 +1511,13 @@ f_xdialog_info() # f_dialog_msgbox() { - local msg_text="$*" height width + local msg_text="$1" hline="$2" height width f_dialog_buttonbox_size height width \ - "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$msg_text" + "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$msg_text" "$hline" $DIALOG \ --title "$DIALOG_TITLE" \ --backtitle "$DIALOG_BACKTITLE" \ + --hline "$hline" \ --ok-label "$msg_ok" \ --msgbox "$msg_text" $height $width }