--- rxvt-unicode/src/rxvt.h 2006/01/13 05:13:09 1.202 +++ rxvt-unicode/src/rxvt.h 2006/01/16 09:51:57 1.207 @@ -5,6 +5,23 @@ #include "feature.h" +#if defined (ISO_14755) || defined (ENABLE_PERL) +# define ENABLE_OVERLAY 1 +#endif + +#if ENABLE_PERL +# define ENABLE_FRILLS 1 +# define ENABLE_COMBINING 1 +#endif + +#if ENABLE_FRILLS +# define ENABLE_XEMBED 1 +# define ENABLE_EWMH 1 +# define CURSOR_BLINK 1 +#else +# define ENABLE_MINIMAL 1 +#endif + #include #include @@ -23,18 +40,13 @@ #include "rxvtperl.h" -#if defined (ISO_14755) || defined (ENABLE_PERL) -# define ENABLE_OVERLAY 1 -#endif - -#if ENABLE_PERL -# define ENABLE_FRILLS -#endif - -#if ENABLE_FRILLS -# define ENABLE_XEMBED 1 -# define ENABLE_EWMH 1 -# define CURSOR_BLINK 1 +// try to avoid some macros to decrease code size, on some systems +#if ENABLE_MINIMAL +# define strcmp(a,b) (strcmp)(a,b) +# define strlen(a) (strlen)(a) +# define strcpy(a,b) (strcpy)(a,b) +# define memset(a,c,l) (memset)(a,c,l) +# define memcpy(a,b,l) (memcpy)(a,b,l) #endif /* @@ -1216,7 +1228,7 @@ long vt_emask, vt_emask_perl; - void vt_select_input () + void vt_select_input () const { XSelectInput (display->display, vt, vt_emask | vt_emask_perl); } @@ -1285,6 +1297,13 @@ bool pty_fill (); + void make_current () const // make this the "currently active" urxvt instance + { + SET_R (this); + rxvt_set_locale (locale); + set_environ (envv); + } + void init_secondary (); const char **init_resources (int argc, const char *const *argv); const char *x_resource (const char *name); @@ -1418,7 +1437,7 @@ // screen.C - void lalloc (line_t &l) + void lalloc (line_t &l) const { l.t = (text_t *)talloc->alloc (); l.r = (rend_t *)ralloc->alloc (); @@ -1432,7 +1451,7 @@ } #endif - void lresize (line_t &l) + void lresize (line_t &l) const { if (!l.t) return; @@ -1446,7 +1465,7 @@ scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE); } - int fgcolor_of (rend_t r) + int fgcolor_of (rend_t r) const { int base = GET_BASEFG (r); #ifndef NO_BRIGHTCOLOR @@ -1460,7 +1479,7 @@ return base; } - int bgcolor_of (rend_t r) + int bgcolor_of (rend_t r) const { int base = GET_BASEBG (r); #ifndef NO_BRIGHTCOLOR @@ -1474,7 +1493,7 @@ return base; } - bool option (uint32_t opt) + bool option (uint32_t opt) const { return OPTION (opt); } @@ -1487,8 +1506,8 @@ options &= ~opt; } - void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); - void scr_blank_screen_mem (line_t &l, rend_t efs); + void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const; + void scr_blank_screen_mem (line_t &l, rend_t efs) const; int scr_scroll_text (int row1, int row2, int count); void scr_reset (); void scr_release (); @@ -1534,9 +1553,9 @@ void set_font_style (); void scr_charset_choose (int set); void scr_charset_set (int set, unsigned int ch); - int scr_move_to (int y, int len); - int scr_page (enum page_dirn direction, int nlines); - int scr_changeview (unsigned int oldviewstart); + void scr_move_to (int y, int len); + bool scr_page (enum page_dirn direction, int nlines); + bool scr_changeview (int new_view_start); void scr_bell (); void scr_printscreen (int fullhist); void scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2);