src/hookinc.h
src/init.C
src/init.h
-src/iom.C
-src/iom.h
-src/iom_conf.h
+src/ev_cpp.C
+src/ev_cpp.h
src/keyboard.C
src/keyboard.h
src/main.C
src/perl/digital-clock
src/perl/macosx-clipboard
+libev/ev.h
+libev/ev.c
+libev/ev_vars.h
+libev/ev_wrap.h
+libev/ev_win32.c
+libev/ev_select.c
+libev/ev_poll.c
+libev/ev_epoll.c
+libev/ev_kqueue.c
#! /bin/sh
+if ! [ -e libev/ev++.h ]; then
+ cat <<EOF
+**
+** libev/ directory is missing
+**
+** you need a checkout of libev (http://software.schmorp.de/pkg/libev)
+** in the top-level build directory.
+**
+EOF
+ exit 1
+fi
+
if autoheader && autoconf; then
rm -rf autom4te.cache
echo "Now run ./configure"
/* Define to 1 if you have the <clocale> header file. */
#undef HAVE_CLOCALE
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
/* Define to 1 if you have the <cwchar> header file. */
#undef HAVE_CWCHAR
/* Define to 1 if you have /dev/ptmx */
#undef HAVE_DEV_PTMX
+/* Define to 1 if you have the `epoll_ctl' function. */
+#undef HAVE_EPOLL_CTL
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `isastream' function. */
#undef HAVE_ISASTREAM
+/* Define to 1 if you have the `kqueue' function. */
+#undef HAVE_KQUEUE
+
/* Define to 1 if you have the <lastlog.h> header file. */
#undef HAVE_LASTLOG_H
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+#undef HAVE_LIBRT
+
/* Define to 1 if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H
/* Define to 1 if you have the <sys/byteorder.h> header file. */
#undef HAVE_SYS_BYTEORDER_H
+/* Define to 1 if you have the <sys/epoll.h> header file. */
+#undef HAVE_SYS_EPOLL_H
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+#undef HAVE_SYS_EVENT_H
+
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
+/* Define to 1 if you have the <sys/queue.h> header file. */
+#undef HAVE_SYS_QUEUE_H
+
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
LINKER
INSTALL_LIBRXVT
RXVTNAME
+CXXCPP
TIC
XMKMF
-CXXCPP
X_CFLAGS
X_PRE_LIBS
X_LIBS
CXXFLAGS
CCC
CPP
-XMKMF
-CXXCPP'
+CXXCPP
+XMKMF'
# Initialize some variables set by options.
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
- XMKMF Path to xmkmf, Makefile generator for X Window System
CXXCPP C++ preprocessor
+ XMKMF Path to xmkmf, Makefile generator for X Window System
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-# Extract the first word of "tic", so it can be a program name with args.
-set dummy tic; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_TIC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $TIC in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_TIC="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_TIC" && ac_cv_path_TIC=":"
- ;;
-esac
-fi
-TIC=$ac_cv_path_TIC
-if test -n "$TIC"; then
- { echo "$as_me:$LINENO: result: $TIC" >&5
-echo "${ECHO_T}$TIC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-
-
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
{ (exit 1); exit 1; }; }
fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_header in sys/epoll.h sys/event.h sys/queue.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+for ac_func in epoll_ctl kqueue
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+{ echo "$as_me:$LINENO: checking for clock_gettime" >&5
+echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6; }
+if test "${ac_cv_func_clock_gettime+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define clock_gettime innocuous_clock_gettime
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char clock_gettime (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef clock_gettime
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_clock_gettime || defined __stub___clock_gettime
+choke me
+#endif
+
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_clock_gettime=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_clock_gettime=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_clock_gettime" >&5
+echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6; }
+if test $ac_cv_func_clock_gettime = yes; then
+ :
+else
+
+
+{ echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
+echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_rt_clock_gettime=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_rt_clock_gettime=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6; }
+if test $ac_cv_lib_rt_clock_gettime = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+ LIBS="-lrt $LIBS"
+
+fi
+
+
+for ac_func in clock_gettime
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for ceil in -lm" >&5
+echo $ECHO_N "checking for ceil in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_ceil+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ceil ();
+int
+main ()
+{
+return ceil ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_m_ceil=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_m_ceil=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_ceil" >&5
+echo "${ECHO_T}$ac_cv_lib_m_ceil" >&6; }
+if test $ac_cv_lib_m_ceil = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+
+
+
+
+
+# Extract the first word of "tic", so it can be a program name with args.
+set dummy tic; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_TIC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $TIC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_TIC="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_TIC" && ac_cv_path_TIC=":"
+ ;;
+esac
+fi
+TIC=$ac_cv_path_TIC
+if test -n "$TIC"; then
+ { echo "$as_me:$LINENO: result: $TIC" >&5
+echo "${ECHO_T}$TIC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
{ echo "$as_me:$LINENO: checking for X" >&5
fi
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
LINKER!$LINKER$ac_delim
INSTALL_LIBRXVT!$INSTALL_LIBRXVT$ac_delim
RXVTNAME!$RXVTNAME$ac_delim
+CXXCPP!$CXXCPP$ac_delim
TIC!$TIC$ac_delim
XMKMF!$XMKMF$ac_delim
-CXXCPP!$CXXCPP$ac_delim
X_CFLAGS!$X_CFLAGS$ac_delim
X_PRE_LIBS!$X_PRE_LIBS$ac_delim
X_LIBS!$X_LIBS$ac_delim
dnl# --------------------------------------------------------------------------
+m4_include([libev/libev.m4])
+
+dnl# --------------------------------------------------------------------------
+
AC_PATH_PROG(TIC, tic, :)
dnl# need a neat way to detect SVR4 or its features
LIBS = @LIBS@
XINC = @X_CFLAGS@ @AFTERIMAGE_CFLAGS@
XLIB = @X_LIBS@ @AFTERIMAGE_LIBS@ -lX11 @X_EXTRA_LIBS@
-COMPILE = $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(DEBUG) $(XINC) -I.. -I$(srcdir) -I.
+COMPILE = $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(DEBUG) $(XINC) -I../libev -I.. -I$(srcdir) -I.
LINK = @LINKER@ $(LDFLAGS)
srcdir = @srcdir@
background.o command.o rxvtfont.o init.o logging.o main.o misc.o \
ptytty.o proxy.o screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o \
scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o \
- rxvttoolkit.o rxvtutil.o iom.o keyboard.o fdpass.o @PERL_O@
+ rxvttoolkit.o rxvtutil.o keyboard.o fdpass.o ev_cpp.o @PERL_O@
COMMON_DAEMON = rxvtdaemon.o
# DO NOT DELETE: nice dependency list follows
background.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-background.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-background.o: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-background.o: background.h rsinc.h
+background.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+background.o: salloc.h libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
command.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-command.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-command.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-command.o: version.h command.h keyboard.h
+command.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+command.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h version.h
+command.o: command.h keyboard.h
encoding.o: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
encoding.o: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
encoding.o: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
encoding.o: table/viscii.h table/jis0201_1976_0.h table/jis0208_1990_0.h
encoding.o: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
encoding.o: table/compose.h table/category.h
+ev_cpp.o: rxvttoolkit.h ev_cpp.h rxvtlib.h optinc.h rxvtutil.h callback.h
fdpass.o: ../config.h libptytty.h
init.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
-init.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h callback.h
-init.o: salloc.h rxvtperl.h hookinc.h background.h rsinc.h init.h
-iom.o: iom.h iom_conf.h rxvtutil.h libptytty.h callback.h
+init.o: rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h libptytty.h
+init.o: rxvtperl.h hookinc.h background.h rsinc.h init.h
keyboard.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-keyboard.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-keyboard.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-keyboard.o: keyboard.h command.h
+keyboard.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+keyboard.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
+keyboard.o: command.h
logging.o: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
logging.o: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
-logging.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-logging.o: background.h rsinc.h
+logging.o: ev_cpp.h callback.h salloc.h rxvtperl.h hookinc.h background.h
+logging.o: rsinc.h
main.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
-main.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h callback.h
-main.o: salloc.h rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
+main.o: rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h libptytty.h
+main.o: rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
misc.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
-misc.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h callback.h
-misc.o: salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+misc.o: rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h libptytty.h
+misc.o: rxvtperl.h hookinc.h background.h rsinc.h
proxy.o: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
proxy.o: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
-proxy.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-proxy.o: background.h rsinc.h
+proxy.o: ev_cpp.h callback.h salloc.h rxvtperl.h hookinc.h background.h
+proxy.o: rsinc.h
ptytty.o: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
ptytty.o: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
-ptytty.o: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-ptytty.o: background.h rsinc.h
+ptytty.o: ev_cpp.h callback.h salloc.h rxvtperl.h hookinc.h background.h
+ptytty.o: rsinc.h
rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h rxvtutil.h
-rxvt.o: rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h callback.h
-rxvt.o: salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+rxvt.o: rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h libptytty.h
+rxvt.o: rxvtperl.h hookinc.h background.h rsinc.h
rxvtc.o: ../config.h rxvtdaemon.h rxvtutil.h libptytty.h rxvt.h rxvtlib.h
-rxvtc.o: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
-rxvtc.o: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h background.h
-rxvtc.o: rsinc.h
+rxvtc.o: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h ev_cpp.h
+rxvtc.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
rxvtd.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtd.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-rxvtd.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-rxvtd.o: rxvtdaemon.h
+rxvtd.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvtd.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h rxvtdaemon.h
rxvtdaemon.o: rxvtdaemon.h rxvtutil.h
rxvtfont.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtfont.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-rxvtfont.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+rxvtfont.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvtfont.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
rxvtfont.o: table/linedraw.h
+rxvtperl.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+rxvtperl.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvtperl.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
+rxvtperl.o: perlxsi.c ./iom_perl.h
rxvttoolkit.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvttoolkit.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-rxvttoolkit.o: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-rxvttoolkit.o: background.h rsinc.h
+rxvttoolkit.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+rxvttoolkit.o: salloc.h libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
rxvtutil.o: rxvtutil.h
salloc.o: salloc.h
screen.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-screen.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-screen.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-screen.o: salloc.C
+screen.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+screen.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h salloc.C
scrollbar-next.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-next.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-next.o: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-next.o: background.h rsinc.h
+scrollbar-next.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar-next.o: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+scrollbar-next.o: rsinc.h
scrollbar-plain.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-plain.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-plain.o: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-plain.o: background.h rsinc.h
+scrollbar-plain.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar-plain.o: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+scrollbar-plain.o: rsinc.h
scrollbar-rxvt.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-rxvt.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-rxvt.o: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-rxvt.o: background.h rsinc.h
+scrollbar-rxvt.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar-rxvt.o: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+scrollbar-rxvt.o: rsinc.h
scrollbar-xterm.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-xterm.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-xterm.o: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-xterm.o: background.h rsinc.h
+scrollbar-xterm.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar-xterm.o: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+scrollbar-xterm.o: rsinc.h
scrollbar.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-scrollbar.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+scrollbar.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+scrollbar.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
xdefaults.o: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-xdefaults.o: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-xdefaults.o: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-xdefaults.o: version.h keyboard.h
+xdefaults.o: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+xdefaults.o: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h version.h
+xdefaults.o: keyboard.h
background.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-background.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-background.lo: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-background.lo: background.h rsinc.h
+background.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+background.lo: salloc.h libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
command.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-command.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-command.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-command.lo: version.h command.h keyboard.h
+command.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+command.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h version.h
+command.lo: command.h keyboard.h
encoding.lo: ../config.h encoding.h table/iso8859_1.h table/iso8859_15.h
encoding.lo: table/iso8859_2.h table/iso8859_3.h table/iso8859_4.h
encoding.lo: table/iso8859_5.h table/iso8859_6.h table/iso8859_7.h
encoding.lo: table/viscii.h table/jis0201_1976_0.h table/jis0208_1990_0.h
encoding.lo: table/jis0212_1990_0.h table/jis0213_1.h table/jis0213_2.h
encoding.lo: table/compose.h table/category.h
+ev_cpp.lo: rxvttoolkit.h ev_cpp.h rxvtlib.h optinc.h rxvtutil.h callback.h
fdpass.lo: ../config.h libptytty.h
init.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-init.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-init.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h init.h
-iom.lo: iom.h iom_conf.h rxvtutil.h libptytty.h callback.h
+init.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+init.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h init.h
keyboard.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-keyboard.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-keyboard.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-keyboard.lo: keyboard.h command.h
+keyboard.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+keyboard.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
+keyboard.lo: command.h
logging.lo: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
logging.lo: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
-logging.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-logging.lo: background.h rsinc.h
+logging.lo: ev_cpp.h callback.h salloc.h rxvtperl.h hookinc.h background.h
+logging.lo: rsinc.h
main.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-main.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-main.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-main.lo: keyboard.h
+main.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+main.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
misc.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-misc.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-misc.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+misc.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+misc.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
proxy.lo: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
proxy.lo: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
-proxy.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-proxy.lo: background.h rsinc.h
+proxy.lo: ev_cpp.h callback.h salloc.h rxvtperl.h hookinc.h background.h
+proxy.lo: rsinc.h
ptytty.lo: ../config.h ptytty.h libptytty.h ptytty_conf.h rxvt.h rxvtlib.h
ptytty.lo: optinc.h feature.h encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h
-ptytty.lo: iom.h iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h
-ptytty.lo: background.h rsinc.h
+ptytty.lo: ev_cpp.h callback.h salloc.h rxvtperl.h hookinc.h background.h
+ptytty.lo: rsinc.h
rxvt.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvt.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-rxvt.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+rxvt.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvt.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
rxvtc.lo: ../config.h rxvtdaemon.h rxvtutil.h libptytty.h rxvt.h rxvtlib.h
-rxvtc.lo: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h iom.h
-rxvtc.lo: iom_conf.h callback.h salloc.h rxvtperl.h hookinc.h background.h
-rxvtc.lo: rsinc.h
+rxvtc.lo: optinc.h feature.h encoding.h rxvtfont.h rxvttoolkit.h ev_cpp.h
+rxvtc.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
rxvtd.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtd.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-rxvtd.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-rxvtd.lo: rxvtdaemon.h
+rxvtd.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvtd.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h rxvtdaemon.h
rxvtdaemon.lo: rxvtdaemon.h rxvtutil.h
rxvtfont.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvtfont.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-rxvtfont.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
+rxvtfont.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvtfont.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
rxvtfont.lo: table/linedraw.h
+rxvtperl.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
+rxvtperl.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+rxvtperl.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h keyboard.h
+rxvtperl.lo: perlxsi.c ./iom_perl.h
rxvttoolkit.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-rxvttoolkit.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-rxvttoolkit.lo: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-rxvttoolkit.lo: background.h rsinc.h
+rxvttoolkit.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+rxvttoolkit.lo: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+rxvttoolkit.lo: rsinc.h
rxvtutil.lo: rxvtutil.h
salloc.lo: salloc.h
screen.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-screen.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h libptytty.h
-screen.lo: callback.h salloc.h rxvtperl.h hookinc.h background.h rsinc.h
-screen.lo: salloc.C
+screen.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h salloc.h
+screen.lo: libptytty.h rxvtperl.h hookinc.h background.h rsinc.h salloc.C
scrollbar-next.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-next.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-next.lo: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-next.lo: background.h rsinc.h
+scrollbar-next.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar-next.lo: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+scrollbar-next.lo: rsinc.h
scrollbar-plain.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h
-scrollbar-plain.lo: encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h
-scrollbar-plain.lo: iom_conf.h libptytty.h callback.h salloc.h rxvtperl.h
-scrollbar-plain.lo: hookinc.h background.h rsinc.h
+scrollbar-plain.lo: encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h
+scrollbar-plain.lo: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
+scrollbar-plain.lo: background.h rsinc.h
scrollbar-rxvt.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar-rxvt.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar-rxvt.lo: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar-rxvt.lo: background.h rsinc.h
+scrollbar-rxvt.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar-rxvt.lo: salloc.h libptytty.h rxvtperl.h hookinc.h background.h
+scrollbar-rxvt.lo: rsinc.h
scrollbar-xterm.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h
-scrollbar-xterm.lo: encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h
-scrollbar-xterm.lo: iom_conf.h libptytty.h callback.h salloc.h rxvtperl.h
-scrollbar-xterm.lo: hookinc.h background.h rsinc.h
+scrollbar-xterm.lo: encoding.h rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h
+scrollbar-xterm.lo: callback.h salloc.h libptytty.h rxvtperl.h hookinc.h
+scrollbar-xterm.lo: background.h rsinc.h
scrollbar.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-scrollbar.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-scrollbar.lo: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-scrollbar.lo: background.h rsinc.h
+scrollbar.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+scrollbar.lo: salloc.h libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
xdefaults.lo: ../config.h rxvt.h rxvtlib.h optinc.h feature.h encoding.h
-xdefaults.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h iom.h iom_conf.h
-xdefaults.lo: libptytty.h callback.h salloc.h rxvtperl.h hookinc.h
-xdefaults.lo: background.h rsinc.h version.h keyboard.h
+xdefaults.lo: rxvtutil.h rxvtfont.h rxvttoolkit.h ev_cpp.h callback.h
+xdefaults.lo: salloc.h libptytty.h rxvtperl.h hookinc.h background.h rsinc.h
+xdefaults.lo: version.h keyboard.h
if (!(flags & isInvalid))
{
flags |= isInvalid;
- invalid_since = NOW;
+ invalid_since = ev::now ();
}
};
};
}
void
-rxvt_term::check_cb (check_watcher &w)
+rxvt_term::prepare_cb (ev::prepare &w, int revents)
{
make_current ();
display->flush ();
if (want_refresh && !flush_ev.active)
- flush_ev.start (NOW + 1. / 60.); // refresh at max. 60 hz normally
+ flush_ev.start (1. / 60.); // refresh at max. 60 hz normally
}
void
-rxvt_term::flush_cb (time_watcher &w)
+rxvt_term::flush_cb (ev::timer &w, int revents)
{
make_current ();
#ifdef CURSOR_BLINK
void
-rxvt_term::cursor_blink_cb (time_watcher &w)
+rxvt_term::cursor_blink_cb (ev::timer &w, int revents)
{
hidden_cursor = !hidden_cursor;
want_refresh = 1;
-
- w.start (w.at + CURSOR_BLINK_INTERVAL);
}
#endif
#ifdef TEXT_BLINK
void
-rxvt_term::text_blink_cb (time_watcher &w)
+rxvt_term::text_blink_cb (ev::timer &w, int revents)
{
if (scr_refresh_rend (RS_Blink, RS_Blink))
{
hidden_text = !hidden_text;
want_refresh = 1;
- w.start (w.at + TEXT_BLINK_INTERVAL);
}
}
#endif
#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
void
-rxvt_term::cont_scroll_cb (time_watcher &w)
+rxvt_term::cont_scroll_cb (ev::timer &w, int revents)
{
if ((scrollbar_isUp() || scrollbar_isDn()) &&
scr_page (scrollbar_isUp() ? UP : DN, 1))
- {
- want_refresh = 1;
- w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
- }
+ want_refresh = 1;
+ else
+ w.stop ();
}
#endif
#ifdef SELECTION_SCROLLING
void
-rxvt_term::sel_scroll_cb (time_watcher &w)
+rxvt_term::sel_scroll_cb (ev::timer &w, int revents)
{
if (scr_page (scroll_selection_dir, scroll_selection_lines))
{
selection_extend (selection_save_x, selection_save_y, selection_save_state);
want_refresh = 1;
- w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
}
+ else
+ w.stop ();
}
#endif
#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
void
-rxvt_term::slip_wheel_cb (time_watcher &w)
+rxvt_term::slip_wheel_cb (ev::timer &w, int revents)
{
if (mouse_slip_wheel_speed == 0
|| mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed)
mouse_slip_wheel_speed = 0;
want_refresh = 1;
- w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
}
+ else
+ w.stop ();
}
#endif
#if LINUX_YIELD_HACK
static struct event_handler
{
- check_watcher yield_ev;
+ ev::prepare yield_ev;
- void yield_cb (check_watcher &w)
+ void yield_cb (ev::prepare &w, int revents)
{
// this should really be sched_yield(), but the linux guys thought
// that giving a process calling sched_yield () less cpu time than
}
void
-rxvt_term::pty_cb (io_watcher &w, short revents)
+rxvt_term::pty_cb (ev::io &w, int revents)
{
make_current ();
- if (revents & EVENT_READ)
+ if (revents & ev::READ)
// loop, but don't allow a single term to monopolize us
while (pty_fill ())
if (cmd_parse ())
break;
- if (revents & EVENT_WRITE)
+ if (revents & ev::WRITE)
pty_write ();
}
hidden_pointer = 0;
if (option (Opt_pointerBlank))
- pointer_ev.start (NOW + pointerBlankDelay);
+ pointer_ev.start (pointerBlankDelay);
#endif
}
}
void
-rxvt_term::pointer_cb (time_watcher &w)
+rxvt_term::pointer_cb (ev::timer &w, int revents)
{
make_current ();
case MapNotify:
mapped = 1;
#ifdef TEXT_BLINK
- text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL);
+ text_blink_ev.start (TEXT_BLINK_INTERVAL);
#endif
HOOK_INVOKE ((this, HOOK_MAP_NOTIFY, DT_XEVENT, &ev, DT_END));
break;
* already in the middle of scrolling.
*/
if (!sel_scroll_ev.active)
- sel_scroll_ev.start (NOW + SCROLLBAR_INITIAL_DELAY);
+ sel_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
/* save the event params so we can highlight
* the selection in the pending-scroll loop
want_refresh = 1;
}
- cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL);
+ cursor_blink_ev.again ();
}
#endif
#endif
#if CURSOR_BLINK
if (option (Opt_cursorBlink))
- cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL);
+ cursor_blink_ev.start (CURSOR_BLINK_INTERVAL, CURSOR_BLINK_INTERVAL);
#endif
#if OFF_FOCUS_FADING
if (rs[Rs_fade])
#if CURSOR_BLINK
if (option (Opt_cursorBlink))
cursor_blink_ev.stop ();
+
hidden_cursor = 0;
#endif
#if OFF_FOCUS_FADING
if (upordown)
{
#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
- cont_scroll_ev.start (NOW + SCROLLBAR_INITIAL_DELAY);
+ cont_scroll_ev.start (SCROLLBAR_INITIAL_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
#endif
if (scr_page (upordown < 0 ? UP : DN, 1))
{
if (mouse_slip_wheel_speed < -nrow) mouse_slip_wheel_speed = -nrow;
if (mouse_slip_wheel_speed > +nrow) mouse_slip_wheel_speed = +nrow;
- if (slip_wheel_ev.at < NOW)
- slip_wheel_ev.at = NOW + SCROLLBAR_CONTINUOUS_DELAY;
-
- slip_wheel_ev.start ();
+ slip_wheel_ev.start (SCROLLBAR_CONTINUOUS_DELAY, SCROLLBAR_CONTINUOUS_DELAY);
}
else
{
{
refresh_count = 0;
- if (!option (Opt_skipScroll) || io_manager::now () > NOW + 1. / 60.)
+ if (!option (Opt_skipScroll) || ev::ev_time () > ev::now () + 1. / 60.)
{
refreshnow = true;
ch = NOCHAR;
memcpy (v_buffer + v_buflen, data, len);
v_buflen += len;
- pty_ev.set (EVENT_READ | EVENT_WRITE);
+ pty_ev.set (ev::READ | ev::WRITE);
}
void rxvt_term::pty_write ()
free (v_buffer);
v_buffer = 0;
- pty_ev.set (EVENT_READ);
+ pty_ev.set (ev::READ);
return;
}
memmove (v_buffer, v_buffer + written, v_buflen);
}
else if (written != -1 || (errno != EAGAIN && errno != EINTR))
- pty_ev.set (EVENT_READ);
+ pty_ev.set (ev::READ);
}
/*----------------------- end-of-file (C source) -----------------------*/
+++ /dev/null
-/*
- iom.C -- generic I/O multiplexer
- Copyright (C) 2003-2006 Marc Lehmann <gvpe@schmorp.de>
-
- This file is part of GVPE.
-
- GVPE is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with gvpe; if not, write to the Free Software
- Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#include "iom.h"
-
-#include <cstdio>
-#include <cstdlib>
-#include <cerrno>
-#include <cassert>
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-#if 1 // older unices need these includes for select (2)
-# include <unistd.h>
-# include <time.h>
-#endif
-
-#if IOM_CHILD
-# include <sys/wait.h>
-#endif
-
-#if IOM_SIG
-# include <csignal>
-# include <fcntl.h>
-#endif
-
-// if the BSDs would at least be marginally POSIX-compatible.. *sigh*
-// until that happens, sys/select.h must come last
-#include <sys/select.h>
-
-#define TIMEVAL timeval
-#define TV_FRAC tv_usec
-#define TV_MULT 1000000L
-
-#if IOM_CHECK
-static io_manager_vec<check_watcher> cw;
-#endif
-#if IOM_IDLE
-static io_manager_vec<idle_watcher> iw;
-#endif
-
-#if IOM_SIG
-static int sigpipe[2]; // signal signalling pipe
-static sigset_t sigs;
-struct sig_vec : io_manager_vec<sig_watcher> {
- int pending;
- sig_vec ()
- : pending (false)
- { }
-};
-static vector<sig_vec *> sw;
-#endif
-
-#if IOM_CHILD
-static io_manager_vec<child_watcher> pw;
-#endif
-
-#ifdef IOM_LIBEVENT
-static bool need_set_now; // need to set_now in callback
-#else
- #if IOM_IO
- static io_manager_vec<io_watcher> iow;
- #endif
- #if IOM_TIME
- static io_manager_vec<time_watcher> tw;
- #endif
-#endif
-
-#if IOM_TIME
-tstamp io_manager::now ()
-{
- struct timeval tv;
-
- gettimeofday (&tv, 0);
- return (tstamp)tv.tv_sec + (tstamp)tv.tv_usec / 1000000.;
-}
-
-void io_manager::set_now ()
-{
- NOW = now ();
- #ifdef IOM_LIBEVENT
- need_set_now = false;
- #endif
-}
-#endif
-
-#ifndef IOM_LIBEVENT
-// this is a dummy time watcher to ensure that the first
-// time watcher is _always_ valid, this gets rid of a lot
-// of null-pointer-checks
-// (must come _before_ iom is being defined)
-static struct tw0 : time_watcher
-{
- void cb (time_watcher &w)
- {
- // should never get called
- // reached end-of-time, or tstamp has a bogus definition,
- // or compiler initialisation order broken, or something else :)
- abort ();
- }
-
- tw0 ()
- : time_watcher (this, &tw0::cb)
- { }
-} tw0;
-#endif
-
-tstamp NOW;
-
-#if IOM_CHILD
-// sig_watcher for child signal(s)
-static struct sw0 : sig_watcher
-{
- void cb (sig_watcher &w)
- {
- // SIGCHLD, call corresponding watchera
- pid_t pid;
- int status;
-
- while ((pid = waitpid (-1, &status, WNOHANG)) > 0)
- for (int i = pw.size (); i--; )
- {
- child_watcher *w = pw[i];
-
- if (!w)
- pw.erase_unordered (i);
- else if (w->pid == pid)
- {
- io_manager::unreg (*w);
- w->call (*w, status);
- }
- }
- }
-
- sw0 ()
- : sig_watcher (this, &sw0::cb)
- { }
-} sw0;
-#endif
-
-static bool iom_valid;
-
-// used for initialisation only
-static struct init {
- init ()
- {
- #ifdef IOM_PREINIT
- { IOM_PREINIT }
- #endif
-
- #ifdef IOM_LIBEVENT
- event_init ();
- #endif
- iom_valid = true;
-
- #if IOM_SIG
- sigemptyset (&sigs);
-
- if (pipe (sigpipe))
- {
- perror ("io_manager: unable to create signal pipe, aborting.");
- abort ();
- }
-
- fcntl (sigpipe[0], F_SETFL, O_NONBLOCK); fcntl (sigpipe[0], F_SETFD, FD_CLOEXEC);
- fcntl (sigpipe[1], F_SETFL, O_NONBLOCK); fcntl (sigpipe[1], F_SETFD, FD_CLOEXEC);
- #endif
-
- #if IOM_CHILD
- sw0.start (SIGCHLD);
- #endif
-
- #if IOM_TIME
- io_manager::set_now ();
-
- #ifndef IOM_LIBEVENT
- tw0.start (TSTAMP_MAX);
- #endif
- #endif
-
- #ifdef IOM_POSTINIT
- { IOM_POSTINIT }
- #endif
- }
-
- ~init ()
- {
- iom_valid = false;
- }
-
- static void required ();
-} init;
-
-void
-init::required ()
-{
- if (!iom_valid)
- {
- write (2, "io_manager: early registration attempt, aborting.\n",
- sizeof ("io_manager: early registration attempt, aborting.\n") - 1);
- abort ();
- }
-}
-
-template<class watcher>
-void io_manager::reg (watcher &w, io_manager_vec<watcher> &queue)
-{
- init::required ();
-
- if (!w.active)
- {
- queue.push_back (&w);
- w.active = queue.size ();
- }
-}
-
-template<class watcher>
-void io_manager::unreg (watcher &w, io_manager_vec<watcher> &queue)
-{
- if (!iom_valid)
- return;
-
- if (w.active)
- {
- queue [w.active - 1] = 0;
- w.active = 0;
- }
-}
-
-#if IOM_TIME
- #ifdef IOM_LIBEVENT
- void iom_time_c_callback (int fd, short events, void *data)
- {
- if (need_set_now) io_manager::set_now ();
- time_watcher *w = static_cast<time_watcher *>(data);
- w->call (*w);
- }
-
- void time_watcher::start ()
- {
- stop ();
- evtimer_set (&ev, iom_time_c_callback, (void *)this);
- struct timeval tv;
- tv.tv_sec = (long)at;
- tv.tv_usec = (long)((at - (tstamp)tv.tv_sec) * 1000000.);
- evtimer_add (&ev, &tv);
- active = 1;
- }
- #else
- void io_manager::reg (time_watcher &w) { io_manager::reg (w, tw); }
- void io_manager::unreg (time_watcher &w) { io_manager::unreg (w, tw); }
- #endif
-
- void time_watcher::trigger ()
- {
- call (*this);
- start ();
- }
-#endif
-
-#if IOM_IO
- #ifdef IOM_LIBEVENT
- void iom_io_c_callback (int fd, short events, void *data)
- {
- if (need_set_now) io_manager::set_now ();
- io_watcher *w = static_cast<io_watcher *>(data);
- w->call (*w, events);
- }
-
- void io_watcher::set (int fd_, short events_)
- {
- if (active) event_del (&ev);
- fd = fd_;
- events = events_;
- event_set (&ev, fd_, events_ | EV_PERSIST, iom_io_c_callback, (void *)this);
- if (active) event_add (&ev, 0);
- }
- #else
- void io_manager::reg (io_watcher &w) { io_manager::reg (w, iow); }
- void io_manager::unreg (io_watcher &w) { io_manager::unreg (w, iow); }
- #endif
-#endif
-
-#if IOM_CHECK
-void io_manager::reg (check_watcher &w) { io_manager::reg (w, cw); }
-void io_manager::unreg (check_watcher &w) { io_manager::unreg (w, cw); }
-#endif
-
-#if IOM_IDLE
-void io_manager::reg (idle_watcher &w) { io_manager::reg (w, iw); }
-void io_manager::unreg (idle_watcher &w) { io_manager::unreg (w, iw); }
-#endif
-
-#if IOM_SIG
-static void
-sighandler (int signum)
-{
- sw [signum - 1]->pending = true;
-
- // we use a pipe for signal notifications, as most current
- // OSes (Linux...) do not implement pselect correctly. ugh.
- char ch = signum; // actual content not used
- write (sigpipe[1], &ch, 1);
-}
-
-void io_manager::reg (sig_watcher &w)
-{
- init::required ();
-
- assert (0 < w.signum);
-
- sw.reserve (w.signum);
-
- while (sw.size () < w.signum) // pathetic
- sw.push_back (0);
-
- sig_vec *&sv = sw[w.signum - 1];
-
- if (!sv)
- {
- sv = new sig_vec;
-
- sigaddset (&sigs, w.signum);
- sigprocmask (SIG_BLOCK, &sigs, NULL);
-
- struct sigaction sa;
- sa.sa_handler = sighandler;
- sigfillset (&sa.sa_mask);
- sa.sa_flags = SA_RESTART;
-
- if (sigaction (w.signum, &sa, 0))
- {
- perror ("io_manager: error while installing signal handler, ignoring.");
- abort ();
- }
-
- }
-
- io_manager::reg (w, *sv);
-}
-
-void io_manager::unreg (sig_watcher &w)
-{
- if (!w.active || !iom_valid)
- return;
-
- assert (0 < w.signum && w.signum <= sw.size ());
-
- io_manager::unreg (w, *sw[w.signum - 1]);
-}
-
-void sig_watcher::start (int signum)
-{
- stop ();
- this->signum = signum;
- io_manager::reg (*this);
-}
-#endif
-
-#if IOM_CHILD
-void io_manager::reg (child_watcher &w) { io_manager::reg (w, pw); }
-void io_manager::unreg (child_watcher &w) { io_manager::unreg (w, pw); }
-#endif
-
-void io_manager::loop ()
-{
- init::required ();
-
- #if IOM_TIME
- set_now ();
- #endif
-
- for (;;)
- {
- #ifndef IOM_LIBEVENT
- #if IOM_TIME
- // call pending time watchers
- {
- bool activity;
-
- do
- {
- activity = false;
-
- for (int i = tw.size (); i--; )
- if (!tw[i])
- tw.erase_unordered (i);
- else if (tw[i]->at <= NOW)
- {
- time_watcher &w = *tw[i];
-
- unreg (w);
- w.call (w);
-
- activity = true;
- }
- }
- while (activity);
- }
- #endif
- #endif
-
- #if IOM_CHECK
- // call all check watchers
- for (int i = cw.size (); i--; )
- if (!cw[i])
- cw.erase_unordered (i);
- else
- cw[i]->call (*cw[i]);
- #endif
-
- struct TIMEVAL *to = 0;
- struct TIMEVAL tval;
-
-#if IOM_IDLE
- if (iw.size ())
- {
- tval.tv_sec = 0;
- tval.TV_FRAC = 0;
- to = &tval;
- }
- else
-#endif
- {
- #ifndef IOM_LIBEVENT
- #if IOM_TIME
- // find earliest active watcher
- time_watcher *next = tw[0]; // the first time-watcher must exist at ALL times
-
- for (io_manager_vec<time_watcher>::const_iterator i = tw.end (); i-- > tw.begin (); )
- if (*i && (*i)->at < next->at)
- next = *i;
-
- if (next->at > NOW && next != tw[0])
- {
- double diff = next->at - NOW;
- tval.tv_sec = (int)diff;
- tval.TV_FRAC = (int) ((diff - tval.tv_sec) * TV_MULT);
- to = &tval;
- }
- #endif
- #endif
- }
-
- #ifndef IOM_LIBEVENT
- #if IOM_IO || IOM_SIG
- fd_set rfd, wfd;
-
- FD_ZERO (&rfd);
- FD_ZERO (&wfd);
-
- int fds = 0;
-
- #if IOM_IO
- for (io_manager_vec<io_watcher>::const_iterator i = iow.end (); i-- > iow.begin (); )
- if (*i)
- {
- if ((*i)->events & EVENT_READ ) FD_SET ((*i)->fd, &rfd);
- if ((*i)->events & EVENT_WRITE) FD_SET ((*i)->fd, &wfd);
-
- if ((*i)->fd >= fds) fds = (*i)->fd + 1;
- }
- #endif
-
- if (!to && !fds) //TODO: also check idle_watchers and check_watchers?
- break; // no events
-
- #if IOM_SIG
- FD_SET (sigpipe[0], &rfd);
- if (sigpipe[0] >= fds) fds = sigpipe[0] + 1;
- #endif
-
- #if IOM_SIG
- // there is no race, as we use a pipe for signals, so select
- // will return if a signal is caught.
- sigprocmask (SIG_UNBLOCK, &sigs, NULL);
- #endif
- fds = select (fds, &rfd, &wfd, NULL, to);
- #if IOM_SIG
- sigprocmask (SIG_BLOCK, &sigs, NULL);
- #endif
- #elif IOM_TIME
- if (!to)
- break;
-
- select (0, 0, 0, 0, to);
- #endif
-
- #if IOM_TIME
- {
- // update time, try to compensate for gross non-monotonic time changes
- tstamp diff = NOW;
- set_now ();
- diff = NOW - diff;
-
- if (diff < 0)
- for (io_manager_vec<time_watcher>::const_iterator i = tw.end (); i-- > tw.begin (); )
- if (*i)
- (*i)->at += diff;
- }
- #endif
-
- if (fds > 0)
- {
- #if IOM_SIG
- if (FD_ISSET (sigpipe[0], &rfd))
- {
- char ch;
-
- while (read (sigpipe[0], &ch, 1) > 0)
- ;
-
- for (vector<sig_vec *>::iterator svp = sw.end (); svp-- > sw.begin (); )
- if (*svp && (*svp)->pending)
- {
- sig_vec &sv = **svp;
- for (int i = sv.size (); i--; )
- if (!sv[i])
- sv.erase_unordered (i);
- else
- sv[i]->call (*sv[i]);
-
- sv.pending = false;
- }
- }
- #endif
-
- #if IOM_IO
- for (int i = iow.size (); i--; )
- if (!iow[i])
- iow.erase_unordered (i);
- else
- {
- io_watcher &w = *iow[i];
- short revents = w.events;
-
- if (!FD_ISSET (w.fd, &rfd)) revents &= ~EVENT_READ;
- if (!FD_ISSET (w.fd, &wfd)) revents &= ~EVENT_WRITE;
-
- if (revents)
- w.call (w, revents);
- }
- #endif
- }
- else if (fds < 0 && errno != EINTR)
- {
- perror ("io_manager: fatal error while waiting for I/O or time event, aborting.");
- abort ();
- }
-#if IOM_IDLE
- else
- for (int i = iw.size (); i--; )
- if (!iw[i])
- iw.erase_unordered (i);
- else
- iw[i]->call (*iw[i]);
-#endif
-
- #else
- need_set_now = true;
-
- if (to)
- event_loop (EVLOOP_NONBLOCK);
- else
- event_loop (EVLOOP_ONCE);
-
- if (need_set_now) set_now ();
- #endif
- //TODO: IOM_IDLE
- }
-}
-
+++ /dev/null
-/*
- iom.h -- generic I/O multiplexer
- Copyright (C) 2003-2006 Marc Lehmann <gvpe@schmorp.de>
-
- This file is part of GVPE.
-
- GVPE is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with gvpe; if not, write to the Free Software
- Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef IOM_H__
-#define IOM_H__
-
-// required:
-// - a vector template like simplevec or stl's vector
-// - defines for all watcher types required in your app
-// edit iom_conf.h as appropriate.
-#include "iom_conf.h"
-
-#if IOM_CHILD
-# undef IOM_SIG
-# define IOM_SIG 1
-#endif
-
-#include "callback.h"
-
-typedef double tstamp;
-extern tstamp NOW;
-
-// TSTAMP_MAX must still fit into a positive struct timeval
-#define TSTAMP_MAX (double)(1UL<<31)
-
-//#define IOM_LIBEVENT "event.h" *NOT* a supported feature
-#ifdef IOM_LIBEVENT
-# include <sys/time.h>
-# include IOM_LIBEVENT
-# undef IOM_IO
-# define IOM_IO 1
-# undef IOM_TIME
-# define IOM_TIME 1
-# undef IOM_IDLE // NYI
-# undef IOM_SIG // NYI
-# undef IOM_CHILD // NYI
-#endif
-
-struct watcher;
-#if IOM_IO
-struct io_watcher;
-#endif
-#if IOM_TIME
-struct time_watcher;
-#endif
-#if IOM_CHECK
-struct check_watcher;
-#endif
-#if IOM_IDLE
-struct idle_watcher;
-#endif
-#if IOM_SIG
-struct sig_watcher;
-#endif
-#if IOM_CHILD
-struct child_watcher;
-#endif
-
-template<class watcher>
-struct io_manager_vec : vector<watcher *> {
- void erase_unordered (unsigned int pos)
- {
- watcher *w = (*this)[this->size () - 1];
- this->pop_back ();
-
- if (!this->empty ())
- if (((*this)[pos] = w)) // '=' is correct!
- w->active = pos + 1;
- }
-};
-
-// only used as a namespace, and for initialisation purposes
-class io_manager {
- template<class watcher>
- static void reg (watcher &w, io_manager_vec<watcher> &queue);
-
- template<class watcher>
- static void unreg (watcher &w, io_manager_vec<watcher> &queue);
-
-public:
-#if IOM_TIME
- // fetch time only
- static tstamp now ();
-
- // set NOW
- static void set_now ();
-#endif
-
- // register a watcher
-#ifndef IOM_LIBEVENT
-#if IOM_IO
- static void reg (io_watcher &w); static void unreg (io_watcher &w);
-#endif
-#if IOM_TIME
- static void reg (time_watcher &w); static void unreg (time_watcher &w);
-#endif
-#if IOM_SIG
- static void reg (sig_watcher &w); static void unreg (sig_watcher &w);
-#endif
-#if IOM_CHECK
- static void reg (check_watcher &w); static void unreg (check_watcher &w);
-#endif
-#endif
-#if IOM_IDLE
- static void reg (idle_watcher &w); static void unreg (idle_watcher &w);
-#endif
-#if IOM_CHILD
- static void reg (child_watcher &w); static void unreg (child_watcher &w);
-#endif
-
- static void loop ();
-};
-
-struct watcher {
- int active; /* 0 == inactive, else index into respective vector */
-
- bool is_active () { return active; }
-
- watcher () : active (0) { }
-};
-
-#if IOM_IO
-#ifdef IOM_LIBEVENT
-enum { EVENT_UNDEF = -1, EVENT_NONE = 0, EVENT_READ = EV_READ, EVENT_WRITE = EV_WRITE };
-
-void iom_io_c_callback (int fd, short events, void *data);
-
-struct io_watcher : watcher, callback<void (io_watcher &, short)> {
- struct event ev;
- int fd;
- short events;
-
- void set (int fd_, short events_);
- void set (short events_) { set (fd, events_); }
- void start () { if (!active) event_add (&ev, 0); active = 1; }
- void start (int fd_, short events_) { set (fd_, events_); start (); }
- void stop () { if (active) event_del (&ev); active = 0; }
-
- template<class O, class M>
- io_watcher (O object, M method)
- : callback<void (io_watcher &, short)> (object, method)
- { }
- ~io_watcher () { stop (); }
-};
-#else
-enum { EVENT_UNDEF = -1, EVENT_NONE = 0, EVENT_READ = 1, EVENT_WRITE = 2 };
-
-struct io_watcher : watcher, callback<void (io_watcher &, short)> {
- int fd;
- short events;
-
- void set (int fd_, short events_) { fd = fd_; events = events_; }
-
- void set (short events_) { set (fd, events_); }
- void start () { io_manager::reg (*this); }
- void start (int fd_, short events_) { set (fd_, events_); start (); }
- void stop () { io_manager::unreg (*this); }
-
- template<class O, class M>
- io_watcher (O object, M method)
- : callback<void (io_watcher &, short)> (object, method)
- { }
- ~io_watcher () { stop (); }
-};
-#endif
-#endif
-
-#if IOM_TIME
-#ifdef IOM_LIBEVENT
-void iom_time_c_callback (int fd, short events, void *data);
-
-struct time_watcher : watcher, callback<void (time_watcher &)> {
- struct event ev;
- tstamp at;
-
- void trigger ();
-
- void set (tstamp when)
- {
- at = when;
- if (active)
- start ();
- }
- void operator () () { trigger (); }
- void start ();
- void start (tstamp when) { at = when; start (); }
- void stop () { if (active) evtimer_del (&ev); active = 0; }
-
- template<class O, class M>
- time_watcher (O object, M method)
- : callback<void (time_watcher &)> (object, method), at (0)
- { }
- ~time_watcher () { stop (); }
-};
-#else
-struct time_watcher : watcher, callback<void (time_watcher &)> {
- tstamp at;
-
- void trigger ();
-
- void set (tstamp when) { at = when; }
- void operator () () { trigger (); }
- void start () { io_manager::reg (*this); }
- void start (tstamp when) { set (when); start (); }
- void stop () { io_manager::unreg (*this); }
-
- template<class O, class M>
- time_watcher (O object, M method)
- : callback<void (time_watcher &)> (object, method), at (0)
- { }
- ~time_watcher () { stop (); }
-};
-#endif
-#endif
-
-#if IOM_CHECK
-// run before checking for new events
-struct check_watcher : watcher, callback<void (check_watcher &)> {
- void start () { io_manager::reg (*this); }
- void stop () { io_manager::unreg (*this); }
-
- template<class O, class M>
- check_watcher (O object, M method)
- : callback<void (check_watcher &)> (object, method)
- { }
- ~check_watcher () { stop (); }
-};
-#endif
-
-#if IOM_IDLE
-// run after checking for any i/o, but before waiting
-struct idle_watcher : watcher, callback<void (idle_watcher &)> {
- void start () { io_manager::reg (*this); }
- void stop () { io_manager::unreg (*this); }
-
- template<class O, class M>
- idle_watcher (O object, M method)
- : callback<void (idle_watcher &)> (object, method)
- { }
- ~idle_watcher () { stop (); }
-};
-#endif
-
-#if IOM_SIG
-struct sig_watcher : watcher, callback<void (sig_watcher &)> {
- int signum;
-
- void start (int signum);
- void stop () { io_manager::unreg (*this); }
-
- template<class O, class M>
- sig_watcher (O object, M method)
- : callback<void(sig_watcher &)> (object, method), signum (0)
- { }
- ~sig_watcher () { stop (); }
-};
-#endif
-
-#if IOM_CHILD
-struct child_watcher : watcher, callback<void (child_watcher &, int)> {
- int /*pid_t*/ pid;
-
- void start (int pid) { this->pid = pid; io_manager::reg (*this); }
- void stop () { io_manager::unreg (*this); }
-
- template<class O, class M>
- child_watcher (O object, M method)
- : callback<void (child_watcher &, int)> (object, method), pid (0)
- { }
- ~child_watcher () { stop (); }
-};
-#endif
-
-#endif
-
+++ /dev/null
-/*
- iom_conf.h -- generic I/O multiplexer config
- Copyright (C) 2003-2006 Marc Lehmann <pcg@goof.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef RXVT_IOM_CONF_H__
-#define RXVT_IOM_CONF_H__
-
-#include "rxvtutil.h"
-
-#define IOM_IO 1
-#define IOM_TIME 1
-#define IOM_CHECK 1
-#define IOM_SIG 1
-#define IOM_IDLE 1
-#define IOM_CHILD 1
-
-#include "libptytty.h"
-#define IOM_PREINIT ptytty::sanitise_stdfd ();
-
-#endif
-
#define newSVtimer(timer) iom_new_ref ((timer)->self, IOM_CLASS "::timer")
#define SvTIMER(sv) (timer *)(perl_watcher *)SvPTR ((sv), IOM_CLASS "::timer")
-struct timer : perl_watcher, time_watcher
+struct timer : perl_watcher, ev::timer
{
- tstamp interval;
-
timer ()
- : time_watcher (this, &timer::execute)
+ : ev::timer (this, &timer::execute)
{
}
- void execute (time_watcher &w)
+ void execute (ev::timer &w, int revents)
{
- if (interval)
- start (at + interval);
-
invoke (IOM_CLASS "::timer", newSVtimer (this));
}
};
#define newSViow(iow) iom_new_ref ((iow)->self, IOM_CLASS "::iow")
#define SvIOW(sv) (iow *)(perl_watcher *)SvPTR ((sv), IOM_CLASS "::iow")
-struct iow : perl_watcher, io_watcher
+struct iow : perl_watcher, ev::io
{
iow ()
- : io_watcher (this, &iow::execute)
+ : ev::io (this, &iow::execute)
{
}
- void execute (io_watcher &w, short revents)
+ void execute (ev::io &w, int revents)
{
invoke (IOM_CLASS "::iow", newSViow (this), revents);
}
#define newSViw(iw) iom_new_ref ((iw)->self, IOM_CLASS "::iw")
#define SvIW(sv) (iw *)(perl_watcher *)SvPTR ((sv), IOM_CLASS "::iw")
-struct iw : perl_watcher, idle_watcher
+struct iw : perl_watcher, ev::idle
{
iw ()
- : idle_watcher (this, &iw::execute)
+ : ev::idle (this, &iw::execute)
{
}
- void execute (idle_watcher &w)
+ void execute (ev::idle &w, int revents)
{
invoke (IOM_CLASS "::iw", newSViw (this));
}
#define newSVpw(pw) iom_new_ref ((pw)->self, IOM_CLASS "::pw")
#define SvPW(sv) (pw *)(perl_watcher *)SvPTR ((sv), IOM_CLASS "::pw")
-struct pw : perl_watcher, child_watcher
+struct pw : perl_watcher, ev::child
{
pw ()
- : child_watcher (this, &pw::execute)
+ : ev::child (this, &pw::execute)
{
}
- void execute (child_watcher &w, int status)
+ void execute (ev::child &w, int revents)
{
- invoke (IOM_CLASS "::pw", newSVpw (this), status);
+ invoke (IOM_CLASS "::pw", newSVpw (this), w.rstatus);
}
};
IV iv;
} *civ, iom_const_iv[] = {
# define iom_const_iv(name) { # name, (IV)name }
- iom_const_iv (EVENT_NONE),
- iom_const_iv (EVENT_READ),
- iom_const_iv (EVENT_WRITE),
+ iom_const_iv (EV_NONE),
+ iom_const_iv (EV_READ),
+ iom_const_iv (EV_WRITE),
# undef iom_const
};
timer::new ()
CODE:
timer *w = new timer;
- w->start (NOW);
+ w->start (0);
RETVAL = newSVptr ((void *)(perl_watcher *)w, "IOM_CLASS::timer");
w->self = (HV *)SvRV (RETVAL);
OUTPUT:
RETVAL
IOM_CHAINED
-timer::interval (NV interval)
+timer::interval (NV repeat)
CODE:
- THIS->interval = interval;
+ THIS->repeat = repeat;
OUTPUT:
RETVAL
RETVAL
IOM_CHAINED
-timer::start (NV tstamp = THIS->at)
+timer::start (NV tstamp = ev::now ())
CODE:
- THIS->start (tstamp);
+ THIS->start (tstamp - ev::now ());
OUTPUT:
RETVAL
IOM_CHAINED
timer::after (NV delay)
CODE:
- THIS->start (NOW + delay);
+ THIS->start (delay);
OUTPUT:
RETVAL
termwin_ev (this, &rxvt_term::x_cb),
vt_ev (this, &rxvt_term::x_cb),
child_ev (this, &rxvt_term::child_cb),
- check_ev (this, &rxvt_term::check_cb),
+ prepare_ev (this, &rxvt_term::prepare_cb),
flush_ev (this, &rxvt_term::flush_cb),
destroy_ev (this, &rxvt_term::destroy_cb),
pty_ev (this, &rxvt_term::pty_cb),
// child has exited, usually destroys
void
-rxvt_term::child_cb (child_watcher &w, int status)
+rxvt_term::child_cb (ev::child &w, int status)
{
HOOK_INVOKE ((this, HOOK_CHILD_EXIT, DT_INT, status, DT_END));
vt_ev.stop (display);
}
- check_ev.stop ();
+ prepare_ev.stop ();
pty_ev.stop ();
#ifdef CURSOR_BLINK
cursor_blink_ev.stop ();
pointer_ev.stop ();
#endif
- destroy_ev.start (0);
+ destroy_ev.start ();
}
void
-rxvt_term::destroy_cb (time_watcher &w)
+rxvt_term::destroy_cb (ev::check &w, int revents)
{
make_current ();
free (cmd_argv);
if (pty->pty >= 0)
- pty_ev.start (pty->pty, EVENT_READ);
+ pty_ev.start (pty->pty, ev::READ);
- check_ev.start ();
+ prepare_ev.start ();
HOOK_INVOKE ((this, HOOK_START, DT_END));
static struct sig_handlers
{
- sig_watcher sw_term, sw_int;
+ ev::sig sw_term, sw_int;
/*
* Catch a fatal signal and tidy up before quitting
*/
void
- sig_term (sig_watcher &w)
+ sig_term (ev::sig &w, int revents)
{
rxvt_emergency_cleanup ();
- signal (w.signum, SIG_DFL);
+ w.stop ();
kill (getpid (), w.signum);
}
rxvt_init ()
{
ptytty::init ();
+ ev::ev_default_loop (0);
rxvt_environ = environ;
signal (SIGHUP, SIG_IGN);
signal (SIGPIPE, SIG_IGN);
- sig_handlers.sw_term.start (SIGTERM);
- sig_handlers.sw_int.start (SIGINT);
+ sig_handlers.sw_term.start (SIGTERM); ev::ev_unref ();
+ sig_handlers.sw_int.start (SIGINT); ev::ev_unref ();
/* need to trap SIGURG for SVR4 (Unixware) rlogin */
/* signal (SIGURG, SIG_DFL); */
{
bgPixmap.invalidate ();
- /* no chance of real time refresh if we are blurring ! */
- if (bgPixmap.invalid_since + 0.5 < NOW && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
+ /* no chance of real time refresh if we are blurring! */
+ if (bgPixmap.invalid_since + 0.5 < ev::now () && !(bgPixmap.flags & bgPixmap_t::blurNeeded))
bgPixmap.render ();
else
{
update_background_ev.stop ();
+
if (!bgPixmap.need_client_side_rendering())
- update_background_ev.start (NOW + .05);
+ update_background_ev.start (.05);
else if (bgPixmap.flags & bgPixmap_t::blurNeeded)
- update_background_ev.start (NOW + .2); /* very slow !!! */
+ update_background_ev.start (.20); /* very slow !!! */
else
- update_background_ev.start (NOW + .07);
+ update_background_ev.start (.07);
}
+
return 0;
}
void
-rxvt_term::update_background_cb (time_watcher &w)
+rxvt_term::update_background_cb (ev::timer &w, int revents)
{
bgPixmap.render ();
}
$self->{iow} = urxvt::iow
->new
->fd (fileno $fh)
- ->events (urxvt::EVENT_WRITE)
+ ->events (urxvt::EV_WRITE)
->start
->cb (sub {
if (my $len = syswrite $fh, $txt) {
$self->{iow} = urxvt::iow
->new
->fd (fileno $fh)
- ->events (urxvt::EVENT_READ)
+ ->events (urxvt::EV_READ)
->start
->cb (sub {
if (my $len = sysread $fh, $txt, 8192, length $txt) {
return if $self->{overlay};
$self->{view_start} = $self->view_start;
- $self->{pty_ev_events} = $self->pty_ev_events (urxvt::EVENT_NONE);
+ $self->{pty_ev_events} = $self->pty_ev_events (urxvt::EV_NONE);
$self->{row} = $self->nrow - 1;
$self->{search} = "(?i)";
-/*--------------------------------*-C-*---------------------------------*
+/*----------------------------------------------------------------------*
* File: rxvt.C
*----------------------------------------------------------------------*
*
#endif
return EXIT_FAILURE;
- io_manager::loop ();
+ ev::ev_loop (0);
return EXIT_SUCCESS;
}
#include "rxvtutil.h"
#include "rxvtfont.h"
#include "rxvttoolkit.h"
-#include "iom.h"
+#include "ev_cpp.h"
#include "salloc.h"
#include "libptytty.h"
#endif
#ifdef HAVE_BG_PIXMAP
int update_background ();
- void update_background_cb (time_watcher &w);
- time_watcher update_background_ev;
+ void update_background_cb (ev::timer &w, int revents);
+ ev::timer update_background_ev;
#endif
void x_cb (XEvent &xev);
xevent_watcher scrollbar_ev;
#endif
- void child_cb (child_watcher &w, int status); child_watcher child_ev;
- void check_cb (check_watcher &w); check_watcher check_ev;
- void destroy_cb (time_watcher &w); time_watcher destroy_ev;
+ void child_cb (ev::child &w, int revents); ev::child child_ev;
+ void prepare_cb (ev::prepare &w, int revents); ev::prepare prepare_ev;
+ void destroy_cb (ev::check &w, int revents); ev::check destroy_ev;
void flush ();
- void flush_cb (time_watcher &w); time_watcher flush_ev;
+ void flush_cb (ev::timer &w, int revents); ev::timer flush_ev;
bool pty_fill ();
- void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
- void incr_cb (time_watcher &w) NOTHROW; time_watcher incr_ev;
+ void pty_cb (ev::io &w, int revents); ev::io pty_ev;
+ void incr_cb (ev::timer &w, int revents) NOTHROW; ev::timer incr_ev;
#ifdef CURSOR_BLINK
- void cursor_blink_cb (time_watcher &w); time_watcher cursor_blink_ev;
+ void cursor_blink_cb (ev::timer &w, int revents); ev::timer cursor_blink_ev;
#endif
#ifdef TEXT_BLINK
- void text_blink_cb (time_watcher &w); time_watcher text_blink_ev;
+ void text_blink_cb (ev::timer &w, int revents); ev::timer text_blink_ev;
#endif
#ifndef NO_BELL
- void bell_cb (time_watcher &w); time_watcher bell_ev;
+ void bell_cb (ev::timer &w, int revents); ev::timer bell_ev;
#endif
#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
- void cont_scroll_cb (time_watcher &w); time_watcher cont_scroll_ev;
+ void cont_scroll_cb (ev::timer &w, int revents); ev::timer cont_scroll_ev;
#endif
#ifdef SELECTION_SCROLLING
- void sel_scroll_cb (time_watcher &w); time_watcher sel_scroll_ev;
+ void sel_scroll_cb (ev::timer &w, int revents); ev::timer sel_scroll_ev;
#endif
#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
- void slip_wheel_cb (time_watcher &w); time_watcher slip_wheel_ev;
+ void slip_wheel_cb (ev::timer &w, int revents); ev::timer slip_wheel_ev;
#endif
#ifdef POINTER_BLANK
- void pointer_cb (time_watcher &w); time_watcher pointer_ev;
+ void pointer_cb (ev::timer &w, int revents); ev::timer pointer_ev;
void pointer_blank ();
#endif
void pointer_unblank ();
#include "rxvt.h"
#include "rxvtdaemon.h"
#include "libptytty.h"
-#include "iom.h"
struct server : rxvt_connection {
log_callback log_cb;
getfd_callback getfd_cb;
- void read_cb (io_watcher &w, short revents); io_watcher read_ev;
+ void read_cb (ev::io &w, int revents); ev::io read_ev;
void log_msg (const char *msg);
int getfd (int remote_fd);
getfd_cb (this, &server::getfd)
{
this->fd = fd;
- read_ev.start (fd, EVENT_READ);
+ read_ev.start (fd, ev::READ);
}
void err (const char *format = 0, ...);
struct unix_listener {
int fd;
- void accept_cb (io_watcher &w, short revents); io_watcher accept_ev;
+ void accept_cb (ev::io &w, int revents); ev::io accept_ev;
unix_listener (const char *sockname);
};
exit (EXIT_FAILURE);
}
- accept_ev.start (fd, EVENT_READ);
+ accept_ev.start (fd, ev::READ);
}
-void unix_listener::accept_cb (io_watcher &w, short revents)
+void unix_listener::accept_cb (ev::io &w, int revents)
{
int fd2 = accept (fd, 0, 0);
delete this;
}
-void server::read_cb (io_watcher &w, short revents)
+void server::read_cb (ev::io &w, int revents)
{
auto_str tok;
_exit (EXIT_SUCCESS);
}
- io_manager::loop ();
+ ev::ev_loop (0);
return EXIT_SUCCESS;
}
#include "unistd.h"
-#include "iom.h"
+#include "ev_cpp.h"
#include "rxvt.h"
#include "keyboard.h"
#include "rxvtutil.h"
NV
NOW ()
CODE:
- RETVAL = NOW;
+ RETVAL = ev::now ();
OUTPUT:
RETVAL
}
int
-rxvt_term::pty_ev_events (int events = EVENT_UNDEF)
+rxvt_term::pty_ev_events (int events = ev::UNDEF)
CODE:
RETVAL = THIS->pty_ev.events;
- if (events != EVENT_UNDEF)
+ if (events != ev::UNDEF)
THIS->pty_ev.set (events);
OUTPUT:
RETVAL
{
THIS->set_option (optval, set);
- if (THIS->check_ev.is_active ()) // avoid doing this before START
+ if (THIS->prepare_ev.is_active ()) // avoid doing this before START
switch (optval)
{
case Opt_skipBuiltinGlyphs:
if (!getsockname (fd, (sockaddr *)&sa, &sl))
is_local = sa.sun_family == AF_UNIX;
- x_ev.start (fd, EVENT_READ);
+ x_ev.start (fd, ev::READ);
fcntl (fd, F_SETFD, FD_CLOEXEC);
XSelectInput (dpy, root, PropertyChangeMask);
}
#endif
-void rxvt_display::x_cb (io_watcher &w, short revents)
+void rxvt_display::x_cb (ev::io &w, int revents)
{
do
{
void rxvt_display::flush ()
{
if (XEventsQueued (dpy, QueuedAlready))
- x_cb (x_ev, EVENT_READ);
+ x_cb (x_ev, ev::READ);
XFlush (dpy);
}
# include <X11/Xft/Xft.h>
#endif
-#include "iom.h"
+#include "ev_cpp.h"
#include "rxvtlib.h"
#include "rxvtutil.h"
struct im_watcher;
struct xevent_watcher;
+template<class watcher>
+struct event_vec : vector<watcher *> {
+ void erase_unordered (unsigned int pos)
+ {
+ watcher *w = (*this)[this->size () - 1];
+ this->pop_back ();
+
+ if (!this->empty ())
+ if (((*this)[pos] = w)) // '=' is correct!
+ w->active = pos + 1;
+ }
+};
+
+struct rxvt_watcher {
+ int active; /* 0 == inactive, else index into respective vector */
+
+ bool is_active () { return active; }
+
+ rxvt_watcher () : active (0) { }
+};
+
struct refcounted {
int referenced;
char *id;
};
struct rxvt_display : refcounted {
- io_manager_vec<xevent_watcher> xw;
+ event_vec<xevent_watcher> xw;
- io_watcher x_ev; void x_cb (io_watcher &w, short revents);
+ ev::io x_ev; void x_cb (ev::io &w, int revents);
#ifdef USE_XIM
refcache<rxvt_xim> xims;
};
#ifdef USE_XIM
-struct im_watcher : watcher, callback<void (void)> {
+struct im_watcher : rxvt_watcher, callback<void (void)> {
template<class O, class M>
im_watcher (O object, M method)
: callback<void (void)> (object, method)
{
display->reg (this);
}
+
void stop (rxvt_display *display)
{
display->unreg (this);
};
#endif
-struct xevent_watcher : watcher, callback<void (XEvent &)> {
+struct xevent_watcher : rxvt_watcher, callback<void (XEvent &)> {
Window window;
template<class O, class M>
this->window = window;
display->reg (this);
}
+
void stop (rxvt_display *display)
{
display->unreg (this);
#ifndef NO_BELL
void
-rxvt_term::bell_cb (time_watcher &w)
+rxvt_term::bell_cb (ev::timer &w, int revents)
{
rvideo_bell = false;
scr_rvideo_mode (rvideo_mode);
scr_rvideo_mode (rvideo_mode);
display->flush ();
- bell_ev.start (NOW + VISUAL_BELL_DURATION);
+ bell_ev.start (VISUAL_BELL_DURATION);
}
else
XBell (dpy, 0);
{
if (!text_blink_ev.active)
{
- text_blink_ev.start (NOW + TEXT_BLINK_INTERVAL);
+ text_blink_ev.start (TEXT_BLINK_INTERVAL, TEXT_BLINK_INTERVAL);
hidden_text = 0;
}
else if (hidden_text)
selection_wait = Sel_incr;
incr_buf_fill = 0;
- incr_ev.start (NOW + 10);
+ incr_ev.start (10);
goto bailout;
}
}
else if (selection_wait == Sel_incr)
{
- incr_ev.start (NOW + 10);
+ incr_ev.start (10);
while (incr_buf_fill + ct.nitems > incr_buf_size)
{
}
void
-rxvt_term::incr_cb (time_watcher &w) NOTHROW
+rxvt_term::incr_cb (ev::timer &w, int revents) NOTHROW
{
selection_wait = Sel_none;
$term->{iow} = urxvt::iow
->new
->fd (fileno $term->{socket})
- ->events (urxvt::EVENT_READ)
+ ->events (urxvt::EV_READ)
->start
->cb (sub {
my ($iow, $revents) = @_;
=item $iow = $iow->events ($eventmask)
Set the event mask to watch. The only allowed values are
-C<urxvt::EVENT_READ> and C<urxvt::EVENT_WRITE>, which might be ORed
-together, or C<urxvt::EVENT_NONE>.
+C<urxvt::EV_READ> and C<urxvt::EV_WRITE>, which might be ORed
+together, or C<urxvt::EV_NONE>.
=item $iow = $iow->start