NetBSD Problem Report #1103
From gnats Sat Jun 3 21:06:25 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id VAA00568 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 3 Jun 1995 21:06:24 -0700
Message-Id: <199506040406.VAA06448@gandalf.sigmasoft.com>
Date: Sat, 3 Jun 1995 21:06:42 -0700
From: Thorsten Lockert <tholo@SigmaSoft.COM>
Reply-To: tholo@SigmaSoft.COM
To: gnats-bugs@NetBSD.ORG
Subject: compile warnings in termcap library
X-Send-Pr-Version: 3.2
>Number: 1103
>Category: lib
>Synopsis: compile warnings in termcap library
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 03 21:20:02 +0000 1995
>Closed-Date: Fri Jun 23 16:00:48 +0000 1995
>Last-Modified:
>Originator: Thorsten Lockert
>Release: May 28, 1995
>Organization:
SigmaSoft, Th. Lockert
>Environment:
System: NetBSD gandalf.sigmasoft.com 1.0A NetBSD 1.0A (GANDALF) #1: Sun May 7 21:49:27 PDT 1995 tholo@gandalf.sigmasoft.com:/usr/src/sys/arch/i386/compile/GANDALF i386
>Description:
There are multiple compile warnings in the termcap library when
compiled with -Wall -Wstrict-prototypes.
In addition, one of the prototypes in <curses.h> is wrong.
>How-To-Repeat:
Compile termcap library with -Wall -Wstrict-prototypes
>Fix:
Apply the following patches:
*** src/lib/libcurses/curses.h.orig Sat Jun 3 21:01:40 1995
--- src/lib/libcurses/curses.h Sat Jun 3 21:01:51 1995
***************
*** 335,341 ****
int tgetflag __P((char *));
char *tgetstr __P((char *, char **));
char *tgoto __P((char *, int, int));
! int tputs __P((char *, int, void (*)(int)));
__END_DECLS
#endif /* !_CURSES_H_ */
--- 335,341 ----
int tgetflag __P((char *));
char *tgetstr __P((char *, char **));
char *tgoto __P((char *, int, int));
! void tputs __P((char *, int, void (*)(int)));
__END_DECLS
#endif /* !_CURSES_H_ */
Common subdirectories: src/lib/libterm.orig/TEST and src/lib/libterm/TEST
diff -c src/lib/libterm.orig/termcap.c src/lib/libterm/termcap.c
*** src/lib/libterm.orig/termcap.c Sat Jun 3 20:53:27 1995
--- src/lib/libterm/termcap.c Sat Jun 3 20:57:44 1995
***************
*** 48,53 ****
--- 48,54 ----
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+ #include <curses.h>
#include "pathnames.h"
/*
***************
*** 100,111 ****
* becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists.
*/
if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */
! if (termpath = getenv("TERMPATH"))
strncpy(pathbuf, termpath, PBUFSIZ);
else {
! if (home = getenv("HOME")) { /* set up default */
! p += strlen(home); /* path, looking in */
! strcpy(pathbuf, home); /* $HOME first */
*p++ = '/';
} /* if no $HOME look in current directory */
strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf));
--- 101,112 ----
* becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists.
*/
if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */
! if ((termpath = getenv("TERMPATH")) != NULL)
strncpy(pathbuf, termpath, PBUFSIZ);
else {
! if ((home = getenv("HOME")) != NULL) { /* set up default */
! p += strlen(home); /* path, looking in */
! strcpy(pathbuf, home); /* $HOME first */
*p++ = '/';
} /* if no $HOME look in current directory */
strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf));
diff -c src/lib/libterm.orig/tgoto.c src/lib/libterm/tgoto.c
*** src/lib/libterm.orig/tgoto.c Sat Jun 3 20:53:27 1995
--- src/lib/libterm/tgoto.c Sat Jun 3 20:56:25 1995
***************
*** 42,47 ****
--- 42,48 ----
#endif /* not lint */
#include <string.h>
+ #include <curses.h>
#define CTRL(c) ((c) & 037)
***************
*** 95,101 ****
return ("OOPS");
}
added[0] = 0;
! while (c = *cp++) {
if (c != '%') {
*dp++ = c;
continue;
--- 96,102 ----
return ("OOPS");
}
added[0] = 0;
! while ((c = *cp++) != '\0') {
if (c != '%') {
*dp++ = c;
continue;
***************
*** 146,152 ****
/* fall into... */
case '.':
- casedot:
/*
* This code is worth scratching your head at for a
* while. The idea is that various weird things can
--- 147,152 ----
diff -c src/lib/libterm.orig/tputs.c src/lib/libterm/tputs.c
*** src/lib/libterm.orig/tputs.c Sat Jun 3 20:53:28 1995
--- src/lib/libterm/tputs.c Sat Jun 3 20:59:07 1995
***************
*** 43,48 ****
--- 43,51 ----
#include <sgtty.h>
#include <ctype.h>
+ #include <curses.h>
+
+ #undef ospeed
/*
* The following array gives the number of tens of milliseconds per
***************
*** 62,71 ****
* The number of affected lines is affcnt, and the routine
* used to output one character is outc.
*/
tputs(cp, affcnt, outc)
register char *cp;
int affcnt;
! int (*outc)();
{
register int i = 0;
register int mspc10;
--- 65,75 ----
* The number of affected lines is affcnt, and the routine
* used to output one character is outc.
*/
+ void
tputs(cp, affcnt, outc)
register char *cp;
int affcnt;
! void (*outc) __P((int));
{
register int i = 0;
register int mspc10;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: pk
State-Changed-When: Fri Jun 23 12:00:48 EDT 1995
State-Changed-Why:
Applied suggested prototype/declaration changes.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.