summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-04-28 20:36:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-04-28 20:36:00 +0000
commit50517f1c3c55ef822e3cf41fa3581f7c529257f1 (patch)
treee3af1a5751d38cb6583c3433f95f619b9473edb7 /usr.bin/ftp
parent6f12ae5958c91167b4ebb429c80b855896108720 (diff)
Deal with $TERM not being set (like in single user mode).
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index 47ca64ad8e8..d84e660e141 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.30 1997/04/23 20:33:19 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.31 1997/04/28 20:35:59 millert Exp $ */
/* $NetBSD: main.c,v 1.21 1997/04/05 03:27:39 lukem Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.30 1997/04/23 20:33:19 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.31 1997/04/28 20:35:59 millert Exp $";
#endif
#endif /* not lint */
@@ -107,8 +107,9 @@ main(argc, argv)
if (strcmp(cp, "pftp") == 0)
passivemode = 1;
- dumb_terminal = (!strcmp(getenv("TERM"), "dumb") ||
- !strcmp(getenv("TERM"), "emacs") || !strcmp(getenv("TERM"), "su"));
+ cp = getenv("TERM");
+ dumb_terminal = (cp == NULL || !strcmp(cp, "dumb") ||
+ !strcmp(cp, "emacs") || !strcmp(cp, "su"));
fromatty = isatty(fileno(stdin));
if (fromatty) {
verbose = 1; /* verbose if from a tty */