head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.38 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.36 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.34 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.32 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.30 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.28 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.26 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.24 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.22 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.20 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.18 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.16 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.14 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.12 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.10 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.8 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.6 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.4 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.2 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.2.0.24 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.22 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.20 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.18 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.16 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.14 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.12 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.10 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.2 comdex-fall-1999:1.2 netbsd-1-4-PATCH001:1.2 netbsd-1-4-RELEASE:1.2 netbsd-1-3-PATCH003:1.2; locks; strict; comment @# @; 1.3 date 2005.09.30.22.02.56; author wiz; state dead; branches; next 1.2; 1.2 date 98.08.07.11.10.15; author agc; state Exp; branches; next 1.1; 1.1 date 98.05.26.22.07.20; author tron; state Exp; branches; next ; desc @@ 1.3 log @Update to 1.0.20050911. Changes since 1997 (or 1995?) are too many to mention here, see http://dickey.his.com/dialog/CHANGES for details. Closes PR pkg/30856. @ text @$NetBSD: patch-ag,v 1.2 1998/08/07 11:10:15 agc Exp $ --- msgbox.c.orig Fri Jan 23 17:37:13 1998 +++ msgbox.c Fri Jan 23 18:16:53 1998 @@@@ -28,8 +28,19 @@@@ dialog_msgbox (const char *title, const char *prompt, int height, int width, int pause) { - int i, x, y, key = 0; + int i, j, x, y, key = 0; WINDOW *dialog; + + /* Choose useful default height and width if they are negative */ + if (height < 0) + height = strheight(prompt) + 2 + 2 * (!!pause); + if (width < 0) { + i = strwidth(prompt); + j = ((title != NULL) ? strwidth(title) : 0); + width = MAX (i, j) + 4; + } + if (pause) + width = MAX (width, 10); /* center dialog box on screen */ x = (COLS - width) / 2; @ 1.2 log @Add NetBSD RCS Ids. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @New "dialog" package supplied by Johnny C. Lam in PR pkg/4993. @ text @d1 2 @