diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-02-23 22:36:56 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-02-23 22:36:56 +0000 |
commit | fdcf149868e1b18e34e9777a82e5e7162404b72d (patch) | |
tree | c6725ce63fd4e727d857231f2cd03d2561d7be89 /gnu/lib/libdialog/msgbox.c | |
parent | b106f3b2551f4496cdfe9134336e01c360677dc7 (diff) |
Notes
Diffstat (limited to 'gnu/lib/libdialog/msgbox.c')
-rw-r--r-- | gnu/lib/libdialog/msgbox.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libdialog/msgbox.c index d5966c441324d..abe69dd84fe8f 100644 --- a/gnu/lib/libdialog/msgbox.c +++ b/gnu/lib/libdialog/msgbox.c @@ -122,12 +122,13 @@ dialog_mesgbox(unsigned char *title, unsigned char *prompt, int height, int widt WINDOW *dialog; if (height < 0) - height = strheight(prompt)+2+2*(!!pause); + height = strheight(prompt)+2+2; if (width < 0) { i = strwidth(prompt); - j = strwidth(title); + j = ((title != NULL) ? strwidth(title) : 0); width = MAX(i,j)+4; } + width = MAX(width,10); if (width > COLS) width = COLS; @@ -158,8 +159,8 @@ dialog_mesgbox(unsigned char *title, unsigned char *prompt, int height, int widt waddstr(dialog, title); waddch(dialog, ' '); } - wattrset(dialog, dialog_attr); + wattrset(dialog, border_attr); wmove(dialog, height-3, 0); waddch(dialog, ACS_LTEE); for (i = 0; i < width-2; i++) |