2007-06-08 16:16:15 +02:00
|
|
|
$NetBSD: patch-ah,v 1.3 2007/06/08 14:16:16 wiz Exp $
|
2004-12-06 00:27:28 +01:00
|
|
|
|
2007-06-08 16:16:15 +02:00
|
|
|
--- Modules/_cursesmodule.c.orig 2006-09-27 19:17:32.000000000 +0000
|
|
|
|
+++ Modules/_cursesmodule.c
|
|
|
|
@@ -317,17 +317,9 @@ Window_OneArgNoReturnFunction(wattroff,
|
2004-12-06 00:27:28 +01:00
|
|
|
Window_OneArgNoReturnFunction(wattrset, attr_t, "l;attr")
|
|
|
|
Window_OneArgNoReturnFunction(clearok, 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)")
|
|
|
|
-#endif
|
|
|
|
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)")
|
|
|
|
-#endif
|
|
|
|
Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
|
|
|
|
Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
|
|
|
|
Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -788,11 +780,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
|
2004-12-06 00:27:28 +01:00
|
|
|
} else if (rtn<=255)
|
|
|
|
return Py_BuildValue("c", rtn);
|
|
|
|
else
|
|
|
|
-#if defined(__NetBSD__)
|
|
|
|
- return PyString_FromString(unctrl(rtn));
|
|
|
|
-#else
|
|
|
|
return PyString_FromString((char *)keyname(rtn));
|
|
|
|
-#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
static PyObject *
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -1953,7 +1941,6 @@ PyCurses_IntrFlush(PyObject *self, PyObj
|
2004-12-06 00:27:28 +01:00
|
|
|
return PyCursesCheckERR(intrflush(NULL,ch), "intrflush");
|
|
|
|
}
|
|
|
|
|
|
|
|
-#if !defined(__NetBSD__)
|
|
|
|
static PyObject *
|
|
|
|
PyCurses_KeyName(PyObject *self, PyObject *args)
|
|
|
|
{
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -1972,7 +1959,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
|
2004-12-06 00:27:28 +01:00
|
|
|
|
|
|
|
return PyString_FromString((knp == NULL) ? "" : (char *)knp);
|
|
|
|
}
|
|
|
|
-#endif
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
PyCurses_KillChar(PyObject *self)
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -2421,9 +2407,7 @@ static PyMethodDef PyCurses_methods[] =
|
2004-12-06 00:27:28 +01:00
|
|
|
{"initscr", (PyCFunction)PyCurses_InitScr, METH_NOARGS},
|
|
|
|
{"intrflush", (PyCFunction)PyCurses_IntrFlush, METH_VARARGS},
|
|
|
|
{"isendwin", (PyCFunction)PyCurses_isendwin, METH_NOARGS},
|
|
|
|
-#if !defined(__NetBSD__)
|
|
|
|
{"keyname", (PyCFunction)PyCurses_KeyName, METH_VARARGS},
|
|
|
|
-#endif
|
|
|
|
{"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS},
|
|
|
|
{"longname", (PyCFunction)PyCurses_longname, METH_NOARGS},
|
|
|
|
{"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS},
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -2526,9 +2510,7 @@ init_curses(void)
|
2004-12-06 00:27:28 +01:00
|
|
|
SetDictInt("A_DIM", A_DIM);
|
|
|
|
SetDictInt("A_BOLD", A_BOLD);
|
|
|
|
SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
|
|
|
|
-#if !defined(__NetBSD__)
|
|
|
|
SetDictInt("A_INVIS", A_INVIS);
|
|
|
|
-#endif
|
|
|
|
SetDictInt("A_PROTECT", A_PROTECT);
|
|
|
|
SetDictInt("A_CHARTEXT", A_CHARTEXT);
|
|
|
|
SetDictInt("A_COLOR", A_COLOR);
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -2600,7 +2582,6 @@ init_curses(void)
|
2004-12-06 00:27:28 +01:00
|
|
|
int key;
|
|
|
|
char *key_n;
|
|
|
|
char *key_n2;
|
|
|
|
-#if !defined(__NetBSD__)
|
|
|
|
for (key=KEY_MIN;key < KEY_MAX; key++) {
|
|
|
|
key_n = (char *)keyname(key);
|
|
|
|
if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
|
2007-06-08 16:16:15 +02:00
|
|
|
@@ -2628,7 +2609,6 @@ init_curses(void)
|
2004-12-06 00:27:28 +01:00
|
|
|
if (key_n2 != key_n)
|
|
|
|
free(key_n2);
|
|
|
|
}
|
|
|
|
-#endif
|
|
|
|
SetDictInt("KEY_MIN", KEY_MIN);
|
|
|
|
SetDictInt("KEY_MAX", KEY_MAX);
|
|
|
|
}
|