bpo-31891: Fix building the curses module on NetBSD. (#4165)
This commit is contained in:
parent
19f68301a1
commit
baac01e629
|
@ -7,7 +7,7 @@
|
||||||
** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
|
** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
|
||||||
** against multiple definition of wchar_t.
|
** against multiple definition of wchar_t.
|
||||||
*/
|
*/
|
||||||
#ifdef _BSD_WCHAR_T_DEFINED_
|
#ifdef _BSD_WCHAR_T_DEFINED_
|
||||||
#define _WCHAR_T
|
#define _WCHAR_T
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
|
** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
|
||||||
** against multiple definition of wchar_t and wint_t.
|
** against multiple definition of wchar_t and wint_t.
|
||||||
*/
|
*/
|
||||||
#ifdef _XOPEN_SOURCE_EXTENDED
|
#ifdef _XOPEN_SOURCE_EXTENDED
|
||||||
#ifndef __FreeBSD_version
|
#ifndef __FreeBSD_version
|
||||||
#include <osreldate.h>
|
#include <osreldate.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -48,10 +48,6 @@
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
#else
|
#else
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
#ifdef HAVE_TERM_H
|
|
||||||
/* for tigetstr, which is not declared in SysV curses */
|
|
||||||
#include <term.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_NCURSES_H
|
#ifdef HAVE_NCURSES_H
|
||||||
|
@ -74,12 +70,12 @@ extern "C" {
|
||||||
/* Type declarations */
|
/* Type declarations */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_HEAD
|
PyObject_HEAD
|
||||||
WINDOW *win;
|
WINDOW *win;
|
||||||
char *encoding;
|
char *encoding;
|
||||||
} PyCursesWindowObject;
|
} PyCursesWindowObject;
|
||||||
|
|
||||||
#define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type)
|
#define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type)
|
||||||
|
|
||||||
#define PyCurses_CAPSULE_NAME "_curses._C_API"
|
#define PyCurses_CAPSULE_NAME "_curses._C_API"
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,12 @@ requires('curses')
|
||||||
|
|
||||||
# If either of these don't exist, skip the tests.
|
# If either of these don't exist, skip the tests.
|
||||||
curses = import_module('curses')
|
curses = import_module('curses')
|
||||||
import_module('curses.panel')
|
|
||||||
import_module('curses.ascii')
|
import_module('curses.ascii')
|
||||||
import_module('curses.textpad')
|
import_module('curses.textpad')
|
||||||
|
try:
|
||||||
|
import curses.panel
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
def requires_curses_func(name):
|
def requires_curses_func(name):
|
||||||
return unittest.skipUnless(hasattr(curses, name),
|
return unittest.skipUnless(hasattr(curses, name),
|
||||||
|
@ -138,7 +141,8 @@ class TestCurses(unittest.TestCase):
|
||||||
|
|
||||||
stdscr.idcok(1)
|
stdscr.idcok(1)
|
||||||
stdscr.idlok(1)
|
stdscr.idlok(1)
|
||||||
stdscr.immedok(1)
|
if hasattr(stdscr, 'immedok'):
|
||||||
|
stdscr.immedok(1)
|
||||||
stdscr.insch('c')
|
stdscr.insch('c')
|
||||||
stdscr.insdelln(1)
|
stdscr.insdelln(1)
|
||||||
stdscr.insnstr('abc', 3)
|
stdscr.insnstr('abc', 3)
|
||||||
|
@ -172,7 +176,8 @@ class TestCurses(unittest.TestCase):
|
||||||
stdscr.setscrreg(10,15)
|
stdscr.setscrreg(10,15)
|
||||||
win3 = stdscr.subwin(10,10)
|
win3 = stdscr.subwin(10,10)
|
||||||
win3 = stdscr.subwin(10,10, 5,5)
|
win3 = stdscr.subwin(10,10, 5,5)
|
||||||
stdscr.syncok(1)
|
if hasattr(stdscr, 'syncok'):
|
||||||
|
stdscr.syncok(1)
|
||||||
stdscr.timeout(5)
|
stdscr.timeout(5)
|
||||||
stdscr.touchline(5,5)
|
stdscr.touchline(5,5)
|
||||||
stdscr.touchline(5,5,0)
|
stdscr.touchline(5,5,0)
|
||||||
|
@ -211,15 +216,19 @@ class TestCurses(unittest.TestCase):
|
||||||
"Test module-level functions"
|
"Test module-level functions"
|
||||||
for func in [curses.baudrate, curses.beep, curses.can_change_color,
|
for func in [curses.baudrate, curses.beep, curses.can_change_color,
|
||||||
curses.cbreak, curses.def_prog_mode, curses.doupdate,
|
curses.cbreak, curses.def_prog_mode, curses.doupdate,
|
||||||
curses.filter, curses.flash, curses.flushinp,
|
curses.flash, curses.flushinp,
|
||||||
curses.has_colors, curses.has_ic, curses.has_il,
|
curses.has_colors, curses.has_ic, curses.has_il,
|
||||||
curses.isendwin, curses.killchar, curses.longname,
|
curses.isendwin, curses.killchar, curses.longname,
|
||||||
curses.nocbreak, curses.noecho, curses.nonl,
|
curses.nocbreak, curses.noecho, curses.nonl,
|
||||||
curses.noqiflush, curses.noraw,
|
curses.noqiflush, curses.noraw,
|
||||||
curses.reset_prog_mode, curses.termattrs,
|
curses.reset_prog_mode, curses.termattrs,
|
||||||
curses.termname, curses.erasechar, curses.getsyx]:
|
curses.termname, curses.erasechar]:
|
||||||
with self.subTest(func=func.__qualname__):
|
with self.subTest(func=func.__qualname__):
|
||||||
func()
|
func()
|
||||||
|
if hasattr(curses, 'filter'):
|
||||||
|
curses.filter()
|
||||||
|
if hasattr(curses, 'getsyx'):
|
||||||
|
curses.getsyx()
|
||||||
|
|
||||||
# Functions that actually need arguments
|
# Functions that actually need arguments
|
||||||
if curses.tigetstr("cnorm"):
|
if curses.tigetstr("cnorm"):
|
||||||
|
@ -243,15 +252,18 @@ class TestCurses(unittest.TestCase):
|
||||||
curses.putp(b'abc')
|
curses.putp(b'abc')
|
||||||
curses.qiflush()
|
curses.qiflush()
|
||||||
curses.raw() ; curses.raw(1)
|
curses.raw() ; curses.raw(1)
|
||||||
curses.setsyx(5,5)
|
if hasattr(curses, 'setsyx'):
|
||||||
|
curses.setsyx(5,5)
|
||||||
curses.tigetflag('hc')
|
curses.tigetflag('hc')
|
||||||
curses.tigetnum('co')
|
curses.tigetnum('co')
|
||||||
curses.tigetstr('cr')
|
curses.tigetstr('cr')
|
||||||
curses.tparm(b'cr')
|
curses.tparm(b'cr')
|
||||||
curses.typeahead(sys.__stdin__.fileno())
|
if hasattr(curses, 'typeahead'):
|
||||||
|
curses.typeahead(sys.__stdin__.fileno())
|
||||||
curses.unctrl('a')
|
curses.unctrl('a')
|
||||||
curses.ungetch('a')
|
curses.ungetch('a')
|
||||||
curses.use_env(1)
|
if hasattr(curses, 'use_env'):
|
||||||
|
curses.use_env(1)
|
||||||
|
|
||||||
# Functions only available on a few platforms
|
# Functions only available on a few platforms
|
||||||
def test_colors_funcs(self):
|
def test_colors_funcs(self):
|
||||||
|
@ -285,6 +297,7 @@ class TestCurses(unittest.TestCase):
|
||||||
curses.ungetmouse(0, 0, 0, 0, curses.BUTTON1_PRESSED)
|
curses.ungetmouse(0, 0, 0, 0, curses.BUTTON1_PRESSED)
|
||||||
m = curses.getmouse()
|
m = curses.getmouse()
|
||||||
|
|
||||||
|
@requires_curses_func('panel')
|
||||||
def test_userptr_without_set(self):
|
def test_userptr_without_set(self):
|
||||||
w = curses.newwin(10, 10)
|
w = curses.newwin(10, 10)
|
||||||
p = curses.panel.new_panel(w)
|
p = curses.panel.new_panel(w)
|
||||||
|
@ -293,6 +306,7 @@ class TestCurses(unittest.TestCase):
|
||||||
msg='userptr should fail since not set'):
|
msg='userptr should fail since not set'):
|
||||||
p.userptr()
|
p.userptr()
|
||||||
|
|
||||||
|
@requires_curses_func('panel')
|
||||||
def test_userptr_memory_leak(self):
|
def test_userptr_memory_leak(self):
|
||||||
w = curses.newwin(10, 10)
|
w = curses.newwin(10, 10)
|
||||||
p = curses.panel.new_panel(w)
|
p = curses.panel.new_panel(w)
|
||||||
|
@ -305,6 +319,7 @@ class TestCurses(unittest.TestCase):
|
||||||
self.assertEqual(sys.getrefcount(obj), nrefs,
|
self.assertEqual(sys.getrefcount(obj), nrefs,
|
||||||
"set_userptr leaked references")
|
"set_userptr leaked references")
|
||||||
|
|
||||||
|
@requires_curses_func('panel')
|
||||||
def test_userptr_segfault(self):
|
def test_userptr_segfault(self):
|
||||||
panel = curses.panel.new_panel(self.stdscr)
|
panel = curses.panel.new_panel(self.stdscr)
|
||||||
class A:
|
class A:
|
||||||
|
@ -313,6 +328,7 @@ class TestCurses(unittest.TestCase):
|
||||||
panel.set_userptr(A())
|
panel.set_userptr(A())
|
||||||
panel.set_userptr(None)
|
panel.set_userptr(None)
|
||||||
|
|
||||||
|
@requires_curses_func('panel')
|
||||||
def test_new_curses_panel(self):
|
def test_new_curses_panel(self):
|
||||||
panel = curses.panel.new_panel(self.stdscr)
|
panel = curses.panel.new_panel(self.stdscr)
|
||||||
self.assertRaises(TypeError, type(panel))
|
self.assertRaises(TypeError, type(panel))
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fixed building the curses module on NetBSD.
|
|
@ -112,13 +112,13 @@ char *PyCursesVersion = "2.2";
|
||||||
#define CURSES_MODULE
|
#define CURSES_MODULE
|
||||||
#include "py_curses.h"
|
#include "py_curses.h"
|
||||||
|
|
||||||
/* These prototypes are in <term.h>, but including this header
|
#if defined(HAVE_TERM_H) || defined(__sgi)
|
||||||
#defines many common symbols (such as "lines") which breaks the
|
/* For termname, longname, putp, tigetflag, tigetnum, tigetstr, tparm
|
||||||
curses module in other ways. So the code will just specify
|
which are not declared in SysV curses and for setupterm. */
|
||||||
explicit prototypes here. */
|
|
||||||
extern int setupterm(char *,int,int *);
|
|
||||||
#ifdef __sgi
|
|
||||||
#include <term.h>
|
#include <term.h>
|
||||||
|
/* Including <term.h> #defines many common symbols. */
|
||||||
|
#undef lines
|
||||||
|
#undef columns
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LANGINFO_H
|
#ifdef HAVE_LANGINFO_H
|
||||||
|
@ -484,7 +484,9 @@ Window_NoArgNoReturnVoidFunction(wclrtobot)
|
||||||
Window_NoArgNoReturnVoidFunction(wclear)
|
Window_NoArgNoReturnVoidFunction(wclear)
|
||||||
|
|
||||||
Window_OneArgNoReturnVoidFunction(idcok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnVoidFunction(idcok, int, "i;True(1) or False(0)")
|
||||||
|
#ifdef HAVE_CURSES_IMMEDOK
|
||||||
Window_OneArgNoReturnVoidFunction(immedok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnVoidFunction(immedok, int, "i;True(1) or False(0)")
|
||||||
|
#endif
|
||||||
Window_OneArgNoReturnVoidFunction(wtimeout, int, "i;delay")
|
Window_OneArgNoReturnVoidFunction(wtimeout, int, "i;delay")
|
||||||
|
|
||||||
Window_NoArg2TupleReturnFunction(getyx, int, "ii")
|
Window_NoArg2TupleReturnFunction(getyx, int, "ii")
|
||||||
|
@ -494,21 +496,15 @@ Window_NoArg2TupleReturnFunction(getparyx, int, "ii")
|
||||||
|
|
||||||
Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
|
||||||
Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
|
||||||
#if defined(__NetBSD__)
|
|
||||||
Window_OneArgNoReturnVoidFunction(keypad, int, "i;True(1) or False(0)")
|
|
||||||
#else
|
|
||||||
Window_OneArgNoReturnFunction(keypad, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(keypad, int, "i;True(1) or False(0)")
|
||||||
#endif
|
|
||||||
Window_OneArgNoReturnFunction(leaveok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(leaveok, int, "i;True(1) or False(0)")
|
||||||
#if defined(__NetBSD__)
|
|
||||||
Window_OneArgNoReturnVoidFunction(nodelay, int, "i;True(1) or False(0)")
|
|
||||||
#else
|
|
||||||
Window_OneArgNoReturnFunction(nodelay, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(nodelay, int, "i;True(1) or False(0)")
|
||||||
#endif
|
|
||||||
Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
|
||||||
Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
|
||||||
Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
|
Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
|
||||||
|
#ifdef HAVE_CURSES_SYNCOK
|
||||||
Window_OneArgNoReturnFunction(syncok, int, "i;True(1) or False(0)")
|
Window_OneArgNoReturnFunction(syncok, int, "i;True(1) or False(0)")
|
||||||
|
#endif
|
||||||
|
|
||||||
Window_TwoArgNoReturnFunction(mvwin, int, "ii;y,x")
|
Window_TwoArgNoReturnFunction(mvwin, int, "ii;y,x")
|
||||||
Window_TwoArgNoReturnFunction(mvderwin, int, "ii;y,x")
|
Window_TwoArgNoReturnFunction(mvderwin, int, "ii;y,x")
|
||||||
|
@ -1163,12 +1159,7 @@ PyCursesWindow_GetKey(PyCursesWindowObject *self, PyObject *args)
|
||||||
} else if (rtn<=255) {
|
} else if (rtn<=255) {
|
||||||
return Py_BuildValue("C", rtn);
|
return Py_BuildValue("C", rtn);
|
||||||
} else {
|
} else {
|
||||||
const char *knp;
|
const char *knp = keyname(rtn);
|
||||||
#if defined(__NetBSD__)
|
|
||||||
knp = unctrl(rtn);
|
|
||||||
#else
|
|
||||||
knp = keyname(rtn);
|
|
||||||
#endif
|
|
||||||
return PyUnicode_FromString((knp == NULL) ? "" : knp);
|
return PyUnicode_FromString((knp == NULL) ? "" : knp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2017,7 +2008,9 @@ static PyMethodDef PyCursesWindow_Methods[] = {
|
||||||
{"hline", (PyCFunction)PyCursesWindow_Hline, METH_VARARGS},
|
{"hline", (PyCFunction)PyCursesWindow_Hline, METH_VARARGS},
|
||||||
{"idcok", (PyCFunction)PyCursesWindow_idcok, METH_VARARGS},
|
{"idcok", (PyCFunction)PyCursesWindow_idcok, METH_VARARGS},
|
||||||
{"idlok", (PyCFunction)PyCursesWindow_idlok, METH_VARARGS},
|
{"idlok", (PyCFunction)PyCursesWindow_idlok, METH_VARARGS},
|
||||||
|
#ifdef HAVE_CURSES_IMMEDOK
|
||||||
{"immedok", (PyCFunction)PyCursesWindow_immedok, METH_VARARGS},
|
{"immedok", (PyCFunction)PyCursesWindow_immedok, METH_VARARGS},
|
||||||
|
#endif
|
||||||
{"inch", (PyCFunction)PyCursesWindow_InCh, METH_VARARGS},
|
{"inch", (PyCFunction)PyCursesWindow_InCh, METH_VARARGS},
|
||||||
{"insch", (PyCFunction)PyCursesWindow_InsCh, METH_VARARGS},
|
{"insch", (PyCFunction)PyCursesWindow_InsCh, METH_VARARGS},
|
||||||
{"insdelln", (PyCFunction)PyCursesWindow_winsdelln, METH_VARARGS},
|
{"insdelln", (PyCFunction)PyCursesWindow_winsdelln, METH_VARARGS},
|
||||||
|
@ -2053,7 +2046,9 @@ static PyMethodDef PyCursesWindow_Methods[] = {
|
||||||
{"subpad", (PyCFunction)PyCursesWindow_SubWin, METH_VARARGS},
|
{"subpad", (PyCFunction)PyCursesWindow_SubWin, METH_VARARGS},
|
||||||
{"subwin", (PyCFunction)PyCursesWindow_SubWin, METH_VARARGS},
|
{"subwin", (PyCFunction)PyCursesWindow_SubWin, METH_VARARGS},
|
||||||
{"syncdown", (PyCFunction)PyCursesWindow_wsyncdown, METH_NOARGS},
|
{"syncdown", (PyCFunction)PyCursesWindow_wsyncdown, METH_NOARGS},
|
||||||
|
#ifdef HAVE_CURSES_SYNCOK
|
||||||
{"syncok", (PyCFunction)PyCursesWindow_syncok, METH_VARARGS},
|
{"syncok", (PyCFunction)PyCursesWindow_syncok, METH_VARARGS},
|
||||||
|
#endif
|
||||||
{"syncup", (PyCFunction)PyCursesWindow_wsyncup, METH_NOARGS},
|
{"syncup", (PyCFunction)PyCursesWindow_wsyncup, METH_NOARGS},
|
||||||
{"timeout", (PyCFunction)PyCursesWindow_wtimeout, METH_VARARGS},
|
{"timeout", (PyCFunction)PyCursesWindow_wtimeout, METH_VARARGS},
|
||||||
{"touchline", (PyCFunction)PyCursesWindow_TouchLine, METH_VARARGS},
|
{"touchline", (PyCFunction)PyCursesWindow_TouchLine, METH_VARARGS},
|
||||||
|
@ -2145,6 +2140,7 @@ NoArgTrueFalseFunction(isendwin)
|
||||||
NoArgNoReturnVoidFunction(flushinp)
|
NoArgNoReturnVoidFunction(flushinp)
|
||||||
NoArgNoReturnVoidFunction(noqiflush)
|
NoArgNoReturnVoidFunction(noqiflush)
|
||||||
|
|
||||||
|
#ifdef HAVE_CURSES_FILTER
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_filter(PyObject *self)
|
PyCurses_filter(PyObject *self)
|
||||||
{
|
{
|
||||||
|
@ -2153,6 +2149,7 @@ PyCurses_filter(PyObject *self)
|
||||||
filter();
|
filter();
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_Color_Content(PyObject *self, PyObject *args)
|
PyCurses_Color_Content(PyObject *self, PyObject *args)
|
||||||
|
@ -2224,6 +2221,7 @@ PyCurses_EraseChar(PyObject *self)
|
||||||
return PyBytes_FromStringAndSize(&ch, 1);
|
return PyBytes_FromStringAndSize(&ch, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef getsyx
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_getsyx(PyObject *self)
|
PyCurses_getsyx(PyObject *self)
|
||||||
{
|
{
|
||||||
|
@ -2236,6 +2234,7 @@ PyCurses_getsyx(PyObject *self)
|
||||||
|
|
||||||
return Py_BuildValue("(ii)", y, x);
|
return Py_BuildValue("(ii)", y, x);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NCURSES_MOUSE_VERSION
|
#ifdef NCURSES_MOUSE_VERSION
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -2336,9 +2335,9 @@ PyCurses_HalfDelay(PyObject *self, PyObject *args)
|
||||||
return PyCursesCheckERR(halfdelay(tenths), "halfdelay");
|
return PyCursesCheckERR(halfdelay(tenths), "halfdelay");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef STRICT_SYSV_CURSES
|
#ifdef HAVE_CURSES_HAS_KEY
|
||||||
/* No has_key! */
|
static PyObject *
|
||||||
static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
|
PyCurses_has_key(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
|
@ -2351,7 +2350,7 @@ static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
Py_RETURN_TRUE;
|
Py_RETURN_TRUE;
|
||||||
}
|
}
|
||||||
#endif /* STRICT_SYSV_CURSES */
|
#endif
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_Init_Color(PyObject *self, PyObject *args)
|
PyCurses_Init_Color(PyObject *self, PyObject *args)
|
||||||
|
@ -2589,7 +2588,6 @@ PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
#endif /* HAVE_CURSES_IS_TERM_RESIZED */
|
#endif /* HAVE_CURSES_IS_TERM_RESIZED */
|
||||||
|
|
||||||
#if !defined(__NetBSD__)
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_KeyName(PyObject *self, PyObject *args)
|
PyCurses_KeyName(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
|
@ -2608,7 +2606,6 @@ PyCurses_KeyName(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
return PyBytes_FromString((knp == NULL) ? "" : knp);
|
return PyBytes_FromString((knp == NULL) ? "" : knp);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_KillChar(PyObject *self)
|
PyCurses_KillChar(PyObject *self)
|
||||||
|
@ -2913,6 +2910,7 @@ PyCurses_Resize_Term(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
#endif /* HAVE_CURSES_RESIZE_TERM */
|
#endif /* HAVE_CURSES_RESIZE_TERM */
|
||||||
|
|
||||||
|
#ifdef getsyx
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_setsyx(PyObject *self, PyObject *args)
|
PyCurses_setsyx(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
|
@ -2931,6 +2929,7 @@ PyCurses_setsyx(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_Start_Color(PyObject *self)
|
PyCurses_Start_Color(PyObject *self)
|
||||||
|
@ -3027,6 +3026,7 @@ PyCurses_tparm(PyObject *self, PyObject *args)
|
||||||
return PyBytes_FromString(result);
|
return PyBytes_FromString(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_CURSES_TYPEAHEAD
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_TypeAhead(PyObject *self, PyObject *args)
|
PyCurses_TypeAhead(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
|
@ -3038,6 +3038,7 @@ PyCurses_TypeAhead(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
return PyCursesCheckERR(typeahead( fd ), "typeahead");
|
return PyCursesCheckERR(typeahead( fd ), "typeahead");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_UnCtrl(PyObject *self, PyObject *args)
|
PyCurses_UnCtrl(PyObject *self, PyObject *args)
|
||||||
|
@ -3137,6 +3138,7 @@ PyCurses_Unget_Wch(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CURSES_TYPEAHEAD
|
||||||
static PyObject *
|
static PyObject *
|
||||||
PyCurses_Use_Env(PyObject *self, PyObject *args)
|
PyCurses_Use_Env(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
|
@ -3154,6 +3156,7 @@ PyCurses_Use_Env(PyObject *self, PyObject *args)
|
||||||
use_env(flag);
|
use_env(flag);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef STRICT_SYSV_CURSES
|
#ifndef STRICT_SYSV_CURSES
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -3191,19 +3194,23 @@ static PyMethodDef PyCurses_methods[] = {
|
||||||
{"echo", (PyCFunction)PyCurses_echo, METH_VARARGS},
|
{"echo", (PyCFunction)PyCurses_echo, METH_VARARGS},
|
||||||
{"endwin", (PyCFunction)PyCurses_endwin, METH_NOARGS},
|
{"endwin", (PyCFunction)PyCurses_endwin, METH_NOARGS},
|
||||||
{"erasechar", (PyCFunction)PyCurses_EraseChar, METH_NOARGS},
|
{"erasechar", (PyCFunction)PyCurses_EraseChar, METH_NOARGS},
|
||||||
|
#ifdef HAVE_CURSES_FILTER
|
||||||
{"filter", (PyCFunction)PyCurses_filter, METH_NOARGS},
|
{"filter", (PyCFunction)PyCurses_filter, METH_NOARGS},
|
||||||
|
#endif
|
||||||
{"flash", (PyCFunction)PyCurses_flash, METH_NOARGS},
|
{"flash", (PyCFunction)PyCurses_flash, METH_NOARGS},
|
||||||
{"flushinp", (PyCFunction)PyCurses_flushinp, METH_NOARGS},
|
{"flushinp", (PyCFunction)PyCurses_flushinp, METH_NOARGS},
|
||||||
#ifdef NCURSES_MOUSE_VERSION
|
#ifdef NCURSES_MOUSE_VERSION
|
||||||
{"getmouse", (PyCFunction)PyCurses_GetMouse, METH_NOARGS},
|
{"getmouse", (PyCFunction)PyCurses_GetMouse, METH_NOARGS},
|
||||||
{"ungetmouse", (PyCFunction)PyCurses_UngetMouse, METH_VARARGS},
|
{"ungetmouse", (PyCFunction)PyCurses_UngetMouse, METH_VARARGS},
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef getsyx
|
||||||
{"getsyx", (PyCFunction)PyCurses_getsyx, METH_NOARGS},
|
{"getsyx", (PyCFunction)PyCurses_getsyx, METH_NOARGS},
|
||||||
|
#endif
|
||||||
{"getwin", (PyCFunction)PyCurses_GetWin, METH_O},
|
{"getwin", (PyCFunction)PyCurses_GetWin, METH_O},
|
||||||
{"has_colors", (PyCFunction)PyCurses_has_colors, METH_NOARGS},
|
{"has_colors", (PyCFunction)PyCurses_has_colors, METH_NOARGS},
|
||||||
{"has_ic", (PyCFunction)PyCurses_has_ic, METH_NOARGS},
|
{"has_ic", (PyCFunction)PyCurses_has_ic, METH_NOARGS},
|
||||||
{"has_il", (PyCFunction)PyCurses_has_il, METH_NOARGS},
|
{"has_il", (PyCFunction)PyCurses_has_il, METH_NOARGS},
|
||||||
#ifndef STRICT_SYSV_CURSES
|
#ifdef HAVE_CURSES_HAS_KEY
|
||||||
{"has_key", (PyCFunction)PyCurses_has_key, METH_VARARGS},
|
{"has_key", (PyCFunction)PyCurses_has_key, METH_VARARGS},
|
||||||
#endif
|
#endif
|
||||||
{"halfdelay", (PyCFunction)PyCurses_HalfDelay, METH_VARARGS},
|
{"halfdelay", (PyCFunction)PyCurses_HalfDelay, METH_VARARGS},
|
||||||
|
@ -3215,9 +3222,7 @@ static PyMethodDef PyCurses_methods[] = {
|
||||||
#ifdef HAVE_CURSES_IS_TERM_RESIZED
|
#ifdef HAVE_CURSES_IS_TERM_RESIZED
|
||||||
{"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
|
{"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
|
||||||
#endif
|
#endif
|
||||||
#if !defined(__NetBSD__)
|
|
||||||
{"keyname", (PyCFunction)PyCurses_KeyName, METH_VARARGS},
|
{"keyname", (PyCFunction)PyCurses_KeyName, METH_VARARGS},
|
||||||
#endif
|
|
||||||
{"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS},
|
{"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS},
|
||||||
{"longname", (PyCFunction)PyCurses_longname, METH_NOARGS},
|
{"longname", (PyCFunction)PyCurses_longname, METH_NOARGS},
|
||||||
{"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS},
|
{"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS},
|
||||||
|
@ -3249,7 +3254,9 @@ static PyMethodDef PyCurses_methods[] = {
|
||||||
{"resize_term", (PyCFunction)PyCurses_Resize_Term, METH_VARARGS},
|
{"resize_term", (PyCFunction)PyCurses_Resize_Term, METH_VARARGS},
|
||||||
#endif
|
#endif
|
||||||
{"savetty", (PyCFunction)PyCurses_savetty, METH_NOARGS},
|
{"savetty", (PyCFunction)PyCurses_savetty, METH_NOARGS},
|
||||||
|
#ifdef getsyx
|
||||||
{"setsyx", (PyCFunction)PyCurses_setsyx, METH_VARARGS},
|
{"setsyx", (PyCFunction)PyCurses_setsyx, METH_VARARGS},
|
||||||
|
#endif
|
||||||
{"setupterm", (PyCFunction)PyCurses_setupterm,
|
{"setupterm", (PyCFunction)PyCurses_setupterm,
|
||||||
METH_VARARGS|METH_KEYWORDS},
|
METH_VARARGS|METH_KEYWORDS},
|
||||||
{"start_color", (PyCFunction)PyCurses_Start_Color, METH_NOARGS},
|
{"start_color", (PyCFunction)PyCurses_Start_Color, METH_NOARGS},
|
||||||
|
@ -3259,7 +3266,9 @@ static PyMethodDef PyCurses_methods[] = {
|
||||||
{"tigetnum", (PyCFunction)PyCurses_tigetnum, METH_VARARGS},
|
{"tigetnum", (PyCFunction)PyCurses_tigetnum, METH_VARARGS},
|
||||||
{"tigetstr", (PyCFunction)PyCurses_tigetstr, METH_VARARGS},
|
{"tigetstr", (PyCFunction)PyCurses_tigetstr, METH_VARARGS},
|
||||||
{"tparm", (PyCFunction)PyCurses_tparm, METH_VARARGS},
|
{"tparm", (PyCFunction)PyCurses_tparm, METH_VARARGS},
|
||||||
|
#ifdef HAVE_CURSES_TYPEAHEAD
|
||||||
{"typeahead", (PyCFunction)PyCurses_TypeAhead, METH_VARARGS},
|
{"typeahead", (PyCFunction)PyCurses_TypeAhead, METH_VARARGS},
|
||||||
|
#endif
|
||||||
{"unctrl", (PyCFunction)PyCurses_UnCtrl, METH_VARARGS},
|
{"unctrl", (PyCFunction)PyCurses_UnCtrl, METH_VARARGS},
|
||||||
{"ungetch", (PyCFunction)PyCurses_UngetCh, METH_VARARGS},
|
{"ungetch", (PyCFunction)PyCurses_UngetCh, METH_VARARGS},
|
||||||
#if defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)
|
#if defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)
|
||||||
|
@ -3268,7 +3277,9 @@ static PyMethodDef PyCurses_methods[] = {
|
||||||
#ifdef HAVE_NCURSESW
|
#ifdef HAVE_NCURSESW
|
||||||
{"unget_wch", (PyCFunction)PyCurses_Unget_Wch, METH_VARARGS},
|
{"unget_wch", (PyCFunction)PyCurses_Unget_Wch, METH_VARARGS},
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_CURSES_USE_ENV
|
||||||
{"use_env", (PyCFunction)PyCurses_Use_Env, METH_VARARGS},
|
{"use_env", (PyCFunction)PyCurses_Use_Env, METH_VARARGS},
|
||||||
|
#endif
|
||||||
#ifndef STRICT_SYSV_CURSES
|
#ifndef STRICT_SYSV_CURSES
|
||||||
{"use_default_colors", (PyCFunction)PyCurses_Use_Default_Colors, METH_NOARGS},
|
{"use_default_colors", (PyCFunction)PyCurses_Use_Default_Colors, METH_NOARGS},
|
||||||
#endif
|
#endif
|
||||||
|
@ -3346,9 +3357,7 @@ PyInit__curses(void)
|
||||||
SetDictInt("A_DIM", A_DIM);
|
SetDictInt("A_DIM", A_DIM);
|
||||||
SetDictInt("A_BOLD", A_BOLD);
|
SetDictInt("A_BOLD", A_BOLD);
|
||||||
SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
|
SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
|
||||||
#if !defined(__NetBSD__)
|
|
||||||
SetDictInt("A_INVIS", A_INVIS);
|
SetDictInt("A_INVIS", A_INVIS);
|
||||||
#endif
|
|
||||||
SetDictInt("A_PROTECT", A_PROTECT);
|
SetDictInt("A_PROTECT", A_PROTECT);
|
||||||
SetDictInt("A_CHARTEXT", A_CHARTEXT);
|
SetDictInt("A_CHARTEXT", A_CHARTEXT);
|
||||||
SetDictInt("A_COLOR", A_COLOR);
|
SetDictInt("A_COLOR", A_COLOR);
|
||||||
|
@ -3425,7 +3434,6 @@ PyInit__curses(void)
|
||||||
int key;
|
int key;
|
||||||
char *key_n;
|
char *key_n;
|
||||||
char *key_n2;
|
char *key_n2;
|
||||||
#if !defined(__NetBSD__)
|
|
||||||
for (key=KEY_MIN;key < KEY_MAX; key++) {
|
for (key=KEY_MIN;key < KEY_MAX; key++) {
|
||||||
key_n = (char *)keyname(key);
|
key_n = (char *)keyname(key);
|
||||||
if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
|
if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
|
||||||
|
@ -3453,7 +3461,6 @@ PyInit__curses(void)
|
||||||
if (key_n2 != key_n)
|
if (key_n2 != key_n)
|
||||||
PyMem_Free(key_n2);
|
PyMem_Free(key_n2);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
SetDictInt("KEY_MIN", KEY_MIN);
|
SetDictInt("KEY_MIN", KEY_MIN);
|
||||||
SetDictInt("KEY_MAX", KEY_MAX);
|
SetDictInt("KEY_MAX", KEY_MAX);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15812,6 +15812,186 @@ else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
|
||||||
|
$as_echo_n "checking for immedok... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <curses.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef immedok
|
||||||
|
void *x=immedok
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
|
||||||
|
$as_echo_n "checking for syncok... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <curses.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef syncok
|
||||||
|
void *x=syncok
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
|
||||||
|
$as_echo_n "checking for filter... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <curses.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef filter
|
||||||
|
void *x=filter
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
|
||||||
|
$as_echo_n "checking for has_key... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <curses.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef has_key
|
||||||
|
void *x=has_key
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
|
||||||
|
$as_echo_n "checking for typeahead... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <curses.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef typeahead
|
||||||
|
void *x=typeahead
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
|
||||||
|
$as_echo_n "checking for use_env... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <curses.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifndef use_env
|
||||||
|
void *x=use_env
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
else
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
# last curses configure check
|
# last curses configure check
|
||||||
|
|
66
configure.ac
66
configure.ac
|
@ -4992,6 +4992,72 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=resizeterm
|
||||||
AC_MSG_RESULT(yes)],
|
AC_MSG_RESULT(yes)],
|
||||||
[AC_MSG_RESULT(no)]
|
[AC_MSG_RESULT(no)]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for immedok)
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||||
|
#ifndef immedok
|
||||||
|
void *x=immedok
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE(HAVE_CURSES_IMMEDOK, 1, Define if you have the 'immedok' function.)
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for syncok)
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||||
|
#ifndef syncok
|
||||||
|
void *x=syncok
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE(HAVE_CURSES_SYNCOK, 1, Define if you have the 'syncok' function.)
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for filter)
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||||
|
#ifndef filter
|
||||||
|
void *x=filter
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE(HAVE_CURSES_FILTER, 1, Define if you have the 'filter' function.)
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for has_key)
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||||
|
#ifndef has_key
|
||||||
|
void *x=has_key
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE(HAVE_CURSES_HAS_KEY, 1, Define if you have the 'has_key' function.)
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for typeahead)
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||||
|
#ifndef typeahead
|
||||||
|
void *x=typeahead
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE(HAVE_CURSES_TYPEAHEAD, 1, Define if you have the 'typeahead' function.)
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for use_env)
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[
|
||||||
|
#ifndef use_env
|
||||||
|
void *x=use_env
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE(HAVE_CURSES_USE_ENV, 1, Define if you have the 'use_env' function.)
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
# last curses configure check
|
# last curses configure check
|
||||||
CPPFLAGS=$ac_save_cppflags
|
CPPFLAGS=$ac_save_cppflags
|
||||||
|
|
||||||
|
|
|
@ -146,9 +146,18 @@
|
||||||
/* Define if you have the 'ctermid_r' function. */
|
/* Define if you have the 'ctermid_r' function. */
|
||||||
#undef HAVE_CTERMID_R
|
#undef HAVE_CTERMID_R
|
||||||
|
|
||||||
|
/* Define if you have the 'filter' function. */
|
||||||
|
#undef HAVE_CURSES_FILTER
|
||||||
|
|
||||||
/* Define to 1 if you have the <curses.h> header file. */
|
/* Define to 1 if you have the <curses.h> header file. */
|
||||||
#undef HAVE_CURSES_H
|
#undef HAVE_CURSES_H
|
||||||
|
|
||||||
|
/* Define if you have the 'has_key' function. */
|
||||||
|
#undef HAVE_CURSES_HAS_KEY
|
||||||
|
|
||||||
|
/* Define if you have the 'immedok' function. */
|
||||||
|
#undef HAVE_CURSES_IMMEDOK
|
||||||
|
|
||||||
/* Define if you have the 'is_term_resized' function. */
|
/* Define if you have the 'is_term_resized' function. */
|
||||||
#undef HAVE_CURSES_IS_TERM_RESIZED
|
#undef HAVE_CURSES_IS_TERM_RESIZED
|
||||||
|
|
||||||
|
@ -158,6 +167,15 @@
|
||||||
/* Define if you have the 'resize_term' function. */
|
/* Define if you have the 'resize_term' function. */
|
||||||
#undef HAVE_CURSES_RESIZE_TERM
|
#undef HAVE_CURSES_RESIZE_TERM
|
||||||
|
|
||||||
|
/* Define if you have the 'syncok' function. */
|
||||||
|
#undef HAVE_CURSES_SYNCOK
|
||||||
|
|
||||||
|
/* Define if you have the 'typeahead' function. */
|
||||||
|
#undef HAVE_CURSES_TYPEAHEAD
|
||||||
|
|
||||||
|
/* Define if you have the 'use_env' function. */
|
||||||
|
#undef HAVE_CURSES_USE_ENV
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
|
/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_ISFINITE
|
#undef HAVE_DECL_ISFINITE
|
||||||
|
|
Loading…
Reference in New Issue