X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Ftermsbr.c;h=a1b8ebf102b9f7fac71d21d92c1ad3856f329f8d;hb=1ae9fa8a84998e44e0234543162e257815d7e972;hp=28aaa8f5088920caacf8202c162c743f2ecf382b;hpb=3c9700d8d045f3ff26ce5dd2a174454dafc14822;p=mmh diff --git a/uip/termsbr.c b/uip/termsbr.c index 28aaa8f..a1b8ebf 100644 --- a/uip/termsbr.c +++ b/uip/termsbr.c @@ -3,6 +3,10 @@ * termsbr.c -- termcap support * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include @@ -21,9 +25,14 @@ # include #endif +/* is need anyway for ioctl() #ifdef GWINSZ_IN_SYS_IOCTL +*/ # include +/* #endif +*/ + #ifdef WINSIZE_IN_PTEM # include # include @@ -96,10 +105,10 @@ read_termcap(void) * If possible, we let tgetent allocate its own termcap buffer */ #ifdef TGETENT_ACCEPTS_NULL - if (tgetent (NULL, term) <= 0) - return + if (tgetent (NULL, term) != TGETENT_SUCCESS) + return; #else - if (tgetent (termbuf, term) <= 0) + if (tgetent (termbuf, term) != TGETENT_SUCCESS) return; #endif