Mercurial > emacs
comparison src/term.c @ 83147:9b7814160efe
Fix SEGV on terminals without 'IC' capability (Yoshiaki Kasahara).
* src/term.c (tty_insert_glyphs): Added missing first parameter (contributed by
Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp>).
(encode_terminal_code): Converted to use ANSI prototype syntax.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-187
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 06 Jun 2004 00:07:46 +0000 |
parents | 5182815e0ee1 |
children | ae72b7a6c292 |
comparison
equal
deleted
inserted
replaced
83146:3708519cf113 | 83147:9b7814160efe |
---|---|
617 | 617 |
618 We store the number of glyphs actually converted in *CONSUMED. The | 618 We store the number of glyphs actually converted in *CONSUMED. The |
619 return value is the number of bytes store in DST. */ | 619 return value is the number of bytes store in DST. */ |
620 | 620 |
621 int | 621 int |
622 encode_terminal_code (coding, src, dst, src_len, dst_len, consumed) | 622 encode_terminal_code (struct coding_system *coding, |
623 struct coding_system *coding; | 623 struct glyph *src, |
624 struct glyph *src; | 624 unsigned char *dst, |
625 int src_len; | 625 int src_len, |
626 unsigned char *dst; | 626 int dst_len, |
627 int dst_len, *consumed; | 627 int *consumed) |
628 { | 628 { |
629 struct glyph *src_start = src, *src_end = src + src_len; | 629 struct glyph *src_start = src, *src_end = src + src_len; |
630 unsigned char *dst_start = dst, *dst_end = dst + dst_len; | 630 unsigned char *dst_start = dst, *dst_end = dst + dst_len; |
631 register GLYPH g; | 631 register GLYPH g; |
632 unsigned char workbuf[MAX_MULTIBYTE_LENGTH]; | 632 unsigned char workbuf[MAX_MULTIBYTE_LENGTH]; |
893 /* This is the last glyph. */ | 893 /* This is the last glyph. */ |
894 FRAME_TERMINAL_CODING (f)->mode |= CODING_MODE_LAST_BLOCK; | 894 FRAME_TERMINAL_CODING (f)->mode |= CODING_MODE_LAST_BLOCK; |
895 | 895 |
896 /* The size of conversion buffer (1024 bytes) is surely | 896 /* The size of conversion buffer (1024 bytes) is surely |
897 sufficient for just one glyph. */ | 897 sufficient for just one glyph. */ |
898 produced = encode_terminal_code (glyph, conversion_buffer, 1, | 898 produced = encode_terminal_code (FRAME_TERMINAL_CODING (f), |
899 glyph, conversion_buffer, 1, | |
899 conversion_buffer_size, &consumed); | 900 conversion_buffer_size, &consumed); |
900 } | 901 } |
901 | 902 |
902 if (produced > 0) | 903 if (produced > 0) |
903 { | 904 { |