changeset 4914:56bc426b1eb4

[TERM]: Include client.h. (Fopen_network_stream): Handle TERM.
author Richard M. Stallman <rms@gnu.org>
date Thu, 04 Nov 1993 22:13:15 +0000
parents eb26686b99cf
children c0523a78e6a5
files src/process.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Thu Nov 04 22:12:59 1993 +0000
+++ b/src/process.c	Thu Nov 04 22:13:15 1993 +0000
@@ -46,6 +46,11 @@
 #include <arpa/inet.h>
 #endif /* HAVE_SOCKETS */
 
+/* TERM is a poor-man's SLIP, used on Linux.  */
+#ifdef TERM
+#include <client.h>
+#endif
+
 #if defined(BSD) || defined(STRIDE)
 #include <sys/ioctl.h>
 #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5)
@@ -1396,6 +1401,7 @@
       port = svc_info->s_port;
     }
 
+#ifndef TERM
   host_info_ptr = gethostbyname (XSTRING (host)->data);
   if (host_info_ptr == 0)
     /* Attempt to interpret host as numeric inet address */
@@ -1440,6 +1446,13 @@
       report_file_error ("connection failed",
 			 Fcons (host, Fcons (name, Qnil)));
     }
+#else /* TERM */
+  s = connect_server (0);
+  if (s < 0)
+    report_file_error ("error creating socket", Fcons (name, Qnil));
+  send_command (s, C_PORT, 0, "%s:%d", XSTRING (host)->data, ntohs (port));
+  send_command (s, C_DUMB, 1, 0);
+#endif /* TERM */
 
   inch = s;
   outch = dup (s);