summaryrefslogtreecommitdiff
path: root/scripts
authorkergoth <kergoth>2003-06-17 17:01:45 (UTC)
committer kergoth <kergoth>2003-06-17 17:01:45 (UTC)
commit384b7f1a42f9f2f101dc8fe11c3625055d96f672 (patch) (unidiff)
treee4c0c83db7e60715be715f06fa221c45e616b00e /scripts
parent154d6deef15b9f7f83ea7a25f2079d9fca034910 (diff)
downloadopie-384b7f1a42f9f2f101dc8fe11c3625055d96f672.zip
opie-384b7f1a42f9f2f101dc8fe11c3625055d96f672.tar.gz
opie-384b7f1a42f9f2f101dc8fe11c3625055d96f672.tar.bz2
Update lxdialog version, and *build* lxdialog. no binary in cvs.
Diffstat (limited to 'scripts') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/lxdialog/Makefile34
-rwxr-xr-xscripts/lxdialog/lxdialogbin37159 -> 0 bytes
-rw-r--r--scripts/lxdialog/util.c2
3 files changed, 21 insertions, 15 deletions
diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile
index 75b7bac..b34bbc3 100644
--- a/scripts/lxdialog/Makefile
+++ b/scripts/lxdialog/Makefile
@@ -1,36 +1,33 @@
1HOST_CFLAGS := -DLOCALE 1HOST_EXTRACFLAGS := -DLOCALE
2HOST_LDFLAGS := -lncurses 2HOST_LOADLIBES := -lncurses
3HOSTCC = gcc
3 4
4ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) 5ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
5 HOST_CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" 6 HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
6else 7else
7ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) 8ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
8 HOST_CFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" 9 HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
9else 10else
10ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) 11ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
11 HOST_CFLAGS += -DCURSES_LOC="<ncurses.h>" 12 HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>"
12else 13else
13 HOST_CFLAGS += -DCURSES_LOC="<curses.h>" 14 HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>"
14endif 15endif
15endif 16endif
16endif 17endif
17 18
18host-progs := lxdialog 19 host-progs:= lxdialog
20 always := $(host-progs)
19 21
20lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ 22lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
21 util.o lxdialog.o msgbox.o 23 util.o lxdialog.o msgbox.o
22 24
23EXTRA_TARGETS := lxdialog 25first_rule: ncurses lxdialog
24
25first_rule: ncurses
26
27include $(TOPDIR)/Rules.make
28 26
29.PHONY: ncurses 27.PHONY: ncurses
30
31ncurses: 28ncurses:
32 @echo "main() {}" > lxtemp.c 29 @echo "main() {}" > lxtemp.c
33 @if $(HOSTCC) $(HOST_CFLAGS) lxtemp.c $(HOST_LDFLAGS); then \ 30 @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \
34 rm -f lxtemp.c a.out; \ 31 rm -f lxtemp.c a.out; \
35 else \ 32 else \
36 rm -f lxtemp.c; \ 33 rm -f lxtemp.c; \
@@ -42,3 +39,12 @@ ncurses:
42 echo ;\ 39 echo ;\
43 exit 1 ;\ 40 exit 1 ;\
44 fi 41 fi
42
43clean:
44 rm -f $(lxdialog-objs) lxdialog
45
46%.o: %.c
47 $(HOSTCC) $(HOST_EXTRACFLAGS) -fPIC -c $^ -o $@
48
49lxdialog: $(lxdialog-objs)
50 $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) $^ -o $@
diff --git a/scripts/lxdialog/lxdialog b/scripts/lxdialog/lxdialog
deleted file mode 100755
index f0dca91..0000000
--- a/scripts/lxdialog/lxdialog
+++ b/dev/null
Binary files differ
diff --git a/scripts/lxdialog/util.c b/scripts/lxdialog/util.c
index b3a7af9..e7bce9b 100644
--- a/scripts/lxdialog/util.c
+++ b/scripts/lxdialog/util.c
@@ -348,7 +348,7 @@ first_alpha(const char *string, const char *exempt)
348 c = tolower(string[i]); 348 c = tolower(string[i]);
349 349
350 if (strchr("<[(", c)) ++in_paren; 350 if (strchr("<[(", c)) ++in_paren;
351 if (strchr(">])", c)) --in_paren; 351 if (strchr(">])", c) && in_paren > 0) --in_paren;
352 352
353 if ((! in_paren) && isalpha(c) && 353 if ((! in_paren) && isalpha(c) &&
354 strchr(exempt, c) == 0) 354 strchr(exempt, c) == 0)