… | |
… | |
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); |
… | |
… | |
1145 | int |
1145 | int |
1146 | SET_CUSTOM (int rend, int new_value) |
1146 | SET_CUSTOM (int rend, int new_value) |
1147 | CODE: |
1147 | CODE: |
1148 | { |
1148 | { |
1149 | if (!IN_RANGE_EXC (new_value, 0, RS_customCount)) |
1149 | if (!IN_RANGE_EXC (new_value, 0, RS_customCount)) |
1150 | 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); |
1151 | |
1151 | |
1152 | RETVAL = (rend & ~RS_customMask) |
1152 | RETVAL = (rend & ~RS_customMask) |
1153 | | ((new_value << RS_customShift) & RS_customMask); |
1153 | | ((new_value << RS_customShift) & RS_customMask); |
1154 | } |
1154 | } |
1155 | OUTPUT: |
1155 | OUTPUT: |
… | |
… | |
1374 | |
1374 | |
1375 | SV * |
1375 | SV * |
1376 | rxvt_term::locale_encode (SV *str) |
1376 | rxvt_term::locale_encode (SV *str) |
1377 | CODE: |
1377 | CODE: |
1378 | { |
1378 | { |
|
|
1379 | if (!SvOK (str)) |
|
|
1380 | XSRETURN_UNDEF; |
|
|
1381 | |
1379 | wchar_t *wstr = sv2wcs (str); |
1382 | wchar_t *wstr = sv2wcs (str); |
1380 | |
1383 | |
1381 | rxvt_push_locale (THIS->locale); |
1384 | rxvt_push_locale (THIS->locale); |
1382 | char *mbstr = rxvt_wcstombs (wstr); |
1385 | char *mbstr = rxvt_wcstombs (wstr); |
1383 | rxvt_pop_locale (); |
1386 | rxvt_pop_locale (); |
… | |
… | |
1392 | |
1395 | |
1393 | SV * |
1396 | SV * |
1394 | rxvt_term::locale_decode (SV *octets) |
1397 | rxvt_term::locale_decode (SV *octets) |
1395 | CODE: |
1398 | CODE: |
1396 | { |
1399 | { |
|
|
1400 | if (!SvOK (octets)) |
|
|
1401 | XSRETURN_UNDEF; |
|
|
1402 | |
1397 | STRLEN len; |
1403 | STRLEN len; |
1398 | char *data = SvPVbyte (octets, len); |
1404 | char *data = SvPVbyte (octets, len); |
1399 | |
1405 | |
1400 | rxvt_push_locale (THIS->locale); |
1406 | rxvt_push_locale (THIS->locale); |
1401 | wchar_t *wstr = rxvt_mbstowcs (data, len); |
1407 | wchar_t *wstr = rxvt_mbstowcs (data, len); |