Changeset 249
- Timestamp:
- 07/02/07 11:36:46 (1 year ago)
- Files:
-
- trunk/src/cmd4.c (modified) (2 diffs)
- trunk/src/util.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd4.c
r240 r249 2827 2827 2828 2828 /* Read the pattern */ 2829 while (ch != ESCAPE&& ch != '\xff')2829 while (ch != 0 && ch != '\xff') 2830 2830 { 2831 2831 /* Save the key */ … … 2836 2836 ascii_to_text(tmp, sizeof(tmp), buf+n-1); 2837 2837 text_out(tmp); 2838 flush();2839 2840 2838 2841 2839 /* Do not process macros */ trunk/src/util.c
r206 r249 1177 1177 if (inkey_base) 1178 1178 { 1179 int w = 0; 1180 1181 /* Wait forever */ 1182 if (!inkey_scan) 1183 { 1184 /* Wait for (and remove) a pending key */ 1185 if (0 == Term_inkey(&ke, TRUE, TRUE)) 1179 int w = 0; 1180 1181 /* Wait forever */ 1182 if (!inkey_scan) 1186 1183 { 1187 /* Done */ 1184 /* Wait for (and remove) a pending key */ 1185 if (0 == Term_inkey(&ke, TRUE, TRUE)) 1186 { 1187 /* Done */ 1188 break; 1189 } 1190 1191 /* Oops */ 1188 1192 break; 1189 1193 } 1190 1194 1191 /* Oops */ 1195 /* Wait only as long as macro activation would wait*/ 1196 while (TRUE) 1197 { 1198 /* Check for (and remove) a pending key */ 1199 if (0 == Term_inkey(&ke, FALSE, TRUE)) 1200 { 1201 /* Done */ 1202 break; 1203 } 1204 1205 /* No key ready */ 1206 else 1207 { 1208 /* Increase "wait" */ 1209 w += 10; 1210 1211 /* Excessive delay */ 1212 if (w >= 100) break; 1213 1214 /* Delay */ 1215 Term_xtra(TERM_XTRA_DELAY, w); 1216 1217 } 1218 } 1219 1220 /* Done */ 1221 ke.type = EVT_KBRD; 1192 1222 break; 1193 }1194 1195 /* Wait */1196 while (TRUE)1197 {1198 /* Check for (and remove) a pending key */1199 if (0 == Term_inkey(&ke, FALSE, TRUE))1200 {1201 /* Done */1202 break;1203 }1204 1205 /* No key ready */1206 else1207 {1208 /* Increase "wait" */1209 w += 10;1210 1211 /* Excessive delay */1212 if (w >= 100) break;1213 1214 /* Delay */1215 Term_xtra(TERM_XTRA_DELAY, w);1216 }1217 }1218 1219 /* Done */1220 break;1221 1223 } 1222 1224
