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.220 by root, Sat Dec 31 18:19:06 2005 UTC vs.
Revision 1.225 by root, Sun Jan 1 13:35:14 2006 UTC

47/*{{{ includes: */ 47/*{{{ includes: */
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
53#if HAVE_SCHED_YIELD
54# include <sched.h>
55#endif
52 56
53#ifdef KEYSYM_RESOURCE 57#ifdef KEYSYM_RESOURCE
54# include "keyboard.h" 58# include "keyboard.h"
55#endif 59#endif
56 60
1080 1084
1081 memmove (cmdbuf_base, cmdbuf_ptr, n); 1085 memmove (cmdbuf_base, cmdbuf_ptr, n);
1082 cmdbuf_ptr = cmdbuf_base; 1086 cmdbuf_ptr = cmdbuf_base;
1083 cmdbuf_endp = cmdbuf_ptr + n; 1087 cmdbuf_endp = cmdbuf_ptr + n;
1084 1088
1085 n = read (pty.pty, cmdbuf_endp, CBUFSIZ - n); 1089 ssize_t r = read (pty.pty, cmdbuf_endp, CBUFSIZ - n);
1086 1090
1087 if (n > 0) 1091 if (r > 0)
1088 { 1092 {
1089 cmdbuf_endp += n; 1093 cmdbuf_endp += r;
1090 return true; 1094 return true;
1091 } 1095 }
1092 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
1093 { 1103 {
1094 pty_ev.stop (); 1104 pty_ev.stop ();
1095 1105
1096 if (!OPTION (Opt_hold)) 1106 if (!OPTION (Opt_hold))
1097 destroy (); 1107 destroy ();
4052 case 1021: 4062 case 1021:
4053 if (mode) 4063 if (mode)
4054 SET_OPTION (Opt_intensityStyles); 4064 SET_OPTION (Opt_intensityStyles);
4055 else 4065 else
4056 CLR_OPTION (Opt_intensityStyles); 4066 CLR_OPTION (Opt_intensityStyles);
4067
4068 scr_touch (true);
4069 break;
4057#endif 4070#endif
4058 case 1048: /* alternative cursor save */ 4071 case 1048: /* alternative cursor save */
4059 case 1049: 4072 case 1049:
4060 if (OPTION (Opt_secondaryScreen)) 4073 if (OPTION (Opt_secondaryScreen))
4061 if (mode == 0) 4074 if (mode == 0)
4313 case 106: 4326 case 106:
4314 case 107: 4327 case 107:
4315 scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg); 4328 scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg);
4316 break; 4329 break;
4317#endif 4330#endif
4318
4319 } 4331 }
4320 } 4332 }
4321} 4333}
4322/*}}} */ 4334/*}}} */
4323 4335

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines