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.
|
Do save snaps on exit.
|
||||||
|
|
||||||
GNOME(1) hint support now disabled by default.
|
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(XINERAMA_LIBS)
|
||||||
AC_SUBST(XKB)
|
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_bass_ale)
|
||||||
AC_CHECK_LIB(Fridge,mass_quantities_of_any_ale, , [
|
AC_CHECK_LIB(Fridge,mass_quantities_of_any_ale, , [
|
||||||
echo "Warning: No ales were found in your refrigerator."
|
echo "Warning: No ales were found in your refrigerator."
|
||||||
|
|
2
e.spec
2
e.spec
|
@ -1,7 +1,7 @@
|
||||||
Summary: The Enlightenment window manager.
|
Summary: The Enlightenment window manager.
|
||||||
Name: enlightenment
|
Name: enlightenment
|
||||||
Version: 0.16.6
|
Version: 0.16.6
|
||||||
Release: 0.35
|
Release: 0.36
|
||||||
Copyright: BSD
|
Copyright: BSD
|
||||||
Group: User Interface/Desktops
|
Group: User Interface/Desktops
|
||||||
Source: ftp://ftp.enlightenment.org/pub/enlightenment/enlightenment-%{version}.tar.gz
|
Source: ftp://ftp.enlightenment.org/pub/enlightenment/enlightenment-%{version}.tar.gz
|
||||||
|
|
|
@ -12,7 +12,7 @@ eesh_SOURCES = \
|
||||||
file.c \
|
file.c \
|
||||||
alert.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
|
INCLUDES = $(IMLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir)/intl
|
||||||
|
|
||||||
|
|
61
eesh/main.c
61
eesh/main.c
|
@ -28,51 +28,26 @@
|
||||||
#endif
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if USE_READLINE
|
|
||||||
#include <readline/readline.h>
|
|
||||||
#include <readline/history.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern char waitonly;
|
extern char waitonly;
|
||||||
|
|
||||||
#if !USE_READLINE
|
|
||||||
static char buf[10240];
|
|
||||||
static int stdin_state;
|
static int stdin_state;
|
||||||
#endif
|
void restore_stdin_state(void);
|
||||||
static Client *e;
|
void
|
||||||
|
|
||||||
static void
|
|
||||||
restore_stdin_state(void)
|
restore_stdin_state(void)
|
||||||
{
|
{
|
||||||
#if USE_READLINE
|
|
||||||
rl_callback_handler_remove();
|
|
||||||
#else
|
|
||||||
fcntl(0, F_SETFL, stdin_state);
|
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
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
Client *me;
|
Client *me, *e;
|
||||||
int i, j;
|
char buf[10240];
|
||||||
|
int i, j, k;
|
||||||
fd_set fd;
|
fd_set fd;
|
||||||
|
signed char ret;
|
||||||
char *command;
|
char *command;
|
||||||
|
|
||||||
waitonly = 0;
|
waitonly = 0;
|
||||||
|
@ -144,16 +119,10 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
XSync(disp, False);
|
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;
|
j = 0;
|
||||||
|
stdin_state = fcntl(0, F_GETFL, 0);
|
||||||
|
atexit(restore_stdin_state);
|
||||||
|
fcntl(0, F_SETFL, O_NONBLOCK);
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (waitonly)
|
if (waitonly)
|
||||||
|
@ -176,11 +145,6 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if (FD_ISSET(0, &fd))
|
if (FD_ISSET(0, &fd))
|
||||||
{
|
{
|
||||||
#if USE_READLINE
|
|
||||||
rl_callback_read_char();
|
|
||||||
#else
|
|
||||||
int k, ret;
|
|
||||||
|
|
||||||
k = 0;
|
k = 0;
|
||||||
while ((ret = read(0, &(buf[j]), 1) > 0))
|
while ((ret = read(0, &(buf[j]), 1) > 0))
|
||||||
{
|
{
|
||||||
|
@ -189,14 +153,16 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
buf[j] = 0;
|
buf[j] = 0;
|
||||||
if (strlen(buf) > 0)
|
if (strlen(buf) > 0)
|
||||||
process_line(buf);
|
{
|
||||||
|
CommsSend(e, buf);
|
||||||
|
XSync(disp, False);
|
||||||
|
}
|
||||||
j = -1;
|
j = -1;
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
if ((ret < 0) || ((k == 0) && (ret == 0)))
|
if ((ret < 0) || ((k == 0) && (ret == 0)))
|
||||||
exit(0);
|
exit(0);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (FD_ISSET(ConnectionNumber(disp), &fd))
|
else if (FD_ISSET(ConnectionNumber(disp), &fd))
|
||||||
{
|
{
|
||||||
|
@ -212,6 +178,5 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue