… | |
… | |
529 | THIS->perl.grabtime = 0; |
529 | THIS->perl.grabtime = 0; |
530 | } |
530 | } |
531 | } |
531 | } |
532 | |
532 | |
533 | bool |
533 | bool |
534 | rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) |
534 | rxvt_perl_interp::invoke (rxvt_term *term, int htype, ...) |
535 | { |
535 | { |
536 | if (!perl || !term->perl.self) |
536 | if (!perl || !term->perl.self) |
537 | return false; |
537 | return false; |
538 | |
538 | |
539 | localise_env set_environ (perl_environ); |
539 | localise_env set_environ (perl_environ); |
… | |
… | |
821 | } *civ, const_iv[] = { |
821 | } *civ, const_iv[] = { |
822 | # define const_iv(name) { # name, (IV)name } |
822 | # define const_iv(name) { # name, (IV)name } |
823 | const_iv (HOOK_INIT), |
823 | const_iv (HOOK_INIT), |
824 | const_iv (HOOK_DESTROY), |
824 | const_iv (HOOK_DESTROY), |
825 | const_iv (HOOK_ACTION), |
825 | const_iv (HOOK_ACTION), |
|
|
826 | const_iv (HOOK_OSC_SEQ), |
|
|
827 | const_iv (HOOK_OSC_SEQ_PERL), |
826 | |
828 | |
827 | const_iv (NUM_RESOURCES), |
829 | const_iv (NUM_RESOURCES), |
828 | const_iv (DEFAULT_RSTYLE), |
830 | const_iv (DEFAULT_RSTYLE), |
829 | const_iv (OVERLAY_RSTYLE), |
831 | const_iv (OVERLAY_RSTYLE), |
830 | const_iv (Color_Bits), |
832 | const_iv (Color_Bits), |
… | |
… | |
1143 | int |
1145 | int |
1144 | SET_CUSTOM (int rend, int new_value) |
1146 | SET_CUSTOM (int rend, int new_value) |
1145 | CODE: |
1147 | CODE: |
1146 | { |
1148 | { |
1147 | if (!IN_RANGE_EXC (new_value, 0, RS_customCount)) |
1149 | if (!IN_RANGE_EXC (new_value, 0, RS_customCount)) |
1148 | croak ("custom value out of range, must be 0..%d", RS_customCount - 1); |
1150 | croak ("custom value out of range, must be 0..%lu", RS_customCount - 1); |
1149 | |
1151 | |
1150 | RETVAL = (rend & ~RS_customMask) |
1152 | RETVAL = (rend & ~RS_customMask) |
1151 | | ((new_value << RS_customShift) & RS_customMask); |
1153 | | ((new_value << RS_customShift) & RS_customMask); |
1152 | } |
1154 | } |
1153 | OUTPUT: |
1155 | OUTPUT: |
… | |
… | |
1372 | |
1374 | |
1373 | SV * |
1375 | SV * |
1374 | rxvt_term::locale_encode (SV *str) |
1376 | rxvt_term::locale_encode (SV *str) |
1375 | CODE: |
1377 | CODE: |
1376 | { |
1378 | { |
|
|
1379 | if (!SvOK (str)) |
|
|
1380 | XSRETURN_UNDEF; |
|
|
1381 | |
1377 | wchar_t *wstr = sv2wcs (str); |
1382 | wchar_t *wstr = sv2wcs (str); |
1378 | |
1383 | |
1379 | rxvt_push_locale (THIS->locale); |
1384 | rxvt_push_locale (THIS->locale); |
1380 | char *mbstr = rxvt_wcstombs (wstr); |
1385 | char *mbstr = rxvt_wcstombs (wstr); |
1381 | rxvt_pop_locale (); |
1386 | rxvt_pop_locale (); |
… | |
… | |
1390 | |
1395 | |
1391 | SV * |
1396 | SV * |
1392 | rxvt_term::locale_decode (SV *octets) |
1397 | rxvt_term::locale_decode (SV *octets) |
1393 | CODE: |
1398 | CODE: |
1394 | { |
1399 | { |
|
|
1400 | if (!SvOK (octets)) |
|
|
1401 | XSRETURN_UNDEF; |
|
|
1402 | |
1395 | STRLEN len; |
1403 | STRLEN len; |
1396 | char *data = SvPVbyte (octets, len); |
1404 | char *data = SvPVbyte (octets, len); |
1397 | |
1405 | |
1398 | rxvt_push_locale (THIS->locale); |
1406 | rxvt_push_locale (THIS->locale); |
1399 | wchar_t *wstr = rxvt_mbstowcs (data, len); |
1407 | wchar_t *wstr = rxvt_mbstowcs (data, len); |
… | |
… | |
1562 | THIS->rstyle = new_rstyle; |
1570 | THIS->rstyle = new_rstyle; |
1563 | OUTPUT: |
1571 | OUTPUT: |
1564 | RETVAL |
1572 | RETVAL |
1565 | |
1573 | |
1566 | int |
1574 | int |
1567 | rxvt_term::view_start (int newval = 1) |
1575 | rxvt_term::view_start (int newval = 0) |
1568 | PROTOTYPE: $;$ |
1576 | PROTOTYPE: $;$ |
1569 | CODE: |
1577 | CODE: |
1570 | { |
1578 | { |
1571 | RETVAL = THIS->view_start; |
1579 | RETVAL = THIS->view_start; |
1572 | if (items > 1) |
1580 | if (items > 1) |