changeset 10824:894369e950f5

(term_init) [TERMINFO]: Make error message more accurate.
author Karl Heuer <kwzh@gnu.org>
date Sat, 25 Feb 1995 04:05:46 +0000
parents abd2a268ed88
children 4dba26c66bf5
files src/term.c
diffstat 1 files changed, 20 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c	Fri Feb 24 21:26:05 1995 +0000
+++ b/src/term.c	Sat Feb 25 04:05:46 1995 +0000
@@ -1437,15 +1437,31 @@
 
   status = tgetent (buffer, terminal_type);
   if (status < 0)
-    fatal ("Cannot open termcap database file.\n");
+    {
+#ifdef TERMINFO
+      fatal ("Cannot open terminfo database file.\n");
+#else
+      fatal ("Cannot open termcap database file.\n");
+#endif
+    }
   if (status == 0)
-    fatal ("Terminal type %s is not defined.\n\
+    {
+#ifdef TERMINFO
+      fatal ("Terminal type %s is not defined.\n\
+If that is not the actual type of terminal you have,\n\
+use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
+`setenv TERM ...') to specify the correct type.  It may be necessary\n\
+to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.\n",
+	     terminal_type);
+#else
+      fatal ("Terminal type %s is not defined.\n\
 If that is not the actual type of terminal you have,\n\
 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
 `setenv TERM ...') to specify the correct type.  It may be necessary\n\
 to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.\n",
-	   terminal_type);
-
+	     terminal_type);
+#endif
+    }
 #ifdef TERMINFO
   area = (char *) malloc (2044);
 #else