… | |
… | |
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) |
… | |
… | |
699 | #define PrivMode_LFNL (1UL<<19) |
693 | #define PrivMode_LFNL (1UL<<19) |
700 | /* too annoying to implement X11 highlight tracking */ |
694 | /* too annoying to implement X11 highlight tracking */ |
701 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
695 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
702 | |
696 | |
703 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
697 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
704 | #define PrivMode(test,bit) \ |
|
|
705 | if (test) \ |
|
|
706 | priv_modes |= (bit); \ |
|
|
707 | else \ |
|
|
708 | priv_modes &= ~(bit) |
|
|
709 | |
698 | |
710 | #ifdef ALLOW_132_MODE |
699 | #ifdef ALLOW_132_MODE |
711 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
700 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
712 | #else |
701 | #else |
713 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
702 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
… | |
… | |
1398 | { |
1387 | { |
1399 | if (set) |
1388 | if (set) |
1400 | options[opt >> 3] |= (1 << (opt & 7)); |
1389 | options[opt >> 3] |= (1 << (opt & 7)); |
1401 | else |
1390 | else |
1402 | 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; |
1403 | } |
1400 | } |
1404 | |
1401 | |
1405 | 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; |
1406 | 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; |
1407 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
1404 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
… | |
… | |
1517 | // xpm.C |
1514 | // xpm.C |
1518 | void get_window_origin (int &x, int &y); |
1515 | void get_window_origin (int &x, int &y); |
1519 | Pixmap get_pixmap_property (int prop_id); |
1516 | Pixmap get_pixmap_property (int prop_id); |
1520 | }; |
1517 | }; |
1521 | |
1518 | |
1522 | /* |
|
|
1523 | ***************************************************************************** |
|
|
1524 | * PROTOTYPES |
|
|
1525 | ***************************************************************************** |
|
|
1526 | */ |
|
|
1527 | #ifdef PROTOTYPES |
|
|
1528 | # define __PROTO(p) p |
|
|
1529 | #else |
|
|
1530 | # define __PROTO(p) () |
|
|
1531 | #endif |
|
|
1532 | |
|
|
1533 | #endif /* _RXVT_H_ */ |
1519 | #endif /* _RXVT_H_ */ |
1534 | |
1520 | |