diff src/process.c @ 175:2d532a89d707 r20-3b14

Import from CVS: tag r20-3b14
author cvs
date Mon, 13 Aug 2007 09:50:14 +0200
parents 8eaf7971accc
children 3d6bfa290dbd
line wrap: on
line diff
--- a/src/process.c	Mon Aug 13 09:49:11 2007 +0200
+++ b/src/process.c	Mon Aug 13 09:50:14 2007 +0200
@@ -1509,7 +1509,6 @@
     for (tail = network_stream_blocking_port_list; CONSP (tail); tail = XCDR (tail))
       {
 	Lisp_Object tail_port = XCAR (tail);
-	int block_port;
 
 	if (STRINGP (tail_port))
 	  {
@@ -2085,10 +2084,10 @@
        (process))
 {
   process = get_process (process);
-  return Fcons(decoding_stream_coding_system
-	       (XLSTREAM (XPROCESS (process)->instream)),
-	       encoding_stream_coding_system
-	       (XLSTREAM (XPROCESS (process)->outstream)) );
+  return Fcons (decoding_stream_coding_system
+		(XLSTREAM (XPROCESS (process)->instream)),
+		encoding_stream_coding_system
+		(XLSTREAM (XPROCESS (process)->outstream)));
 }
 
 DEFUN ("set-process-input-coding-system",
@@ -2154,11 +2153,10 @@
 exec_sentinel (Lisp_Object proc, Lisp_Object reason)
 {
   /* This function can GC */
-  Lisp_Object sentinel;
+  int speccount = specpdl_depth ();
   struct Lisp_Process *p = XPROCESS (proc);
-  int speccount = specpdl_depth ();
-
-  sentinel = p->sentinel;
+  Lisp_Object sentinel = p->sentinel;
+
   if (NILP (sentinel))
     return;
 
@@ -2172,8 +2170,7 @@
   /* We used to bind inhibit-quit to t here, but call2_trapping_errors()
      does that for us. */
   running_asynch_code = 1;
-  call2_trapping_errors ("Error in process sentinel",
-			 sentinel, proc, reason);
+  call2_trapping_errors ("Error in process sentinel", sentinel, proc, reason);
   running_asynch_code = 0;
   restore_match_data ();
   unbind_to (speccount, Qnil);
@@ -2670,19 +2667,20 @@
 Return the status of PROCESS.
 This is a symbol, one of these:
 
-run  -- for a process that is running.
-stop -- for a process stopped but continuable.
-exit -- for a process that has exited.
+run    -- for a process that is running.
+stop   -- for a process stopped but continuable.
+exit   -- for a process that has exited.
 signal -- for a process that has got a fatal signal.
-open -- for a network stream connection that is open.
+open   -- for a network stream connection that is open.
 closed -- for a network stream connection that is closed.
-nil -- if arg is a process name and no such process exists.
+nil    -- if arg is a process name and no such process exists.
+
 PROCESS may be a process, a buffer, the name of a process or buffer, or
 nil, indicating the current buffer's process.
 */
        (proc))
 {
-  Lisp_Object status;
+  Lisp_Object status_symbol;
 
   if (STRINGP (proc))
     proc = Fget_process (proc);
@@ -2690,17 +2688,17 @@
     proc = get_process (proc);
 
   if (NILP (proc))
-    return proc;
-
-  status = XPROCESS (proc)->status_symbol;
+    return Qnil;
+
+  status_symbol = XPROCESS (proc)->status_symbol;
   if (network_connection_p (proc))
     {
-      if (EQ (status, Qrun))
-	status = Qopen;
-      else if (EQ (status, Qexit))
-	status = Qclosed;
+      if (EQ (status_symbol, Qrun))
+	status_symbol = Qopen;
+      else if (EQ (status_symbol, Qexit))
+	status_symbol = Qclosed;
     }
-  return status;
+  return status_symbol;
 }
 
 DEFUN ("process-exit-status", Fprocess_exit_status, 1, 1, 0, /*
@@ -2782,7 +2780,7 @@
     }
   }
 # else /* ! defined (TCGETA) */
-#error ERROR! Using SIGNALS_VIA_CHARACTERS, but not (TIOCGLTC && TIOCGETC) || TCGETA
+#error ERROR! Using SIGNALS_VIA_CHARACTERS, but not HAVE_TERMIOS || (TIOCGLTC && TIOCGETC) || TCGETA
   /* If your system configuration files define SIGNALS_VIA_CHARACTERS,
      you'd better be using one of the alternatives above!  */
 # endif /* ! defined (TCGETA) */