Mercurial > emacs
comparison src/xterm.c @ 40433:3f11c065fa9e
(XTread_socket) <KeyPress>: Don't use
STRING_CHAR_AND_LENGTH if nchars == nbytes. From Kenichi Handa
<handa@etl.go.jp>.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 29 Oct 2001 09:44:31 +0000 |
parents | 02365ce6ccc9 |
children | b23a0899363f |
comparison
equal
deleted
inserted
replaced
40432:225bd38b0ce7 | 40433:3f11c065fa9e |
---|---|
10591 | 10591 |
10592 /* Convert the input data to a sequence of | 10592 /* Convert the input data to a sequence of |
10593 character events. */ | 10593 character events. */ |
10594 for (i = 0; i < nbytes; i += len) | 10594 for (i = 0; i < nbytes; i += len) |
10595 { | 10595 { |
10596 c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, | 10596 if (nchars == nbytes) |
10597 nbytes - i, len); | 10597 c = copy_bufptr[i], len = 1; |
10598 else | |
10599 c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, | |
10600 nbytes - i, len); | |
10601 | |
10598 bufp->kind = (SINGLE_BYTE_CHAR_P (c) | 10602 bufp->kind = (SINGLE_BYTE_CHAR_P (c) |
10599 ? ascii_keystroke | 10603 ? ascii_keystroke |
10600 : multibyte_char_keystroke); | 10604 : multibyte_char_keystroke); |
10601 bufp->code = c; | 10605 bufp->code = c; |
10602 XSETFRAME (bufp->frame_or_window, f); | 10606 XSETFRAME (bufp->frame_or_window, f); |