ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.273 by ayin, Thu Jan 19 23:13:19 2006 UTC vs.
Revision 1.274 by root, Fri Jan 20 10:27:08 2006 UTC

63#include <csignal> 63#include <csignal>
64 64
65/*----------------------------------------------------------------------*/ 65/*----------------------------------------------------------------------*/
66 66
67#define IS_CONTROL(ch) !((ch) & 0xffffff60UL) 67#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
68
69// exception thrown when the command parser runs out of input data
70class out_of_input { } out_of_input;
71 68
72#if ENABLE_FRILLS || ISO_14755 69#if ENABLE_FRILLS || ISO_14755
73 70
74#define ISO_14755_STARTED 0x80000000UL 71#define ISO_14755_STARTED 0x80000000UL
75#define ISO_14755_51 0x40000000UL // basic (section 5.1) 72#define ISO_14755_51 0x40000000UL // basic (section 5.1)
1044rxvt_term::cursor_blink_cb (time_watcher &w) 1041rxvt_term::cursor_blink_cb (time_watcher &w)
1045{ 1042{
1046 hidden_cursor = !hidden_cursor; 1043 hidden_cursor = !hidden_cursor;
1047 want_refresh = 1; 1044 want_refresh = 1;
1048 1045
1049 w.start (w.at + BLINK_INTERVAL); 1046 w.start (w.at + CURSOR_BLINK_INTERVAL);
1050} 1047}
1051#endif 1048#endif
1052 1049
1053#ifdef TEXT_BLINK 1050#ifdef TEXT_BLINK
1054void 1051void
1713 { 1710 {
1714 hidden_cursor = 0; 1711 hidden_cursor = 0;
1715 want_refresh = 1; 1712 want_refresh = 1;
1716 } 1713 }
1717 1714
1718 cursor_blink_ev.start (NOW + BLINK_INTERVAL); 1715 cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL);
1719 } 1716 }
1720#endif 1717#endif
1721 1718
1722#if defined(POINTER_BLANK) 1719#if defined(POINTER_BLANK)
1723 if (OPTION (Opt_pointerBlank) && pointerBlankDelay > 0) 1720 if (OPTION (Opt_pointerBlank) && pointerBlankDelay > 0)
1751 XSetICFocus (Input_Context); 1748 XSetICFocus (Input_Context);
1752 } 1749 }
1753#endif 1750#endif
1754#if CURSOR_BLINK 1751#if CURSOR_BLINK
1755 if (OPTION (Opt_cursorBlink)) 1752 if (OPTION (Opt_cursorBlink))
1756 cursor_blink_ev.start (NOW + BLINK_INTERVAL); 1753 cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL);
1757#endif 1754#endif
1758#if OFF_FOCUS_FADING 1755#if OFF_FOCUS_FADING
1759 if (rs[Rs_fade]) 1756 if (rs[Rs_fade])
1760 { 1757 {
1761 pix_colors = pix_colors_focused; 1758 pix_colors = pix_colors_focused;
2831 return flag; 2828 return flag;
2832} 2829}
2833 2830
2834// read the next character 2831// read the next character
2835wchar_t 2832wchar_t
2836rxvt_term::next_char () 2833rxvt_term::next_char () NOTHROW
2837{ 2834{
2838 while (cmdbuf_ptr < cmdbuf_endp) 2835 while (cmdbuf_ptr < cmdbuf_endp)
2839 { 2836 {
2840 // assume 7-bit to be ascii ALWAYS 2837 // assume 7-bit to be ascii ALWAYS
2841 if ((unsigned char)*cmdbuf_ptr <= 0x7f && *cmdbuf_ptr != 0x1b) 2838 if ((unsigned char)*cmdbuf_ptr <= 0x7f && *cmdbuf_ptr != 0x1b)
2862 return NOCHAR; 2859 return NOCHAR;
2863} 2860}
2864 2861
2865// read the next octet 2862// read the next octet
2866uint32_t 2863uint32_t
2867rxvt_term::next_octet () 2864rxvt_term::next_octet () NOTHROW
2868{ 2865{
2869 return cmdbuf_ptr < cmdbuf_endp 2866 return cmdbuf_ptr < cmdbuf_endp
2870 ? (unsigned char)*cmdbuf_ptr++ 2867 ? (unsigned char)*cmdbuf_ptr++
2871 : NOCHAR; 2868 : NOCHAR;
2872} 2869}
2870
2871static class out_of_input out_of_input;
2873 2872
2874/* rxvt_cmd_getc () - Return next input character */ 2873/* rxvt_cmd_getc () - Return next input character */
2875/* 2874/*
2876 * Return the next input character after first passing any keyboard input 2875 * Return the next input character after first passing any keyboard input
2877 * to the command. 2876 * to the command.
2878 */ 2877 */
2879wchar_t 2878wchar_t
2880rxvt_term::cmd_getc () 2879rxvt_term::cmd_getc () THROW ((class out_of_input))
2881{ 2880{
2882 wchar_t c = next_char (); 2881 wchar_t c = next_char ();
2883 2882
2884 if (c == NOCHAR) 2883 if (c == NOCHAR)
2885 throw out_of_input; 2884 throw out_of_input;
2886 2885
2887 return c; 2886 return c;
2888} 2887}
2889 2888
2890uint32_t 2889uint32_t
2891rxvt_term::cmd_get8 () 2890rxvt_term::cmd_get8 () THROW ((class out_of_input))
2892{ 2891{
2893 uint32_t c = next_octet (); 2892 uint32_t c = next_octet ();
2894 2893
2895 if (c == NOCHAR) 2894 if (c == NOCHAR)
2896 throw out_of_input; 2895 throw out_of_input;
4046 return state; 4045 return state;
4047} 4046}
4048 4047
4049/* we're not using priv _yet_ */ 4048/* we're not using priv _yet_ */
4050void 4049void
4051rxvt_term::process_terminal_mode (int mode, int priv __attribute__ ((unused)), unsigned int nargs, const int *arg) 4050rxvt_term::process_terminal_mode (int mode, int priv UNUSED, unsigned int nargs, const int *arg)
4052{ 4051{
4053 unsigned int i, j; 4052 unsigned int i, j;
4054 int state; 4053 int state;
4055 4054
4056 static const struct 4055 static const struct

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines