From 0d888e3677d9cd501c6b87f634d9bb8f13de581f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 23 Sep 2007 14:06:59 +0000 Subject: - pull kbuild from 2.6.22.7. This should fix the ncurses detection for dylib et al --- package/config/lxdialog/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'package/config/lxdialog/util.c') diff --git a/package/config/lxdialog/util.c b/package/config/lxdialog/util.c index d54440fc1..a1bddefe7 100644 --- a/package/config/lxdialog/util.c +++ b/package/config/lxdialog/util.c @@ -272,6 +272,11 @@ void init_dialog(const char *backtitle) color_setup(getenv("MENUCONFIG_COLOR")); } +void set_dialog_backtitle(const char *backtitle) +{ + dlg.backtitle = backtitle; +} + void reset_dialog(void) { initscr(); /* Init curses */ @@ -336,7 +341,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) newl = 1; word = tempstr; while (word && *word) { - sp = index(word, ' '); + sp = strchr(word, ' '); if (sp) *sp++ = 0; @@ -348,7 +353,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) if (wlen > room || (newl && wlen < 4 && sp && wlen + 1 + strlen(sp) > room - && (!(sp2 = index(sp, ' ')) + && (!(sp2 = strchr(sp, ' ')) || wlen + 1 + (sp2 - sp) > room))) { cur_y++; cur_x = x; -- cgit v1.2.3