diff options
| author | Richard M. Stallman | 1995-05-05 02:55:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-05-05 02:55:21 +0000 |
| commit | 5d5b907f9a2bf2ccf7e99ff658c78ebacb4dee65 (patch) | |
| tree | c0ae24c00451294028d76ad5c0afae278415ce76 /src | |
| parent | b818092206eeb9db5ab786a0d4166f9ff25bba16 (diff) | |
| download | emacs-5d5b907f9a2bf2ccf7e99ff658c78ebacb4dee65.tar.gz emacs-5d5b907f9a2bf2ccf7e99ff658c78ebacb4dee65.zip | |
(Fexecute_extended_command): Handle long EMACS_INT in sprintf.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index a387edb3e06..df29e33c75a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6054,9 +6054,23 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_ | |||
| 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 |