… | |
… | |
111 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
111 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
112 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
112 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
113 | |
113 | |
114 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
114 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
115 | |
115 | |
116 | char * rxvt_r_basename (const char *str) NOTHROW; |
116 | char * rxvt_basename (const char *str) NOTHROW; |
117 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
117 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
118 | void rxvt_log (const char *fmt,...) NOTHROW; |
118 | void rxvt_log (const char *fmt,...) NOTHROW; |
119 | void rxvt_warn (const char *fmt,...) NOTHROW; |
119 | void rxvt_warn (const char *fmt,...) NOTHROW; |
120 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
120 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
121 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
121 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
122 | |
122 | |
123 | int rxvt_Str_match (const char *s1, const char *s2) NOTHROW; |
|
|
124 | const char * rxvt_Str_skip_space (const char *str) NOTHROW; |
|
|
125 | char * rxvt_Str_trim (char *str) NOTHROW; |
123 | char * rxvt_strtrim (char *str) NOTHROW; |
126 | int rxvt_Str_escaped (char *str) NOTHROW; |
|
|
127 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
124 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
128 | void rxvt_freecommastring (char **cs) NOTHROW; |
125 | void rxvt_freecommastring (char **cs) NOTHROW; |
129 | |
126 | |
130 | ///////////////////////////////////////////////////////////////////////////// |
127 | ///////////////////////////////////////////////////////////////////////////// |
131 | |
128 | |
132 | // temporarily replace the process environment |
129 | // temporarily replace the process environment |
133 | extern char **environ; |
130 | extern char **environ; |
134 | extern char **rxvt_environ; // the original environ pointer |
131 | extern char **rxvt_environ; // the original environ pointer |
135 | |
132 | |
136 | inline void set_environ (stringvec *envv) |
133 | static inline void set_environ (stringvec *envv) |
137 | { |
134 | { |
138 | #if ENABLE_PERL |
135 | #if ENABLE_PERL |
139 | assert (envv); |
136 | assert (envv); |
140 | #else |
137 | #else |
141 | if (envv) |
138 | if (envv) |
142 | #endif |
139 | #endif |
143 | environ = (char **)envv->begin (); |
140 | environ = (char **)envv->begin (); |
144 | } |
141 | } |
145 | |
142 | |
146 | inline void set_environ (char **envv) |
143 | static inline void set_environ (char **envv) |
147 | { |
144 | { |
148 | #if ENABLE_PERL |
145 | #if ENABLE_PERL |
149 | assert (envv); |
146 | assert (envv); |
150 | #else |
147 | #else |
151 | if (envv) |
148 | if (envv) |
… | |
… | |
696 | #define PrivMode_LFNL (1UL<<19) |
693 | #define PrivMode_LFNL (1UL<<19) |
697 | /* too annoying to implement X11 highlight tracking */ |
694 | /* too annoying to implement X11 highlight tracking */ |
698 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
695 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
699 | |
696 | |
700 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
697 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
701 | #define PrivMode(test,bit) \ |
|
|
702 | if (test) \ |
|
|
703 | priv_modes |= (bit); \ |
|
|
704 | else \ |
|
|
705 | priv_modes &= ~(bit) |
|
|
706 | |
698 | |
707 | #ifdef ALLOW_132_MODE |
699 | #ifdef ALLOW_132_MODE |
708 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
700 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
709 | #else |
701 | #else |
710 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
702 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
… | |
… | |
1395 | { |
1387 | { |
1396 | if (set) |
1388 | if (set) |
1397 | options[opt >> 3] |= (1 << (opt & 7)); |
1389 | options[opt >> 3] |= (1 << (opt & 7)); |
1398 | else |
1390 | else |
1399 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1391 | options[opt >> 3] &= ~(1 << (opt & 7)); |
|
|
1392 | } |
|
|
1393 | |
|
|
1394 | void PrivMode (int set, unsigned bit) NOTHROW |
|
|
1395 | { |
|
|
1396 | if (set) |
|
|
1397 | priv_modes |= bit; |
|
|
1398 | else |
|
|
1399 | priv_modes &= ~bit; |
1400 | } |
1400 | } |
1401 | |
1401 | |
1402 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1402 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1403 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1403 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1404 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
1404 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |