From 112b31372e85ba94288813d907f67783ddf7fcfd Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 17 Aug 2003 13:30:37 +0000 Subject: [PATCH] Sun Aug 17 15:28:17 CEST 2003 (Kim) Removed possibility to use readline in eesh (readline is GPL, not LGPL). SVN revision: 7335 --- ChangeLog | 7 ++++++ configure.in | 11 --------- e.spec | 2 +- eesh/Makefile.am | 2 +- eesh/main.c | 61 +++++++++++------------------------------------- 5 files changed, 22 insertions(+), 61 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a374914..f87d368c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2105,3 +2105,10 @@ Do config file replacements atomically. Do save snaps on exit. GNOME(1) hint support now disabled by default. + +------------------------------------------------------------------------------- + +Sun Aug 17 15:28:17 CEST 2003 +(Kim) + +Removed possibility to use readline in eesh (readline is GPL, not LGPL). diff --git a/configure.in b/configure.in index 5f2a16c3..1b81683e 100644 --- a/configure.in +++ b/configure.in @@ -177,17 +177,6 @@ AC_SUBST(XVM_LIBS) AC_SUBST(XINERAMA_LIBS) AC_SUBST(XKB) -AC_ARG_WITH(readline, - [ --with-readline compile eesh with GNU readline support [default=no]],, with_readline=no) -if test "x$with_readline" = "xyes"; then - AC_CHECK_LIB(readline, readline, RL_LIBS="-lreadline -ltermcap", - AC_ERROR(readline not found - don't use --with-readline), - -ltermcap - ) - AC_SUBST(RL_LIBS) - AC_DEFINE(USE_READLINE, 1, [readline support]) -fi - AC_CHECK_LIB(Fridge,mass_quantities_of_bass_ale) AC_CHECK_LIB(Fridge,mass_quantities_of_any_ale, , [ echo "Warning: No ales were found in your refrigerator." diff --git a/e.spec b/e.spec index bb6c6285..ac912eec 100644 --- a/e.spec +++ b/e.spec @@ -1,7 +1,7 @@ Summary: The Enlightenment window manager. Name: enlightenment Version: 0.16.6 -Release: 0.35 +Release: 0.36 Copyright: BSD Group: User Interface/Desktops Source: ftp://ftp.enlightenment.org/pub/enlightenment/enlightenment-%{version}.tar.gz diff --git a/eesh/Makefile.am b/eesh/Makefile.am index b6a462ec..73da939d 100644 --- a/eesh/Makefile.am +++ b/eesh/Makefile.am @@ -12,7 +12,7 @@ eesh_SOURCES = \ file.c \ alert.c -LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) $(RL_LIBS) -lm +LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) -lm INCLUDES = $(IMLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir)/intl diff --git a/eesh/main.c b/eesh/main.c index 251184ee..317fb0ab 100644 --- a/eesh/main.c +++ b/eesh/main.c @@ -28,51 +28,26 @@ #endif #include #include -#if USE_READLINE -#include -#include -#endif extern char waitonly; -#if !USE_READLINE -static char buf[10240]; static int stdin_state; -#endif -static Client *e; - -static void +void restore_stdin_state(void); +void restore_stdin_state(void) { -#if USE_READLINE - rl_callback_handler_remove(); -#else fcntl(0, F_SETFL, stdin_state); -#endif -} - -static void -process_line(char *line) -{ - if (line == NULL) - exit(0); - if (*line == '\0') - return; - - CommsSend(e, line); - XSync(disp, False); -#if USE_READLINE - add_history(line); -#endif } int main(int argc, char **argv) { XEvent ev; - Client *me; - int i, j; + Client *me, *e; + char buf[10240]; + int i, j, k; fd_set fd; + signed char ret; char *command; waitonly = 0; @@ -144,16 +119,10 @@ main(int argc, char **argv) } XSync(disp, False); - -#if USE_READLINE - rl_callback_handler_install("", process_line); -#else - stdin_state = fcntl(0, F_GETFL, 0); - fcntl(0, F_SETFL, O_NONBLOCK); -#endif - atexit(restore_stdin_state); - j = 0; + stdin_state = fcntl(0, F_GETFL, 0); + atexit(restore_stdin_state); + fcntl(0, F_SETFL, O_NONBLOCK); for (;;) { if (waitonly) @@ -176,11 +145,6 @@ main(int argc, char **argv) if (FD_ISSET(0, &fd)) { -#if USE_READLINE - rl_callback_read_char(); -#else - int k, ret; - k = 0; while ((ret = read(0, &(buf[j]), 1) > 0)) { @@ -189,14 +153,16 @@ main(int argc, char **argv) { buf[j] = 0; if (strlen(buf) > 0) - process_line(buf); + { + CommsSend(e, buf); + XSync(disp, False); + } j = -1; } j++; } if ((ret < 0) || ((k == 0) && (ret == 0))) exit(0); -#endif } else if (FD_ISSET(ConnectionNumber(disp), &fd)) { @@ -212,6 +178,5 @@ main(int argc, char **argv) } } } - return 0; }