summaryrefslogtreecommitdiffstats
path: root/lib/libtermcap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libtermcap')
-rw-r--r--lib/libtermcap/termcap.32
-rw-r--r--lib/libtermcap/termcap.c4
-rw-r--r--lib/libtermcap/termcap.h4
-rw-r--r--lib/libtermcap/tgoto.c3
-rw-r--r--lib/libtermcap/tputs.c1
5 files changed, 8 insertions, 6 deletions
diff --git a/lib/libtermcap/termcap.3 b/lib/libtermcap/termcap.3
index 3867f70..47103af 100644
--- a/lib/libtermcap/termcap.3
+++ b/lib/libtermcap/termcap.3
@@ -60,7 +60,7 @@
.Fn tgetstr "const char *id" "char **area"
.Ft char *
.Fn tgoto "const char *cm" "int destcol" "int destline"
-.Ft int
+.Ft void
.Fn tputs "const char *cp" "int affcnt" "int (*outc)(int)"
.Ft char *
.Fn tparm "const char *cp" "..."
diff --git a/lib/libtermcap/termcap.c b/lib/libtermcap/termcap.c
index 7f8d39d..38cb1a2 100644
--- a/lib/libtermcap/termcap.c
+++ b/lib/libtermcap/termcap.c
@@ -101,10 +101,10 @@ tgetent(char *bp, const char *name)
* becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists.
*/
if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */
- if (termpath = getenv("TERMPATH"))
+ if ( (termpath = getenv("TERMPATH")) )
strncpy(pathbuf, termpath, PBUFSIZ);
else {
- if (home = getenv("HOME")) { /* set up default */
+ if ( (home = getenv("HOME")) ) {/* set up default */
p += strlen(home); /* path, looking in */
strcpy(pathbuf, home); /* $HOME first */
*p++ = '/';
diff --git a/lib/libtermcap/termcap.h b/lib/libtermcap/termcap.h
index 6e2ef39..38ded02 100644
--- a/lib/libtermcap/termcap.h
+++ b/lib/libtermcap/termcap.h
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-/* $Id: termcap.h,v 1.5 1995/08/04 06:39:54 ache Exp $ */
+/* $Id: termcap.h,v 1.6 1995/08/05 21:21:54 ache Exp $ */
#ifndef _TERMCAP_H_
#define _TERMCAP_H_
@@ -41,7 +41,7 @@ extern int tgetflag __P((const char *));
extern int tgetnum __P((const char *));
extern char *tgetstr __P((const char *, char **));
-extern int tputs __P((const char *, int, int (*)(int)));
+extern void tputs __P((const char *, int, int (*)(int)));
extern char *tgoto __P((const char *, int, int));
extern char *tparm __P((const char *, ...));
diff --git a/lib/libtermcap/tgoto.c b/lib/libtermcap/tgoto.c
index e28a85c..85b8d57 100644
--- a/lib/libtermcap/tgoto.c
+++ b/lib/libtermcap/tgoto.c
@@ -35,6 +35,7 @@
static char sccsid[] = "@(#)tgoto.c 8.1 (Berkeley) 6/4/93";
#endif /* not lint */
+#include <string.h>
#include "termcap.h"
#define CTRL(c) ((c) & 037)
@@ -87,7 +88,7 @@ toohard:
return ("OOPS");
}
added[0] = 0;
- while (c = *cp++) {
+ while ( (c = *cp++) ) {
if (c != '%') {
*dp++ = c;
continue;
diff --git a/lib/libtermcap/tputs.c b/lib/libtermcap/tputs.c
index 46b6dc2..6cfdeed 100644
--- a/lib/libtermcap/tputs.c
+++ b/lib/libtermcap/tputs.c
@@ -57,6 +57,7 @@ char PC;
* The number of affected lines is affcnt, and the routine
* used to output one character is outc.
*/
+void
tputs(const char *cp, int affcnt, int (*outc)(int))
{
register int i = 0;
OpenPOWER on IntegriCloud