diff src/process-unix.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 8d29f1c4bb98
children a216b3c2b09e
line wrap: on
line diff
--- a/src/process-unix.c	Sat Oct 08 12:26:09 2011 +0100
+++ b/src/process-unix.c	Sun Oct 09 09:51:57 2011 +0100
@@ -171,10 +171,10 @@
   EMACS_INT inch;
 
   CHECK_STRING (name);
-  CHECK_INT (infd);
-  CHECK_INT (outfd);
+  CHECK_FIXNUM (infd);
+  CHECK_FIXNUM (outfd);
 
-  inch = XINT (infd);
+  inch = XFIXNUM (infd);
   if (get_process_from_usid (FD_TO_USID (inch)))
     invalid_operation ("There is already a process connected to fd", infd);
   if (!NILP (buffer))
@@ -184,7 +184,7 @@
   XPROCESS (proc)->pid = Fcons (infd, name);
   XPROCESS (proc)->buffer = buffer;
   init_process_io_handles (XPROCESS (proc), (void *) inch,
-			   (void *) XINT (outfd), (void *) -1, 0);
+			   (void *) XFIXNUM (outfd), (void *) -1, 0);
   UNIX_DATA (XPROCESS (proc))->connected_via_filedesc_p = 1;
 
   event_stream_select_process (XPROCESS (proc), 1, 1);
@@ -464,7 +464,7 @@
       if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
 #endif
 	break;
-      Fsleep_for (make_int (1));
+      Fsleep_for (make_fixnum (1));
     }
   if (host_info_ptr)
     {
@@ -528,7 +528,7 @@
 	  else
 	    continue;
 	}
-      else if (INTP (tail_port) && (htons ((unsigned short) XINT (tail_port)) == port))
+      else if (FIXNUMP (tail_port) && (htons ((unsigned short) XFIXNUM (tail_port)) == port))
 	break;
     }
 
@@ -927,7 +927,7 @@
 
   /* Set `env' to a vector of the strings in Vprocess_environment.  */
   /* + 2 to include PWD and terminating 0.  */
-  env = alloca_array (Ibyte *, XINT (Flength (Vprocess_environment)) + 2);
+  env = alloca_array (Ibyte *, XFIXNUM (Flength (Vprocess_environment)) + 2);
   {
     REGISTER Lisp_Object tail;
     Ibyte **new_env = env;
@@ -1348,7 +1348,7 @@
 #ifdef SIGCHLD
   EMACS_BLOCK_SIGNAL (SIGCHLD);
 #endif
-  if (waitpid (XINT (p->pid), &w, WNOHANG) == XINT (p->pid))
+  if (waitpid (XFIXNUM (p->pid), &w, WNOHANG) == XFIXNUM (p->pid))
     {
       p->tick++;
       update_status_from_wait_code (p, &w);
@@ -1396,7 +1396,7 @@
 	  {
 	    Lisp_Object proc = XCAR (tail);
 	    p = XPROCESS (proc);
-	    if (INTP (p->pid) && XINT (p->pid) == pid)
+	    if (FIXNUMP (p->pid) && XFIXNUM (p->pid) == pid)
 	      break;
 	    p = 0;
 	  }
@@ -1527,7 +1527,7 @@
 		 uses geometrically increasing timeouts (up to 1s).  This
 		 might be a good idea here.
 	         N.B. timeout_secs = Qnil is faster than Qzero. */
-	      Faccept_process_output (Qnil, Qnil, make_int (10));
+	      Faccept_process_output (Qnil, Qnil, make_fixnum (10));
 	      /* It could have *really* finished, deleting the process */
 	      if (NILP(p->pipe_outstream))
 		return;
@@ -1761,7 +1761,7 @@
        the shell's subprocess is killed, which is the desired effect.
        The process group of p->pid is always p->pid, since it was
        created as a process group leader. */
-    pgid = XINT (p->pid);
+    pgid = XFIXNUM (p->pid);
 
   /* Finally send the signal. */
   if (EMACS_KILLPG (pgid, signo) == -1)
@@ -1885,11 +1885,11 @@
      * Caution: service can either be a string or int.
      * Convert to a C string for later use by getaddrinfo.
      */
-    if (INTP (service))
+    if (FIXNUMP (service))
       {
-	snprintf (portbuf, sizeof (portbuf), "%ld", (long) XINT (service));
+	snprintf (portbuf, sizeof (portbuf), "%ld", (long) XFIXNUM (service));
 	portstring = portbuf;
-	port = htons ((unsigned short) XINT (service));
+	port = htons ((unsigned short) XFIXNUM (service));
       }
     else
       {
@@ -1925,8 +1925,8 @@
     struct sockaddr_in address;
     volatile int i;
 
-    if (INTP (service))
-      port = htons ((unsigned short) XINT (service));
+    if (FIXNUMP (service))
+      port = htons ((unsigned short) XFIXNUM (service));
     else
       {
 	struct servent *svc_info;
@@ -2119,10 +2119,10 @@
   CHECK_STRING (dest);
 
   check_integer_range (port, Qzero, make_integer (USHRT_MAX));
-  theport = htons ((unsigned short) XINT (port));
+  theport = htons ((unsigned short) XFIXNUM (port));
 
   check_integer_range (ttl, Qzero, make_integer (UCHAR_MAX));
-  thettl = (unsigned char) XINT (ttl);
+  thettl = (unsigned char) XFIXNUM (ttl);
 
   if ((udp = getprotobyname ("udp")) == NULL)
     invalid_operation ("No info available for UDP protocol", Qunbound);