mirror of https://github.com/python/cpython.git
reindent _cursesmodule.c
Use untabify.py + emacs (python3 mode) + manual editions for Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS
This commit is contained in:
parent
03acec2256
commit
fd2103e68d
|
@ -33,12 +33,12 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
A number of SysV or ncurses functions don't have wrappers yet; if you
|
A number of SysV or ncurses functions don't have wrappers yet; if you
|
||||||
need a given function, add it and send a patch. See
|
need a given function, add it and send a patch. See
|
||||||
http://www.python.org/dev/patches/ for instructions on how to submit
|
http://www.python.org/dev/patches/ for instructions on how to submit
|
||||||
patches to Python.
|
patches to Python.
|
||||||
|
|
||||||
Here's a list of currently unsupported functions:
|
Here's a list of currently unsupported functions:
|
||||||
|
|
||||||
addchnstr addchstr color_set define_key
|
addchnstr addchstr color_set define_key
|
||||||
del_curterm delscreen dupwin inchnstr inchstr innstr keyok
|
del_curterm delscreen dupwin inchnstr inchstr innstr keyok
|
||||||
|
@ -51,12 +51,12 @@ Here's a list of currently unsupported functions:
|
||||||
vidattr vidputs waddchnstr waddchstr
|
vidattr vidputs waddchnstr waddchstr
|
||||||
wcolor_set winchnstr winchstr winnstr wmouse_trafo wscrl
|
wcolor_set winchnstr winchstr winnstr wmouse_trafo wscrl
|
||||||
|
|
||||||
Low-priority:
|
Low-priority:
|
||||||
slk_attr slk_attr_off slk_attr_on slk_attr_set slk_attroff
|
slk_attr slk_attr_off slk_attr_on slk_attr_set slk_attroff
|
||||||
slk_attron slk_attrset slk_clear slk_color slk_init slk_label
|
slk_attron slk_attrset slk_clear slk_color slk_init slk_label
|
||||||
slk_noutrefresh slk_refresh slk_restore slk_set slk_touch
|
slk_noutrefresh slk_refresh slk_restore slk_set slk_touch
|
||||||
|
|
||||||
Menu extension (ncurses and probably SYSV):
|
Menu extension (ncurses and probably SYSV):
|
||||||
current_item free_item free_menu item_count item_description
|
current_item free_item free_menu item_count item_description
|
||||||
item_index item_init item_name item_opts item_opts_off
|
item_index item_init item_name item_opts item_opts_off
|
||||||
item_opts_on item_term item_userptr item_value item_visible
|
item_opts_on item_term item_userptr item_value item_visible
|
||||||
|
@ -72,7 +72,7 @@ Menu extension (ncurses and probably SYSV):
|
||||||
set_menu_pattern set_menu_spacing set_menu_sub set_menu_term
|
set_menu_pattern set_menu_spacing set_menu_sub set_menu_term
|
||||||
set_menu_userptr set_menu_win set_top_row top_row unpost_menu
|
set_menu_userptr set_menu_win set_top_row top_row unpost_menu
|
||||||
|
|
||||||
Form extension (ncurses and probably SYSV):
|
Form extension (ncurses and probably SYSV):
|
||||||
current_field data_ahead data_behind dup_field
|
current_field data_ahead data_behind dup_field
|
||||||
dynamic_fieldinfo field_arg field_back field_buffer
|
dynamic_fieldinfo field_arg field_back field_buffer
|
||||||
field_count field_fore field_index field_info field_init
|
field_count field_fore field_index field_info field_init
|
||||||
|
@ -92,7 +92,7 @@ Form extension (ncurses and probably SYSV):
|
||||||
set_max_field set_new_page unpost_form
|
set_max_field set_new_page unpost_form
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Release Number */
|
/* Release Number */
|
||||||
|
|
||||||
|
@ -240,53 +240,53 @@ PyTypeObject PyCursesWindow_Type;
|
||||||
TYPE - parameter Type
|
TYPE - parameter Type
|
||||||
ERGSTR - format string for construction of the return value
|
ERGSTR - format string for construction of the return value
|
||||||
PARSESTR - format string for argument parsing
|
PARSESTR - format string for argument parsing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Window_NoArgNoReturnFunction(X) \
|
#define Window_NoArgNoReturnFunction(X) \
|
||||||
static PyObject *PyCursesWindow_ ## X \
|
static PyObject *PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self, PyObject *args) \
|
(PyCursesWindowObject *self, PyObject *args) \
|
||||||
{ return PyCursesCheckERR(X(self->win), # X); }
|
{ return PyCursesCheckERR(X(self->win), # X); }
|
||||||
|
|
||||||
#define Window_NoArgTrueFalseFunction(X) \
|
#define Window_NoArgTrueFalseFunction(X) \
|
||||||
static PyObject * PyCursesWindow_ ## X \
|
static PyObject * PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self) \
|
(PyCursesWindowObject *self) \
|
||||||
{ \
|
{ \
|
||||||
if (X (self->win) == FALSE) { Py_INCREF(Py_False); return Py_False; } \
|
if (X (self->win) == FALSE) { Py_INCREF(Py_False); return Py_False; } \
|
||||||
else { Py_INCREF(Py_True); return Py_True; } }
|
else { Py_INCREF(Py_True); return Py_True; } }
|
||||||
|
|
||||||
#define Window_NoArgNoReturnVoidFunction(X) \
|
#define Window_NoArgNoReturnVoidFunction(X) \
|
||||||
static PyObject * PyCursesWindow_ ## X \
|
static PyObject * PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self) \
|
(PyCursesWindowObject *self) \
|
||||||
{ \
|
{ \
|
||||||
X(self->win); Py_INCREF(Py_None); return Py_None; }
|
X(self->win); Py_INCREF(Py_None); return Py_None; }
|
||||||
|
|
||||||
#define Window_NoArg2TupleReturnFunction(X, TYPE, ERGSTR) \
|
#define Window_NoArg2TupleReturnFunction(X, TYPE, ERGSTR) \
|
||||||
static PyObject * PyCursesWindow_ ## X \
|
static PyObject * PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self) \
|
(PyCursesWindowObject *self) \
|
||||||
{ \
|
{ \
|
||||||
TYPE arg1, arg2; \
|
TYPE arg1, arg2; \
|
||||||
X(self->win,arg1,arg2); return Py_BuildValue(ERGSTR, arg1, arg2); }
|
X(self->win,arg1,arg2); return Py_BuildValue(ERGSTR, arg1, arg2); }
|
||||||
|
|
||||||
#define Window_OneArgNoReturnVoidFunction(X, TYPE, PARSESTR) \
|
#define Window_OneArgNoReturnVoidFunction(X, TYPE, PARSESTR) \
|
||||||
static PyObject * PyCursesWindow_ ## X \
|
static PyObject * PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self, PyObject *args) \
|
(PyCursesWindowObject *self, PyObject *args) \
|
||||||
{ \
|
{ \
|
||||||
TYPE arg1; \
|
TYPE arg1; \
|
||||||
if (!PyArg_ParseTuple(args, PARSESTR, &arg1)) return NULL; \
|
if (!PyArg_ParseTuple(args, PARSESTR, &arg1)) return NULL; \
|
||||||
X(self->win,arg1); Py_INCREF(Py_None); return Py_None; }
|
X(self->win,arg1); Py_INCREF(Py_None); return Py_None; }
|
||||||
|
|
||||||
#define Window_OneArgNoReturnFunction(X, TYPE, PARSESTR) \
|
#define Window_OneArgNoReturnFunction(X, TYPE, PARSESTR) \
|
||||||
static PyObject * PyCursesWindow_ ## X \
|
static PyObject * PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self, PyObject *args) \
|
(PyCursesWindowObject *self, PyObject *args) \
|
||||||
{ \
|
{ \
|
||||||
TYPE arg1; \
|
TYPE arg1; \
|
||||||
if (!PyArg_ParseTuple(args,PARSESTR, &arg1)) return NULL; \
|
if (!PyArg_ParseTuple(args,PARSESTR, &arg1)) return NULL; \
|
||||||
return PyCursesCheckERR(X(self->win, arg1), # X); }
|
return PyCursesCheckERR(X(self->win, arg1), # X); }
|
||||||
|
|
||||||
#define Window_TwoArgNoReturnFunction(X, TYPE, PARSESTR) \
|
#define Window_TwoArgNoReturnFunction(X, TYPE, PARSESTR) \
|
||||||
static PyObject * PyCursesWindow_ ## X \
|
static PyObject * PyCursesWindow_ ## X \
|
||||||
(PyCursesWindowObject *self, PyObject *args) \
|
(PyCursesWindowObject *self, PyObject *args) \
|
||||||
{ \
|
{ \
|
||||||
TYPE arg1, arg2; \
|
TYPE arg1, arg2; \
|
||||||
if (!PyArg_ParseTuple(args,PARSESTR, &arg1, &arg2)) return NULL; \
|
if (!PyArg_ParseTuple(args,PARSESTR, &arg1, &arg2)) return NULL; \
|
||||||
return PyCursesCheckERR(X(self->win, arg1, arg2), # X); }
|
return PyCursesCheckERR(X(self->win, arg1, arg2), # X); }
|
||||||
|
@ -1854,7 +1854,7 @@ PyCurses_HalfDelay(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef STRICT_SYSV_CURSES
|
#ifndef STRICT_SYSV_CURSES
|
||||||
/* No has_key! */
|
/* No has_key! */
|
||||||
static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
|
static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
|
Loading…
Reference in New Issue