summaryrefslogtreecommitdiffstats
path: root/lib/libtermcap
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-09-10 12:42:10 +0000
committerpeter <peter@FreeBSD.org>1996-09-10 12:42:10 +0000
commit14d65dda3397410449c665e76a3f06dfdfa2f014 (patch)
treebf9486b1e3cfc1005d2fe2c1e577e60803e7c378 /lib/libtermcap
parent1e04fa822e550633de8d4ba887d6866193b7b4ae (diff)
downloadFreeBSD-src-14d65dda3397410449c665e76a3f06dfdfa2f014.zip
FreeBSD-src-14d65dda3397410449c665e76a3f06dfdfa2f014.tar.gz
Change the last -Wall cleanup so that the tputs declaration doesn't
conflict with the other declarations in other files. tputs() is traditionally declared to return int, not void. curses.h has it as int. ncurses has int and actually sets the return value. This problem has been causing the ircII port to not compile. (I've only minimally tested this, I do not have libtermcap on my systems)
Diffstat (limited to 'lib/libtermcap')
-rw-r--r--lib/libtermcap/termcap.h4
-rw-r--r--lib/libtermcap/tputs.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/libtermcap/termcap.h b/lib/libtermcap/termcap.h
index 38ded02..9c0cdfb 100644
--- a/lib/libtermcap/termcap.h
+++ b/lib/libtermcap/termcap.h
@@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
-/* $Id: termcap.h,v 1.6 1995/08/05 21:21:54 ache Exp $ */
+/* $Id: termcap.h,v 1.7 1996/07/12 18:57:26 jkh 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 void tputs __P((const char *, int, int (*)(int)));
+extern int 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/tputs.c b/lib/libtermcap/tputs.c
index 6cfdeed..0e8b147 100644
--- a/lib/libtermcap/tputs.c
+++ b/lib/libtermcap/tputs.c
@@ -57,14 +57,14 @@ char PC;
* The number of affected lines is affcnt, and the routine
* used to output one character is outc.
*/
-void
+int
tputs(const char *cp, int affcnt, int (*outc)(int))
{
register int i = 0;
register int mspc10;
if (cp == 0)
- return;
+ return 0;
/*
* Convert the number representing the delay.
@@ -104,9 +104,9 @@ tputs(const char *cp, int affcnt, int (*outc)(int))
* not comprehensible, then don't try to delay.
*/
if (i == 0)
- return;
+ return 0;
if (ospeed <= 0 || ospeed >= (sizeof tmspc10 / sizeof tmspc10[0]))
- return;
+ return 0;
/*
* Round up by a half a character frame,
@@ -119,4 +119,5 @@ tputs(const char *cp, int affcnt, int (*outc)(int))
i += mspc10 / 2;
for (i /= mspc10; i > 0; i--)
(*outc)(PC);
+ return 0;
}
OpenPOWER on IntegriCloud