… | |
… | |
28 | # define __svr4__ |
28 | # define __svr4__ |
29 | #endif |
29 | #endif |
30 | #if defined (sun) && !defined (__sun__) |
30 | #if defined (sun) && !defined (__sun__) |
31 | # define __sun__ |
31 | # define __sun__ |
32 | #endif |
32 | #endif |
33 | |
|
|
34 | |
33 | |
35 | #ifndef HAVE_XPOINTER |
34 | #ifndef HAVE_XPOINTER |
36 | typedef char *XPointer; |
35 | typedef char *XPointer; |
37 | #endif |
36 | #endif |
38 | |
37 | |
… | |
… | |
585 | #define PrivMode_TtyOutputInh (1LU<<16) |
584 | #define PrivMode_TtyOutputInh (1LU<<16) |
586 | #define PrivMode_Keypress (1LU<<17) |
585 | #define PrivMode_Keypress (1LU<<17) |
587 | #define PrivMode_smoothScroll (1LU<<18) |
586 | #define PrivMode_smoothScroll (1LU<<18) |
588 | #define PrivMode_vt52 (1LU<<19) |
587 | #define PrivMode_vt52 (1LU<<19) |
589 | /* too annoying to implement X11 highlight tracking */ |
588 | /* too annoying to implement X11 highlight tracking */ |
590 | /* #define PrivMode_MouseX11Track (1LU<<18) */ |
589 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
591 | |
590 | |
592 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
591 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
593 | #define PrivMode(test,bit) \ |
592 | #define PrivMode(test,bit) \ |
594 | if (test) \ |
593 | if (test) \ |
595 | PrivateModes |= (bit); \ |
594 | PrivateModes |= (bit); \ |
… | |
… | |
604 | |
603 | |
605 | #define XDEPTH display->depth |
604 | #define XDEPTH display->depth |
606 | #define XCMAP display->cmap |
605 | #define XCMAP display->cmap |
607 | #define XVISUAL display->visual |
606 | #define XVISUAL display->visual |
608 | |
607 | |
609 | #define IMBUFSIZ 128 /* input modifier buffer sizes */ |
608 | #define IMBUFSIZ 128 // input modifier buffer sizes |
610 | #ifndef BUFSIZ |
|
|
611 | # define BUFSIZ 4096 |
|
|
612 | #endif |
|
|
613 | #define KBUFSZ 512 /* size of keyboard mapping buffer */ |
609 | #define KBUFSZ 512 // size of keyboard mapping buffer |
|
|
610 | #define CBUFSIZ 4096 // size of command buffer |
|
|
611 | #define UBUFSIZ 4096 // character buffer |
614 | |
612 | |
615 | /* |
613 | /* |
616 | ***************************************************************************** |
614 | ***************************************************************************** |
617 | * MACRO DEFINES |
615 | * MACRO DEFINES |
618 | ***************************************************************************** |
616 | ***************************************************************************** |
… | |
… | |
788 | # define D_X(x) fprintf x ; fputc('\n', stderr) |
786 | # define D_X(x) fprintf x ; fputc('\n', stderr) |
789 | #else |
787 | #else |
790 | # define D_X(x) |
788 | # define D_X(x) |
791 | #endif |
789 | #endif |
792 | |
790 | |
|
|
791 | extern class rxvt_failure_exception { } rxvt_failure_exception; |
|
|
792 | |
|
|
793 | typedef callback1<void, const char *> log_callback; |
|
|
794 | |
|
|
795 | extern void rxvt_vlog (const char *fmt, va_list arg_ptr); |
|
|
796 | extern void rxvt_log (const char *fmt, ...); |
|
|
797 | extern void rxvt_warn (const char *fmt, ...); |
|
|
798 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
|
|
799 | extern void rxvt_exit_failure () __attribute__ ((noreturn)); |
|
|
800 | |
|
|
801 | #define SET_LOCALE(locale) rxvt_set_locale (locale) |
|
|
802 | extern void rxvt_set_locale (const char *locale); |
|
|
803 | |
793 | /* |
804 | /* |
794 | ***************************************************************************** |
805 | ***************************************************************************** |
795 | * VARIABLES |
806 | * VARIABLES |
796 | ***************************************************************************** |
807 | ***************************************************************************** |
797 | */ |
808 | */ |
… | |
… | |
857 | extern class rxvt_composite_vec rxvt_composite; |
868 | extern class rxvt_composite_vec rxvt_composite; |
858 | #endif |
869 | #endif |
859 | |
870 | |
860 | |
871 | |
861 | struct rxvt_term : rxvt_vars { |
872 | struct rxvt_term : rxvt_vars { |
|
|
873 | log_callback *log_hook; |
|
|
874 | |
862 | struct mbstate mbstate; |
875 | struct mbstate mbstate; |
863 | |
876 | |
864 | unsigned char want_refresh:1, |
877 | unsigned char want_refresh:1, |
865 | #ifdef TRANSPARENT |
878 | #ifdef TRANSPARENT |
866 | want_full_refresh:1, /* awaiting full screen refresh */ |
879 | want_full_refresh:1, /* awaiting full screen refresh */ |
… | |
… | |
881 | #endif |
894 | #endif |
882 | #ifdef POINTER_BLANK |
895 | #ifdef POINTER_BLANK |
883 | hidden_pointer:1, |
896 | hidden_pointer:1, |
884 | #endif |
897 | #endif |
885 | parsed_geometry:1, |
898 | parsed_geometry:1, |
|
|
899 | // enc_utf8:1, /* wether terminal reads/writes utf-8 */ |
886 | seen_input:1, /* wether any input has been seen so far */ |
900 | seen_input:1; /* wether any input has been seen so far */ |
887 | enc_utf8:1; /* wether terminal reads/writes utf-8 */ |
|
|
888 | |
901 | |
889 | unsigned char refresh_type, |
902 | unsigned char refresh_type, |
890 | #ifdef UTMP_SUPPORT |
903 | #ifdef UTMP_SUPPORT |
891 | next_utmp_action, |
904 | next_utmp_action, |
892 | #endif |
905 | #endif |
… | |
… | |
1054 | #endif |
1067 | #endif |
1055 | #ifdef POINTER_BLANK |
1068 | #ifdef POINTER_BLANK |
1056 | struct timeval lastmotion; |
1069 | struct timeval lastmotion; |
1057 | #endif |
1070 | #endif |
1058 | |
1071 | |
1059 | /* these three don't need to be kept but do so to placate some mem checkers */ |
1072 | vector<void *> allocated; // free these memory blocks |
|
|
1073 | |
1060 | char *env_windowid; /* environmental variable WINDOWID */ |
1074 | char *env_windowid; /* environmental variable WINDOWID */ |
1061 | char *env_display; /* environmental variable DISPLAY */ |
1075 | char *env_display; /* environmental variable DISPLAY */ |
1062 | char *env_term; /* environmental variable TERM */ |
1076 | char *env_term; /* environmental variable TERM */ |
1063 | char *env_colorfgbg; |
1077 | char *env_colorfgbg; |
1064 | char *locale; |
1078 | char *locale; |
|
|
1079 | #if 0 |
1065 | char *codeset; |
1080 | char *codeset; |
|
|
1081 | #endif |
1066 | char charsets[4]; |
1082 | char charsets[4]; |
1067 | unsigned char *v_buffer; /* pointer to physical buffer */ |
1083 | unsigned char *v_buffer; /* pointer to physical buffer */ |
1068 | unsigned int v_buflen; /* size of area to write */ |
1084 | unsigned int v_buflen; /* size of area to write */ |
1069 | stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ |
1085 | stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ |
1070 | #ifdef KEYSYM_RESOURCE |
1086 | #ifdef KEYSYM_RESOURCE |
1071 | const unsigned char *Keysym_map[256]; |
1087 | const unsigned char *Keysym_map[256]; |
1072 | #endif |
1088 | #endif |
1073 | const char *rs[NUM_RESOURCES]; |
1089 | const char *rs[NUM_RESOURCES]; |
1074 | /* command input buffering */ |
1090 | /* command input buffering */ |
1075 | unsigned char *cmdbuf_ptr, *cmdbuf_endp; |
1091 | unsigned char *cmdbuf_ptr, *cmdbuf_endp; |
1076 | unsigned char cmdbuf_base[BUFSIZ]; |
1092 | unsigned char cmdbuf_base[CBUFSIZ]; |
1077 | |
1093 | |
1078 | rxvt_salloc *ralloc; |
1094 | rxvt_salloc *ralloc; |
1079 | rxvt_salloc *talloc; |
1095 | rxvt_salloc *talloc; |
1080 | |
1096 | |
1081 | void paste (const unsigned char *data, unsigned int len); |
1097 | void paste (const unsigned char *data, unsigned int len); |
… | |
… | |
1201 | #ifdef PRINTPIPE |
1217 | #ifdef PRINTPIPE |
1202 | FILE *popen_printer (); |
1218 | FILE *popen_printer (); |
1203 | int pclose_printer (FILE *stream); |
1219 | int pclose_printer (FILE *stream); |
1204 | #endif |
1220 | #endif |
1205 | void process_print_pipe (); |
1221 | void process_print_pipe (); |
1206 | void process_nonprinting (unsigned char ch); |
1222 | void process_nonprinting (unicode_t ch); |
1207 | void process_escape_vt52 (unsigned char ch); |
1223 | void process_escape_vt52 (unicode_t ch); |
1208 | void process_escape_seq (); |
1224 | void process_escape_seq (); |
1209 | void process_csi_seq (); |
1225 | void process_csi_seq (); |
1210 | void process_window_ops (const int *args, unsigned int nargs); |
1226 | void process_window_ops (const int *args, unsigned int nargs); |
1211 | unsigned char * get_to_st (unsigned char *ends_how); |
1227 | unsigned char *get_to_st (unicode_t &ends_how); |
1212 | void process_dcs_seq (); |
1228 | void process_dcs_seq (); |
1213 | void process_osc_seq (); |
1229 | void process_osc_seq (); |
1214 | void xterm_seq (int op, const char *str, unsigned char resp __attribute__ ((unused))); |
1230 | void xterm_seq (int op, const char *str, unsigned char resp __attribute__ ((unused))); |
1215 | int privcases (int mode, unsigned long bit); |
1231 | int privcases (int mode, unsigned long bit); |
1216 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1232 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
… | |
… | |
1227 | void privileged_utmp (char action); |
1243 | void privileged_utmp (char action); |
1228 | void privileged_ttydev (char action); |
1244 | void privileged_ttydev (char action); |
1229 | bool change_font (const char *fontname); |
1245 | bool change_font (const char *fontname); |
1230 | bool font_up_down (int n, int direction); |
1246 | bool font_up_down (int n, int direction); |
1231 | void set_title (const char *str); |
1247 | void set_title (const char *str); |
1232 | void set_iconName (const char *str); |
1248 | void set_icon_name (const char *str); |
1233 | void set_window_color (int idx, const char *color); |
1249 | void set_window_color (int idx, const char *color); |
1234 | void set_colorfgbg (); |
1250 | void set_colorfgbg (); |
1235 | int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); |
1251 | int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); |
1236 | void set_widthheight (unsigned int width, unsigned int height); |
1252 | void set_widthheight (unsigned int width, unsigned int height); |
1237 | |
1253 | |
… | |
… | |
1354 | int scale_pixmap (const char *geom); |
1370 | int scale_pixmap (const char *geom); |
1355 | void resize_pixmap (); |
1371 | void resize_pixmap (); |
1356 | Pixmap set_bgPixmap (const char *file); |
1372 | Pixmap set_bgPixmap (const char *file); |
1357 | }; |
1373 | }; |
1358 | |
1374 | |
1359 | #define SET_LOCALE(locale) rxvt_set_locale (locale) |
|
|
1360 | extern void rxvt_set_locale (const char *locale); |
|
|
1361 | |
|
|
1362 | /* |
1375 | /* |
1363 | ***************************************************************************** |
1376 | ***************************************************************************** |
1364 | * PROTOTYPES |
1377 | * PROTOTYPES |
1365 | ***************************************************************************** |
1378 | ***************************************************************************** |
1366 | */ |
1379 | */ |