Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jan 1997 20:36:14 +1100 (EST)
From:      peter.jeremy@alcatel.com.au
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/2383: Inconsistent tputs(3) prototypes in curses.h & termcap.h
Message-ID:  <199701060936.UAA27432@vk2pj.alcatel.com.au>
Resent-Message-ID: <199701060940.BAA23291@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2383
>Category:       bin
>Synopsis:       Inconsistent tputs(3) prototypes in curses.h & termcap.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan  6 01:40:06 PST 1997
>Last-Modified:
>Originator:     Peter Jeremy
>Organization:
Peter Jeremy (VK2PJ)			peter.jeremy@alcatel.com.au
Alcatel Australia Limited
41 Mandible St				Phone: +61 2 9690 5019
ALEXANDRIA  NSW  2015			Fax:   +61 2 9690 5247
>Release:        FreeBSD 2.1-STABLE i386
>Environment:

none

>Description:

A number of different include files include prototypes for tputs(3).  These
include curses.h (twice), ncurses.h, term.h and termcap.h.  According to
the manual page, the prototype for tputs() (located in termcap(3)) is
	int tputs(const char *cp, int affcnt, int (*outc)(int));
This prototype is inconsistent with the prototype definition in termcap.h
and one of the definitions in curses.h.

The prototype in termcap.h would appear to be in error and should be
corrected (see below).  Since the inconsistent prototype in curses.h
is only visible when the macro _CURSES_PRIVATE is defined, the problem
in this case is restricted to building libcurses.  It would be nice
if it was consistent with the public interface.

>How-To-Repeat:

$ man tputs
$ grep tputs /usr/include/*.h

>Fix:

*** /cdrom/usr/src/lib/libedit/termcap.h	Tue Jun  4 22:52:29 1996
--- /usr/src/lib/libedit/termcap.h	Sat Dec 14 08:07:11 1996
***************
*** 47,52 ****
  int   tgetflag	__P((char *));
  int   tgetnum	__P((char *));
  char *tgoto	__P((char *, int, int));
! char *tputs	__P((char *, int, void (*)(int)));
  
  #endif /* _h_termcap */
--- 47,52 ----
  int   tgetflag	__P((char *));
  int   tgetnum	__P((char *));
  char *tgoto	__P((char *, int, int));
! char *tputs	__P((char *, int, int (*)(int)));
  
  #endif /* _h_termcap */

(And a similar change to /usr/include/termcap.h).
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701060936.UAA27432>