Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv761
Modified Files:
_cursesmodule.c
Log Message:
Added .timeout() method and .typeahead() function
Index: _cursesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v
retrieving revision 2.23
retrieving revision 2.24
diff -C2 -r2.23 -r2.24
*** _cursesmodule.c 2000/06/10 23:12:32 2.23
--- _cursesmodule.c 2000/06/21 01:41:48 2.24
***************
*** 227,230 ****
--- 227,231 ----
Window_OneArgNoReturnVoidFunction(idcok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnVoidFunction(immedok, int, "i;True(1) or False(0)")
+ Window_OneArgNoReturnVoidFunction(wtimeout, int, "i;delay")
Window_NoArg2TupleReturnFunction(getyx, int, "(ii)")
***************
*** 1287,1290 ****
--- 1288,1292 ----
{"syncok", (PyCFunction)PyCursesWindow_syncok},
{"syncup", (PyCFunction)PyCursesWindow_wsyncup},
+ {"timeout", (PyCFunction)PyCursesWindow_wtimeout},
{"touchline", (PyCFunction)PyCursesWindow_TouchLine},
{"touchwin", (PyCFunction)PyCursesWindow_touchwin},
***************
*** 2028,2031 ****
--- 2030,2049 ----
static PyObject *
+ PyCurses_TypeAhead(self,arg)
+ PyObject * self;
+ PyObject * arg;
+ {
+ int fd, err;
+
+ PyCursesInitialised
+
+ if (!PyArg_Parse(arg,"i;fd",&fd)) return NULL;
+
+ PyCursesCheckERR(typeahead( fd ), "typeahead");
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ static PyObject *
PyCurses_UnCtrl(self,arg)
PyObject * self;
***************
*** 2155,2158 ****
--- 2173,2177 ----
{"termattrs", (PyCFunction)PyCurses_termattrs},
{"termname", (PyCFunction)PyCurses_termname},
+ {"typeahead", (PyCFunction)PyCurses_TypeAhead},
{"unctrl", (PyCFunction)PyCurses_UnCtrl},
{"ungetch", (PyCFunction)PyCurses_UngetCh},