Mercurial > emacs
comparison src/keymap.c @ 26864:b89eb8bbaff1
(push_key_description): Adjusted for the change of
CHAR_STRING.
(Ftext_char_description): Likewise.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Wed, 15 Dec 1999 00:15:57 +0000 |
| parents | 70d85ae6dfee |
| children | b9565b4bcdf8 |
comparison
equal
deleted
inserted
replaced
| 26863:9fa7ffa9b04d | 26864:b89eb8bbaff1 |
|---|---|
| 1901 *p++ = ((c & (7 << bit_offset)) >> bit_offset) + '0'; | 1901 *p++ = ((c & (7 << bit_offset)) >> bit_offset) + '0'; |
| 1902 } | 1902 } |
| 1903 } | 1903 } |
| 1904 else | 1904 else |
| 1905 { | 1905 { |
| 1906 unsigned char work[4], *str; | 1906 p += CHAR_STRING (c, p); |
| 1907 int i = CHAR_STRING (c, work, str); | |
| 1908 bcopy (str, p, i); | |
| 1909 p += i; | |
| 1910 } | 1907 } |
| 1911 } | 1908 } |
| 1912 | 1909 |
| 1913 return p; | 1910 return p; |
| 1914 } | 1911 } |
| 1995 "Return a pretty description of file-character CHARACTER.\n\ | 1992 "Return a pretty description of file-character CHARACTER.\n\ |
| 1996 Control characters turn into \"^char\", etc.") | 1993 Control characters turn into \"^char\", etc.") |
| 1997 (character) | 1994 (character) |
| 1998 Lisp_Object character; | 1995 Lisp_Object character; |
| 1999 { | 1996 { |
| 2000 char tem[6]; | 1997 /* Currently MAX_MULTIBYTE_LENGTH is 4 (< 6). */ |
| 1998 unsigned char str[6]; | |
| 1999 int c; | |
| 2001 | 2000 |
| 2002 CHECK_NUMBER (character, 0); | 2001 CHECK_NUMBER (character, 0); |
| 2003 | 2002 |
| 2004 if (!SINGLE_BYTE_CHAR_P (XFASTINT (character))) | 2003 c = XINT (character); |
| 2005 { | 2004 if (!SINGLE_BYTE_CHAR_P (c)) |
| 2006 unsigned char *str; | 2005 { |
| 2007 int len = non_ascii_char_to_string (XFASTINT (character), tem, &str); | 2006 int len = CHAR_STRING (c, str); |
| 2008 | 2007 |
| 2009 return make_multibyte_string (str, 1, len); | 2008 return make_multibyte_string (str, 1, len); |
| 2010 } | 2009 } |
| 2011 | 2010 |
| 2012 *push_text_char_description (XINT (character) & 0377, tem) = 0; | 2011 *push_text_char_description (c & 0377, str) = 0; |
| 2013 | 2012 |
| 2014 return build_string (tem); | 2013 return build_string (str); |
| 2015 } | 2014 } |
| 2016 | 2015 |
| 2017 /* Return non-zero if SEQ contains only ASCII characters, perhaps with | 2016 /* Return non-zero if SEQ contains only ASCII characters, perhaps with |
| 2018 a meta bit. */ | 2017 a meta bit. */ |
| 2019 static int | 2018 static int |
