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.224 by root, Sun Jan 1 06:18:20 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 want_refresh = 1;
4069 want_full_refresh = 1;
4070 break;
4057#endif 4071#endif
4058 case 1048: /* alternative cursor save */ 4072 case 1048: /* alternative cursor save */
4059 case 1049: 4073 case 1049:
4060 if (OPTION (Opt_secondaryScreen)) 4074 if (OPTION (Opt_secondaryScreen))
4061 if (mode == 0) 4075 if (mode == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines