enable ~C (CONNECT command) and make it work (like it does for sun)
authorMarc Teitelbaum <marc@ucbvax.Berkeley.EDU>
Fri, 31 Jul 1992 07:43:43 +0000 (23:43 -0800)
committerMarc Teitelbaum <marc@ucbvax.Berkeley.EDU>
Fri, 31 Jul 1992 07:43:43 +0000 (23:43 -0800)
SCCS-vsn: usr.bin/tip/Makefile 5.10
SCCS-vsn: usr.bin/tip/cmds.c 5.17

usr/src/usr.bin/tip/Makefile
usr/src/usr.bin/tip/cmds.c

index 9a183b7..f8a02bb 100644 (file)
@@ -1,4 +1,4 @@
-#      @(#)Makefile    5.9 (Berkeley) %G%
+#      @(#)Makefile    5.10 (Berkeley) %G%
 #
 # Files are:
 #      /etc/remote             remote host description file
 #
 # Files are:
 #      /etc/remote             remote host description file
 #                              writes on local side
 #      BUFSIZ                  buffer sizing from stdio, must be fed
 #                              explicitly to remcap.c if not 1024
 #                              writes on local side
 #      BUFSIZ                  buffer sizing from stdio, must be fed
 #                              explicitly to remcap.c if not 1024
+#      CONNECT                 enable ~C command (connect pgm to remote)
 
 PROG=  tip
 CFLAGS+=-I${.CURDIR} -DV831 -DVENTEL -DHAYES -DCOURIER -DDEFBR=1200 \
 
 PROG=  tip
 CFLAGS+=-I${.CURDIR} -DV831 -DVENTEL -DHAYES -DCOURIER -DDEFBR=1200 \
-       -DDEFFS=BUFSIZ -DACULOG -DPRISTINE
+       -DDEFFS=BUFSIZ -DACULOG -DPRISTINE -DCONNECT
 .PATH: ${.CURDIR}/aculib
 BINOWN=        uucp
 BINGRP=        dialer
 .PATH: ${.CURDIR}/aculib
 BINOWN=        uucp
 BINGRP=        dialer
index 0ac299a..3edacee 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)cmds.c     5.16 (Berkeley) %G%";
+static char sccsid[] = "@(#)cmds.c     5.17 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "tip.h"
 #endif /* not lint */
 
 #include "tip.h"
@@ -474,11 +474,9 @@ pipeout(c)
 #ifdef CONNECT
 /*
  * Fork a program with:
 #ifdef CONNECT
 /*
  * Fork a program with:
- *  0 <-> local tty in
- *  1 <-> local tty out
+ *  0 <-> remote tty in
+ *  1 <-> remote tty out
  *  2 <-> local tty out
  *  2 <-> local tty out
- *  3 <-> remote tty in
- *  4 <-> remote tty out
  */
 consh(c)
 {
  */
 consh(c)
 {
@@ -507,9 +505,9 @@ consh(c)
        } else {
                register int i;
 
        } else {
                register int i;
 
-               dup2(FD, 3);
-               dup2(3, 4);
-               for (i = 5; i < 20; i++)
+               dup2(FD, 0);
+               dup2(3, 1);
+               for (i = 3; i < 20; i++)
                        close(i);
                signal(SIGINT, SIG_DFL);
                signal(SIGQUIT, SIG_DFL);
                        close(i);
                signal(SIGINT, SIG_DFL);
                signal(SIGQUIT, SIG_DFL);