[PATCH] info/terminal.c: use modern prototypes for ncurses

Tony Battersby <[email protected]>
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
This patch fixes a compile error with gcc 15 that I experienced with
Yocto 5.3 (whinlatter).  It only affects builds that do not have
termcap.h installed.

Prototypes were copied from:

https://linux.die.net/man/3/tgetnum

Tony Battersby
Cybernetics
0001-info-terminal.c-use-modern-prototypes-for-curses.patch (text/x-patch, 1.2 KB)
From 3cf0712d7660b676cef365e9e55dcfd92800639f Mon Sep 17 00:00:00 2001
From: Tony Battersby <[email protected]>
Date: Fri, 13 Feb 2026 16:18:02 -0500
Subject: [PATCH] info/terminal.c: use modern prototypes for curses

Fix compile errors with -std=gnu23 (which is the default with gcc 15)
on systems that do not have termcap.h.
---
 info/terminal.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/info/terminal.c b/info/terminal.c
index b1eb0ffd13..273a9ca48d 100644
--- a/info/terminal.c
+++ b/info/terminal.c
@@ -44,9 +44,12 @@
 char *BC, *UP;
 char PC;      /* Pad character */
 short ospeed; /* Terminal output baud rate */
-extern int tgetnum (), tgetflag (), tgetent ();
-extern char *tgetstr (), *tgoto ();
-extern int tputs ();
+extern int tgetnum (char *id);
+extern int tgetflag (char *id);
+extern int tgetent (char *bp, const char *name);
+extern char *tgetstr (char *id, char **area);
+extern char *tgoto (const char *cap, int col, int row);
+extern int tputs (const char *str, int affcnt, int (*putc)(int));
 #endif /* not HAVE_NCURSES_TERMCAP_H */
 
 /* Function "hooks".  If you make one of these point to a function, that
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.