Mercurial > emacs
comparison src/xterm.c @ 79870:b508fea5860e
(handle_one_xevent): Revert to counting chars not bytes.
(XTread_socket): Clarify what return value is counting in comment.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Thu, 17 Jan 2008 15:22:42 +0000 |
parents | fc2bcd2a8aad |
children | 91722a54546f 5d58981e6690 |
comparison
equal
deleted
inserted
replaced
79869:a8237408c221 | 79870:b508fea5860e |
---|---|
6486 : MULTIBYTE_CHAR_KEYSTROKE_EVENT); | 6486 : MULTIBYTE_CHAR_KEYSTROKE_EVENT); |
6487 inev.ie.code = c; | 6487 inev.ie.code = c; |
6488 kbd_buffer_store_event_hold (&inev.ie, hold_quit); | 6488 kbd_buffer_store_event_hold (&inev.ie, hold_quit); |
6489 } | 6489 } |
6490 | 6490 |
6491 /* Previous code updated count by nchars rather than nbytes, | 6491 count += nchars; |
6492 but that seems bogus to me. ++kfs */ | |
6493 count += nbytes; | |
6494 | 6492 |
6495 inev.ie.kind = NO_EVENT; /* Already stored above. */ | 6493 inev.ie.kind = NO_EVENT; /* Already stored above. */ |
6496 | 6494 |
6497 if (keysym == NoSymbol) | 6495 if (keysym == NoSymbol) |
6498 break; | 6496 break; |
6987 /* Read events coming from the X server. | 6985 /* Read events coming from the X server. |
6988 This routine is called by the SIGIO handler. | 6986 This routine is called by the SIGIO handler. |
6989 We return as soon as there are no more events to be read. | 6987 We return as soon as there are no more events to be read. |
6990 | 6988 |
6991 We return the number of characters stored into the buffer, | 6989 We return the number of characters stored into the buffer, |
6992 thus pretending to be `read'. | 6990 thus pretending to be `read' (except the characters we store |
6991 in the keyboard buffer can be multibyte, so are not necessarily | |
6992 C chars). | |
6993 | 6993 |
6994 EXPECTED is nonzero if the caller knows input is available. */ | 6994 EXPECTED is nonzero if the caller knows input is available. */ |
6995 | 6995 |
6996 static int | 6996 static int |
6997 XTread_socket (sd, expected, hold_quit) | 6997 XTread_socket (sd, expected, hold_quit) |