8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

non-standard hp-ux tgetent( ) returns 0 when all is well

This commit is contained in:
verbguy 2009-08-13 11:13:25 +00:00
parent 54ed36bc6a
commit 8586788c31

View File

@ -925,13 +925,20 @@ term_set(EditLine *el, const char *term)
i = tgetent(el->el_term.t_cap, term);
#ifdef __hpux
// hp-ux returns 0 if all is well
if (i == -1) {
#else
if (i <= 0) {
#endif
if (i == -1)
(void) fprintf(el->el_errfile,
"Cannot read termcap database;\n");
#ifndef __hpux
else if (i == 0)
(void) fprintf(el->el_errfile,
"No entry for terminal type \"%s\";\n", term);
#endif
(void) fprintf(el->el_errfile,
"using dumb terminal settings.\n");
Val(T_co) = 80; /* do a dumb terminal */
@ -976,7 +983,11 @@ term_set(EditLine *el, const char *term)
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
term_bind_arrow(el);
el->el_term.t_name = term;
#ifdef __hpux
return (i == -1 ? -1 : 0);
#else
return (i <= 0 ? -1 : 0);
#endif
}