comparison src/keyboard.c @ 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 7eda6c1f3d5e
children fb074e606a41
comparison
equal deleted inserted replaced
11697:2de5b0c89802 11698:36204fbb45d0
6052 if (EQ (prefixarg, Qminus)) 6052 if (EQ (prefixarg, Qminus))
6053 strcpy (buf, "- "); 6053 strcpy (buf, "- ");
6054 else if (CONSP (prefixarg) && XINT (XCONS (prefixarg)->car) == 4) 6054 else if (CONSP (prefixarg) && XINT (XCONS (prefixarg)->car) == 4)
6055 strcpy (buf, "C-u "); 6055 strcpy (buf, "C-u ");
6056 else if (CONSP (prefixarg) && INTEGERP (XCONS (prefixarg)->car)) 6056 else if (CONSP (prefixarg) && INTEGERP (XCONS (prefixarg)->car))
6057 sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car)); 6057 {
6058 if (sizeof (int) == sizeof (EMACS_INT))
6059 sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car));
6060 else if (sizeof (long) == sizeof (EMACS_INT))
6061 sprintf (buf, "%ld ", XINT (XCONS (prefixarg)->car));
6062 else
6063 abort ();
6064 }
6058 else if (INTEGERP (prefixarg)) 6065 else if (INTEGERP (prefixarg))
6059 sprintf (buf, "%d ", XINT (prefixarg)); 6066 {
6067 if (sizeof (int) == sizeof (EMACS_INT))
6068 sprintf (buf, "%d ", XINT (prefixarg));
6069 else if (sizeof (long) == sizeof (EMACS_INT))
6070 sprintf (buf, "%ld ", XINT (prefixarg));
6071 else
6072 abort ();
6073 }
6060 6074
6061 /* This isn't strictly correct if execute-extended-command 6075 /* This isn't strictly correct if execute-extended-command
6062 is bound to anything else. Perhaps it should use 6076 is bound to anything else. Perhaps it should use
6063 this_command_keys? */ 6077 this_command_keys? */
6064 strcat (buf, "M-x "); 6078 strcat (buf, "M-x ");