mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Merge pull request #1290 from mistydemeo/check_for_term_h
Add a check for term.h
This commit is contained in:
commit
a731525012
@ -355,6 +355,10 @@ if test "x$want_textui" != "xno"; then
|
|||||||
AC_SUBST(TEXTUI_LIBS)
|
AC_SUBST(TEXTUI_LIBS)
|
||||||
LIBS="$TEXTUI_NO_LIBS"
|
LIBS="$TEXTUI_NO_LIBS"
|
||||||
|
|
||||||
|
AC_CHECK_HEADER([term.h], [
|
||||||
|
AC_DEFINE(HAVE_TERM_H, [], [Define to 1 if you have the `term.h' header.])
|
||||||
|
])
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **
|
dnl **
|
||||||
|
@ -525,6 +525,7 @@ headers = [
|
|||||||
'sys/time.h',
|
'sys/time.h',
|
||||||
'sys/utsname.h',
|
'sys/utsname.h',
|
||||||
'dirent.h',
|
'dirent.h',
|
||||||
|
'term.h',
|
||||||
'unistd.h',
|
'unistd.h',
|
||||||
]
|
]
|
||||||
foreach h : headers
|
foreach h : headers
|
||||||
|
@ -12,6 +12,9 @@ inline static int term_putchar(int c)
|
|||||||
return fputc(c, current_term->out);
|
return fputc(c, current_term->out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_TERM_H
|
||||||
|
#include <term.h>
|
||||||
|
#else
|
||||||
/* Don't bother including curses.h because of these -
|
/* Don't bother including curses.h because of these -
|
||||||
they might not even be defined there */
|
they might not even be defined there */
|
||||||
char *tparm();
|
char *tparm();
|
||||||
@ -21,6 +24,8 @@ int setupterm();
|
|||||||
char *tigetstr();
|
char *tigetstr();
|
||||||
int tigetnum();
|
int tigetnum();
|
||||||
int tigetflag();
|
int tigetflag();
|
||||||
|
#endif
|
||||||
|
|
||||||
#define term_getstr(x, buffer) tigetstr(x.ti_name)
|
#define term_getstr(x, buffer) tigetstr(x.ti_name)
|
||||||
#define term_getnum(x) tigetnum(x.ti_name);
|
#define term_getnum(x) tigetnum(x.ti_name);
|
||||||
#define term_getflag(x) tigetflag(x.ti_name);
|
#define term_getflag(x) tigetflag(x.ti_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user