-/* $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 $ */
/*
#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 */
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 */