Mercurial > emacs
changeset 11698:36204fbb45d0
(Fexecute_extended_command): Handle long EMACS_INT in sprintf.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 05 May 1995 02:55:21 +0000 |
parents | 2de5b0c89802 |
children | eb4b842ee557 |
files | src/keyboard.c |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Fri May 05 02:23:56 1995 +0000 +++ b/src/keyboard.c Fri May 05 02:55:21 1995 +0000 @@ -6054,9 +6054,23 @@ else if (CONSP (prefixarg) && XINT (XCONS (prefixarg)->car) == 4) strcpy (buf, "C-u "); else if (CONSP (prefixarg) && INTEGERP (XCONS (prefixarg)->car)) - sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car)); + { + if (sizeof (int) == sizeof (EMACS_INT)) + sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car)); + else if (sizeof (long) == sizeof (EMACS_INT)) + sprintf (buf, "%ld ", XINT (XCONS (prefixarg)->car)); + else + abort (); + } else if (INTEGERP (prefixarg)) - sprintf (buf, "%d ", XINT (prefixarg)); + { + if (sizeof (int) == sizeof (EMACS_INT)) + sprintf (buf, "%d ", XINT (prefixarg)); + else if (sizeof (long) == sizeof (EMACS_INT)) + sprintf (buf, "%ld ", XINT (prefixarg)); + else + abort (); + } /* This isn't strictly correct if execute-extended-command is bound to anything else. Perhaps it should use