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.223 by root, Sun Jan 1 05:28:28 2006 UTC

54# include "keyboard.h" 54# include "keyboard.h"
55#endif 55#endif
56 56
57#include <csignal> 57#include <csignal>
58 58
59#define HAVE_SCHED_YIELD 1 //D//TODO//FIXME
60#if HAVE_SCHED_YIELD
61# include <sched.h>
62#endif
63
59/*----------------------------------------------------------------------*/ 64/*----------------------------------------------------------------------*/
60 65
61#define IS_CONTROL(ch) !((ch) & 0xffffff60UL) 66#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
62 67
63// exception thrown when the command parser runs out of input data 68// exception thrown when the command parser runs out of input data
155 } 160 }
156 161
157 x--; 162 x--;
158 } 163 }
159} 164}
160#endif
161 165
162void 166void
163rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y) 167rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y)
164{ 168{
165#if ENABLE_OVERLAY
166 rxvt_fontset *fs = FONTSET (r); 169 rxvt_fontset *fs = FONTSET (r);
167 rxvt_font *f = (*fs)[fs->find_font (ch)]; 170 rxvt_font *f = (*fs)[fs->find_font (ch)];
168 wchar_t *chr, *alloc, ch2, *fname; 171 wchar_t *chr, *alloc, ch2, *fname;
169 int len; 172 int len;
170 173
238 241
239# if ENABLE_COMBINING 242# if ENABLE_COMBINING
240 if (alloc) 243 if (alloc)
241 delete [] alloc; 244 delete [] alloc;
242# endif 245# endif
243#endif
244} 246}
247#endif
245 248
246void 249void
247rxvt_term::commit_iso14755 () 250rxvt_term::commit_iso14755 ()
248{ 251{
249 wchar_t ch[2]; 252 wchar_t ch[2];
1082 1085
1083 memmove (cmdbuf_base, cmdbuf_ptr, n); 1086 memmove (cmdbuf_base, cmdbuf_ptr, n);
1084 cmdbuf_ptr = cmdbuf_base; 1087 cmdbuf_ptr = cmdbuf_base;
1085 cmdbuf_endp = cmdbuf_ptr + n; 1088 cmdbuf_endp = cmdbuf_ptr + n;
1086 1089
1087 n = read (pty.pty, cmdbuf_endp, CBUFSIZ - n); 1090 ssize_t r = read (pty.pty, cmdbuf_endp, CBUFSIZ - n);
1088 1091
1089 if (n > 0) 1092 if (r > 0)
1090 { 1093 {
1091 cmdbuf_endp += n; 1094 cmdbuf_endp += r;
1092 return true; 1095 return true;
1093 } 1096 }
1094 else if ((n < 0 && errno != EAGAIN && errno != EINTR) || n == 0) 1097 else if (r < 0 && (errno == EAGAIN || errno == EINTR))
1098 {
1099#if HAVE_SCHED_YIELD
1100 sched_yield ();
1101#endif
1102 }
1103 else
1095 { 1104 {
1096 pty_ev.stop (); 1105 pty_ev.stop ();
1097 1106
1098 if (!OPTION (Opt_hold)) 1107 if (!OPTION (Opt_hold))
1099 destroy (); 1108 destroy ();
4048 } 4057 }
4049 4058
4050 /* extra handling for values with state unkept */ 4059 /* extra handling for values with state unkept */
4051 switch (arg[i]) 4060 switch (arg[i])
4052 { 4061 {
4062#if ENABLE_STYLES
4063 case 1021:
4064 if (mode)
4065 SET_OPTION (Opt_intensityStyles);
4066 else
4067 CLR_OPTION (Opt_intensityStyles);
4068
4069 want_refresh = 1;
4070 want_full_refresh = 1;
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