Lines Matching refs:scratch
66 int scan_key_getsize(char *scratch, int timeout_ms, unsigned *xx, unsigned *yy) in scan_key_getsize() argument
70 if (512&(key = scan_key(scratch, timeout_ms))) { in scan_key_getsize()
166 int scan_key(char *scratch, int timeout_ms) in scan_key() argument
178 if (*scratch) { in scan_key()
184 scratch[(1+*scratch)&15] = 0; in scan_key()
185 sscanf(scratch+1, "\033%n[%n%3u%n;%n%3u%nR%n", pos, pos+1, &y, in scan_key()
189 *scratch = 0; in scan_key()
191 } else for (i=0; i<6; i++) if (pos[i]==*scratch) maybe = 1; in scan_key()
196 for (j = 0; j<*scratch; j++) if (scratch[j+1] != test[j]) break; in scan_key()
197 if (j == *scratch) { in scan_key()
201 *scratch = 0; in scan_key()
219 if (toys.signal>0 || 1 != read(0, scratch+1+*scratch, 1)) in scan_key()
221 ++*scratch; in scan_key()
225 if (!*scratch) return -2; in scan_key()
226 i = scratch[1]; in scan_key()
227 if (--*scratch) memmove(scratch+1, scratch+2, *scratch); in scan_key()