diff src/doprnt.c @ 5581:56144c8593a8

Mechanically change INT to FIXNUM in our sources. src/ChangeLog addition: 2011-10-09 Aidan Kehoe <kehoea@parhasard.net> [...] Mechanically change INT (where it refers to non-bignum Lisp integers) to FIXNUM in our sources. Done for the following functions, enums, and macros: Lisp_Type_Int_Even, Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(), XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(), EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT. The EMACS_INT typedef was not changed, it does not describe non-bignum Lisp integers. Script that did the change available in http://mid.gmane.org/20067.17650.181273.12014@parhasard.net . modules/ChangeLog addition: 2011-10-09 Aidan Kehoe <kehoea@parhasard.net> [...] Mechanically change INT to FIXNUM, where the usage describes non-bignum Lisp integers. See the src/ChangeLog entry for more details. man/ChangeLog addition: 2011-10-09 Aidan Kehoe <kehoea@parhasard.net> * internals/internals.texi (How Lisp Objects Are Represented in C): * internals/internals.texi (Integers and Characters): Mechanically change INT to FIXNUM, where the usage describes non-bignum Lisp integers.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 09 Oct 2011 09:51:57 +0100
parents 308d34e9f07d
children b3824b7f5627
line wrap: on
line diff
--- a/src/doprnt.c	Sat Oct 08 12:26:09 2011 +0100
+++ b/src/doprnt.c	Sun Oct 09 09:51:57 2011 +0100
@@ -371,7 +371,7 @@
 	}
 
       if (j == Dynarr_length (specs))
-	syntax_error ("No conversion spec for argument", make_int (i));
+	syntax_error ("No conversion spec for argument", make_fixnum (i));
 
       ch = spec->converter;
 
@@ -453,7 +453,7 @@
       if (nargs < get_args_needed (specs))
 	signal_error_1 (Qwrong_number_of_arguments,
 			list3 (Qformat,
-			       make_int (nargs),
+			       make_fixnum (nargs),
 			       !NILP (format_reloc) ? format_reloc :
 			       make_string (format_nonreloc, format_length)));
     }
@@ -494,17 +494,17 @@
 	  struct printf_spec *nextspec = Dynarr_atp (specs, i + 1);
 	  Lisp_Object obj = largs[spec->argnum - 1];
 
-	  if (INTP (obj))
+	  if (FIXNUMP (obj))
 	    {
 	      if (spec->forwarding_precision)
 		{
-		  nextspec->precision = XINT (obj);
+		  nextspec->precision = XFIXNUM (obj);
 		  nextspec->minwidth = spec->minwidth;
 		}
 	      else
 		{
-		  nextspec->minwidth = XINT (obj);
-		  if (XINT (obj) < 0)
+		  nextspec->minwidth = XFIXNUM (obj);
+		  if (XFIXNUM (obj) < 0)
 		    {
 		      spec->minus_flag = 1;
 		      nextspec->minwidth = - nextspec->minwidth;
@@ -521,7 +521,7 @@
 
       if (largs && (spec->argnum < 1 || spec->argnum > nargs))
 	syntax_error ("Invalid repositioning argument",
-		      make_int (spec->argnum));
+		      make_fixnum (spec->argnum));
 
       else if (ch == 'S' || ch == 's')
 	{
@@ -588,7 +588,7 @@
 	    {
 	      Lisp_Object obj = largs[spec->argnum - 1];
 	      if (CHARP (obj))
-		obj = make_int (XCHAR (obj));
+		obj = make_fixnum (XCHAR (obj));
 	      if (!NUMBERP (obj))
 		{
 		  /* WARNING!  This MUST be big enough for the sprintf below */
@@ -600,8 +600,8 @@
 		}
 	      else if (strchr (double_converters, ch))
 		{
-		  if (INTP (obj))
-		    arg.d = XINT (obj);
+		  if (FIXNUMP (obj))
+		    arg.d = XFIXNUM (obj);
 		  else if (FLOATP (obj))
 		    arg.d = XFLOAT_DATA (obj);
 #ifdef HAVE_BIGNUM
@@ -643,7 +643,7 @@
 		      obj =
 			Fcanonicalize_number (make_bignum_bg (scratch_bignum));
 #else /* !HAVE_BIGNUM */
-		      obj = make_int (bigfloat_to_long (XBIGFLOAT_DATA (obj)));
+		      obj = make_fixnum (bigfloat_to_long (XBIGFLOAT_DATA (obj)));
 #endif /* HAVE_BIGNUM */
 		    }
 #endif /* HAVE_BIGFLOAT */
@@ -687,18 +687,18 @@
 			}
 		    }
 #endif
-		  if (INTP (obj))
+		  if (FIXNUMP (obj))
 		    {
 		      if (strchr (unsigned_int_converters, ch))
 			{
 #ifdef HAVE_BIGNUM
-			  if (XINT (obj) < 0)
+			  if (XFIXNUM (obj) < 0)
 			    dead_wrong_type_argument (Qnatnump, obj);
 #endif
 			  arg.ul = (unsigned long) XUINT (obj);
 			}
 		      else
-			arg.l = XINT (obj);
+			arg.l = XFIXNUM (obj);
 		    }
 		}
 	    }