Lines Matching defs:buffer
147 * Attempt to decode the key sequence in 'buffer'.
149 * On success (the data in 'buffer' matches a key code) put the
150 * corresponding key code in 'code' and return 0. Return 1 if 'buffer'
152 * make an unambiguous match. Return -1 if the buffer does not contain
155 int get_key_decode(char *buffer, int nc, int *code)
162 if (nc == kc->seqlen && !memcmp(buffer, kc->seq, nc)) {
166 } else if (nc < kc->seqlen && !memcmp(buffer, kc->seq, nc)) {
196 char buffer[KEY_MAXLEN];
215 return (unsigned char)buffer[0]; /* timeout */
229 buffer[nc++] = ch;
232 rv = get_key_decode(buffer, nc, &code);
242 return (unsigned char)buffer[0];