From owner-svn-src-head@FreeBSD.ORG Tue Jun 18 23:48:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DFD88A44; Tue, 18 Jun 2013 23:48:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B8AB61AFD; Tue, 18 Jun 2013 23:48:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5INm5Os066182; Tue, 18 Jun 2013 23:48:05 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5INm513066181; Tue, 18 Jun 2013 23:48:05 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306182348.r5INm513066181@svn.freebsd.org> From: Devin Teske Date: Tue, 18 Jun 2013 23:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251977 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 23:48:06 -0000 Author: dteske Date: Tue Jun 18 23:48:05 2013 New Revision: 251977 URL: http://svnweb.freebsd.org/changeset/base/251977 Log: 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'). Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Tue Jun 18 23:31:09 2013 (r251976) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue Jun 18 23:48:05 2013 (r251977) @@ -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