-
Notifications
You must be signed in to change notification settings - Fork 372
Fix compat with NetBSD libcurses by using tiparm() instead of tparm() #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
from the ncurses man page: >X/Open Curses prototypes tparm with a fixed number of parameters, >rather than a variable argument list. > >This implementation uses a variable argument list, but can be con- >figured to use the fixed-parameter list. Portable applications >should provide 9 parameters after the format; zeroes are fine for >this purpose. > >In response to review comments by Thomas E. Dickey, X/Open Curses >Issue 7 proposed the tiparm function in mid-2009. Previously, irssi defined its own tparm prototype, so passing a variable number of arguments worked. However, since this change: irssi@0b82f14 <term.h> in included, which on systems using NetBSD libcurses, gives the X/Open compliant definition of tparm, which does not work with a variable number of arguments.
that's what you get from trying to fix apple :( |
nb we don't have tiparm on Solaris 5.10 |
@ailin-nemui does irssi compile using solaris 10 curses? i'd expect it not to because their tparm is also fixed-argument |
maybe we have to revert the apple patch and go back to not including term.h |
that's fine by me, I'd only worry about it breaking again in the future because of people being unaware of this ncurses vs. other quirk (or being unaware that there's an other to ncurses tbh) |
@mistydemeo any ideas? |
FWIW my first version of this patch just added the missing arguments to tparm(), but it does add a lot of noise to the code. |
for the time being I have attached a no-term.h.patch to the releases page. sorry for the inconvenience |
I wonder if we can add a check for
How ugly is it? Sounds like it might actually be a good solution. |
Add the missing arguments to tparm. X/Open Curses specifies tparm takes a fixed number of 10 arguments, while ncurses has implemented it as a varargs function. tiparm is a standardized version of varargs tparm, support in both NetBSD libcurses and ncurses, but not by older versions of Solaris. This is an alternate fix to the one proposed in irssi/irssi/irssi#1305 that should keep compatibility with older versions of Solaris by avoiding tiparm.
@irssi/developers |
Previously, irssi defined its own
tparm()
prototype, so passing a variable number of arguments worked.However, since 0b82f14, <term.h> in included, which on systems using NetBSD's libcurses instead of ncurses, gives the X/Open compliant definition of tparm, which does not work with a variable number of arguments, resulting in a build error.
tiparm()
is a variable-argument version oftparm()
supported by both ncurses and NetBSD's libcurses. It was added to the X/Open Curses standard in Issue 7, the final version of which was released in November 2009.from the ncurses man page: