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.219 by root, Sat Dec 31 17:16:17 2005 UTC vs.
Revision 1.226 by root, Sun Jan 1 15:03:49 2006 UTC

48#include "../config.h" /* NECESSARY */ 48#include "../config.h" /* NECESSARY */
49#include "rxvt.h" /* NECESSARY */ 49#include "rxvt.h" /* NECESSARY */
50#include "version.h" 50#include "version.h"
51#include "command.h" 51#include "command.h"
52 52
53#if HAVE_SCHED_YIELD
54# include <sched.h>
55#endif
56
53#ifdef KEYSYM_RESOURCE 57#ifdef KEYSYM_RESOURCE
54# include "keyboard.h" 58# include "keyboard.h"
55#endif 59#endif
56 60
57#include <csignal> 61#include <csignal>
155 } 159 }
156 160
157 x--; 161 x--;
158 } 162 }
159} 163}
160#endif
161 164
162void 165void
163rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y) 166rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y)
164{ 167{
165#if ENABLE_OVERLAY
166 rxvt_fontset *fs = FONTSET (r); 168 rxvt_fontset *fs = FONTSET (r);
167 rxvt_font *f = (*fs)[fs->find_font (ch)]; 169 rxvt_font *f = (*fs)[fs->find_font (ch)];
168 wchar_t *chr, *alloc, ch2, *fname; 170 wchar_t *chr, *alloc, ch2, *fname;
169 int len; 171 int len;
170 172
238 240
239# if ENABLE_COMBINING 241# if ENABLE_COMBINING
240 if (alloc) 242 if (alloc)
241 delete [] alloc; 243 delete [] alloc;
242# endif 244# endif
243#endif
244} 245}
246#endif
245 247
246void 248void
247rxvt_term::commit_iso14755 () 249rxvt_term::commit_iso14755 ()
248{ 250{
249 wchar_t ch[2]; 251 wchar_t ch[2];
982 SET_LOCALE (locale); 984 SET_LOCALE (locale);
983 985
984 display->flush (); 986 display->flush ();
985 987
986 if (want_refresh && !flush_ev.active) 988 if (want_refresh && !flush_ev.active)
987 flush_ev.start (NOW + 0.01); 989 flush_ev.start (NOW + 1. / 60.); // refresh at max. 60 hz normally
988} 990}
989 991
990void 992void
991rxvt_term::flush_cb (time_watcher &w) 993rxvt_term::flush_cb (time_watcher &w)
992{ 994{
1082 1084
1083 memmove (cmdbuf_base, cmdbuf_ptr, n); 1085 memmove (cmdbuf_base, cmdbuf_ptr, n);
1084 cmdbuf_ptr = cmdbuf_base; 1086 cmdbuf_ptr = cmdbuf_base;
1085 cmdbuf_endp = cmdbuf_ptr + n; 1087 cmdbuf_endp = cmdbuf_ptr + n;
1086 1088
1087 n = read (pty.pty, cmdbuf_endp, CBUFSIZ - n); 1089 ssize_t r = read (pty.pty, cmdbuf_endp, CBUFSIZ - n);
1088 1090
1089 if (n > 0) 1091 if (r > 0)
1090 { 1092 {
1091 cmdbuf_endp += n; 1093 cmdbuf_endp += r;
1092 return true; 1094 return true;
1093 } 1095 }
1094 else if ((n < 0 && errno != EAGAIN && errno != EINTR) || n == 0) 1096 else if (r < 0 && (errno == EAGAIN || errno == EINTR))
1097 {
1098#if HAVE_SCHED_YIELD
1099 sched_yield ();
1100#endif
1101 }
1102 else
1095 { 1103 {
1096 pty_ev.stop (); 1104 pty_ev.stop ();
1097 1105
1098 if (!OPTION (Opt_hold)) 1106 if (!OPTION (Opt_hold))
1099 destroy (); 1107 destroy ();
2686 2694
2687 if (!OPTION (Opt_jumpScroll) 2695 if (!OPTION (Opt_jumpScroll)
2688 || (refresh_count >= refresh_limit * (nrow - 1))) 2696 || (refresh_count >= refresh_limit * (nrow - 1)))
2689 { 2697 {
2690 refreshnow = true; 2698 refreshnow = true;
2699 refresh_count = 0;
2691 ch = NOCHAR; 2700 ch = NOCHAR;
2692 break; 2701 break;
2693 } 2702 }
2694 2703
2695 // scr_add_lines only works for nlines <= nrow - 1. 2704 // scr_add_lines only works for nlines <= nrow - 1.
2732 refresh_limit++; 2741 refresh_limit++;
2733 else 2742 else
2734 { 2743 {
2735 flag = true; 2744 flag = true;
2736 scr_refresh (refresh_type); 2745 scr_refresh (refresh_type);
2746 flush_ev.stop ();
2737 } 2747 }
2738 } 2748 }
2739 2749
2740 } 2750 }
2741 else 2751 else
4048 } 4058 }
4049 4059
4050 /* extra handling for values with state unkept */ 4060 /* extra handling for values with state unkept */
4051 switch (arg[i]) 4061 switch (arg[i])
4052 { 4062 {
4063#if ENABLE_STYLES
4064 case 1021:
4065 if (mode)
4066 SET_OPTION (Opt_intensityStyles);
4067 else
4068 CLR_OPTION (Opt_intensityStyles);
4069
4070 scr_touch (true);
4071 break;
4072#endif
4053 case 1048: /* alternative cursor save */ 4073 case 1048: /* alternative cursor save */
4054 case 1049: 4074 case 1049:
4055 if (OPTION (Opt_secondaryScreen)) 4075 if (OPTION (Opt_secondaryScreen))
4056 if (mode == 0) 4076 if (mode == 0)
4057 scr_cursor (RESTORE); 4077 scr_cursor (RESTORE);
4140 if (state) 4160 if (state)
4141 SET_OPTION (Opt_scrollTtyKeypress); 4161 SET_OPTION (Opt_scrollTtyKeypress);
4142 else 4162 else
4143 CLR_OPTION (Opt_scrollTtyKeypress); 4163 CLR_OPTION (Opt_scrollTtyKeypress);
4144 break; 4164 break;
4145#if ENABLE_STYLES
4146 case 1021:
4147 if (state)
4148 SET_OPTION (Opt_intensityStyles);
4149 else
4150 CLR_OPTION (Opt_intensityStyles);
4151#endif
4152 case 1047: /* secondary screen w/ clearing last */ 4165 case 1047: /* secondary screen w/ clearing last */
4153 if (OPTION (Opt_secondaryScreen)) 4166 if (OPTION (Opt_secondaryScreen))
4154 if (current_screen != PRIMARY) 4167 if (current_screen != PRIMARY)
4155 scr_erase_screen (2); 4168 scr_erase_screen (2);
4156 scr_change_screen (state); 4169 scr_change_screen (state);
4315 case 106: 4328 case 106:
4316 case 107: 4329 case 107:
4317 scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg); 4330 scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg);
4318 break; 4331 break;
4319#endif 4332#endif
4320
4321 } 4333 }
4322 } 4334 }
4323} 4335}
4324/*}}} */ 4336/*}}} */
4325 4337

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines