Rebuild configure and defs.h.in from new configure.in, and update code to match.

This simplifies the inclusion logic in ircterm.h, and updates term.c to include
term.h if available.  This removes the declarations for setupterm(), tigetstr(),
tigetnum(), tigetflag(), tgetent(), tgetstr(), tgetnum() and tgetflag() from
term.c as those should be defined in term.h or termcap.h.

This should make the system declaration of tparm() available to term.c, which
will fix a crash on NetBSD x86-64 caused by the implicit declaration of tparm()
having a return type of 'int' while the real function has a return type of
'char *'.

We have to include term.h in term.c, not in ircterm.h because term.h defines
a large number of macros, at least two of which ('lines' and 'goto_window')
conflict with names in use in the rest of the codebase.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@435 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-11-10 05:38:06 +00:00
parent 73c9947324
commit 0fe37326a3
4 changed files with 162 additions and 1758 deletions

View File

@@ -54,6 +54,12 @@ DWORD gdwPlatform;
#include <sys/ioctl.h>
#if defined(HAVE_NCURSES_TERM_H)
#include <ncurses/term.h>
#elif defined(HAVE_TERM_H)
#include <term.h>
#endif
static int tty_des; /* descriptor for the tty */
static struct termios oldb, newb;
@@ -66,18 +72,10 @@ extern int already_detached;
/* Systems cant seem to agree where to put these... */
#ifdef HAVE_TERMINFO
extern int setupterm();
extern char *tigetstr();
extern int tigetnum();
extern int tigetflag();
#define Tgetstr(x, y) ((void)&(y), tigetstr((x).iname))
#define Tgetnum(x) tigetnum(x.iname);
#define Tgetflag(x) tigetflag(x.iname);
#else
extern int tgetent();
extern char *tgetstr();
extern int tgetnum();
extern int tgetflag();
#define Tgetstr(x, y) tgetstr(x.tname, &y)
#define Tgetnum(x) tgetnum(x.tname)
#define Tgetflag(x) tgetflag(x.tname)
@@ -1258,9 +1256,9 @@ void tty_dup(int tty)
dup2(tty, tty_des);
}
void reset_lines(int lines)
void reset_lines(int nlines)
{
li = lines;
li = nlines;
}
void reset_cols(int cols)