… | |
… | |
99 | ***************************************************************************** |
99 | ***************************************************************************** |
100 | * PROTOTYPES |
100 | * PROTOTYPES |
101 | ***************************************************************************** |
101 | ***************************************************************************** |
102 | */ |
102 | */ |
103 | // main.C |
103 | // main.C |
104 | RETSIGTYPE rxvt_Child_signal (int sig) NOTHROW; |
|
|
105 | RETSIGTYPE rxvt_Exit_signal (int sig) NOTHROW; |
|
|
106 | void rxvt_clean_exit () NOTHROW; |
|
|
107 | void * rxvt_malloc (size_t size); |
104 | void * rxvt_malloc (size_t size); |
108 | void * rxvt_calloc (size_t number, size_t size); |
105 | void * rxvt_calloc (size_t number, size_t size); |
109 | void * rxvt_realloc (void *ptr, size_t size); |
106 | void * rxvt_realloc (void *ptr, size_t size); |
110 | |
107 | |
111 | // misc.C |
108 | // misc.C |
… | |
… | |
114 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
111 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
115 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
112 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
116 | |
113 | |
117 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
114 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
118 | |
115 | |
119 | char * rxvt_r_basename (const char *str) NOTHROW; |
116 | char * rxvt_basename (const char *str) NOTHROW; |
120 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
117 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
121 | void rxvt_log (const char *fmt,...) NOTHROW; |
118 | void rxvt_log (const char *fmt,...) NOTHROW; |
122 | void rxvt_warn (const char *fmt,...) NOTHROW; |
119 | void rxvt_warn (const char *fmt,...) NOTHROW; |
123 | 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; |
124 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
121 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
125 | |
122 | |
126 | int rxvt_Str_match (const char *s1, const char *s2) NOTHROW; |
|
|
127 | const char * rxvt_Str_skip_space (const char *str) NOTHROW; |
|
|
128 | char * rxvt_Str_trim (char *str) NOTHROW; |
123 | char * rxvt_strtrim (char *str) NOTHROW; |
129 | int rxvt_Str_escaped (char *str) NOTHROW; |
|
|
130 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
124 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
131 | void rxvt_freecommastring (char **cs) NOTHROW; |
125 | void rxvt_freecommastring (char **cs) NOTHROW; |
132 | |
126 | |
133 | ///////////////////////////////////////////////////////////////////////////// |
127 | ///////////////////////////////////////////////////////////////////////////// |
134 | |
128 | |
135 | // temporarily replace the process environment |
129 | // temporarily replace the process environment |
136 | extern char **environ; |
130 | extern char **environ; |
137 | extern char **rxvt_environ; // the original environ pointer |
131 | extern char **rxvt_environ; // the original environ pointer |
138 | |
132 | |
139 | inline void set_environ (stringvec *envv) |
133 | static inline void set_environ (stringvec *envv) |
140 | { |
134 | { |
141 | #if ENABLE_PERL |
135 | #if ENABLE_PERL |
142 | assert (envv); |
136 | assert (envv); |
143 | #else |
137 | #else |
144 | if (envv) |
138 | if (envv) |
145 | #endif |
139 | #endif |
146 | environ = (char **)envv->begin (); |
140 | environ = (char **)envv->begin (); |
147 | } |
141 | } |
148 | |
142 | |
149 | inline void set_environ (char **envv) |
143 | static inline void set_environ (char **envv) |
150 | { |
144 | { |
151 | #if ENABLE_PERL |
145 | #if ENABLE_PERL |
152 | assert (envv); |
146 | assert (envv); |
153 | #else |
147 | #else |
154 | if (envv) |
148 | if (envv) |
… | |
… | |
181 | propScale = (1UL<<1), |
175 | propScale = (1UL<<1), |
182 | geometryFlags = (geometrySet|propScale), |
176 | geometryFlags = (geometrySet|propScale), |
183 | |
177 | |
184 | tintSet = (1UL<<8), |
178 | tintSet = (1UL<<8), |
185 | tintNeeded = (1UL<<9), |
179 | tintNeeded = (1UL<<9), |
|
|
180 | tintWholesome = (1UL<<10), |
186 | tintServerSide = (1UL<<10), |
181 | tintServerSide = (1UL<<11), |
187 | tintFlags = (tintSet|tintServerSide|tintNeeded), |
182 | tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome), |
188 | blurNeeded = (1UL<<11), |
183 | blurNeeded = (1UL<<12), |
189 | |
184 | |
190 | isTransparent = (1UL<<16), |
185 | isTransparent = (1UL<<16), |
191 | isInvalid = (1UL<<17) |
186 | isInvalid = (1UL<<17) |
192 | }; |
187 | }; |
193 | |
188 | |
… | |
… | |
698 | #define PrivMode_LFNL (1UL<<19) |
693 | #define PrivMode_LFNL (1UL<<19) |
699 | /* too annoying to implement X11 highlight tracking */ |
694 | /* too annoying to implement X11 highlight tracking */ |
700 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
695 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
701 | |
696 | |
702 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
697 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
703 | #define PrivMode(test,bit) \ |
|
|
704 | if (test) \ |
|
|
705 | priv_modes |= (bit); \ |
|
|
706 | else \ |
|
|
707 | priv_modes &= ~(bit) |
|
|
708 | |
698 | |
709 | #ifdef ALLOW_132_MODE |
699 | #ifdef ALLOW_132_MODE |
710 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
700 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
711 | #else |
701 | #else |
712 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
702 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
… | |
… | |
1397 | { |
1387 | { |
1398 | if (set) |
1388 | if (set) |
1399 | options[opt >> 3] |= (1 << (opt & 7)); |
1389 | options[opt >> 3] |= (1 << (opt & 7)); |
1400 | else |
1390 | else |
1401 | 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; |
1402 | } |
1400 | } |
1403 | |
1401 | |
1404 | 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; |
1405 | 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; |
1406 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
1404 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
… | |
… | |
1516 | // xpm.C |
1514 | // xpm.C |
1517 | void get_window_origin (int &x, int &y); |
1515 | void get_window_origin (int &x, int &y); |
1518 | Pixmap get_pixmap_property (int prop_id); |
1516 | Pixmap get_pixmap_property (int prop_id); |
1519 | }; |
1517 | }; |
1520 | |
1518 | |
1521 | /* |
|
|
1522 | ***************************************************************************** |
|
|
1523 | * PROTOTYPES |
|
|
1524 | ***************************************************************************** |
|
|
1525 | */ |
|
|
1526 | #ifdef PROTOTYPES |
|
|
1527 | # define __PROTO(p) p |
|
|
1528 | #else |
|
|
1529 | # define __PROTO(p) () |
|
|
1530 | #endif |
|
|
1531 | |
|
|
1532 | #endif /* _RXVT_H_ */ |
1519 | #endif /* _RXVT_H_ */ |
1533 | |
1520 | |