Mercurial > emacs
changeset 88548:d8ddbdfc33da
(modify_event_symbol): Fix print format for 64-bit
systems.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 17 May 2002 16:36:03 +0000 |
parents | ef1b2fbc435f |
children | c88e9fa13453 |
files | src/keyboard.c |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Fri May 17 16:33:41 2002 +0000 +++ b/src/keyboard.c Fri May 17 16:36:03 2002 +0000 @@ -5884,10 +5884,17 @@ value = Fcdr_safe (Fassq (symbol_int, name_alist_or_stem)); else if (STRINGP (name_alist_or_stem)) { - int len = STRING_BYTES (XSTRING (name_alist_or_stem)); - char *buf = (char *) alloca (len + 50); - sprintf (buf, "%s-%d", XSTRING (name_alist_or_stem)->data, - XINT (symbol_int) + 1); + int len = STRING_BYTES (XSTRING (name_alist_or_stem)); + char *buf = (char *) alloca (len + 50); + + if (sizeof (int) == sizeof (EMACS_INT)) + sprintf (buf, "%s-%d", XSTRING (name_alist_or_stem)->data, + XINT (symbol_int) + 1); + else if (sizeof (long) == sizeof (EMACS_INT)) + sprintf (buf, "%s-%ld", XSTRING (name_alist_or_stem)->data, + XINT (symbol_int) + 1); + else + abort (); value = intern (buf); } else if (name_table != 0 && name_table[symbol_num])