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.2 by root, Mon Jan 2 17:17:02 2006 UTC vs.
Revision 1.3 by root, Mon Jan 2 18:20:23 2006 UTC

324void 324void
325fatal (const char *msg) 325fatal (const char *msg)
326 CODE: 326 CODE:
327 rxvt_fatal ("%s", msg); 327 rxvt_fatal ("%s", msg);
328 328
329int
330wcswidth (SV *str)
331 CODE:
332{
333 wchar_t *wstr = sv2wcs (str);
334 RETVAL = wcswidth (wstr, wcslen (wstr));
335 free (wstr);
336}
337 OUTPUT:
338 RETVAL
339
340NV 329NV
341NOW () 330NOW ()
342 CODE: 331 CODE:
343 RETVAL = NOW; 332 RETVAL = NOW;
344 OUTPUT: 333 OUTPUT:
345 RETVAL 334 RETVAL
346 335
347MODULE = urxvt PACKAGE = urxvt::term 336MODULE = urxvt PACKAGE = urxvt::term
337
338int
339rxvt_term::strwidth (SV *str)
340 CODE:
341{
342 wchar_t *wstr = sv2wcs (str);
343
344 rxvt_push_locale (THIS->locale);
345 RETVAL = wcswidth (wstr, wcslen (wstr));
346 rxvt_pop_locale ();
347
348 free (wstr);
349}
350 OUTPUT:
351 RETVAL
352
353SV *
354rxvt_term::locale_encode (SV *str)
355 CODE:
356{
357 wchar_t *wstr = sv2wcs (str);
358
359 rxvt_push_locale (THIS->locale);
360 char *mbstr = rxvt_wcstombs (wstr);
361 rxvt_pop_locale ();
362
363 free (wstr);
364
365 RETVAL = newSVpv (mbstr, 0);
366 free (mbstr);
367}
368 OUTPUT:
369 RETVAL
370
371SV *
372rxvt_term::locale_decode (SV *octets)
373 CODE:
374{
375 STRLEN len;
376 char *data = SvPVbyte (octets, len);
377
378 rxvt_push_locale (THIS->locale);
379 wchar_t *wstr = rxvt_mbstowcs (data, len);
380 rxvt_pop_locale ();
381
382 char *str = rxvt_wcstoutf8 (wstr);
383 free (wstr);
384
385 RETVAL = newSVpv (str, 0);
386 SvUTF8_on (RETVAL);
387 free (str);
388}
389 OUTPUT:
390 RETVAL
348 391
349void 392void
350rxvt_term::_resource (char *name, int index, SV *newval = 0) 393rxvt_term::_resource (char *name, int index, SV *newval = 0)
351 PPCODE: 394 PPCODE:
352{ 395{
458 wchar_t *wtext = sv2wcs (text); 501 wchar_t *wtext = sv2wcs (text);
459 THIS->scr_overlay_set (x, y, wtext); 502 THIS->scr_overlay_set (x, y, wtext);
460 free (wtext); 503 free (wtext);
461} 504}
462 505
506void
507rxvt_term::tt_write (SV *octets)
508 INIT:
509 STRLEN len;
510 char *str = SvPVbyte (octets, len);
511 C_ARGS:
512 (unsigned char *)str, len
513
463MODULE = urxvt PACKAGE = urxvt::timer 514MODULE = urxvt PACKAGE = urxvt::timer
464 515
465SV * 516SV *
466timer::new () 517timer::new ()
467 CODE: 518 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines