Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F96523503
D33920.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33920.diff
View Options
diff --git a/contrib/bsddialog/lib/libbsddialog.c b/contrib/bsddialog/lib/libbsddialog.c
--- a/contrib/bsddialog/lib/libbsddialog.c
+++ b/contrib/bsddialog/lib/libbsddialog.c
@@ -57,11 +57,12 @@
int bsddialog_init(void)
{
int i, j, c, error;
+ enum bsddialog_default_theme theme;
set_error_string("");
- if(initscr() == NULL)
- RETURN_ERROR("Cannot init ncurses (initscr)");
+ if (initscr() == NULL)
+ RETURN_ERROR("Cannot init curses (initscr)");
error = OK;
error += keypad(stdscr, TRUE);
@@ -69,9 +70,9 @@
error += cbreak();
error += noecho();
curs_set(0);
- if(error != OK) {
+ if (error != OK) {
bsddialog_end();
- RETURN_ERROR("Cannot init ncurses (keypad and cursor)");
+ RETURN_ERROR("Cannot init curses (keypad and cursor)");
}
c = 1;
@@ -81,12 +82,13 @@
error += init_pair(c, i, j);
c++;
}
- if(error != OK) {
- bsddialog_end();
- RETURN_ERROR("Cannot init ncurses (colors)");
- }
- if (bsddialog_set_default_theme(BSDDIALOG_THEME_DEFAULT) != 0) {
+ if (error == OK)
+ theme = BSDDIALOG_THEME_DEFAULT;
+ else
+ theme = BSDDIALOG_THEME_BLACKWHITE;
+
+ if (bsddialog_set_default_theme(theme) != 0) {
bsddialog_end();
return (BSDDIALOG_ERROR);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 26, 8:27 AM (15 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12799806
Default Alt Text
D33920.diff (1 KB)
Attached To
Mode
D33920: Fix libbsddialog for terminals without colours
Attached
Detach File
Event Timeline
Log In to Comment