Sun Aug 17 15:28:17 CEST 2003
(Kim) Removed possibility to use readline in eesh (readline is GPL, not LGPL). SVN revision: 7335
This commit is contained in:
parent
c904f9f41e
commit
112b31372e
|
@ -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).
|
||||
|
|
11
configure.in
11
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."
|
||||
|
|
2
e.spec
2
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
61
eesh/main.c
61
eesh/main.c
|
@ -28,51 +28,26 @@
|
|||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#if USE_READLINE
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue