diff options
author | Devin Teske <dteske@FreeBSD.org> | 2013-06-18 23:48:05 +0000 |
---|---|---|
committer | Devin Teske <dteske@FreeBSD.org> | 2013-06-18 23:48:05 +0000 |
commit | 68d5c9afb90d52078bd363e95429d15344bd2386 (patch) | |
tree | fd2a5eda497eecbf41e3cc522f9c572425ae182c /usr.sbin | |
parent | 1e2751ddeb25ae935255e57860a2488e01845a42 (diff) | |
download | src-68d5c9afb90d52078bd363e95429d15344bd2386.tar.gz src-68d5c9afb90d52078bd363e95429d15344bd2386.zip |
Change the f_dialog_{yesno,noyes}() function-arguments in `dialog.subr' to
accomodate an $hline value for overriding the default. This change does
not effect any current modules as it turns out that not one single usage of
either f_dialog_yesno() or f_dialog_noyes() 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 --yesno and --noyes to roll over
to these functions (for example, in `timezone/timezone').
Notes
Notes:
svn path=/head/; revision=251977
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bsdconfig/share/dialog.subr | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/bsdconfig/share/dialog.subr b/usr.sbin/bsdconfig/share/dialog.subr index 86e4373c4c5e..256c2dd9fd5c 100644 --- a/usr.sbin/bsdconfig/share/dialog.subr +++ b/usr.sbin/bsdconfig/share/dialog.subr @@ -1562,7 +1562,7 @@ f_dialog_textbox() ############################################################ YESNO FUNCTIONS -# f_dialog_yesno $msg_text ... +# f_dialog_yesno $msg_text [$hline] # # Display a dialog(1) Yes/No prompt to allow the user to make some decision. # The yesno prompt remains until the user presses ENTER or ESC, acknowledging @@ -1573,8 +1573,8 @@ f_dialog_textbox() # f_dialog_yesno() { - local msg_text="$*" height width - local hline="$hline_arrows_tab_enter" + local msg_text="$1" height width + local hline="${2-$hline_arrows_tab_enter}" f_interactive || return 0 # If non-interactive, return YES all the time @@ -1600,7 +1600,7 @@ f_dialog_yesno() fi } -# f_dialog_noyes $msg_text ... +# f_dialog_noyes $msg_text [$hline] # # Display a dialog(1) No/Yes prompt to allow the user to make some decision. # The noyes prompt remains until the user presses ENTER or ESC, acknowledging @@ -1613,8 +1613,8 @@ f_dialog_yesno() # f_dialog_noyes() { - local msg_text="$*" height width - local hline="$hline_arrows_tab_enter" + local msg_text="$1" height width + local hline="${2-$hline_arrows_tab_enter}" f_interactive || return 1 # If non-interactive, return NO all the time |