From: Dave Love Date: Fri, 17 May 2002 16:36:03 +0000 (+0000) Subject: (modify_event_symbol): Fix print format for 64-bit X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~845 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0dca3959836816622df0e212ec93adb18d655312;p=emacs.git (modify_event_symbol): Fix print format for 64-bit systems. --- diff --git a/src/keyboard.c b/src/keyboard.c index 6dfe76b47e8..8128eaca2d9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5884,10 +5884,17 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_alist_or_stem, 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])