ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.251 by sf-exg, Wed Jul 14 12:39:57 2021 UTC vs.
Revision 1.255 by root, Sun Nov 21 23:00:48 2021 UTC

529 THIS->perl.grabtime = 0; 529 THIS->perl.grabtime = 0;
530 } 530 }
531} 531}
532 532
533bool 533bool
534rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) 534rxvt_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),
1372 1374
1373SV * 1375SV *
1374rxvt_term::locale_encode (SV *str) 1376rxvt_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
1391SV * 1396SV *
1392rxvt_term::locale_decode (SV *octets) 1397rxvt_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
1566int 1574int
1567rxvt_term::view_start (int newval = 1) 1575rxvt_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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines