Mercurial > emacs
comparison src/xdisp.c @ 38393:2f9707a444e4
(get_next_display_element): Use CHAR_STRING_NO_SIGNAL
instead of CHAR_STRING which can signal an error.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 13 Jul 2001 09:30:21 +0000 |
parents | 919f3c722163 |
children | 0fe1911b4f11 |
comparison
equal
deleted
inserted
replaced
38392:5b7951bd8471 | 38393:2f9707a444e4 |
---|---|
4225 escape_glyph = FAST_MAKE_GLYPH ('\\', 0); | 4225 escape_glyph = FAST_MAKE_GLYPH ('\\', 0); |
4226 | 4226 |
4227 if (SINGLE_BYTE_CHAR_P (it->c)) | 4227 if (SINGLE_BYTE_CHAR_P (it->c)) |
4228 str[0] = it->c, len = 1; | 4228 str[0] = it->c, len = 1; |
4229 else | 4229 else |
4230 len = CHAR_STRING (it->c, str); | 4230 { |
4231 len = CHAR_STRING_NO_SIGNAL (it->c, str); | |
4232 if (len < 0) | |
4233 { | |
4234 /* It's an invalid character, which | |
4235 shouldn't happen actually, but due to | |
4236 bugs it may happen. Let's print the char | |
4237 as is, there's not much meaningful we can | |
4238 do with it. */ | |
4239 str[0] = it->c; | |
4240 str[1] = it->c >> 8; | |
4241 str[2] = it->c >> 16; | |
4242 str[3] = it->c >> 24; | |
4243 len = 4; | |
4244 } | |
4245 } | |
4231 | 4246 |
4232 for (i = 0; i < len; i++) | 4247 for (i = 0; i < len; i++) |
4233 { | 4248 { |
4234 XSETINT (it->ctl_chars[i * 4], escape_glyph); | 4249 XSETINT (it->ctl_chars[i * 4], escape_glyph); |
4235 /* Insert three more glyphs into IT->ctl_chars for | 4250 /* Insert three more glyphs into IT->ctl_chars for |