# HG changeset patch # User Richard M. Stallman # Date 799642610 0 # Node ID 79358a3240fe0ee1bc684c302751dee873f21e2a # Parent eb4b842ee5576ad881e6af267baeb7839167fb7f (doprnt): Handle long EMACS_INT in sprintf. diff -r eb4b842ee557 -r 79358a3240fe src/doprnt.c --- a/src/doprnt.c Fri May 05 02:56:20 1995 +0000 +++ b/src/doprnt.c Fri May 05 02:56:50 1995 +0000 @@ -126,6 +126,16 @@ 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;