From: millert Date: Mon, 28 Apr 1997 20:35:59 +0000 (+0000) Subject: Deal with $TERM not being set (like in single user mode). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9277c003556275c8db214018755556a46296ca62;p=openbsd Deal with $TERM not being set (like in single user mode). --- 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 */