summaryrefslogtreecommitdiff
path: root/mail/mush/patches/patch-an
blob: a011b6b74531088a178cb2b47ebdf619866f3217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$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;
     }