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.221 by root, Sat Dec 31 18:27:57 2005 UTC vs.
Revision 1.223 by root, Sun Jan 1 05:28:28 2006 UTC

53#ifdef KEYSYM_RESOURCE 53#ifdef KEYSYM_RESOURCE
54# include "keyboard.h" 54# include "keyboard.h"
55#endif 55#endif
56 56
57#include <csignal> 57#include <csignal>
58
59#define HAVE_SCHED_YIELD 1 //D//TODO//FIXME
60#if HAVE_SCHED_YIELD
61# include <sched.h>
62#endif
58 63
59/*----------------------------------------------------------------------*/ 64/*----------------------------------------------------------------------*/
60 65
61#define IS_CONTROL(ch) !((ch) & 0xffffff60UL) 66#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
62 67
1080 1085
1081 memmove (cmdbuf_base, cmdbuf_ptr, n); 1086 memmove (cmdbuf_base, cmdbuf_ptr, n);
1082 cmdbuf_ptr = cmdbuf_base; 1087 cmdbuf_ptr = cmdbuf_base;
1083 cmdbuf_endp = cmdbuf_ptr + n; 1088 cmdbuf_endp = cmdbuf_ptr + n;
1084 1089
1085 n = read (pty.pty, cmdbuf_endp, CBUFSIZ - n); 1090 ssize_t r = read (pty.pty, cmdbuf_endp, CBUFSIZ - n);
1086 1091
1087 if (n > 0) 1092 if (r > 0)
1088 { 1093 {
1089 cmdbuf_endp += n; 1094 cmdbuf_endp += r;
1090 return true; 1095 return true;
1091 } 1096 }
1092 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
1093 { 1104 {
1094 pty_ev.stop (); 1105 pty_ev.stop ();
1095 1106
1096 if (!OPTION (Opt_hold)) 1107 if (!OPTION (Opt_hold))
1097 destroy (); 1108 destroy ();
4052 case 1021: 4063 case 1021:
4053 if (mode) 4064 if (mode)
4054 SET_OPTION (Opt_intensityStyles); 4065 SET_OPTION (Opt_intensityStyles);
4055 else 4066 else
4056 CLR_OPTION (Opt_intensityStyles); 4067 CLR_OPTION (Opt_intensityStyles);
4068
4069 want_refresh = 1;
4070 want_full_refresh = 1;
4071 break;
4057#endif 4072#endif
4058 case 1048: /* alternative cursor save */ 4073 case 1048: /* alternative cursor save */
4059 case 1049: 4074 case 1049:
4060 if (OPTION (Opt_secondaryScreen)) 4075 if (OPTION (Opt_secondaryScreen))
4061 if (mode == 0) 4076 if (mode == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines