--- rxvt-unicode/src/rxvtperl.xs 2006/12/14 17:33:53 1.111 +++ rxvt-unicode/src/rxvtperl.xs 2007/11/11 04:08:00 1.116 @@ -33,7 +33,7 @@ #include "unistd.h" -#include "iom.h" +#include "ev_cpp.h" #include "rxvt.h" #include "keyboard.h" #include "rxvtutil.h" @@ -75,12 +75,6 @@ } static SV * -new_ref (HV *hv, const char *klass) -{ - return sv_bless (newRV ((SV *)hv), gv_stashpv (klass, 1)); -} - -static SV * newSVptr (void *ptr, const char *klass) { HV *hv = newHV (); @@ -304,6 +298,7 @@ ///////////////////////////////////////////////////////////////////////////// #define IOM_CLASS "urxvt" +#define IOM_WARN rxvt_warn #include ///////////////////////////////////////////////////////////////////////////// @@ -389,7 +384,7 @@ if (htype == HOOK_REFRESH_END) { AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); - + for (int i = 0; i <= AvFILL (av); i++) ((overlay *)SvIV (*av_fetch (av, i, 0)))->swap (); } @@ -598,7 +593,7 @@ if (htype == HOOK_REFRESH_BEGIN) { AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); - + for (int i = AvFILL (av); i >= 0; i--) ((overlay *)SvIV (*av_fetch (av, i, 0)))->swap (); } @@ -606,7 +601,7 @@ { clearSVptr ((SV *)term->perl.self); SvREFCNT_dec ((SV *)term->perl.self); - + // don't allow further calls term->perl.self = 0; } @@ -782,7 +777,7 @@ NV NOW () CODE: - RETVAL = NOW; + RETVAL = ev::now (); OUTPUT: RETVAL @@ -1146,10 +1141,10 @@ } int -rxvt_term::pty_ev_events (int events = EVENT_UNDEF) +rxvt_term::pty_ev_events (int events = ev::UNDEF) CODE: RETVAL = THIS->pty_ev.events; - if (events != EVENT_UNDEF) + if (events != ev::UNDEF) THIS->pty_ev.set (events); OUTPUT: RETVAL @@ -1402,7 +1397,6 @@ CODE: { wchar_t *wstr = sv2wcs (text); - int wlen = wcslen (wstr); int dlen = 0; // find length @@ -1475,19 +1469,16 @@ rxvt_term::x_resource (const char *name) bool -rxvt_term::option (U32 optval, int set = -1) +rxvt_term::option (U8 optval, int set = -1) CODE: { - RETVAL = THIS->options & optval; + RETVAL = THIS->option (optval); if (set >= 0) { - if (set) - THIS->options |= optval; - else - THIS->options &= ~optval; + THIS->set_option (optval, set); - if (THIS->check_ev.is_active ()) // avoid doing this before START + if (THIS->prepare_ev.is_active ()) // avoid doing this before START switch (optval) { case Opt_skipBuiltinGlyphs: @@ -1683,7 +1674,7 @@ EXTEND (SP, count); while (count--) PUSHs (newSVuv ((U32)props [count])); - + XFree (props); }