projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Backport fix from trunk for SASL bug.
[mmh]
/
uip
/
termsbr.c
diff --git
a/uip/termsbr.c
b/uip/termsbr.c
index
77af468
..
a1b8ebf
100644
(file)
--- a/
uip/termsbr.c
+++ b/
uip/termsbr.c
@@
-3,6
+3,10
@@
* termsbr.c -- termcap support
*
* $Id$
* 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 <h/mh.h>
*/
#include <h/mh.h>
@@
-21,9
+25,14
@@
# include <termcap.h>
#endif
# include <termcap.h>
#endif
+/* <sys/ioctl.h> is need anyway for ioctl()
#ifdef GWINSZ_IN_SYS_IOCTL
#ifdef GWINSZ_IN_SYS_IOCTL
+*/
# include <sys/ioctl.h>
# include <sys/ioctl.h>
+/*
#endif
#endif
+*/
+
#ifdef WINSIZE_IN_PTEM
# include <sys/stream.h>
# include <sys/ptem.h>
#ifdef WINSIZE_IN_PTEM
# include <sys/stream.h>
# include <sys/ptem.h>
@@
-96,10
+105,10
@@
read_termcap(void)
* If possible, we let tgetent allocate its own termcap buffer
*/
#ifdef TGETENT_ACCEPTS_NULL
* 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
#else
- if (tgetent (termbuf, term) <= 0)
+ if (tgetent (termbuf, term) != TGETENT_SUCCESS)
return;
#endif
return;
#endif
@@
-170,7
+179,7
@@
sc_length (void)
static int
outc (int c)
{
static int
outc (int c)
{
- putchar(c);
+ return putchar(c);
}
}