Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/python2....
File: py_curses.h
[0] Fix | Delete
#ifndef Py_CURSES_H
[1] Fix | Delete
#define Py_CURSES_H
[2] Fix | Delete
[3] Fix | Delete
#ifdef __APPLE__
[4] Fix | Delete
/*
[5] Fix | Delete
** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
[6] Fix | Delete
** against multiple definition of wchar_t.
[7] Fix | Delete
*/
[8] Fix | Delete
#ifdef _BSD_WCHAR_T_DEFINED_
[9] Fix | Delete
#define _WCHAR_T
[10] Fix | Delete
#endif
[11] Fix | Delete
#endif /* __APPLE__ */
[12] Fix | Delete
[13] Fix | Delete
#ifdef __FreeBSD__
[14] Fix | Delete
/*
[15] Fix | Delete
** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
[16] Fix | Delete
** against multiple definition of wchar_t and wint_t.
[17] Fix | Delete
*/
[18] Fix | Delete
#ifdef _XOPEN_SOURCE_EXTENDED
[19] Fix | Delete
#ifndef __FreeBSD_version
[20] Fix | Delete
#include <osreldate.h>
[21] Fix | Delete
#endif
[22] Fix | Delete
#if __FreeBSD_version >= 500000
[23] Fix | Delete
#ifndef __wchar_t
[24] Fix | Delete
#define __wchar_t
[25] Fix | Delete
#endif
[26] Fix | Delete
#ifndef __wint_t
[27] Fix | Delete
#define __wint_t
[28] Fix | Delete
#endif
[29] Fix | Delete
#else
[30] Fix | Delete
#ifndef _WCHAR_T
[31] Fix | Delete
#define _WCHAR_T
[32] Fix | Delete
#endif
[33] Fix | Delete
#ifndef _WINT_T
[34] Fix | Delete
#define _WINT_T
[35] Fix | Delete
#endif
[36] Fix | Delete
#endif
[37] Fix | Delete
#endif
[38] Fix | Delete
#endif
[39] Fix | Delete
[40] Fix | Delete
#if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS)
[41] Fix | Delete
/* The following definition is necessary for ncurses 5.7; without it,
[42] Fix | Delete
some of [n]curses.h set NCURSES_OPAQUE to 1, and then Python
[43] Fix | Delete
can't get at the WINDOW flags field. */
[44] Fix | Delete
#define NCURSES_OPAQUE 0
[45] Fix | Delete
#endif
[46] Fix | Delete
[47] Fix | Delete
#ifdef HAVE_NCURSES_H
[48] Fix | Delete
#include <ncurses.h>
[49] Fix | Delete
#else
[50] Fix | Delete
#include <curses.h>
[51] Fix | Delete
#endif
[52] Fix | Delete
[53] Fix | Delete
#ifdef HAVE_NCURSES_H
[54] Fix | Delete
/* configure was checking <curses.h>, but we will
[55] Fix | Delete
use <ncurses.h>, which has some or all these features. */
[56] Fix | Delete
#if !defined(WINDOW_HAS_FLAGS) && !(NCURSES_OPAQUE+0)
[57] Fix | Delete
#define WINDOW_HAS_FLAGS 1
[58] Fix | Delete
#endif
[59] Fix | Delete
#if !defined(HAVE_CURSES_IS_PAD) && NCURSES_VERSION_PATCH+0 >= 20090906
[60] Fix | Delete
#define HAVE_CURSES_IS_PAD 1
[61] Fix | Delete
#endif
[62] Fix | Delete
#ifndef MVWDELCH_IS_EXPRESSION
[63] Fix | Delete
#define MVWDELCH_IS_EXPRESSION 1
[64] Fix | Delete
#endif
[65] Fix | Delete
#endif
[66] Fix | Delete
[67] Fix | Delete
#ifdef __cplusplus
[68] Fix | Delete
extern "C" {
[69] Fix | Delete
#endif
[70] Fix | Delete
[71] Fix | Delete
#define PyCurses_API_pointers 4
[72] Fix | Delete
[73] Fix | Delete
/* Type declarations */
[74] Fix | Delete
[75] Fix | Delete
typedef struct {
[76] Fix | Delete
PyObject_HEAD
[77] Fix | Delete
WINDOW *win;
[78] Fix | Delete
} PyCursesWindowObject;
[79] Fix | Delete
[80] Fix | Delete
#define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type)
[81] Fix | Delete
[82] Fix | Delete
#define PyCurses_CAPSULE_NAME "_curses._C_API"
[83] Fix | Delete
[84] Fix | Delete
[85] Fix | Delete
#ifdef CURSES_MODULE
[86] Fix | Delete
/* This section is used when compiling _cursesmodule.c */
[87] Fix | Delete
[88] Fix | Delete
#else
[89] Fix | Delete
/* This section is used in modules that use the _cursesmodule API */
[90] Fix | Delete
[91] Fix | Delete
static void **PyCurses_API;
[92] Fix | Delete
[93] Fix | Delete
#define PyCursesWindow_Type (*(PyTypeObject *) PyCurses_API[0])
[94] Fix | Delete
#define PyCursesSetupTermCalled {if (! ((int (*)(void))PyCurses_API[1]) () ) return NULL;}
[95] Fix | Delete
#define PyCursesInitialised {if (! ((int (*)(void))PyCurses_API[2]) () ) return NULL;}
[96] Fix | Delete
#define PyCursesInitialisedColor {if (! ((int (*)(void))PyCurses_API[3]) () ) return NULL;}
[97] Fix | Delete
[98] Fix | Delete
#define import_curses() \
[99] Fix | Delete
PyCurses_API = (void **)PyCapsule_Import(PyCurses_CAPSULE_NAME, 1);
[100] Fix | Delete
[101] Fix | Delete
#endif
[102] Fix | Delete
[103] Fix | Delete
/* general error messages */
[104] Fix | Delete
static char *catchall_ERR = "curses function returned ERR";
[105] Fix | Delete
static char *catchall_NULL = "curses function returned NULL";
[106] Fix | Delete
[107] Fix | Delete
/* Function Prototype Macros - They are ugly but very, very useful. ;-)
[108] Fix | Delete
[109] Fix | Delete
X - function name
[110] Fix | Delete
TYPE - parameter Type
[111] Fix | Delete
ERGSTR - format string for construction of the return value
[112] Fix | Delete
PARSESTR - format string for argument parsing
[113] Fix | Delete
*/
[114] Fix | Delete
[115] Fix | Delete
#define NoArgNoReturnFunction(X) \
[116] Fix | Delete
static PyObject *PyCurses_ ## X (PyObject *self) \
[117] Fix | Delete
{ \
[118] Fix | Delete
PyCursesInitialised \
[119] Fix | Delete
return PyCursesCheckERR(X(), # X); }
[120] Fix | Delete
[121] Fix | Delete
#define NoArgOrFlagNoReturnFunction(X) \
[122] Fix | Delete
static PyObject *PyCurses_ ## X (PyObject *self, PyObject *args) \
[123] Fix | Delete
{ \
[124] Fix | Delete
int flag = 0; \
[125] Fix | Delete
PyCursesInitialised \
[126] Fix | Delete
switch(PyTuple_Size(args)) { \
[127] Fix | Delete
case 0: \
[128] Fix | Delete
return PyCursesCheckERR(X(), # X); \
[129] Fix | Delete
case 1: \
[130] Fix | Delete
if (!PyArg_ParseTuple(args, "i;True(1) or False(0)", &flag)) return NULL; \
[131] Fix | Delete
if (flag) return PyCursesCheckERR(X(), # X); \
[132] Fix | Delete
else return PyCursesCheckERR(no ## X (), # X); \
[133] Fix | Delete
default: \
[134] Fix | Delete
PyErr_SetString(PyExc_TypeError, # X " requires 0 or 1 arguments"); \
[135] Fix | Delete
return NULL; } }
[136] Fix | Delete
[137] Fix | Delete
#define NoArgReturnIntFunction(X) \
[138] Fix | Delete
static PyObject *PyCurses_ ## X (PyObject *self) \
[139] Fix | Delete
{ \
[140] Fix | Delete
PyCursesInitialised \
[141] Fix | Delete
return PyInt_FromLong((long) X()); }
[142] Fix | Delete
[143] Fix | Delete
[144] Fix | Delete
#define NoArgReturnStringFunction(X) \
[145] Fix | Delete
static PyObject *PyCurses_ ## X (PyObject *self) \
[146] Fix | Delete
{ \
[147] Fix | Delete
PyCursesInitialised \
[148] Fix | Delete
return PyString_FromString(X()); }
[149] Fix | Delete
[150] Fix | Delete
#define NoArgTrueFalseFunction(X) \
[151] Fix | Delete
static PyObject *PyCurses_ ## X (PyObject *self) \
[152] Fix | Delete
{ \
[153] Fix | Delete
PyCursesInitialised \
[154] Fix | Delete
if (X () == FALSE) { \
[155] Fix | Delete
Py_INCREF(Py_False); \
[156] Fix | Delete
return Py_False; \
[157] Fix | Delete
} \
[158] Fix | Delete
Py_INCREF(Py_True); \
[159] Fix | Delete
return Py_True; }
[160] Fix | Delete
[161] Fix | Delete
#define NoArgNoReturnVoidFunction(X) \
[162] Fix | Delete
static PyObject *PyCurses_ ## X (PyObject *self) \
[163] Fix | Delete
{ \
[164] Fix | Delete
PyCursesInitialised \
[165] Fix | Delete
X(); \
[166] Fix | Delete
Py_INCREF(Py_None); \
[167] Fix | Delete
return Py_None; }
[168] Fix | Delete
[169] Fix | Delete
#ifdef __cplusplus
[170] Fix | Delete
}
[171] Fix | Delete
#endif
[172] Fix | Delete
[173] Fix | Delete
#endif /* !defined(Py_CURSES_H) */
[174] Fix | Delete
[175] Fix | Delete
[176] Fix | Delete
[177] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function