diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-05-05 02:56:50 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-05-05 02:56:50 +0000 |
commit | 251bdde1c6a635c10e76c96545864404885e3759 (patch) | |
tree | 6d066cf847ba766f7bb2f85e2dd26654f6b8ec38 /src/doprnt.c | |
parent | 07f2094c71af005066bcbede87e315b81d5037d5 (diff) | |
download | emacs-251bdde1c6a635c10e76c96545864404885e3759.tar.gz |
(doprnt): Handle long EMACS_INT in sprintf.
Diffstat (limited to 'src/doprnt.c')
-rw-r--r-- | src/doprnt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/doprnt.c b/src/doprnt.c index 1743c785f01..39562af19fa 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -126,6 +126,16 @@ doprnt (buffer, bufsize, format, format_end, nargs, args) case 'x': if (cnt == nargs) error ("not enough arguments for format string"); + if (sizeof (int) == sizeof (EMACS_INT)) + ; + else if (sizeof (long) == sizeof (EMACS_INT)) + /* Insert an `l' the right place. */ + string[1] = string[0], + string[0] = string[-1], + string[-1] = 'l', + string++; + else + abort (); sprintf (sprintf_buffer, fmtcpy, args[cnt++]); /* Now copy into final output, truncating as nec. */ string = sprintf_buffer; |