Commit 81651aee authored by Ryan Kavanagh's avatar Ryan Kavanagh

Imported Upstream version 9.22

parent 5c927cb5
......@@ -24,7 +24,6 @@ TODO: xdbe
TODO: optimise bg reeval for resize for common patterns (pixmap bigger than window?)
TODO: pack rxvt_fatal messages into the exception object
TODO: load must not cache, but global image cache must be cleaned
TODO: provide something like % for easy access for parse_keysym
TODO: description into --help output?
TODO: rxvt -help => (see rxvt-XXX(1))?
TODO: xor_rect should shift right
......@@ -39,6 +38,45 @@ TODO: c&c perl socket via daemon-ext mechanism
TODO: simplify extension metainfo cache, cache on disk
TODO: URxvt::Ext::Name installs urxvt ext name and provides pod/manpage for URxvt::Ext::Name
9.22 Sat Jan 23 21:07:33 CET 2016
- NOTICE: this release updates terminfo.
- add terminfo capabilities for various ctrl and shift-ctrl key variants
(patch by Sebastian Schmidt).
- fix longstanding core font encoding bug where some character
ranges could not be mapped from unicode to the font: affected
encodings are big5, gb2312, iso8859-8 (hebrew), jis0201 and
ksc5601 (reported by Mikachu).
- fix crash when the number of columns is 1 and a 0 width character is inserted
(reported by Kuang-che Wu).
- fix a crash when parsing an invalid color specification (reported by Kuang-che Wu).
- fix a buffer overflow in font name parser (reported by Kuang-che Wu).
- do not start blinking cursor if the window is unfocused (reported by
Devin J. Pohly).
- change the width of underline and i-beam cursor to 2 pixels (based on
a patch by Omar Sandoval).
- add pointerShape resource to change the mouse pointer shape
(based on a patch by Brian Watson).
- a keysym resource for a key which is already bound to an
action now properly rebinds the key.
- do not report mouse motion events if Shift is active (patch by Daniel Hahler).
- put the alpha component last in responses to OSC color queries
(patch by Benjamin Herr).
- the key_press hook is now invoked before processing the
event, as documented. This change was done in 9.21 but not
announced and fixes debian bugs #511377, #531751 and red hat
bug #1105069. Note that this change breaks a few scripts,
such as mark-yank-urls, which rely on the previous buggy
behaviour that urxvt processes the event (in particular
keysym bindings) before invoking the hook.
- the tabbed extension now properly refreshes the active tab
on a key press when the mouse pointer is outside the terminal
window.
- add 'lookup_keysym' perl method to lookup the action bound
to a key combination.
- a key combination bound to 'matcher:select' can now be used
to cycle through the matches in matcher.
- change perl integer accessors (->width et al.) into mutators.
9.21 Wed Dec 31 14:50:03 CET 2014
- the "moa redraw 8-bit british vintage colour management" release.
- NOTICE: this release updates terminfo.
......
......@@ -484,9 +484,12 @@ xterm? I need this to decide about setting colours etc.
This will keep the default extensions, but disable the two popup
extensions. Some extensions can also be configured, for example,
scrollback search mode is triggered by M-s. You can move it to any other
combination either by setting the searchable-scrollback resource:
combination by adding a keysym resource that binds the desired
combination to the "start" action of "searchable-scrollback" and another
one that binds M-s to the "builtin:" action:
URxvt.searchable-scrollback: CM-s
URxvt.keysym.CM-s: searchable-scrollback:start
URxvt.keysym.M-s: builtin:
The cursor moves when selecting text in the current input line, how do I switch this off?
See next entry.
......@@ -827,8 +830,8 @@ xterm? I need this to decide about setting colours etc.
I need a termcap file entry.
One reason you might want this is that some distributions or operating
systems still compile some programs using the long-obsoleted termcap
library (Fedora Core's bash is one example) and rely on a termcap entry
for "rxvt-unicode".
library (Fedora's bash is one example) and rely on a termcap entry for
"rxvt-unicode".
You could use rxvt's termcap entry with reasonable results in many
cases. You can also create a termcap entry by using terminfo's infocmp
......
m4_include([libptytty/ptytty.m4])
dnl maybe import pkg.m4 and use PKG_CHECK_MODULES in place of this macro
AC_DEFUN([RXVT_CHECK_MODULES],
[
AC_MSG_CHECKING(for $2)
if test $PKG_CONFIG != no && $PKG_CONFIG --exists $2; then
$1[]_CFLAGS="`$PKG_CONFIG --cflags $2`"
$1[]_LIBS="`$PKG_CONFIG --libs $2`"
AC_MSG_RESULT(ok)
$3
else
AC_MSG_RESULT(no)
$4
fi
])
......@@ -250,6 +250,9 @@
/* Define to 1 if you have the `XftDrawString32' function. */
#undef HAVE_XFTDRAWSTRING32
/* Define to enable Xmu support */
#undef HAVE_XMU
/* Define if setlocale (defined to Xsetlocale) works */
#undef HAVE_XSETLOCALE
......
This diff is collapsed.
......@@ -295,10 +295,11 @@ AC_ARG_ENABLE(delete-key,
AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key)
fi])
support_resources=yes
AC_ARG_ENABLE(resources,
[ --disable-resources disable all resource checking],
[if test x$enableval = xno; then
AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read)
support_resources=no
fi])
AC_ARG_ENABLE(8bitctrls,
......@@ -412,6 +413,14 @@ AC_ARG_WITH(terminfo,
AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval"
fi])
if test x$support_resources = xno; then
if test x$support_frills = xyes || test x$support_perl = xyes; then
AC_MSG_ERROR([--disable-resources requires --disable-frills --disable-perl])
fi
AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read)
fi
dnl# --------------------------------------------------------------------------
LIBEV_M4_AVOID_LIBRT=1
......@@ -423,28 +432,18 @@ AC_PATH_PROG(TIC, tic, :)
AC_PATH_XTRA
AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
image_lib=none
PIXBUF_CFLAGS=
PIXBUF_LIBS=
if test x$support_pixbuf = xyes; then
support_pixbuf=no
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_MSG_CHECKING(for gdk-pixbuf)
if test $PKG_CONFIG != no && $PKG_CONFIG --exists gdk-pixbuf-2.0; then
PIXBUF_CFLAGS="`$PKG_CONFIG gdk-pixbuf-2.0 --cflags`"
PIXBUF_LIBS="`$PKG_CONFIG gdk-pixbuf-2.0 --libs`"
support_pixbuf=yes
fi
if test x$support_pixbuf = xyes; then
AC_MSG_RESULT(ok)
RXVT_CHECK_MODULES([PIXBUF], [gdk-pixbuf-2.0], [
image_lib=gdk-pixbuf
AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing)
else
AC_MSG_RESULT(no)
fi
], [:])
fi
AC_SUBST(PIXBUF_CFLAGS)
......@@ -454,26 +453,22 @@ STARTUP_NOTIFICATION_CFLAGS=
STARTUP_NOTIFICATION_LIBS=
if test x$support_startup_notification = xyes; then
support_startup_notification=no
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_MSG_CHECKING(for libstartup-notification)
if test $PKG_CONFIG != no && $PKG_CONFIG --exists libstartup-notification-1.0; then
STARTUP_NOTIFICATION_CFLAGS="`$PKG_CONFIG libstartup-notification-1.0 --cflags`"
STARTUP_NOTIFICATION_LIBS="`$PKG_CONFIG libstartup-notification-1.0 --libs`"
support_startup_notification=yes
fi
if test x$support_startup_notification = xyes; then
AC_MSG_RESULT(ok)
RXVT_CHECK_MODULES([STARTUP_NOTIFICATION], [libstartup-notification-1.0], [
AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, Define if freedesktop startup notifications should be supported)
else
AC_MSG_RESULT(no)
fi
], [:])
fi
AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
AC_SUBST(STARTUP_NOTIFICATION_LIBS)
if test x$support_frills = xyes; then
RXVT_CHECK_MODULES([XMU], [xmu], [
X_LIBS="$XMU_LIBS $X_LIBS"
CPPFLAGS="$CPPFLAGS $XMU_CFLAGS"
AC_DEFINE(HAVE_XMU, 1, Define to enable Xmu support)
], [:])
fi
dnl# --------------------------------------------------------------------------
dnl# CHECKING FOR HEADER FILES
dnl# --------------------------------------------------------------------------
......@@ -593,10 +588,9 @@ if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then
fi
if test x$support_xft = xyes || test x$support_image = xyes; then
rxvt_have_xrender=no
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test $PKG_CONFIG != no && $PKG_CONFIG --exists xrender; then
X_LIBS="`$PKG_CONFIG xrender --libs` $X_LIBS"
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xrender --cflags`"
RXVT_CHECK_MODULES([XRENDER], [xrender], [
X_LIBS="$XRENDER_LIBS $X_LIBS"
CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
rxvt_have_xrender=yes
save_LIBS="$LIBS"
......@@ -604,26 +598,20 @@ if test x$support_xft = xyes || test x$support_image = xyes; then
AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no])
AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no])
LIBS="$save_LIBS"
fi
], [:])
fi
if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then
X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS"
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`"
else
RXVT_CHECK_MODULES([XFT], [fontconfig xft], [
X_LIBS="$XFT_LIBS $X_LIBS"
CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
], [
AC_PATH_PROG(XFT_CONFIG, xft-config, no)
if test $XFT_CONFIG != no; then
X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
fi
fi
if test $PKG_CONFIG != no && $PKG_CONFIG --exists fontconfig; then
X_LIBS="`$PKG_CONFIG fontconfig --libs` $X_LIBS"
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG fontconfig --cflags`"
fi
])
save_LIBS="$LIBS"
LIBS="$LIBS $X_LIBS"
......
......@@ -54,13 +54,34 @@ rxvt-unicode|rxvt-unicode terminal (X Window System),
is1=\E[\041p,
is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l,
kDC=\E[3$,
kDC5=\E[3\^,
kDC6=\E[3@,
kDN=\E[b,
kDN5=\EOb,
kIC=\E[2$,
kIC5=\E[2\^,
kIC6=\E[2@,
kEND=\E[8$,
kEND5=\E[8\^,
kEND6=\E[8@,
kFND=\E[1$,
kFND5=\E[1\^,
kFND6=\E[1@,
kHOM=\E[7$,
kHOM5=\E[7\^,
kHOM6=\E[7@,
kLFT=\E[d,
kLFT5=\EOd,
kNXT=\E[6$,
kNXT5=\E[6\^,
kNXT6=\E[6@,
kPRV=\E[5$,
kPRV5=\E[5\^,
kPRV6=\E[5@,
kRIT=\E[c,
kRIT5=\EOc,
kUP=\E[a,
kUP5=\EOa,
kbs=\177,
ka1=\EOw,
ka3=\EOy,
......
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "@@RXVT_NAME@@ 1"
.TH @@RXVT_NAME@@ 1 "2014-12-31" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.TH @@RXVT_NAME@@ 1 "2016-01-23" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -465,6 +465,9 @@ Capture system console messages.
.IX Item "-pt style"
Compile \fI\s-1XIM\s0\fR: input style for input method; \fBOverTheSpot\fR,
\&\fBOffTheSpot\fR, \fBRoot\fR; resource \fBpreeditType\fR.
.Sp
If the perl extension \f(CW\*(C`xim\-onthespot\*(C'\fR is used (which is the default),
then additionally the \f(CW\*(C`OnTheSpot\*(C'\fR preedit type is available.
.IP "\fB\-im\fR \fItext\fR" 4
.IX Item "-im text"
Compile \fI\s-1XIM\s0\fR: input method name. resource \fBinputMethod\fR.
......@@ -904,8 +907,7 @@ are not passed onto the shell; option \fB\-sk\fR. \fBFalse\fR: do not scroll to
bottom when a non-special key is pressed; option \fB+sk\fR.
.IP "\fBsaveLines:\fR \fInumber\fR" 4
.IX Item "saveLines: number"
Save \fInumber\fR lines in the scrollback buffer [default 64]. This
resource is limited on most machines to 65535; option \fB\-sl\fR.
Save \fInumber\fR lines in the scrollback buffer [default 1000]; option \fB\-sl\fR.
.IP "\fBinternalBorder:\fR \fInumber\fR" 4
.IX Item "internalBorder: number"
Internal border of \fInumber\fR pixels. This resource is limited to 100;
......@@ -963,6 +965,11 @@ Mouse pointer foreground colour.
.IP "\fBpointerColor2:\fR \fIcolour\fR" 4
.IX Item "pointerColor2: colour"
Mouse pointer background colour.
.IP "\fBpointerShape:\fR \fIstring\fR" 4
.IX Item "pointerShape: string"
Compile \fIfrills\fR: Specifies the name of the mouse pointer shape
[default \fBxterm\fR]. See the macros in the \fBX11/cursorfont.h\fR include
file for possible values (omit the \f(CW\*(C`XC_\*(C'\fR prefix).
.IP "\fBpointerBlankDelay:\fR \fInumber\fR" 4
.IX Item "pointerBlankDelay: number"
Specifies number of seconds before blanking the pointer [default 2]. Use a
......@@ -994,7 +1001,7 @@ be used. If not specified, the built-in default is used:
\&\fB\s-1BACKSLASH\s0 `"'&()*,;<=>?@[]^{|}\fR
.IP "\fBpreeditType:\fR \fIstyle\fR" 4
.IX Item "preeditType: style"
\&\fBOverTheSpot\fR, \fBOffTheSpot\fR, \fBRoot\fR; option \fB\-pt\fR.
\&\fBOnTheSpot\fR, \fBOverTheSpot\fR, \fBOffTheSpot\fR, \fBRoot\fR; option \fB\-pt\fR.
.IP "\fBinputMethod:\fR \fIname\fR" 4
.IX Item "inputMethod: name"
\&\fIname\fR of inputMethod to use; option \fB\-im\fR.
......
......@@ -382,6 +382,9 @@ Capture system console messages.
Compile I<XIM>: input style for input method; B<OverTheSpot>,
B<OffTheSpot>, B<Root>; resource B<preeditType>.
If the perl extension C<xim-onthespot> is used (which is the default),
then additionally the C<OnTheSpot> preedit type is available.
=item B<-im> I<text>
Compile I<XIM>: input method name. resource B<inputMethod>.
......@@ -870,8 +873,7 @@ bottom when a non-special key is pressed; option B<+sk>.
=item B<saveLines:> I<number>
Save I<number> lines in the scrollback buffer [default 64]. This
resource is limited on most machines to 65535; option B<-sl>.
Save I<number> lines in the scrollback buffer [default 1000]; option B<-sl>.
=item B<internalBorder:> I<number>
......@@ -944,6 +946,12 @@ Mouse pointer foreground colour.
Mouse pointer background colour.
=item B<pointerShape:> I<string>
Compile I<frills>: Specifies the name of the mouse pointer shape
[default B<xterm>]. See the macros in the B<X11/cursorfont.h> include
file for possible values (omit the C<XC_> prefix).
=item B<pointerBlankDelay:> I<number>
Specifies number of seconds before blanking the pointer [default 2]. Use a
......@@ -979,7 +987,7 @@ B<< BACKSLASH `"'&()*,;<=>?@[]^{|} >>
=item B<preeditType:> I<style>
B<OverTheSpot>, B<OffTheSpot>, B<Root>; option B<-pt>.
B<OnTheSpot>, B<OverTheSpot>, B<OffTheSpot>, B<Root>; option B<-pt>.
=item B<inputMethod:> I<name>
......
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "@@RXVT_NAME@@ 7"
.TH @@RXVT_NAME@@ 7 "2014-12-31" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.TH @@RXVT_NAME@@ 7 "2016-01-23" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -747,10 +747,13 @@ this \fBperl-ext-common\fR resource:
This will keep the default extensions, but disable the two popup
extensions. Some extensions can also be configured, for example,
scrollback search mode is triggered by \fBM\-s\fR. You can move it to any
other combination either by setting the \fBsearchable-scrollback\fR resource:
other combination by adding a \fBkeysym\fR resource that binds the desired
combination to the \f(CW\*(C`start\*(C'\fR action of \f(CW\*(C`searchable\-scrollback\*(C'\fR and another
one that binds \fBM\-s\fR to the \f(CW\*(C`builtin:\*(C'\fR action:
.PP
.Vb 1
\& URxvt.searchable\-scrollback: CM\-s
.Vb 2
\& URxvt.keysym.CM\-s: searchable\-scrollback:start
\& URxvt.keysym.M\-s: builtin:
.Ve
.PP
\fIThe cursor moves when selecting text in the current input line, how do I switch this off?\fR
......@@ -1168,7 +1171,7 @@ See next entry.
.PP
One reason you might want this is that some distributions or operating
systems still compile some programs using the long-obsoleted termcap
library (Fedora Core's bash is one example) and rely on a termcap entry
library (Fedora's bash is one example) and rely on a termcap entry
for \f(CW\*(C`rxvt\-unicode\*(C'\fR.
.PP
You could use rxvt's termcap entry with reasonable results in many cases.
......
......@@ -541,9 +541,12 @@ this B<perl-ext-common> resource:
This will keep the default extensions, but disable the two popup
extensions. Some extensions can also be configured, for example,
scrollback search mode is triggered by B<M-s>. You can move it to any
other combination either by setting the B<searchable-scrollback> resource:
other combination by adding a B<keysym> resource that binds the desired
combination to the C<start> action of C<searchable-scrollback> and another
one that binds B<M-s> to the C<builtin:> action:
URxvt.searchable-scrollback: CM-s
URxvt.keysym.CM-s: searchable-scrollback:start
URxvt.keysym.M-s: builtin:
=head3 The cursor moves when selecting text in the current input line, how do I switch this off?
......@@ -902,7 +905,7 @@ See next entry.
One reason you might want this is that some distributions or operating
systems still compile some programs using the long-obsoleted termcap
library (Fedora Core's bash is one example) and rely on a termcap entry
library (Fedora's bash is one example) and rely on a termcap entry
for C<rxvt-unicode>.
You could use rxvt's termcap entry with reasonable results in many cases.
......
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "@@RXVT_NAME@@ 1"
.TH @@RXVT_NAME@@ 1 "2014-12-31" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.TH @@RXVT_NAME@@ 1 "2016-01-23" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.30)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "@@RXVT_NAME@@ 1"
.TH @@RXVT_NAME@@ 1 "2014-12-31" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.TH @@RXVT_NAME@@ 1 "2016-01-23" "@@RXVT_VERSION@@" "RXVT-UNICODE"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -12,10 +12,23 @@ TODO: document file descriptor usage per loop
TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork
TODO: embed watchers need updating when fd changes
TODO: document portability requirements for atomic pointer access
TODO: possible cb aliasing?
TODO: document requirements for function pointers and calling conventions.
4.22 Sun Dec 20 22:11:50 CET 2015
- when epoll detects unremovable fds in the fd set, rebuild
only the epoll descriptor, not the signal pipe, to avoid
SIGPIPE in ev_async_send. This doesn't solve it on fork,
so document what needs to be done in ev_loop_fork
(analyzed by Benjamin Mahler).
- remove superfluous sys/timeb.h include on win32
(analyzed by Jason Madden).
- updated libecb.
4.20 Sat Jun 20 13:01:43 CEST 2015
- prefer noexcept over throw () with C++ 11.
- update ecb.h due to incompatibilities with c11.
- fix a potential aliasing issue when reading and writing
watcher callbacks.
4.19 Thu Sep 25 08:18:25 CEST 2014
- ev.h wasn't valid C++ anymore, which tripped compilers other than
......
......@@ -575,7 +575,7 @@ namespace ev {
}
#endif
/* using a template here would require quite a bit more lines,
/* using a template here would require quite a few more lines,
* so a macro solution was chosen */
#define EV_BEGIN_WATCHER(cppstem,cstem) \
\
......
This diff is collapsed.
/*
* libev native API header
*
* Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
* Copyright (c) 2007,2008,2009,2010,2011,2012,2015 Marc Alexander Lehmann <libev@schmorp.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
......@@ -152,6 +152,8 @@ EV_CPP(extern "C" {)
typedef double ev_tstamp;
#include <string.h> /* for memmove */
#ifndef EV_ATOMIC_T
# include <signal.h>
# define EV_ATOMIC_T sig_atomic_t volatile
......@@ -209,7 +211,7 @@ struct ev_loop;
/*****************************************************************************/
#define EV_VERSION_MAJOR 4
#define EV_VERSION_MINOR 19
#define EV_VERSION_MINOR 22
/* eventmask, revents, events... */
enum {
......@@ -664,7 +666,7 @@ EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW;
EV_API_DECL void *ev_userdata (EV_P) EV_THROW;
typedef void (*ev_loop_callback)(EV_P);
EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ ev_loop_callback invoke_pending_cb) EV_THROW;
/* C++ doesn't allow the use of the ev_loop_callback typedef here, so we need to spell it out*/
/* C++ doesn't allow the use of the ev_loop_callback typedef here, so we need to spell it out */
EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW;
EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */
......@@ -719,7 +721,8 @@ EV_API_DECL void ev_resume (EV_P) EV_THROW;
#define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */
#define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */
#define ev_cb(ev) (ev)->cb /* rw */
#define ev_cb_(ev) (ev)->cb /* rw */
#define ev_cb(ev) (memmove (&ev_cb_ (ev), &((ev_watcher *)(ev))->cb, sizeof (ev_cb_ (ev))), (ev)->cb)
#if EV_MINPRI == EV_MAXPRI
# define ev_priority(ev) ((ev), EV_MINPRI)
......@@ -732,7 +735,7 @@ EV_API_DECL void ev_resume (EV_P) EV_THROW;
#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at)
#ifndef ev_set_cb
# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)
# define ev_set_cb(ev,cb_) (ev_cb_ (ev) = (cb_), memmove (&((ev_watcher *)(ev))->cb, &ev_cb_ (ev), sizeof (ev_cb_ (ev))))
#endif
/* stopping (enabling, adding) a watcher does nothing if it is already running */
......
......@@ -179,7 +179,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
if (expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32)))
{
/* recreate kernel state */
postfork = 1;
postfork |= 2;
continue;
}
......@@ -203,7 +203,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
/* which is fortunately easy to do for us. */
if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev))
{
postfork = 1; /* an error occurred, recreate kernel state */
postfork |= 2; /* an error occurred, recreate kernel state */
continue;
}
}
......
......@@ -39,9 +39,6 @@
#ifdef _WIN32
/* timeb.h is actually xsi legacy functionality */
#include <sys/timeb.h>
/* note: the comment below could not be substantiated, but what would I care */
/* MSDN says this is required to handle SIGFPE */
/* my wild guess would be that using something floating-pointy is required */
......@@ -91,6 +88,8 @@ ev_pipe (int filedes [2])
if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
goto fail;
/* TODO: returns INVALID_SOCKET on winsock accept, not < 0. fix it */
/* when convenient, probably by just removing error checking altogether? */
if ((sock [1] = accept (listener, 0, 0)) < 0)
goto fail;
......
1.7
- fix m4 underquoting bug that prevented utmpx detection from
working on systems without the utmp.h header, such as
freebsd 9 and newer.
- fix ptytty::get hang on AIX.
- ptytty::get on Solaris no longer makes the tty controlling
when the calling process does not have a controlling
terminal. Bug introduced in ptytty-1.4.
1.7 Thu Mar 19 22:04:33 CET 2015
- fix various bugs that prevented the lib from working correctly on
some systems when using the helper process.
- fix compilation on solaris with g++ >= 4.7.
......
......@@ -105,7 +105,7 @@ dnl# --------------------------------------------------------------------------
dnl# check for host field in utmp structure
dnl# --------------------------------------------
AC_CHECK_HEADERS(utmp.h,
AC_CHECK_HEADERS(utmp.h, [
AC_CHECK_TYPES([struct utmp], [], [], [
#include <sys/types.h>
#include <utmp.h>
......@@ -122,11 +122,11 @@ AC_CHECK_MEMBER([struct utmp.ut_pid],
#include <sys/types.h>
#include <utmp.h>
])
) dnl# AC_CHECK_HEADERS(utmp.h
]) dnl# AC_CHECK_HEADERS(utmp.h
dnl# --------------------------------------------
AC_CHECK_HEADERS(utmpx.h,
AC_CHECK_HEADERS(utmpx.h, [
AC_CHECK_TYPES([struct utmpx], [], [], [
#include <sys/types.h>
#include <utmpx.h>
......@@ -137,7 +137,7 @@ AC_CHECK_MEMBER([struct utmpx.ut_host],
#include <sys/types.h>
#include <utmpx.h>
])
) dnl# AC_CHECK_HEADERS(utmpx.h
]) dnl# AC_CHECK_HEADERS(utmpx.h
dnl# --------------------------------------------------------------------------
dnl# check for struct lastlog
......
This diff is collapsed.
......@@ -297,7 +297,7 @@ ptytty::sanitise_stdfd ()
fd2 = open ("/dev/null", fd ? O_WRONLY : O_RDONLY);
if (fd2 != fd)
abort ();
PTYTTY_FATAL ("unable to sanitise fds, aborting.\n");
}
}
......
......@@ -352,23 +352,41 @@ ptytty_unix::get ()
* ldterm: standard terminal line discipline.
* ttcompat: V7, 4BSD and XENIX STREAMS compatibility module.
*
* After we push the STREAMS modules, the first open () on the slave side
* should make the "ptem" (or "ldterm" depending upon either which OS
* version or which set of manual pages you have) module give us a
* controlling terminal. We must already have close ()d the master side
* fd in this child process before we push STREAMS modules on because the
* documentation is really unclear about whether it is any close () on
* the master side or the last close () - i.e. a proper STREAMS dismantling
* close () - on the master side which causes a hang up to be sent
* through - Geoff Wing
* On Solaris, a process can acquire a controlling terminal in the
* following ways:
* - open() of /dev/ptmx or of a slave device without O_NOCTTY
* - I_PUSH ioctl() of the "ptem" or "ldterm" module on a slave device
* The second case is problematic, because it cannot be disabled.
* Fortunately, Solaris (10 and 11 at least) provides an undocumented
* __IPUSH_NOCTTY ioctl which does not have this side-effect, so we
* use it if defined. See
* https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/os/streamio.c#L3755
* https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/io/ptem.c#L203
* https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/io/ldterm.c#L794
* Note that an open() of a slave device autoloads the modules,
* with __I_PUSH_NOCTTY, if xpg[46] mode is enabled (which requires
* linking /usr/lib/values-xpg[46].o).
* https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libc/port/sys/open.c#L173
*/
#ifdef __I_PUSH_NOCTTY
# define PT_I_PUSH __I_PUSH_NOCTTY
#else
# define PT_I_PUSH I_PUSH
#endif
#if defined(HAVE_ISASTREAM) && defined(HAVE_STROPTS_H)
if (isastream (tty) == 1)
# endif
{
ioctl (tty, I_PUSH, "ptem");
ioctl (tty, I_PUSH, "ldterm");
ioctl (tty, I_PUSH, "ttcompat");
if (!ioctl (tty, I_FIND, "ptem"))
ioctl (tty, PT_I_PUSH, "ptem");
if (!ioctl (tty, I_FIND, "ldterm"))
ioctl (tty, PT_I_PUSH, "ldterm");
if (!ioctl (tty, I_FIND, "ttcompat"))
ioctl (tty, PT_I_PUSH, "ttcompat");
}
#endif
......
......@@ -28,7 +28,7 @@
* - Ctrl/Mod4+Tab works like Meta+Tab (options)
* Copyright (c) 2003 Rob McMullen <robm@flipturn.org>
* Copyright (c) 2003-2014 Marc Lehmann <schmorp@schmorp.de>
* Copyright (c) 2007 Emanuele Giaquinta <e.giaquinta@glauco.it>
* Copyright (c) 2007,2015 Emanuele Giaquinta <e.giaquinta@glauco.it>
*
* 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
......@@ -1036,6 +1036,9 @@ rxvt_term::flush_cb (ev::timer &w, int revents)
void
rxvt_term::cursor_blink_reset ()
{
if (!focus)
return;
if (hidden_cursor)
{
hidden_cursor = 0;
......@@ -1611,8 +1614,9 @@ rxvt_term::x_cb (XEvent &ev)
if (hidden_pointer)
pointer_unblank ();
#endif
if ((priv_modes & PrivMode_MouseBtnEvent && ev.xbutton.state & (Button1Mask|Button2Mask|Button3Mask))
|| priv_modes & PrivMode_MouseAnyEvent)
if (!bypass_keystate
&& ((priv_modes & PrivMode_MouseBtnEvent && ev.xbutton.state & (Button1Mask|Button2Mask|Button3Mask))
|| priv_modes & PrivMode_MouseAnyEvent))
mouse_report (ev.xbutton);
if ((priv_modes & PrivMode_mouse_report) && !bypass_keystate)
break;
......@@ -1634,9 +1638,9 @@ rxvt_term::x_cb (XEvent &ev)
&ev.xbutton.state);
#ifdef MOUSE_THRESHOLD
/* deal with a `jumpy' mouse */
if ((ev.xmotion.time - MEvent.time) > MOUSE_THRESHOLD)
{
if (ev.xmotion.time - MEvent.time > MOUSE_THRESHOLD)
#endif
{
#if ISO_14755
// 5.4
if (iso14755buf & (ISO_14755_STARTED | ISO_14755_54))
......@@ -1695,9 +1699,7 @@ rxvt_term::x_cb (XEvent &ev)
sel_scroll_ev.stop();
}
#endif
#ifdef MOUSE_THRESHOLD
}
#endif
}
}
else if (scrollBar.state == SB_STATE_MOTION && ev.xany.window == scrollBar.win)
......@@ -3338,7 +3340,7 @@ rxvt_term::process_color_seq (int report, int color, const char *str, char resp)
#if XFT
if (c.a != rgba::MAX_CC)
tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.a, c.r, c.g, c.b, resp);
tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.r, c.g, c