=== modified file 'Makefile' --- Makefile 2011-09-23 23:04:01 +0000 +++ Makefile 2011-09-23 22:50:13 +0000 @@ -1,13 +1,7 @@ LIBTOOL=libtool CFLAGS?= - -ifeq ($(shell pkg-config --atleast-version=0.1.0 unibilium && echo 1),1) - CFLAGS +=$(shell pkg-config --cflags unibilium) -DHAVE_UNIBILIUM - LDFLAGS+=$(shell pkg-config --libs unibilium) -else - LDFLAGS+=-lncurses -endif +LDFLAGS=-lcurses CFLAGS_DEBUG= === modified file 'driver-ti.c' --- driver-ti.c 2011-09-23 23:04:01 +0000 +++ driver-ti.c 2011-09-23 22:40:54 +0000 @@ -4,15 +4,11 @@ #include "termkey.h" #include "termkey-internal.h" -#ifdef HAVE_UNIBILIUM -# include -#else -# include -# include +#include +#include /* curses.h has just poluted our namespace. We want this back */ -# undef buttons -#endif +#undef buttons #include #include @@ -163,41 +159,21 @@ static int load_terminfo(TermKeyTI *ti, const char *term) { - int i; - -#ifdef HAVE_UNIBILIUM - unibi_term *unibi = unibi_from_term(term); - if(!unibi) - return 0; -#else int err; /* Have to cast away the const. But it's OK - we know terminfo won't really * modify term */ if(setupterm((char*)term, 1, &err) != OK) return 0; -#endif -#ifdef HAVE_UNIBILIUM - for(i = unibi_string_begin_+1; i < unibi_string_end_; i++) -#else - for(i = 0; strfnames[i]; i++) -#endif - { + int i; + for(i = 0; strfnames[i]; i++) { // Only care about the key_* constants -#ifdef HAVE_UNIBILIUM - const char *name = unibi_name_str(i); -#else const char *name = strfnames[i]; -#endif if(strncmp(name, "key_", 4) != 0) continue; -#ifdef HAVE_UNIBILIUM - const char *value = unibi_get_str(unibi, i); -#else const char *value = tigetstr(strnames[i]); -#endif if(!value || value == (char*)-1) continue; @@ -236,28 +212,16 @@ * instances for multiple different termtypes, and it's different by the * time we want to use it */ -#ifdef HAVE_UNIBILIUM - const char *keypad_xmit = unibi_get_str(unibi, unibi_pkey_xmit); -#endif - if(keypad_xmit) ti->start_string = strdup(keypad_xmit); else ti->start_string = NULL; -#ifdef HAVE_UNIBILIUM - const char *keypad_local = unibi_get_str(unibi, unibi_pkey_local); -#endif - if(keypad_local) ti->stop_string = strdup(keypad_local); else ti->stop_string = NULL; -#ifdef HAVE_UNIBILIUM - unibi_destroy(unibi); -#endif - return 1; }