From 6cf0018652eb3af2797a3f9cadf5be880b75eedf Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sat, 25 Feb 1995 04:05:46 +0000 Subject: (term_init) [TERMINFO]: Make error message more accurate. --- src/term.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/term.c') diff --git a/src/term.c b/src/term.c index 463862a8adf..4caed037bf2 100644 --- a/src/term.c +++ b/src/term.c @@ -1437,15 +1437,31 @@ term_init (terminal_type) 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 -- cgit v1.2.1