Mercurial > emacs
comparison src/print.c @ 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 | e0f3fa4e7bf3 |
children | 7646040d7383 |
comparison
equal
deleted
inserted
replaced
11696:d43754b30133 | 11697:2de5b0c89802 |
---|---|
753 #endif /* MAX_PRINT_CHARS */ | 753 #endif /* MAX_PRINT_CHARS */ |
754 | 754 |
755 switch (XGCTYPE (obj)) | 755 switch (XGCTYPE (obj)) |
756 { | 756 { |
757 case Lisp_Int: | 757 case Lisp_Int: |
758 sprintf (buf, "%d", XINT (obj)); | 758 if (sizeof (int) == sizeof (EMACS_INT)) |
759 sprintf (buf, "%d", XINT (obj)); | |
760 else if (sizeof (long) == sizeof (EMACS_INT)) | |
761 sprintf (buf, "%ld", XINT (obj)); | |
762 else | |
763 abort (); | |
759 strout (buf, -1, printcharfun); | 764 strout (buf, -1, printcharfun); |
760 break; | 765 break; |
761 | 766 |
762 #ifdef LISP_FLOAT_TYPE | 767 #ifdef LISP_FLOAT_TYPE |
763 case Lisp_Float: | 768 case Lisp_Float: |