… | |
… | |
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 | |
162 | void |
165 | void |
163 | rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y) |
166 | rxvt_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 | |
246 | void |
248 | void |
247 | rxvt_term::commit_iso14755 () |
249 | rxvt_term::commit_iso14755 () |
248 | { |
250 | { |
249 | wchar_t ch[2]; |
251 | wchar_t ch[2]; |
… | |
… | |
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 (); |
… | |
… | |
4048 | } |
4056 | } |
4049 | |
4057 | |
4050 | /* extra handling for values with state unkept */ |
4058 | /* extra handling for values with state unkept */ |
4051 | switch (arg[i]) |
4059 | switch (arg[i]) |
4052 | { |
4060 | { |
|
|
4061 | #if ENABLE_STYLES |
|
|
4062 | case 1021: |
|
|
4063 | if (mode) |
|
|
4064 | SET_OPTION (Opt_intensityStyles); |
|
|
4065 | else |
|
|
4066 | CLR_OPTION (Opt_intensityStyles); |
|
|
4067 | |
|
|
4068 | scr_touch (true); |
|
|
4069 | break; |
|
|
4070 | #endif |
4053 | case 1048: /* alternative cursor save */ |
4071 | case 1048: /* alternative cursor save */ |
4054 | case 1049: |
4072 | case 1049: |
4055 | if (OPTION (Opt_secondaryScreen)) |
4073 | if (OPTION (Opt_secondaryScreen)) |
4056 | if (mode == 0) |
4074 | if (mode == 0) |
4057 | scr_cursor (RESTORE); |
4075 | scr_cursor (RESTORE); |
… | |
… | |
4140 | if (state) |
4158 | if (state) |
4141 | SET_OPTION (Opt_scrollTtyKeypress); |
4159 | SET_OPTION (Opt_scrollTtyKeypress); |
4142 | else |
4160 | else |
4143 | CLR_OPTION (Opt_scrollTtyKeypress); |
4161 | CLR_OPTION (Opt_scrollTtyKeypress); |
4144 | break; |
4162 | 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 */ |
4163 | case 1047: /* secondary screen w/ clearing last */ |
4153 | if (OPTION (Opt_secondaryScreen)) |
4164 | if (OPTION (Opt_secondaryScreen)) |
4154 | if (current_screen != PRIMARY) |
4165 | if (current_screen != PRIMARY) |
4155 | scr_erase_screen (2); |
4166 | scr_erase_screen (2); |
4156 | scr_change_screen (state); |
4167 | scr_change_screen (state); |
… | |
… | |
4315 | case 106: |
4326 | case 106: |
4316 | case 107: |
4327 | case 107: |
4317 | scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg); |
4328 | scr_color ((unsigned int) (minBrightCOLOR + (arg[i] - 100)), Color_bg); |
4318 | break; |
4329 | break; |
4319 | #endif |
4330 | #endif |
4320 | |
|
|
4321 | } |
4331 | } |
4322 | } |
4332 | } |
4323 | } |
4333 | } |
4324 | /*}}} */ |
4334 | /*}}} */ |
4325 | |
4335 | |