… | |
… | |
23 | #define line_t perl_line_t |
23 | #define line_t perl_line_t |
24 | #include <EXTERN.h> |
24 | #include <EXTERN.h> |
25 | #include <perl.h> |
25 | #include <perl.h> |
26 | #include <XSUB.h> |
26 | #include <XSUB.h> |
27 | #undef line_t |
27 | #undef line_t |
|
|
28 | #undef bool // perl defines it's own bool type, except with g++... what a trap |
28 | |
29 | |
29 | #include "../config.h" |
30 | #include "../config.h" |
30 | |
31 | |
31 | #include <cstddef> |
32 | #include <stddef.h> |
32 | #include <cstdarg> |
33 | #include <stdarg.h> |
33 | |
34 | |
34 | #include "unistd.h" |
35 | #include "unistd.h" |
35 | |
36 | |
36 | #include "ev_cpp.h" |
37 | #include "ev_cpp.h" |
37 | #include "rxvt.h" |
38 | #include "rxvt.h" |
… | |
… | |
920 | CODE: |
921 | CODE: |
921 | { |
922 | { |
922 | rxvt_term *term = new rxvt_term; |
923 | rxvt_term *term = new rxvt_term; |
923 | |
924 | |
924 | stringvec *argv = new stringvec; |
925 | stringvec *argv = new stringvec; |
925 | stringvec *envv = new stringvec; |
|
|
926 | |
|
|
927 | for (int i = 0; i <= AvFILL (arg); i++) |
926 | for (int i = 0; i <= AvFILL (arg); i++) |
928 | argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1)))); |
927 | argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1)))); |
929 | |
928 | |
|
|
929 | stringvec *envv = new stringvec; |
930 | for (int i = AvFILL (env) + 1; i--; ) |
930 | for (int i = AvFILL (env) + 1; i--; ) |
931 | envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1)))); |
931 | envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1)))); |
932 | |
|
|
933 | envv->push_back (0); |
|
|
934 | |
932 | |
935 | try |
933 | try |
936 | { |
934 | { |
937 | term->init (argv, envv); |
935 | term->init (argv, envv); |
938 | } |
936 | } |
… | |
… | |
1099 | rxvt_pop_locale (); |
1097 | rxvt_pop_locale (); |
1100 | |
1098 | |
1101 | RETVAL = wcs2sv (wstr); |
1099 | RETVAL = wcs2sv (wstr); |
1102 | free (wstr); |
1100 | free (wstr); |
1103 | } |
1101 | } |
1104 | OUTPUT: |
|
|
1105 | RETVAL |
|
|
1106 | |
|
|
1107 | char * |
|
|
1108 | rxvt_term::locale () |
|
|
1109 | CODE: |
|
|
1110 | RETVAL = THIS->locale; |
|
|
1111 | OUTPUT: |
1102 | OUTPUT: |
1112 | RETVAL |
1103 | RETVAL |
1113 | |
1104 | |
1114 | #define TERM_OFFSET(sym) offsetof (TermWin_t, sym) |
1105 | #define TERM_OFFSET(sym) offsetof (TermWin_t, sym) |
1115 | |
1106 | |
… | |
… | |
1553 | |
1544 | |
1554 | if (set >= 0) |
1545 | if (set >= 0) |
1555 | { |
1546 | { |
1556 | THIS->set_option (optval, set); |
1547 | THIS->set_option (optval, set); |
1557 | |
1548 | |
1558 | if (THIS->env_colorfgbg [0]) // avoid doing this before START |
1549 | if (THIS->init_done) // avoid doing this before START |
1559 | switch (optval) |
1550 | switch (optval) |
1560 | { |
1551 | { |
1561 | case Opt_skipBuiltinGlyphs: |
1552 | case Opt_skipBuiltinGlyphs: |
1562 | THIS->set_fonts (); |
1553 | THIS->set_fonts (); |
1563 | THIS->scr_remap_chars (); |
1554 | THIS->scr_remap_chars (); |
1564 | THIS->scr_touch (true); |
1555 | THIS->scr_touch (true); |
1565 | THIS->want_refresh = 1; |
1556 | THIS->want_refresh = 1; |
1566 | THIS->refresh_check (); |
1557 | THIS->refresh_check (); |
1567 | break; |
1558 | break; |
|
|
1559 | |
|
|
1560 | #ifdef CURSOR_BLINK |
|
|
1561 | case Opt_cursorBlink: |
|
|
1562 | THIS->cursor_blink_reset (); |
|
|
1563 | break; |
|
|
1564 | #endif |
1568 | |
1565 | |
1569 | case Opt_cursorUnderline: |
1566 | case Opt_cursorUnderline: |
1570 | THIS->want_refresh = 1; |
1567 | THIS->want_refresh = 1; |
1571 | THIS->refresh_check (); |
1568 | THIS->refresh_check (); |
1572 | break; |
1569 | break; |