From owner-svn-src-head@FreeBSD.ORG Tue Jun 4 00:30:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AADDFF43; Tue, 4 Jun 2013 00:30: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 9DAEA1FD6; Tue, 4 Jun 2013 00:30: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 r540U5f1044542; Tue, 4 Jun 2013 00:30:05 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r540U5CU044541; Tue, 4 Jun 2013 00:30:05 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306040030.r540U5CU044541@svn.freebsd.org> From: Devin Teske Date: Tue, 4 Jun 2013 00:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251353 - 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, 04 Jun 2013 00:30:05 -0000 Author: dteske Date: Tue Jun 4 00:30:05 2013 New Revision: 251353 URL: http://svnweb.freebsd.org/changeset/base/251353 Log: Improve debugging for f_dialog_*_constrain() to print constrained rather than unconstrained values. Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Mon Jun 3 23:51:46 2013 (r251352) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue Jun 4 00:30:05 2013 (r251353) @@ -328,7 +328,7 @@ f_dialog_size_constrain() for __arg in height width; do debug= f_getvar __var_$__arg __cp [ "$__cp" ] || continue - if ! f_getvar "$__cp" __$__arg; then + if ! debug= f_getvar "$__cp" __$__arg; then f_dprintf "%s: var_%s variable \`%s' not set" \ $__fname $__arg "$__cp" __retval=$FAILURE @@ -377,6 +377,12 @@ f_dialog_size_constrain() fi fi + if [ "$debug" ]; then + # Print final constrained values to debuggin + f_quietly f_getvar "$__var_height" + f_quietly f_getvar "$__var_width" + fi + return $__retval # success if no debug warnings were printed } @@ -419,7 +425,7 @@ f_dialog_menu_constrain() for __arg in height width rows; do debug= f_getvar __var_$__arg __cp [ "$__cp" ] || continue - if ! f_getvar "$__cp" __$__arg; then + if ! debug= f_getvar "$__cp" __$__arg; then f_dprintf "%s: var_%s variable \`%s' not set" \ $__fname $__arg "$__cp" __retval=$FAILURE @@ -489,6 +495,13 @@ f_dialog_menu_constrain() fi fi + if [ "$debug" ]; then + # Print final constrained values to debuggin + f_quietly f_getvar "$__var_height" + f_quietly f_getvar "$__var_width" + f_quietly f_getvar "$__var_rows" + fi + return $__retval # success if no debug warnings were printed }