-/* $OpenBSD: hunt.c,v 1.4 1996/10/15 23:47:21 millert Exp $ */
-/* $NetBSD: hunt.c,v 1.5 1995/10/29 00:49:40 pk Exp $ */
+/* $OpenBSD: hunt.c,v 1.5 1997/04/20 23:29:32 millert Exp $ */
+/* $NetBSD: hunt.c,v 1.6 1997/04/20 00:02:10 mellon Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)hunt.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: hunt.c,v 1.4 1996/10/15 23:47:21 millert Exp $";
+static char rcsid[] = "$OpenBSD: hunt.c,v 1.5 1997/04/20 23:29:32 millert Exp $";
#endif /* not lint */
#include "tip.h"
break;
if (setjmp(deadline) == 0) {
alarm(10);
- FD = open(cp, O_RDWR);
+ FD = open(cp, (O_RDWR |
+ (boolean(value(DC)) ? O_NONBLOCK : 0)));
}
alarm(0);
if (FD < 0) {
struct termios cntrl;
tcgetattr(FD, &cntrl);
- cntrl.c_cflag |= HUPCL;
+ if (!boolean(value(DC)))
+ cntrl.c_cflag |= HUPCL;
tcsetattr(FD, TCSAFLUSH, &cntrl);
ioctl(FD, TIOCEXCL, 0);
signal(SIGALRM, SIG_DFL);
-/* $OpenBSD: remote.c,v 1.4 1997/04/02 01:47:02 millert Exp $ */
-/* $NetBSD: remote.c,v 1.4 1996/12/29 10:34:08 cgd Exp $ */
+/* $OpenBSD: remote.c,v 1.5 1997/04/20 23:29:33 millert Exp $ */
+/* $NetBSD: remote.c,v 1.5 1997/04/20 00:02:45 mellon Exp $ */
/*
* Copyright (c) 1992, 1993
#if 0
static char sccsid[] = "@(#)remote.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: remote.c,v 1.4 1997/04/02 01:47:02 millert Exp $";
+static char rcsid[] = "$OpenBSD: remote.c,v 1.5 1997/04/20 23:29:33 millert Exp $";
#endif /* not lint */
#include <stdio.h>
setboolean(value(RAWFTP), 1);
if (cgetflag("hd"))
setboolean(value(HALFDUPLEX), 1);
+ if (cgetflag("dc"))
+ setboolean(value(DC), 1);
if (RE == NOSTR)
RE = (char *)"tip.record";
if (EX == NOSTR)
-/* $OpenBSD: tip.c,v 1.4 1997/04/02 01:47:03 millert Exp $ */
-/* $NetBSD: tip.c,v 1.11 1997/02/11 09:24:06 mrg Exp $ */
+/* $OpenBSD: tip.c,v 1.5 1997/04/20 23:29:33 millert Exp $ */
+/* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */
/*
* Copyright (c) 1983, 1993
#if 0
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: tip.c,v 1.4 1997/04/02 01:47:03 millert Exp $";
+static char rcsid[] = "$OpenBSD: tip.c,v 1.5 1997/04/20 23:29:33 millert Exp $";
#endif /* not lint */
/*
char *s;
register char *p;
{
+ register int c;
register char *b = p;
sig_t oint, oquit;
unraw();
printf("%s", s);
if (setjmp(promptbuf) == 0)
- while ((*p = getchar()) != EOF && *p != '\n')
+ while ((c = getchar()) != EOF && (*p = c) != '\n')
p++;
*p = '\0';
cfsetispeed(&cntrl, speed);
cntrl.c_cflag &= ~(CSIZE|PARENB);
cntrl.c_cflag |= CS8;
+ if (boolean(value(DC)))
+ cntrl.c_cflag |= CLOCAL;
cntrl.c_iflag &= ~(ISTRIP|ICRNL);
cntrl.c_oflag &= ~OPOST;
cntrl.c_lflag &= ~(ICANON|ISIG|IEXTEN|ECHO);
-/* $OpenBSD: tip.h,v 1.5 1997/04/02 01:47:03 millert Exp $ */
-/* $NetBSD: tip.h,v 1.5 1996/12/29 10:34:11 cgd Exp $ */
+/* $OpenBSD: tip.h,v 1.6 1997/04/20 23:29:33 millert Exp $ */
+/* $NetBSD: tip.h,v 1.7 1997/04/20 00:02:46 mellon Exp $ */
/*
* Copyright (c) 1989, 1993
long BR; /* line speed for conversation */
long FS; /* frame size for transfers */
-char DU; /* this host is dialed up */
-char HW; /* this device is hardwired, see hunt.c */
+short DU; /* this host is dialed up */
+short HW; /* this device is hardwired, see hunt.c */
char *ES; /* escape character */
char *EX; /* exceptions */
char *FO; /* force (literal next) char*/
long DL; /* line delay for file transfers to remote */
long CL; /* char delay for file transfers to remote */
long ET; /* echocheck timeout */
-char HD; /* this host is half duplex - do local echo */
+short HD; /* this host is half duplex - do local echo */
+short DC; /* this host is directly connected. */
/*
* String value table