diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-09-23 14:06:59 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-09-23 14:06:59 +0000 |
commit | 0d888e3677d9cd501c6b87f634d9bb8f13de581f (patch) | |
tree | c9abe1ce50c34b4610732bbeb4c7e2d0335e9861 /package/config/lxdialog | |
parent | e640e6a8ef197f712237668bf7c8a9b89fa01310 (diff) |
- pull kbuild from 2.6.22.7. This should fix the ncurses detection for dylib et al
Diffstat (limited to 'package/config/lxdialog')
-rw-r--r-- | package/config/lxdialog/check-lxdialog.sh | 24 | ||||
-rw-r--r-- | package/config/lxdialog/dialog.h | 1 | ||||
-rw-r--r-- | package/config/lxdialog/util.c | 9 |
3 files changed, 17 insertions, 17 deletions
diff --git a/package/config/lxdialog/check-lxdialog.sh b/package/config/lxdialog/check-lxdialog.sh index 120d624e6..cdca7388e 100644 --- a/package/config/lxdialog/check-lxdialog.sh +++ b/package/config/lxdialog/check-lxdialog.sh @@ -4,21 +4,15 @@ # What library to link ldflags() { - $cc -print-file-name=libncursesw.so | grep -q / - if [ $? -eq 0 ]; then - echo '-lncursesw' - exit - fi - $cc -print-file-name=libncurses.so | grep -q / - if [ $? -eq 0 ]; then - echo '-lncurses' - exit - fi - $cc -print-file-name=libcurses.so | grep -q / - if [ $? -eq 0 ]; then - echo '-lcurses' - exit - fi + for ext in so a dylib ; do + for lib in ncursesw ncurses curses ; do + $cc -print-file-name=lib${lib}.${ext} | grep -q / + if [ $? -eq 0 ]; then + echo "-l${lib}" + exit + fi + done + done exit 1 } diff --git a/package/config/lxdialog/dialog.h b/package/config/lxdialog/dialog.h index fd695e107..7e17eba75 100644 --- a/package/config/lxdialog/dialog.h +++ b/package/config/lxdialog/dialog.h @@ -188,6 +188,7 @@ int on_key_esc(WINDOW *win); int on_key_resize(void); void init_dialog(const char *backtitle); +void set_dialog_backtitle(const char *backtitle); void reset_dialog(void); void end_dialog(void); void attr_clear(WINDOW * win, int height, int width, chtype attr); 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; |