changeset 11697:2de5b0c89802

(print): Make the printing understand EMACS_INTs that are longs as well as ints.
author Richard M. Stallman <rms@gnu.org>
date Fri, 05 May 1995 02:23:56 +0000
parents d43754b30133
children 36204fbb45d0
files src/print.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/print.c	Fri May 05 02:21:21 1995 +0000
+++ b/src/print.c	Fri May 05 02:23:56 1995 +0000
@@ -755,7 +755,12 @@
   switch (XGCTYPE (obj))
     {
     case Lisp_Int:
-      sprintf (buf, "%d", XINT (obj));
+      if (sizeof (int) == sizeof (EMACS_INT))
+	sprintf (buf, "%d", XINT (obj));
+      else if (sizeof (long) == sizeof (EMACS_INT))
+	sprintf (buf, "%ld", XINT (obj));
+      else
+	abort ();
       strout (buf, -1, printcharfun);
       break;