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.110 by root, Thu Dec 14 17:22:04 2006 UTC vs.
Revision 1.114 by ayin, Mon Aug 27 18:31:00 2007 UTC

50#undef LINENO 50#undef LINENO
51#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) 51#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows)
52#undef ROW 52#undef ROW
53#define ROW(n) THIS->row_buf [LINENO (n)] 53#define ROW(n) THIS->row_buf [LINENO (n)]
54 54
55typedef int CHAINED UNUSED;
56
57///////////////////////////////////////////////////////////////////////////// 55/////////////////////////////////////////////////////////////////////////////
58 56
59static wchar_t * 57static wchar_t *
60sv2wcs (SV *sv) 58sv2wcs (SV *sv)
61{ 59{
72 SV *sv = newSVpv (str, 0); 70 SV *sv = newSVpv (str, 0);
73 SvUTF8_on (sv); 71 SvUTF8_on (sv);
74 free (str); 72 free (str);
75 73
76 return sv; 74 return sv;
77}
78
79static SV *
80new_ref (HV *hv, const char *klass)
81{
82 return sv_bless (newRV ((SV *)hv), gv_stashpv (klass, 1));
83} 75}
84 76
85static SV * 77static SV *
86newSVptr (void *ptr, const char *klass) 78newSVptr (void *ptr, const char *klass)
87{ 79{
304} 296}
305 297
306///////////////////////////////////////////////////////////////////////////// 298/////////////////////////////////////////////////////////////////////////////
307 299
308#define IOM_CLASS "urxvt" 300#define IOM_CLASS "urxvt"
301#define IOM_WARN rxvt_warn
309#include <iom_perl.h> 302#include <iom_perl.h>
310 303
311///////////////////////////////////////////////////////////////////////////// 304/////////////////////////////////////////////////////////////////////////////
312 305
313struct rxvt_perl_interp rxvt_perl; 306struct rxvt_perl_interp rxvt_perl;
1402SV * 1395SV *
1403rxvt_term::special_decode (SV *text) 1396rxvt_term::special_decode (SV *text)
1404 CODE: 1397 CODE:
1405{ 1398{
1406 wchar_t *wstr = sv2wcs (text); 1399 wchar_t *wstr = sv2wcs (text);
1407 int wlen = wcslen (wstr);
1408 int dlen = 0; 1400 int dlen = 0;
1409 1401
1410 // find length 1402 // find length
1411 for (wchar_t *s = wstr; *s; s++) 1403 for (wchar_t *s = wstr; *s; s++)
1412 if (*s == NOCHAR) 1404 if (*s == NOCHAR)
1475 1467
1476const char * 1468const char *
1477rxvt_term::x_resource (const char *name) 1469rxvt_term::x_resource (const char *name)
1478 1470
1479bool 1471bool
1480rxvt_term::option (U32 optval, int set = -1) 1472rxvt_term::option (U8 optval, int set = -1)
1481 CODE: 1473 CODE:
1482{ 1474{
1483 RETVAL = THIS->options & optval; 1475 RETVAL = THIS->option (optval);
1484 1476
1485 if (set >= 0) 1477 if (set >= 0)
1486 { 1478 {
1487 if (set)
1488 THIS->options |= optval; 1479 THIS->set_option (optval, set);
1489 else
1490 THIS->options &= ~optval;
1491 1480
1492 if (THIS->check_ev.is_active ()) // avoid doing this before START 1481 if (THIS->check_ev.is_active ()) // avoid doing this before START
1493 switch (optval) 1482 switch (optval)
1494 { 1483 {
1495 case Opt_skipBuiltinGlyphs: 1484 case Opt_skipBuiltinGlyphs:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines