33 lines
927 B
Text
33 lines
927 B
Text
$NetBSD: patch-an,v 1.2 2005/09/28 20:31:28 christos Exp $
|
|
|
|
--- curses.c.orig 2005-09-28 16:24:35.000000000 -0400
|
|
+++ curses.c 2005-09-28 16:28:37.000000000 -0400
|
|
@@ -11,11 +11,6 @@
|
|
{
|
|
char buf[80];
|
|
extern char *UP;
|
|
-#ifndef M_UNIX
|
|
-#ifndef BSD44
|
|
- extern char ttytype[];
|
|
-#endif
|
|
-#endif /* M_UNIX */
|
|
|
|
if (argv && *++argv && !strcmp(*argv, "-?"))
|
|
return help(0, "curses", cmd_help);
|
|
@@ -57,12 +52,15 @@
|
|
(void) signal(SIGTSTP, stop_start);
|
|
(void) signal(SIGCONT, stop_start);
|
|
#endif /* SIGCONT */
|
|
-#if !defined(SYSV) && !defined(USG) && !defined(__NCURSES_H)
|
|
+#if !defined(SYSV) && !defined(USG) && !defined(BSD44)
|
|
if (!UP || !*UP)
|
|
#else /* ~SYSV && ~USG */
|
|
if (!stdscr)
|
|
#endif /* ~SYSV && ~USG */
|
|
{
|
|
+ char *ttytype = getenv("TERM");
|
|
+ if (ttytype == NULL)
|
|
+ ttytype = "*unknown*";
|
|
print("Terminal type %s can not use the curses interface.\n", ttytype);
|
|
return -1;
|
|
}
|