… | |
… | |
73 | |
73 | |
74 | return sv; |
74 | return sv; |
75 | } |
75 | } |
76 | |
76 | |
77 | static SV * |
77 | static SV * |
78 | new_ref (HV *hv, const char *klass) |
|
|
79 | { |
|
|
80 | return sv_bless (newRV ((SV *)hv), gv_stashpv (klass, 1)); |
|
|
81 | } |
|
|
82 | |
|
|
83 | static SV * |
|
|
84 | newSVptr (void *ptr, const char *klass) |
78 | newSVptr (void *ptr, const char *klass) |
85 | { |
79 | { |
86 | HV *hv = newHV (); |
80 | HV *hv = newHV (); |
87 | sv_magic ((SV *)hv, 0, PERL_MAGIC_ext, (char *)ptr, 0); |
81 | sv_magic ((SV *)hv, 0, PERL_MAGIC_ext, (char *)ptr, 0); |
88 | return sv_bless (newRV_noinc ((SV *)hv), gv_stashpv (klass, 1)); |
82 | return sv_bless (newRV_noinc ((SV *)hv), gv_stashpv (klass, 1)); |
… | |
… | |
302 | } |
296 | } |
303 | |
297 | |
304 | ///////////////////////////////////////////////////////////////////////////// |
298 | ///////////////////////////////////////////////////////////////////////////// |
305 | |
299 | |
306 | #define IOM_CLASS "urxvt" |
300 | #define IOM_CLASS "urxvt" |
|
|
301 | #define IOM_WARN rxvt_warn |
307 | #include <iom_perl.h> |
302 | #include <iom_perl.h> |
308 | |
303 | |
309 | ///////////////////////////////////////////////////////////////////////////// |
304 | ///////////////////////////////////////////////////////////////////////////// |
310 | |
305 | |
311 | struct rxvt_perl_interp rxvt_perl; |
306 | struct rxvt_perl_interp rxvt_perl; |
… | |
… | |
1400 | SV * |
1395 | SV * |
1401 | rxvt_term::special_decode (SV *text) |
1396 | rxvt_term::special_decode (SV *text) |
1402 | CODE: |
1397 | CODE: |
1403 | { |
1398 | { |
1404 | wchar_t *wstr = sv2wcs (text); |
1399 | wchar_t *wstr = sv2wcs (text); |
1405 | int wlen = wcslen (wstr); |
|
|
1406 | int dlen = 0; |
1400 | int dlen = 0; |
1407 | |
1401 | |
1408 | // find length |
1402 | // find length |
1409 | for (wchar_t *s = wstr; *s; s++) |
1403 | for (wchar_t *s = wstr; *s; s++) |
1410 | if (*s == NOCHAR) |
1404 | if (*s == NOCHAR) |
… | |
… | |
1473 | |
1467 | |
1474 | const char * |
1468 | const char * |
1475 | rxvt_term::x_resource (const char *name) |
1469 | rxvt_term::x_resource (const char *name) |
1476 | |
1470 | |
1477 | bool |
1471 | bool |
1478 | rxvt_term::option (U32 optval, int set = -1) |
1472 | rxvt_term::option (U8 optval, int set = -1) |
1479 | CODE: |
1473 | CODE: |
1480 | { |
1474 | { |
1481 | RETVAL = THIS->options & optval; |
1475 | RETVAL = THIS->option (optval); |
1482 | |
1476 | |
1483 | if (set >= 0) |
1477 | if (set >= 0) |
1484 | { |
1478 | { |
1485 | if (set) |
|
|
1486 | THIS->options |= optval; |
1479 | THIS->set_option (optval, set); |
1487 | else |
|
|
1488 | THIS->options &= ~optval; |
|
|
1489 | |
1480 | |
1490 | if (THIS->check_ev.is_active ()) // avoid doing this before START |
1481 | if (THIS->check_ev.is_active ()) // avoid doing this before START |
1491 | switch (optval) |
1482 | switch (optval) |
1492 | { |
1483 | { |
1493 | case Opt_skipBuiltinGlyphs: |
1484 | case Opt_skipBuiltinGlyphs: |