--- rxvt-unicode/src/rxvtperl.xs 2015/02/17 14:48:59 1.235 +++ rxvt-unicode/src/rxvtperl.xs 2019/06/25 03:35:01 1.244 @@ -293,7 +293,7 @@ for (; i < AvFILL (overlay_av); i++) av_store (overlay_av, i, SvREFCNT_inc (*av_fetch (overlay_av, i + 1, 0))); - av_pop (overlay_av); + SvREFCNT_dec (av_pop (overlay_av)); SvREFCNT_dec (overlay_av); overlay_av = 0; @@ -393,7 +393,7 @@ perl_environ = rxvt_environ; localise_env set_environ (perl_environ); - char *args[] = { + const char *args[] = { "", "-e" "BEGIN {" @@ -401,10 +401,11 @@ " unshift @INC, '" LIBDIR "';" "}" "" - "use urxvt;" + "use urxvt;", + 0 }; - int argc = ecb_array_length (args); - char **argv = args; + int argc = ecb_array_length (args) - 1; + char **argv = (char **)args; PERL_SYS_INIT3 (&argc, &argv, &environ); perl = perl_alloc (); @@ -1022,6 +1023,36 @@ const_iv (XIMDontChange), # endif # endif + + /* DEC private modes */ + const_iv (PrivMode_132), + const_iv (PrivMode_132OK), + const_iv (PrivMode_rVideo), + const_iv (PrivMode_relOrigin), + const_iv (PrivMode_Screen), + const_iv (PrivMode_Autowrap), + const_iv (PrivMode_aplCUR), + const_iv (PrivMode_aplKP), + const_iv (PrivMode_HaveBackSpace), + const_iv (PrivMode_BackSpace), + const_iv (PrivMode_ShiftKeys), + const_iv (PrivMode_VisibleCursor), + const_iv (PrivMode_MouseX10), + const_iv (PrivMode_MouseX11), + const_iv (PrivMode_scrollBar), + const_iv (PrivMode_TtyOutputInh), + const_iv (PrivMode_Keypress), + const_iv (PrivMode_smoothScroll), + const_iv (PrivMode_vt52), + const_iv (PrivMode_LFNL), + const_iv (PrivMode_MouseBtnEvent), + const_iv (PrivMode_MouseAnyEvent), + const_iv (PrivMode_BracketPaste), + const_iv (PrivMode_ExtModeMouse), + const_iv (PrivMode_ExtMouseRight), + const_iv (PrivMode_BlinkingCursor), + const_iv (PrivMode_mouse_report), + const_iv (PrivMode_Default), }; for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--) @@ -1389,7 +1420,7 @@ #define TERM_OFFSET_top_row TERM_OFFSET(top_row) int -rxvt_term::width () +rxvt_term::width (int new_value = NO_INIT) ALIAS: width = TERM_OFFSET_width height = TERM_OFFSET_height @@ -1409,6 +1440,8 @@ top_row = TERM_OFFSET_top_row CODE: RETVAL = *(int *)((char *)THIS + ix); + if (items > 1) + *(int *)((char *)THIS + ix) = new_value; OUTPUT: RETVAL @@ -1420,6 +1453,7 @@ ModNumLockMask = 2 current_screen = 3 hidden_cursor = 4 + priv_modes = 5 CODE: switch (ix) { @@ -1429,7 +1463,10 @@ case 3: RETVAL = THIS->current_screen; break; #ifdef CURSOR_BLINK case 4: RETVAL = THIS->hidden_cursor; break; +#else + case 4: RETVAL = 0; break; #endif + case 5: RETVAL = THIS->priv_modes; break; } OUTPUT: RETVAL @@ -1797,7 +1834,7 @@ else { --rs; - name = ""; + name = (octet_string)""; } if (!IN_RANGE_EXC (index, 0, NUM_RESOURCES)) @@ -1864,6 +1901,16 @@ OUTPUT: RETVAL +SV * +rxvt_term::lookup_keysym (int keysym, unsigned int state) + CODE: +{ + keysym_t *key = THIS->keyboard->lookup_keysym (THIS, keysym, state); + RETVAL = key ? sv_2mortal (newSVpv (key->str, 0)) : &PL_sv_undef; +} + OUTPUT: + RETVAL + bool rxvt_term::bind_action (octet_string keysym, octet_string action) ALIAS: @@ -2291,7 +2338,7 @@ ->replace (img); THIS->bg_img = img; - THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; + THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH; if (!border) THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT; @@ -2378,7 +2425,9 @@ rxvt_img::fill (SV *c, int x = 0, int y = 0, int w = THIS->w, int h = THIS->h) PROTOTYPE: $;$$$$ INIT: - rgba cc = parse_rgba (c, THIS->s); + rxvt_screen screen; + screen.set (THIS->d); + rgba cc = parse_rgba (c, &screen); C_ARGS: cc, x, y, w, h void @@ -2446,7 +2495,9 @@ rxvt_img * rxvt_img::tint (SV *c) INIT: - rgba cc = parse_rgba (c, THIS->s); + rxvt_screen screen; + screen.set (THIS->d); + rgba cc = parse_rgba (c, &screen); C_ARGS: cc rxvt_img *