"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/rxvtperl.xs" between
rxvt-unicode-9.26.tar.bz2 and rxvt-unicode-9.29.tar.bz2

About: rxvt-unicode is a clone of the terminal emulator rxvt.

rxvtperl.xs  (rxvt-unicode-9.26.tar.bz2):rxvtperl.xs  (rxvt-unicode-9.29.tar.bz2)
skipping to change at line 534 skipping to change at line 534
{ {
if (THIS->perl.grabtime) if (THIS->perl.grabtime)
{ {
XUngrabKeyboard (THIS->dpy, THIS->perl.grabtime); XUngrabKeyboard (THIS->dpy, THIS->perl.grabtime);
XUngrabPointer (THIS->dpy, THIS->perl.grabtime); XUngrabPointer (THIS->dpy, THIS->perl.grabtime);
THIS->perl.grabtime = 0; THIS->perl.grabtime = 0;
} }
} }
bool bool
rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) rxvt_perl_interp::invoke (rxvt_term *term, int htype, ...)
{ {
if (!perl || !term->perl.self) if (!perl || !term->perl.self)
return false; return false;
localise_env set_environ (perl_environ); localise_env set_environ (perl_environ);
// pre-handling of some events // pre-handling of some events
if (htype == HOOK_REFRESH_END) if (htype == HOOK_REFRESH_END)
{ {
AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_over lay", 8, 0)); AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_over lay", 8, 0));
skipping to change at line 826 skipping to change at line 826
HV *stash = gv_stashpv ("urxvt", 1); HV *stash = gv_stashpv ("urxvt", 1);
static const struct { static const struct {
const char *name; const char *name;
IV iv; IV iv;
} *civ, const_iv[] = { } *civ, const_iv[] = {
# define const_iv(name) { # name, (IV)name } # define const_iv(name) { # name, (IV)name }
const_iv (HOOK_INIT), const_iv (HOOK_INIT),
const_iv (HOOK_DESTROY), const_iv (HOOK_DESTROY),
const_iv (HOOK_ACTION), const_iv (HOOK_ACTION),
const_iv (HOOK_OSC_SEQ),
const_iv (HOOK_OSC_SEQ_PERL),
const_iv (NUM_RESOURCES), const_iv (NUM_RESOURCES),
const_iv (DEFAULT_RSTYLE), const_iv (DEFAULT_RSTYLE),
const_iv (OVERLAY_RSTYLE), const_iv (OVERLAY_RSTYLE),
const_iv (Color_Bits), const_iv (Color_Bits),
const_iv (RS_bgShift), const_iv (RS_bgMask), const_iv (RS_bgShift), const_iv (RS_bgMask),
const_iv (RS_fgShift), const_iv (RS_fgMask), const_iv (RS_fgShift), const_iv (RS_fgMask),
const_iv (RS_Careful), const_iv (RS_Careful),
const_iv (RS_fontCount), const_iv (RS_fontCount),
const_iv (RS_fontShift), const_iv (RS_fontShift),
skipping to change at line 1377 skipping to change at line 1379
free (wstr); free (wstr);
} }
OUTPUT: OUTPUT:
RETVAL RETVAL
SV * SV *
rxvt_term::locale_encode (SV *str) rxvt_term::locale_encode (SV *str)
CODE: CODE:
{ {
if (!SvOK (str))
XSRETURN_UNDEF;
wchar_t *wstr = sv2wcs (str); wchar_t *wstr = sv2wcs (str);
rxvt_push_locale (THIS->locale); rxvt_push_locale (THIS->locale);
char *mbstr = rxvt_wcstombs (wstr); char *mbstr = rxvt_wcstombs (wstr);
rxvt_pop_locale (); rxvt_pop_locale ();
free (wstr); free (wstr);
RETVAL = newSVpv (mbstr, 0); RETVAL = newSVpv (mbstr, 0);
free (mbstr); free (mbstr);
} }
OUTPUT: OUTPUT:
RETVAL RETVAL
SV * SV *
rxvt_term::locale_decode (SV *octets) rxvt_term::locale_decode (SV *octets)
CODE: CODE:
{ {
if (!SvOK (octets))
XSRETURN_UNDEF;
STRLEN len; STRLEN len;
char *data = SvPVbyte (octets, len); char *data = SvPVbyte (octets, len);
rxvt_push_locale (THIS->locale); rxvt_push_locale (THIS->locale);
wchar_t *wstr = rxvt_mbstowcs (data, len); wchar_t *wstr = rxvt_mbstowcs (data, len);
rxvt_pop_locale (); rxvt_pop_locale ();
RETVAL = wcs2sv (wstr); RETVAL = wcs2sv (wstr);
free (wstr); free (wstr);
} }
skipping to change at line 1567 skipping to change at line 1575
U32 U32
rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle)
CODE: CODE:
RETVAL = THIS->rstyle; RETVAL = THIS->rstyle;
THIS->rstyle = new_rstyle; THIS->rstyle = new_rstyle;
OUTPUT: OUTPUT:
RETVAL RETVAL
int int
rxvt_term::view_start (int newval = 1) rxvt_term::view_start (int newval = 0)
PROTOTYPE: $;$ PROTOTYPE: $;$
CODE: CODE:
{ {
RETVAL = THIS->view_start; RETVAL = THIS->view_start;
if (items > 1)
if (newval <= 0) THIS->scr_changeview (newval);
THIS->scr_changeview (max (newval, THIS->top_row));
} }
OUTPUT: OUTPUT:
RETVAL RETVAL
void void
rxvt_term::set_urgency (bool enable) rxvt_term::set_urgency (bool enable)
void void
rxvt_term::focus_in () rxvt_term::focus_in ()
skipping to change at line 1794 skipping to change at line 1801
CODE: CODE:
{ {
wchar_t *wstr = sv2wcs (text); wchar_t *wstr = sv2wcs (text);
int dlen = 0; int dlen = 0;
// find length // find length
for (wchar_t *s = wstr; *s; s++) for (wchar_t *s = wstr; *s; s++)
if (*s == NOCHAR) if (*s == NOCHAR)
; ;
else if (IS_COMPOSE (*s)) else if (IS_COMPOSE (*s))
dlen += rxvt_composite.expand (*s, 0); dlen += rxvt_composite.expand (*s);
else else
dlen++; dlen++;
wchar_t *rstr = rxvt_temp_buf<wchar_t> (dlen); wchar_t *rstr = rxvt_temp_buf<wchar_t> (dlen);
// decode // decode
wchar_t *r = rstr; wchar_t *r = rstr;
for (wchar_t *s = wstr; *s; s++) for (wchar_t *s = wstr; *s; s++)
if (*s == NOCHAR) if (*s == NOCHAR)
; ;
 End of changes. 7 change blocks. 
6 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)