diff lib-src/gnuclient.c @ 294:4b85ae5eabfb r21-0b45

Import from CVS: tag r21-0b45
author cvs
date Mon, 13 Aug 2007 10:38:01 +0200
parents 6cb5e14cd98e
children afd57c14dfc8
line wrap: on
line diff
--- a/lib-src/gnuclient.c	Mon Aug 13 10:37:16 2007 +0200
+++ b/lib-src/gnuclient.c	Mon Aug 13 10:38:01 2007 +0200
@@ -24,7 +24,7 @@
  Author: Andy Norman (ange@hplb.hpl.hp.com), based on
          'etc/emacsclient.c' from the GNU Emacs 18.52 distribution.
 
- Please mail bugs and suggestions to the author at the above address.
+ Please mail bugs and suggestions to the XEmacs maintainer.
 */
 
 /*
@@ -467,12 +467,14 @@
 	  send_string (s, ")");
 	}
       send_string (s, "))");
-      send_string (s, EOT_STR);
-      if (read_line (s, result) == 0)
-	{
-	  fprintf (stderr, "%s: Could not read\n", progname);
-	  exit (1);
-	}
+      /* disconnect already sends EOT_STR */
+#ifdef SYSV_IPC
+      if (connect_type == (int) CONN_IPC)
+	disconnect_from_ipc_server (s, msgp, batch && !quick);
+#else /* !SYSV_IPC */
+      if (connect_type != (int) CONN_IPC)
+	disconnect_from_server (s, batch && !quick);
+#endif /* !SYSV_IPC */
     } /* eval_function || eval_form || load_library */
   else if (batch)
     {
@@ -493,12 +495,14 @@
 	  send_string(s, buffer);
 	}
       send_string(s,"))");
-      send_string (s, EOT_STR);
-      if (read_line (s, result) == 0)
-	{
-	  fprintf (stderr, "%s: Could not read\n", progname);
-	  exit (1);
-	}
+      /* disconnect already sends EOT_STR */
+#ifdef SYSV_IPC
+      if (connect_type == (int) CONN_IPC)
+	disconnect_from_ipc_server (s, msgp, batch && !quick);
+#else /* !SYSV_IPC */
+      if (connect_type != (int) CONN_IPC)
+	disconnect_from_server (s, batch && !quick);
+#endif /* !SYSV_IPC */
     }
 
   if (!batch)
@@ -647,8 +651,6 @@
 #endif /* !SYSV_IPC */
     } /* not batch */
 
-  if (batch && !quick)
-      printf ("%s\n", result);
 
   return 0;