Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +3 -0
- evalkit_cambrian/include/cursesapp.h +191 -0
- evalkit_cambrian/include/cursesw.h +1581 -0
- evalkit_cambrian/include/eti.h +55 -0
- evalkit_cambrian/include/fakemysql.h +335 -0
- evalkit_cambrian/include/itclTclIntStubsFcn.h +38 -0
- evalkit_cambrian/include/menu.h +281 -0
- evalkit_cambrian/include/pqStubs.h +85 -0
- evalkit_cambrian/include/python3.10/boolobject.h +43 -0
- evalkit_cambrian/include/python3.10/cellobject.h +29 -0
- evalkit_cambrian/include/python3.10/ceval.h +158 -0
- evalkit_cambrian/include/python3.10/context.h +81 -0
- evalkit_cambrian/include/python3.10/cpython/interpreteridobject.h +11 -0
- evalkit_cambrian/include/python3.10/enumobject.h +17 -0
- evalkit_cambrian/include/python3.10/errcode.h +38 -0
- evalkit_cambrian/include/python3.10/eval.h +27 -0
- evalkit_cambrian/include/python3.10/exports.h +30 -0
- evalkit_cambrian/include/python3.10/frameobject.h +20 -0
- evalkit_cambrian/include/python3.10/interpreteridobject.h +17 -0
- evalkit_cambrian/include/python3.10/listobject.h +52 -0
- evalkit_cambrian/include/python3.10/longintrepr.h +99 -0
- evalkit_cambrian/include/python3.10/marshal.h +28 -0
- evalkit_cambrian/include/python3.10/moduleobject.h +96 -0
- evalkit_cambrian/include/python3.10/namespaceobject.h +19 -0
- evalkit_cambrian/include/python3.10/py_curses.h +99 -0
- evalkit_cambrian/include/python3.10/pycapsule.h +59 -0
- evalkit_cambrian/include/python3.10/pyconfig.h +1703 -0
- evalkit_cambrian/include/python3.10/pydtrace.h +59 -0
- evalkit_cambrian/include/python3.10/pyerrors.h +324 -0
- evalkit_cambrian/include/python3.10/pylifecycle.h +74 -0
- evalkit_cambrian/include/python3.10/pymem.h +104 -0
- evalkit_cambrian/include/python3.10/pystrhex.h +22 -0
- evalkit_cambrian/include/python3.10/tupleobject.h +46 -0
- evalkit_cambrian/include/python3.10/typeslots.h +94 -0
- evalkit_cambrian/include/tclIntDecls.h +1434 -0
- evalkit_cambrian/include/tclOOInt.h +607 -0
- evalkit_cambrian/include/tclUnixPort.h +732 -0
- evalkit_cambrian/include/tkBusy.h +41 -0
- evalkit_cambrian/include/tkMacOSX.h +34 -0
- evalkit_cambrian/include/tkUnixPort.h +197 -0
- evalkit_cambrian/lib/python3.10/site-packages/scipy/sparse/csgraph/_flow.cpython-310-x86_64-linux-gnu.so +3 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/CommonTokenStream.py +87 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/InputStream.py +87 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/IntervalSet.py +180 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/ListTokenSource.py +144 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/Parser.py +580 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/ParserInterpreter.py +170 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/ParserRuleContext.py +186 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/Recognizer.py +147 -0
- evalkit_tf449/lib/python3.10/site-packages/antlr4/RuleContext.py +227 -0
.gitattributes
CHANGED
|
@@ -1233,3 +1233,6 @@ evalkit_tf449/lib/python3.10/site-packages/pandas/io/formats/__pycache__/style.c
|
|
| 1233 |
evalkit_tf449/lib/python3.10/site-packages/pandas/io/__pycache__/stata.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1234 |
evalkit_tf449/lib/python3.10/site-packages/pandas/io/__pycache__/pytables.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1235 |
evalkit_cambrian/lib/python3.10/site-packages/scipy/integrate/_test_odeint_banded.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 1233 |
evalkit_tf449/lib/python3.10/site-packages/pandas/io/__pycache__/stata.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1234 |
evalkit_tf449/lib/python3.10/site-packages/pandas/io/__pycache__/pytables.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 1235 |
evalkit_cambrian/lib/python3.10/site-packages/scipy/integrate/_test_odeint_banded.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 1236 |
+
evalkit_cambrian/lib/python3.10/site-packages/scipy/sparse/csgraph/_flow.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 1237 |
+
evalkit_tf449/lib/python3.10/site-packages/opencv_python.libs/libavformat-3ff1be5b.so.59.27.100 filter=lfs diff=lfs merge=lfs -text
|
| 1238 |
+
evalkit_tf449/lib/python3.10/site-packages/opencv_python.libs/libQt5Core-e6d3f451.so.5.15.13 filter=lfs diff=lfs merge=lfs -text
|
evalkit_cambrian/include/cursesapp.h
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
/****************************************************************************
|
| 3 |
+
* Copyright 2019-2020,2021 Thomas E. Dickey *
|
| 4 |
+
* Copyright 1998-2005,2011 Free Software Foundation, Inc. *
|
| 5 |
+
* *
|
| 6 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 7 |
+
* copy of this software and associated documentation files (the *
|
| 8 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 9 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 10 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 11 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 12 |
+
* furnished to do so, subject to the following conditions: *
|
| 13 |
+
* *
|
| 14 |
+
* The above copyright notice and this permission notice shall be included *
|
| 15 |
+
* in all copies or substantial portions of the Software. *
|
| 16 |
+
* *
|
| 17 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 18 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 19 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 20 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 21 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 22 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 23 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 24 |
+
* *
|
| 25 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 26 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 27 |
+
* sale, use or other dealings in this Software without prior written *
|
| 28 |
+
* authorization. *
|
| 29 |
+
****************************************************************************/
|
| 30 |
+
|
| 31 |
+
/****************************************************************************
|
| 32 |
+
* Author: Juergen Pfeifer, 1997 *
|
| 33 |
+
****************************************************************************/
|
| 34 |
+
|
| 35 |
+
// $Id: cursesapp.h,v 1.18 2021/06/17 21:26:02 tom Exp $
|
| 36 |
+
|
| 37 |
+
#ifndef NCURSES_CURSESAPP_H_incl
|
| 38 |
+
#define NCURSES_CURSESAPP_H_incl
|
| 39 |
+
|
| 40 |
+
#include <ncursesw/cursslk.h>
|
| 41 |
+
|
| 42 |
+
#if (defined(_WIN32) || defined(_WIN64))
|
| 43 |
+
# define NCURSES_CXX_MAIN_NAME cursespp_main
|
| 44 |
+
# define NCURSES_CXX_MAIN \
|
| 45 |
+
int main(int argc, char *argv[]) { \
|
| 46 |
+
return NCURSES_CXX_MAIN_NAME(argc, argv); \
|
| 47 |
+
}
|
| 48 |
+
#else
|
| 49 |
+
# define NCURSES_CXX_MAIN_NAME main
|
| 50 |
+
#endif
|
| 51 |
+
NCURSES_CXX_IMPEXP int NCURSES_CXX_MAIN_NAME(int argc, char *argv[]);
|
| 52 |
+
|
| 53 |
+
class NCURSES_CXX_IMPEXP NCursesApplication {
|
| 54 |
+
public:
|
| 55 |
+
typedef struct _slk_link { // This structure is used to maintain
|
| 56 |
+
struct _slk_link* prev; // a stack of SLKs
|
| 57 |
+
Soft_Label_Key_Set* SLKs;
|
| 58 |
+
} SLK_Link;
|
| 59 |
+
private:
|
| 60 |
+
static int rinit(NCursesWindow& w); // Internal Init function for title
|
| 61 |
+
static NCursesApplication* theApp; // Global ref. to the application
|
| 62 |
+
|
| 63 |
+
static SLK_Link* slk_stack;
|
| 64 |
+
|
| 65 |
+
protected:
|
| 66 |
+
static NCursesWindow* titleWindow; // The Title Window (if any)
|
| 67 |
+
|
| 68 |
+
bool b_Colors; // Is this a color application?
|
| 69 |
+
NCursesWindow* Root_Window; // This is the stdscr equiv.
|
| 70 |
+
|
| 71 |
+
// Initialization of attributes;
|
| 72 |
+
// Rewrite this in your derived class if you prefer other settings
|
| 73 |
+
virtual void init(bool bColors);
|
| 74 |
+
|
| 75 |
+
// The number of lines for the title window. Default is no title window
|
| 76 |
+
// You may rewrite this in your derived class
|
| 77 |
+
virtual int titlesize() const {
|
| 78 |
+
return 0;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// This method is called to put something into the title window initially
|
| 82 |
+
// You may rewrite this in your derived class
|
| 83 |
+
virtual void title() {
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
// The layout used for the Soft Label Keys. Default is to have no SLKs.
|
| 87 |
+
// You may rewrite this in your derived class
|
| 88 |
+
virtual Soft_Label_Key_Set::Label_Layout useSLKs() const {
|
| 89 |
+
return Soft_Label_Key_Set::None;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
// This method is called to initialize the SLKs. Default is nothing.
|
| 93 |
+
// You may rewrite this in your derived class
|
| 94 |
+
virtual void init_labels(Soft_Label_Key_Set& S) const {
|
| 95 |
+
(void) S;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
// Your derived class must implement this method. The return value must
|
| 99 |
+
// be the exit value of your application.
|
| 100 |
+
virtual int run() = 0;
|
| 101 |
+
|
| 102 |
+
// The constructor is protected, so you may use it in your derived
|
| 103 |
+
// class constructor. The argument tells whether or not you want colors.
|
| 104 |
+
NCursesApplication(bool wantColors = FALSE);
|
| 105 |
+
|
| 106 |
+
NCursesApplication& operator=(const NCursesApplication& rhs)
|
| 107 |
+
{
|
| 108 |
+
if (this != &rhs) {
|
| 109 |
+
*this = rhs;
|
| 110 |
+
}
|
| 111 |
+
return *this;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
NCursesApplication(const NCursesApplication& rhs)
|
| 115 |
+
: b_Colors(rhs.b_Colors),
|
| 116 |
+
Root_Window(rhs.Root_Window)
|
| 117 |
+
{
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
static NCursesWindow *&getTitleWindow();
|
| 121 |
+
|
| 122 |
+
public:
|
| 123 |
+
virtual ~NCursesApplication() THROWS(NCursesException);
|
| 124 |
+
|
| 125 |
+
// Get a pointer to the current application object
|
| 126 |
+
static NCursesApplication* getApplication();
|
| 127 |
+
|
| 128 |
+
// This method runs the application and returns its exit value
|
| 129 |
+
int operator()(void);
|
| 130 |
+
|
| 131 |
+
// Process the commandline arguments. The default implementation simply
|
| 132 |
+
// ignores them. Your derived class may rewrite this.
|
| 133 |
+
virtual void handleArgs(int argc, char* argv[]) {
|
| 134 |
+
(void) argc;
|
| 135 |
+
(void) argv;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
// Does this application use colors?
|
| 139 |
+
inline bool useColors() const {
|
| 140 |
+
return b_Colors;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Push the Key Set S onto the SLK Stack. S then becomes the current set
|
| 144 |
+
// of Soft Labelled Keys.
|
| 145 |
+
void push(Soft_Label_Key_Set& S);
|
| 146 |
+
|
| 147 |
+
// Throw away the current set of SLKs and make the previous one the
|
| 148 |
+
// new current set.
|
| 149 |
+
bool pop();
|
| 150 |
+
|
| 151 |
+
// Retrieve the current set of Soft Labelled Keys.
|
| 152 |
+
Soft_Label_Key_Set* top() const;
|
| 153 |
+
|
| 154 |
+
// Attributes to use for menu and forms foregrounds
|
| 155 |
+
virtual chtype foregrounds() const {
|
| 156 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(1)) : A_BOLD;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
// Attributes to use for menu and forms backgrounds
|
| 160 |
+
virtual chtype backgrounds() const {
|
| 161 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(2)) : A_NORMAL;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
// Attributes to use for inactive (menu) elements
|
| 165 |
+
virtual chtype inactives() const {
|
| 166 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(3)|A_DIM) : A_DIM;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
// Attributes to use for (form) labels and SLKs
|
| 170 |
+
virtual chtype labels() const {
|
| 171 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
// Attributes to use for form backgrounds
|
| 175 |
+
virtual chtype dialog_backgrounds() const {
|
| 176 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(4)) : A_NORMAL;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
// Attributes to use as default for (form) window backgrounds
|
| 180 |
+
virtual chtype window_backgrounds() const {
|
| 181 |
+
return b_Colors ? static_cast<chtype>(COLOR_PAIR(5)) : A_NORMAL;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// Attributes to use for the title window
|
| 185 |
+
virtual chtype screen_titles() const {
|
| 186 |
+
return b_Colors ? static_cast<chtype>(COLOR_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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// * This makes emacs happy -*-Mode: C++;-*-
|
| 2 |
+
// vile:cppmode
|
| 3 |
+
/****************************************************************************
|
| 4 |
+
* Copyright 2019-2021,2022 Thomas E. Dickey *
|
| 5 |
+
* Copyright 1998-2014,2017 Free Software Foundation, Inc. *
|
| 6 |
+
* *
|
| 7 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 8 |
+
* copy of this software and associated documentation files (the *
|
| 9 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 10 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 11 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 12 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 13 |
+
* furnished to do so, subject to the following conditions: *
|
| 14 |
+
* *
|
| 15 |
+
* The above copyright notice and this permission notice shall be included *
|
| 16 |
+
* in all copies or substantial portions of the Software. *
|
| 17 |
+
* *
|
| 18 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 19 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 20 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 21 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 22 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 23 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 24 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 25 |
+
* *
|
| 26 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 27 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 28 |
+
* sale, use or other dealings in this Software without prior written *
|
| 29 |
+
* authorization. *
|
| 30 |
+
****************************************************************************/
|
| 31 |
+
|
| 32 |
+
#ifndef NCURSES_CURSESW_H_incl
|
| 33 |
+
#define NCURSES_CURSESW_H_incl 1
|
| 34 |
+
|
| 35 |
+
// $Id: cursesw.h,v 1.59 2022/08/20 20:52:15 tom Exp $
|
| 36 |
+
|
| 37 |
+
extern "C" {
|
| 38 |
+
# include <ncursesw/curses.h>
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
#if defined(BUILDING_NCURSES_CXX)
|
| 42 |
+
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 43 |
+
#else
|
| 44 |
+
# define NCURSES_CXX_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#define NCURSES_CXX_WRAPPED_VAR(type,name) extern NCURSES_CXX_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 48 |
+
|
| 49 |
+
#define NCURSES_CXX_EXPORT(type) NCURSES_CXX_IMPEXP type NCURSES_API
|
| 50 |
+
#define NCURSES_CXX_EXPORT_VAR(type) NCURSES_CXX_IMPEXP type
|
| 51 |
+
|
| 52 |
+
#include <ncursesw/etip.h>
|
| 53 |
+
|
| 54 |
+
/* SCO 3.2v4 curses.h includes term.h, which defines lines as a macro.
|
| 55 |
+
Undefine it here, because NCursesWindow uses lines as a method. */
|
| 56 |
+
#undef lines
|
| 57 |
+
|
| 58 |
+
/* "Convert" macros to inlines. We'll define it as another symbol to avoid
|
| 59 |
+
* conflict with library symbols.
|
| 60 |
+
*/
|
| 61 |
+
#undef UNDEF
|
| 62 |
+
#define UNDEF(name) CUR_ ##name
|
| 63 |
+
|
| 64 |
+
#ifdef addch
|
| 65 |
+
inline int UNDEF(addch)(chtype ch) { return addch(ch); }
|
| 66 |
+
#undef addch
|
| 67 |
+
#define addch UNDEF(addch)
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
#ifdef addchstr
|
| 71 |
+
inline int UNDEF(addchstr)(chtype *at) { return addchstr(at); }
|
| 72 |
+
#undef addchstr
|
| 73 |
+
#define addchstr UNDEF(addchstr)
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
#ifdef addnstr
|
| 77 |
+
inline int UNDEF(addnstr)(const char *str, int n)
|
| 78 |
+
{ return addnstr(str, n); }
|
| 79 |
+
#undef addnstr
|
| 80 |
+
#define addnstr UNDEF(addnstr)
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
#ifdef addstr
|
| 84 |
+
inline int UNDEF(addstr)(const char * str) { return addstr(str); }
|
| 85 |
+
#undef addstr
|
| 86 |
+
#define addstr UNDEF(addstr)
|
| 87 |
+
#endif
|
| 88 |
+
|
| 89 |
+
#ifdef attroff
|
| 90 |
+
inline int UNDEF(attroff)(chtype at) { return attroff(at); }
|
| 91 |
+
#undef attroff
|
| 92 |
+
#define attroff UNDEF(attroff)
|
| 93 |
+
#endif
|
| 94 |
+
|
| 95 |
+
#ifdef attron
|
| 96 |
+
inline int UNDEF(attron)(chtype at) { return attron(at); }
|
| 97 |
+
#undef attron
|
| 98 |
+
#define attron UNDEF(attron)
|
| 99 |
+
#endif
|
| 100 |
+
|
| 101 |
+
#ifdef attrset
|
| 102 |
+
inline chtype UNDEF(attrset)(chtype at) { return attrset(at); }
|
| 103 |
+
#undef attrset
|
| 104 |
+
#define attrset UNDEF(attrset)
|
| 105 |
+
#endif
|
| 106 |
+
|
| 107 |
+
#ifdef bkgd
|
| 108 |
+
inline int UNDEF(bkgd)(chtype ch) { return bkgd(ch); }
|
| 109 |
+
#undef bkgd
|
| 110 |
+
#define bkgd UNDEF(bkgd)
|
| 111 |
+
#endif
|
| 112 |
+
|
| 113 |
+
#ifdef bkgdset
|
| 114 |
+
inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); }
|
| 115 |
+
#undef bkgdset
|
| 116 |
+
#define bkgdset UNDEF(bkgdset)
|
| 117 |
+
#endif
|
| 118 |
+
|
| 119 |
+
#ifdef border
|
| 120 |
+
inline int UNDEF(border)(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
|
| 121 |
+
{ return border(ls, rs, ts, bs, tl, tr, bl, br); }
|
| 122 |
+
#undef border
|
| 123 |
+
#define border UNDEF(border)
|
| 124 |
+
#endif
|
| 125 |
+
|
| 126 |
+
#ifdef box
|
| 127 |
+
inline int UNDEF(box)(WINDOW *win, int v, int h) { return box(win, v, h); }
|
| 128 |
+
#undef box
|
| 129 |
+
#define box UNDEF(box)
|
| 130 |
+
#endif
|
| 131 |
+
|
| 132 |
+
#ifdef chgat
|
| 133 |
+
inline int UNDEF(chgat)(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 134 |
+
return chgat(n, attr, color, opts); }
|
| 135 |
+
#undef chgat
|
| 136 |
+
#define chgat UNDEF(chgat)
|
| 137 |
+
#endif
|
| 138 |
+
|
| 139 |
+
#ifdef clear
|
| 140 |
+
inline int UNDEF(clear)() { return clear(); }
|
| 141 |
+
#undef clear
|
| 142 |
+
#define clear UNDEF(clear)
|
| 143 |
+
#endif
|
| 144 |
+
|
| 145 |
+
#ifdef clearok
|
| 146 |
+
inline int UNDEF(clearok)(WINDOW* win, bool bf) { return clearok(win, bf); }
|
| 147 |
+
#undef clearok
|
| 148 |
+
#define clearok UNDEF(clearok)
|
| 149 |
+
#else
|
| 150 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API clearok(WINDOW*, bool);
|
| 151 |
+
#endif
|
| 152 |
+
|
| 153 |
+
#ifdef clrtobot
|
| 154 |
+
inline int UNDEF(clrtobot)() { return clrtobot(); }
|
| 155 |
+
#undef clrtobot
|
| 156 |
+
#define clrtobot UNDEF(clrtobot)
|
| 157 |
+
#endif
|
| 158 |
+
|
| 159 |
+
#ifdef clrtoeol
|
| 160 |
+
inline int UNDEF(clrtoeol)() { return clrtoeol(); }
|
| 161 |
+
#undef clrtoeol
|
| 162 |
+
#define clrtoeol UNDEF(clrtoeol)
|
| 163 |
+
#endif
|
| 164 |
+
|
| 165 |
+
#ifdef color_set
|
| 166 |
+
inline chtype UNDEF(color_set)(NCURSES_PAIRS_T p, void* opts) { return color_set(p, opts); }
|
| 167 |
+
#undef color_set
|
| 168 |
+
#define color_set UNDEF(color_set)
|
| 169 |
+
#endif
|
| 170 |
+
|
| 171 |
+
#ifdef crmode
|
| 172 |
+
inline int UNDEF(crmode)(void) { return crmode(); }
|
| 173 |
+
#undef crmode
|
| 174 |
+
#define crmode UNDEF(crmode)
|
| 175 |
+
#endif
|
| 176 |
+
|
| 177 |
+
#ifdef delch
|
| 178 |
+
inline int UNDEF(delch)() { return delch(); }
|
| 179 |
+
#undef delch
|
| 180 |
+
#define delch UNDEF(delch)
|
| 181 |
+
#endif
|
| 182 |
+
|
| 183 |
+
#ifdef deleteln
|
| 184 |
+
inline int UNDEF(deleteln)() { return deleteln(); }
|
| 185 |
+
#undef deleteln
|
| 186 |
+
#define deleteln UNDEF(deleteln)
|
| 187 |
+
#endif
|
| 188 |
+
|
| 189 |
+
#ifdef echochar
|
| 190 |
+
inline int UNDEF(echochar)(chtype ch) { return echochar(ch); }
|
| 191 |
+
#undef echochar
|
| 192 |
+
#define echochar UNDEF(echochar)
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
#ifdef erase
|
| 196 |
+
inline int UNDEF(erase)() { return erase(); }
|
| 197 |
+
#undef erase
|
| 198 |
+
#define erase UNDEF(erase)
|
| 199 |
+
#endif
|
| 200 |
+
|
| 201 |
+
#ifdef fixterm
|
| 202 |
+
inline int UNDEF(fixterm)(void) { return fixterm(); }
|
| 203 |
+
#undef fixterm
|
| 204 |
+
#define fixterm UNDEF(fixterm)
|
| 205 |
+
#endif
|
| 206 |
+
|
| 207 |
+
#ifdef flushok
|
| 208 |
+
inline int UNDEF(flushok)(WINDOW* _win, bool _bf) {
|
| 209 |
+
return flushok(_win, _bf); }
|
| 210 |
+
#undef flushok
|
| 211 |
+
#define flushok UNDEF(flushok)
|
| 212 |
+
#else
|
| 213 |
+
#define _no_flushok
|
| 214 |
+
#endif
|
| 215 |
+
|
| 216 |
+
#ifdef getattrs
|
| 217 |
+
inline int UNDEF(getattrs)(WINDOW *win) { return getattrs(win); }
|
| 218 |
+
#undef getattrs
|
| 219 |
+
#define getattrs UNDEF(getattrs)
|
| 220 |
+
#endif
|
| 221 |
+
|
| 222 |
+
#ifdef getbegyx
|
| 223 |
+
inline void UNDEF(getbegyx)(WINDOW* win, int& y, int& x) { getbegyx(win, y, x); }
|
| 224 |
+
#undef getbegyx
|
| 225 |
+
#define getbegyx UNDEF(getbegyx)
|
| 226 |
+
#endif
|
| 227 |
+
|
| 228 |
+
#ifdef getbkgd
|
| 229 |
+
inline chtype UNDEF(getbkgd)(const WINDOW *win) { return getbkgd(win); }
|
| 230 |
+
#undef getbkgd
|
| 231 |
+
#define getbkgd UNDEF(getbkgd)
|
| 232 |
+
#endif
|
| 233 |
+
|
| 234 |
+
#ifdef getch
|
| 235 |
+
inline int UNDEF(getch)() { return getch(); }
|
| 236 |
+
#undef getch
|
| 237 |
+
#define getch UNDEF(getch)
|
| 238 |
+
#endif
|
| 239 |
+
|
| 240 |
+
#ifdef getmaxyx
|
| 241 |
+
inline void UNDEF(getmaxyx)(WINDOW* win, int& y, int& x) { getmaxyx(win, y, x); }
|
| 242 |
+
#undef getmaxyx
|
| 243 |
+
#define getmaxyx UNDEF(getmaxyx)
|
| 244 |
+
#endif
|
| 245 |
+
|
| 246 |
+
#ifdef getnstr
|
| 247 |
+
inline int UNDEF(getnstr)(char *_str, int n) { return getnstr(_str, n); }
|
| 248 |
+
#undef getnstr
|
| 249 |
+
#define getnstr UNDEF(getnstr)
|
| 250 |
+
#endif
|
| 251 |
+
|
| 252 |
+
#ifdef getparyx
|
| 253 |
+
inline void UNDEF(getparyx)(WINDOW* win, int& y, int& x) { getparyx(win, y, x); }
|
| 254 |
+
#undef getparyx
|
| 255 |
+
#define getparyx UNDEF(getparyx)
|
| 256 |
+
#endif
|
| 257 |
+
|
| 258 |
+
#ifdef getstr
|
| 259 |
+
inline int UNDEF(getstr)(char *_str) { return getstr(_str); }
|
| 260 |
+
#undef getstr
|
| 261 |
+
#define getstr UNDEF(getstr)
|
| 262 |
+
#endif
|
| 263 |
+
|
| 264 |
+
#ifdef getyx
|
| 265 |
+
inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) {
|
| 266 |
+
getyx(win, y, x); }
|
| 267 |
+
#undef getyx
|
| 268 |
+
#define getyx UNDEF(getyx)
|
| 269 |
+
#endif
|
| 270 |
+
|
| 271 |
+
#ifdef hline
|
| 272 |
+
inline int UNDEF(hline)(chtype ch, int n) { return hline(ch, n); }
|
| 273 |
+
#undef hline
|
| 274 |
+
#define hline UNDEF(hline)
|
| 275 |
+
#endif
|
| 276 |
+
|
| 277 |
+
#ifdef inch
|
| 278 |
+
inline chtype UNDEF(inch)() { return inch(); }
|
| 279 |
+
#undef inch
|
| 280 |
+
#define inch UNDEF(inch)
|
| 281 |
+
#endif
|
| 282 |
+
|
| 283 |
+
#ifdef inchstr
|
| 284 |
+
inline int UNDEF(inchstr)(chtype *str) { return inchstr(str); }
|
| 285 |
+
#undef inchstr
|
| 286 |
+
#define inchstr UNDEF(inchstr)
|
| 287 |
+
#endif
|
| 288 |
+
|
| 289 |
+
#ifdef innstr
|
| 290 |
+
inline int UNDEF(innstr)(char *_str, int n) { return innstr(_str, n); }
|
| 291 |
+
#undef innstr
|
| 292 |
+
#define innstr UNDEF(innstr)
|
| 293 |
+
#endif
|
| 294 |
+
|
| 295 |
+
#ifdef insch
|
| 296 |
+
inline int UNDEF(insch)(chtype c) { return insch(c); }
|
| 297 |
+
#undef insch
|
| 298 |
+
#define insch UNDEF(insch)
|
| 299 |
+
#endif
|
| 300 |
+
|
| 301 |
+
#ifdef insdelln
|
| 302 |
+
inline int UNDEF(insdelln)(int n) { return insdelln(n); }
|
| 303 |
+
#undef insdelln
|
| 304 |
+
#define insdelln UNDEF(insdelln)
|
| 305 |
+
#endif
|
| 306 |
+
|
| 307 |
+
#ifdef insertln
|
| 308 |
+
inline int UNDEF(insertln)() { return insertln(); }
|
| 309 |
+
#undef insertln
|
| 310 |
+
#define insertln UNDEF(insertln)
|
| 311 |
+
#endif
|
| 312 |
+
|
| 313 |
+
#ifdef insnstr
|
| 314 |
+
inline int UNDEF(insnstr)(const char *_str, int n) {
|
| 315 |
+
return insnstr(_str, n); }
|
| 316 |
+
#undef insnstr
|
| 317 |
+
#define insnstr UNDEF(insnstr)
|
| 318 |
+
#endif
|
| 319 |
+
|
| 320 |
+
#ifdef insstr
|
| 321 |
+
inline int UNDEF(insstr)(const char *_str) {
|
| 322 |
+
return insstr(_str); }
|
| 323 |
+
#undef insstr
|
| 324 |
+
#define insstr UNDEF(insstr)
|
| 325 |
+
#endif
|
| 326 |
+
|
| 327 |
+
#ifdef instr
|
| 328 |
+
inline int UNDEF(instr)(char *_str) { return instr(_str); }
|
| 329 |
+
#undef instr
|
| 330 |
+
#define instr UNDEF(instr)
|
| 331 |
+
#endif
|
| 332 |
+
|
| 333 |
+
#ifdef intrflush
|
| 334 |
+
inline void UNDEF(intrflush)(WINDOW *win, bool bf) { intrflush(); }
|
| 335 |
+
#undef intrflush
|
| 336 |
+
#define intrflush UNDEF(intrflush)
|
| 337 |
+
#endif
|
| 338 |
+
|
| 339 |
+
#ifdef is_linetouched
|
| 340 |
+
inline int UNDEF(is_linetouched)(WINDOW *w, int l) { return is_linetouched(w,l); }
|
| 341 |
+
#undef is_linetouched
|
| 342 |
+
#define is_linetouched UNDEF(is_linetouched)
|
| 343 |
+
#endif
|
| 344 |
+
|
| 345 |
+
#ifdef leaveok
|
| 346 |
+
inline int UNDEF(leaveok)(WINDOW* win, bool bf) { return leaveok(win, bf); }
|
| 347 |
+
#undef leaveok
|
| 348 |
+
#define leaveok UNDEF(leaveok)
|
| 349 |
+
#else
|
| 350 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API leaveok(WINDOW* win, bool bf);
|
| 351 |
+
#endif
|
| 352 |
+
|
| 353 |
+
#ifdef move
|
| 354 |
+
inline int UNDEF(move)(int x, int y) { return move(x, y); }
|
| 355 |
+
#undef move
|
| 356 |
+
#define move UNDEF(move)
|
| 357 |
+
#endif
|
| 358 |
+
|
| 359 |
+
#ifdef mvaddch
|
| 360 |
+
inline int UNDEF(mvaddch)(int y, int x, chtype ch)
|
| 361 |
+
{ return mvaddch(y, x, ch); }
|
| 362 |
+
#undef mvaddch
|
| 363 |
+
#define mvaddch UNDEF(mvaddch)
|
| 364 |
+
#endif
|
| 365 |
+
|
| 366 |
+
#ifdef mvaddnstr
|
| 367 |
+
inline int UNDEF(mvaddnstr)(int y, int x, const char *str, int n)
|
| 368 |
+
{ return mvaddnstr(y, x, str, n); }
|
| 369 |
+
#undef mvaddnstr
|
| 370 |
+
#define mvaddnstr UNDEF(mvaddnstr)
|
| 371 |
+
#endif
|
| 372 |
+
|
| 373 |
+
#ifdef mvaddstr
|
| 374 |
+
inline int UNDEF(mvaddstr)(int y, int x, const char * str)
|
| 375 |
+
{ return mvaddstr(y, x, str); }
|
| 376 |
+
#undef mvaddstr
|
| 377 |
+
#define mvaddstr UNDEF(mvaddstr)
|
| 378 |
+
#endif
|
| 379 |
+
|
| 380 |
+
#ifdef mvchgat
|
| 381 |
+
inline int UNDEF(mvchgat)(int y, int x, int n,
|
| 382 |
+
attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 383 |
+
return mvchgat(y, x, n, attr, color, opts); }
|
| 384 |
+
#undef mvchgat
|
| 385 |
+
#define mvchgat UNDEF(mvchgat)
|
| 386 |
+
#endif
|
| 387 |
+
|
| 388 |
+
#ifdef mvdelch
|
| 389 |
+
inline int UNDEF(mvdelch)(int y, int x) { return mvdelch(y, x);}
|
| 390 |
+
#undef mvdelch
|
| 391 |
+
#define mvdelch UNDEF(mvdelch)
|
| 392 |
+
#endif
|
| 393 |
+
|
| 394 |
+
#ifdef mvgetch
|
| 395 |
+
inline int UNDEF(mvgetch)(int y, int x) { return mvgetch(y, x);}
|
| 396 |
+
#undef mvgetch
|
| 397 |
+
#define mvgetch UNDEF(mvgetch)
|
| 398 |
+
#endif
|
| 399 |
+
|
| 400 |
+
#ifdef mvgetnstr
|
| 401 |
+
inline int UNDEF(mvgetnstr)(int y, int x, char *str, int n) {
|
| 402 |
+
return mvgetnstr(y, x, str, n);}
|
| 403 |
+
#undef mvgetnstr
|
| 404 |
+
#define mvgetnstr UNDEF(mvgetnstr)
|
| 405 |
+
#endif
|
| 406 |
+
|
| 407 |
+
#ifdef mvgetstr
|
| 408 |
+
inline int UNDEF(mvgetstr)(int y, int x, char *str) {return mvgetstr(y, x, str);}
|
| 409 |
+
#undef mvgetstr
|
| 410 |
+
#define mvgetstr UNDEF(mvgetstr)
|
| 411 |
+
#endif
|
| 412 |
+
|
| 413 |
+
#ifdef mvinch
|
| 414 |
+
inline chtype UNDEF(mvinch)(int y, int x) { return mvinch(y, x);}
|
| 415 |
+
#undef mvinch
|
| 416 |
+
#define mvinch UNDEF(mvinch)
|
| 417 |
+
#endif
|
| 418 |
+
|
| 419 |
+
#ifdef mvinnstr
|
| 420 |
+
inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) {
|
| 421 |
+
return mvinnstr(y, x, _str, n); }
|
| 422 |
+
#undef mvinnstr
|
| 423 |
+
#define mvinnstr UNDEF(mvinnstr)
|
| 424 |
+
#endif
|
| 425 |
+
|
| 426 |
+
#ifdef mvinsch
|
| 427 |
+
inline int UNDEF(mvinsch)(int y, int x, chtype c)
|
| 428 |
+
{ return mvinsch(y, x, c); }
|
| 429 |
+
#undef mvinsch
|
| 430 |
+
#define mvinsch UNDEF(mvinsch)
|
| 431 |
+
#endif
|
| 432 |
+
|
| 433 |
+
#ifdef mvinsnstr
|
| 434 |
+
inline int UNDEF(mvinsnstr)(int y, int x, const char *_str, int n) {
|
| 435 |
+
return mvinsnstr(y, x, _str, n); }
|
| 436 |
+
#undef mvinsnstr
|
| 437 |
+
#define mvinsnstr UNDEF(mvinsnstr)
|
| 438 |
+
#endif
|
| 439 |
+
|
| 440 |
+
#ifdef mvinsstr
|
| 441 |
+
inline int UNDEF(mvinsstr)(int y, int x, const char *_str) {
|
| 442 |
+
return mvinsstr(y, x, _str); }
|
| 443 |
+
#undef mvinsstr
|
| 444 |
+
#define mvinsstr UNDEF(mvinsstr)
|
| 445 |
+
#endif
|
| 446 |
+
|
| 447 |
+
#ifdef mvwaddch
|
| 448 |
+
inline int UNDEF(mvwaddch)(WINDOW *win, int y, int x, const chtype ch)
|
| 449 |
+
{ return mvwaddch(win, y, x, ch); }
|
| 450 |
+
#undef mvwaddch
|
| 451 |
+
#define mvwaddch UNDEF(mvwaddch)
|
| 452 |
+
#endif
|
| 453 |
+
|
| 454 |
+
#ifdef mvwaddchnstr
|
| 455 |
+
inline int UNDEF(mvwaddchnstr)(WINDOW *win, int y, int x, const chtype *str, int n)
|
| 456 |
+
{ return mvwaddchnstr(win, y, x, str, n); }
|
| 457 |
+
#undef mvwaddchnstr
|
| 458 |
+
#define mvwaddchnstr UNDEF(mvwaddchnstr)
|
| 459 |
+
#endif
|
| 460 |
+
|
| 461 |
+
#ifdef mvwaddchstr
|
| 462 |
+
inline int UNDEF(mvwaddchstr)(WINDOW *win, int y, int x, const chtype *str)
|
| 463 |
+
{ return mvwaddchstr(win, y, x, str); }
|
| 464 |
+
#undef mvwaddchstr
|
| 465 |
+
#define mvwaddchstr UNDEF(mvwaddchstr)
|
| 466 |
+
#endif
|
| 467 |
+
|
| 468 |
+
#ifdef mvwaddnstr
|
| 469 |
+
inline int UNDEF(mvwaddnstr)(WINDOW *win, int y, int x, const char *str, int n)
|
| 470 |
+
{ return mvwaddnstr(win, y, x, str, n); }
|
| 471 |
+
#undef mvwaddnstr
|
| 472 |
+
#define mvwaddnstr UNDEF(mvwaddnstr)
|
| 473 |
+
#endif
|
| 474 |
+
|
| 475 |
+
#ifdef mvwaddstr
|
| 476 |
+
inline int UNDEF(mvwaddstr)(WINDOW *win, int y, int x, const char * str)
|
| 477 |
+
{ return mvwaddstr(win, y, x, str); }
|
| 478 |
+
#undef mvwaddstr
|
| 479 |
+
#define mvwaddstr UNDEF(mvwaddstr)
|
| 480 |
+
#endif
|
| 481 |
+
|
| 482 |
+
#ifdef mvwchgat
|
| 483 |
+
inline int UNDEF(mvwchgat)(WINDOW *win, int y, int x, int n,
|
| 484 |
+
attr_t attr, NCURSES_PAIRS_T color, const void *opts) {
|
| 485 |
+
return mvwchgat(win, y, x, n, attr, color, opts); }
|
| 486 |
+
#undef mvwchgat
|
| 487 |
+
#define mvwchgat UNDEF(mvwchgat)
|
| 488 |
+
#endif
|
| 489 |
+
|
| 490 |
+
#ifdef mvwdelch
|
| 491 |
+
inline int UNDEF(mvwdelch)(WINDOW *win, int y, int x)
|
| 492 |
+
{ return mvwdelch(win, y, x); }
|
| 493 |
+
#undef mvwdelch
|
| 494 |
+
#define mvwdelch UNDEF(mvwdelch)
|
| 495 |
+
#endif
|
| 496 |
+
|
| 497 |
+
#ifdef mvwgetch
|
| 498 |
+
inline int UNDEF(mvwgetch)(WINDOW *win, int y, int x) { return mvwgetch(win, y, x);}
|
| 499 |
+
#undef mvwgetch
|
| 500 |
+
#define mvwgetch UNDEF(mvwgetch)
|
| 501 |
+
#endif
|
| 502 |
+
|
| 503 |
+
#ifdef mvwgetnstr
|
| 504 |
+
inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n)
|
| 505 |
+
{return mvwgetnstr(win, y, x, str, n);}
|
| 506 |
+
#undef mvwgetnstr
|
| 507 |
+
#define mvwgetnstr UNDEF(mvwgetnstr)
|
| 508 |
+
#endif
|
| 509 |
+
|
| 510 |
+
#ifdef mvwgetstr
|
| 511 |
+
inline int UNDEF(mvwgetstr)(WINDOW *win, int y, int x, char *str)
|
| 512 |
+
{return mvwgetstr(win, y, x, str);}
|
| 513 |
+
#undef mvwgetstr
|
| 514 |
+
#define mvwgetstr UNDEF(mvwgetstr)
|
| 515 |
+
#endif
|
| 516 |
+
|
| 517 |
+
#ifdef mvwhline
|
| 518 |
+
inline int UNDEF(mvwhline)(WINDOW *win, int y, int x, chtype c, int n) {
|
| 519 |
+
return mvwhline(win, y, x, c, n); }
|
| 520 |
+
#undef mvwhline
|
| 521 |
+
#define mvwhline UNDEF(mvwhline)
|
| 522 |
+
#endif
|
| 523 |
+
|
| 524 |
+
#ifdef mvwinch
|
| 525 |
+
inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) {
|
| 526 |
+
return mvwinch(win, y, x);}
|
| 527 |
+
#undef mvwinch
|
| 528 |
+
#define mvwinch UNDEF(mvwinch)
|
| 529 |
+
#endif
|
| 530 |
+
|
| 531 |
+
#ifdef mvwinchnstr
|
| 532 |
+
inline int UNDEF(mvwinchnstr)(WINDOW *win, int y, int x, chtype *str, int n) { return mvwinchnstr(win, y, x, str, n); }
|
| 533 |
+
#undef mvwinchnstr
|
| 534 |
+
#define mvwinchnstr UNDEF(mvwinchnstr)
|
| 535 |
+
#endif
|
| 536 |
+
|
| 537 |
+
#ifdef mvwinchstr
|
| 538 |
+
inline int UNDEF(mvwinchstr)(WINDOW *win, int y, int x, chtype *str) { return mvwinchstr(win, y, x, str); }
|
| 539 |
+
#undef mvwinchstr
|
| 540 |
+
#define mvwinchstr UNDEF(mvwinchstr)
|
| 541 |
+
#endif
|
| 542 |
+
|
| 543 |
+
#ifdef mvwinnstr
|
| 544 |
+
inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) {
|
| 545 |
+
return mvwinnstr(win, y, x, _str, n); }
|
| 546 |
+
#undef mvwinnstr
|
| 547 |
+
#define mvwinnstr UNDEF(mvwinnstr)
|
| 548 |
+
#endif
|
| 549 |
+
|
| 550 |
+
#ifdef mvwinsch
|
| 551 |
+
inline int UNDEF(mvwinsch)(WINDOW *win, int y, int x, chtype c)
|
| 552 |
+
{ return mvwinsch(win, y, x, c); }
|
| 553 |
+
#undef mvwinsch
|
| 554 |
+
#define mvwinsch UNDEF(mvwinsch)
|
| 555 |
+
#endif
|
| 556 |
+
|
| 557 |
+
#ifdef mvwinsnstr
|
| 558 |
+
inline int UNDEF(mvwinsnstr)(WINDOW *w, int y, int x, const char *_str, int n) {
|
| 559 |
+
return mvwinsnstr(w, y, x, _str, n); }
|
| 560 |
+
#undef mvwinsnstr
|
| 561 |
+
#define mvwinsnstr UNDEF(mvwinsnstr)
|
| 562 |
+
#endif
|
| 563 |
+
|
| 564 |
+
#ifdef mvwinsstr
|
| 565 |
+
inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) {
|
| 566 |
+
return mvwinsstr(w, y, x, _str); }
|
| 567 |
+
#undef mvwinsstr
|
| 568 |
+
#define mvwinsstr UNDEF(mvwinsstr)
|
| 569 |
+
#endif
|
| 570 |
+
|
| 571 |
+
#ifdef mvwvline
|
| 572 |
+
inline int UNDEF(mvwvline)(WINDOW *win, int y, int x, chtype c, int n) {
|
| 573 |
+
return mvwvline(win, y, x, c, n); }
|
| 574 |
+
#undef mvwvline
|
| 575 |
+
#define mvwvline UNDEF(mvwvline)
|
| 576 |
+
#endif
|
| 577 |
+
|
| 578 |
+
#ifdef napms
|
| 579 |
+
inline void UNDEF(napms)(unsigned long x) { napms(x); }
|
| 580 |
+
#undef napms
|
| 581 |
+
#define napms UNDEF(napms)
|
| 582 |
+
#endif
|
| 583 |
+
|
| 584 |
+
#ifdef nocrmode
|
| 585 |
+
inline int UNDEF(nocrmode)(void) { return nocrmode(); }
|
| 586 |
+
#undef nocrmode
|
| 587 |
+
#define nocrmode UNDEF(nocrmode)
|
| 588 |
+
#endif
|
| 589 |
+
|
| 590 |
+
#ifdef nodelay
|
| 591 |
+
inline void UNDEF(nodelay)() { nodelay(); }
|
| 592 |
+
#undef nodelay
|
| 593 |
+
#define nodelay UNDEF(nodelay)
|
| 594 |
+
#endif
|
| 595 |
+
|
| 596 |
+
#ifdef redrawwin
|
| 597 |
+
inline int UNDEF(redrawwin)(WINDOW *win) { return redrawwin(win); }
|
| 598 |
+
#undef redrawwin
|
| 599 |
+
#define redrawwin UNDEF(redrawwin)
|
| 600 |
+
#endif
|
| 601 |
+
|
| 602 |
+
#ifdef refresh
|
| 603 |
+
inline int UNDEF(refresh)() { return refresh(); }
|
| 604 |
+
#undef refresh
|
| 605 |
+
#define refresh UNDEF(refresh)
|
| 606 |
+
#endif
|
| 607 |
+
|
| 608 |
+
#ifdef resetterm
|
| 609 |
+
inline int UNDEF(resetterm)(void) { return resetterm(); }
|
| 610 |
+
#undef resetterm
|
| 611 |
+
#define resetterm UNDEF(resetterm)
|
| 612 |
+
#endif
|
| 613 |
+
|
| 614 |
+
#ifdef saveterm
|
| 615 |
+
inline int UNDEF(saveterm)(void) { return saveterm(); }
|
| 616 |
+
#undef saveterm
|
| 617 |
+
#define saveterm UNDEF(saveterm)
|
| 618 |
+
#endif
|
| 619 |
+
|
| 620 |
+
#ifdef scrl
|
| 621 |
+
inline int UNDEF(scrl)(int l) { return scrl(l); }
|
| 622 |
+
#undef scrl
|
| 623 |
+
#define scrl UNDEF(scrl)
|
| 624 |
+
#endif
|
| 625 |
+
|
| 626 |
+
#ifdef scroll
|
| 627 |
+
inline int UNDEF(scroll)(WINDOW *win) { return scroll(win); }
|
| 628 |
+
#undef scroll
|
| 629 |
+
#define scroll UNDEF(scroll)
|
| 630 |
+
#endif
|
| 631 |
+
|
| 632 |
+
#ifdef scrollok
|
| 633 |
+
inline int UNDEF(scrollok)(WINDOW* win, bool bf) { return scrollok(win, bf); }
|
| 634 |
+
#undef scrollok
|
| 635 |
+
#define scrollok UNDEF(scrollok)
|
| 636 |
+
#else
|
| 637 |
+
#if defined(__NCURSES_H)
|
| 638 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool);
|
| 639 |
+
#else
|
| 640 |
+
extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char);
|
| 641 |
+
#endif
|
| 642 |
+
#endif
|
| 643 |
+
|
| 644 |
+
#ifdef setscrreg
|
| 645 |
+
inline int UNDEF(setscrreg)(int t, int b) { return setscrreg(t, b); }
|
| 646 |
+
#undef setscrreg
|
| 647 |
+
#define setscrreg UNDEF(setscrreg)
|
| 648 |
+
#endif
|
| 649 |
+
|
| 650 |
+
#ifdef standend
|
| 651 |
+
inline int UNDEF(standend)() { return standend(); }
|
| 652 |
+
#undef standend
|
| 653 |
+
#define standend UNDEF(standend)
|
| 654 |
+
#endif
|
| 655 |
+
|
| 656 |
+
#ifdef standout
|
| 657 |
+
inline int UNDEF(standout)() { return standout(); }
|
| 658 |
+
#undef standout
|
| 659 |
+
#define standout UNDEF(standout)
|
| 660 |
+
#endif
|
| 661 |
+
|
| 662 |
+
#ifdef subpad
|
| 663 |
+
inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x)
|
| 664 |
+
{ return derwin(p, l, c, y, x); }
|
| 665 |
+
#undef subpad
|
| 666 |
+
#define subpad UNDEF(subpad)
|
| 667 |
+
#endif
|
| 668 |
+
|
| 669 |
+
#ifdef timeout
|
| 670 |
+
inline void UNDEF(timeout)(int delay) { timeout(delay); }
|
| 671 |
+
#undef timeout
|
| 672 |
+
#define timeout UNDEF(timeout)
|
| 673 |
+
#endif
|
| 674 |
+
|
| 675 |
+
#ifdef touchline
|
| 676 |
+
inline int UNDEF(touchline)(WINDOW *win, int s, int c)
|
| 677 |
+
{ return touchline(win, s, c); }
|
| 678 |
+
#undef touchline
|
| 679 |
+
#define touchline UNDEF(touchline)
|
| 680 |
+
#endif
|
| 681 |
+
|
| 682 |
+
#ifdef touchwin
|
| 683 |
+
inline int UNDEF(touchwin)(WINDOW *win) { return touchwin(win); }
|
| 684 |
+
#undef touchwin
|
| 685 |
+
#define touchwin UNDEF(touchwin)
|
| 686 |
+
#endif
|
| 687 |
+
|
| 688 |
+
#ifdef untouchwin
|
| 689 |
+
inline int UNDEF(untouchwin)(WINDOW *win) { return untouchwin(win); }
|
| 690 |
+
#undef untouchwin
|
| 691 |
+
#define untouchwin UNDEF(untouchwin)
|
| 692 |
+
#endif
|
| 693 |
+
|
| 694 |
+
#ifdef vline
|
| 695 |
+
inline int UNDEF(vline)(chtype ch, int n) { return vline(ch, n); }
|
| 696 |
+
#undef vline
|
| 697 |
+
#define vline UNDEF(vline)
|
| 698 |
+
#endif
|
| 699 |
+
|
| 700 |
+
#ifdef waddchstr
|
| 701 |
+
inline int UNDEF(waddchstr)(WINDOW *win, chtype *at) { return waddchstr(win, at); }
|
| 702 |
+
#undef waddchstr
|
| 703 |
+
#define waddchstr UNDEF(waddchstr)
|
| 704 |
+
#endif
|
| 705 |
+
|
| 706 |
+
#ifdef waddstr
|
| 707 |
+
inline int UNDEF(waddstr)(WINDOW *win, char *str) { return waddstr(win, str); }
|
| 708 |
+
#undef waddstr
|
| 709 |
+
#define waddstr UNDEF(waddstr)
|
| 710 |
+
#endif
|
| 711 |
+
|
| 712 |
+
#ifdef wattroff
|
| 713 |
+
inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); }
|
| 714 |
+
#undef wattroff
|
| 715 |
+
#define wattroff UNDEF(wattroff)
|
| 716 |
+
#endif
|
| 717 |
+
|
| 718 |
+
#ifdef wattrset
|
| 719 |
+
inline int UNDEF(wattrset)(WINDOW *win, int att) { return wattrset(win, att); }
|
| 720 |
+
#undef wattrset
|
| 721 |
+
#define wattrset UNDEF(wattrset)
|
| 722 |
+
#endif
|
| 723 |
+
|
| 724 |
+
#ifdef winch
|
| 725 |
+
inline chtype UNDEF(winch)(const WINDOW* win) { return winch(win); }
|
| 726 |
+
#undef winch
|
| 727 |
+
#define winch UNDEF(winch)
|
| 728 |
+
#endif
|
| 729 |
+
|
| 730 |
+
#ifdef winchnstr
|
| 731 |
+
inline int UNDEF(winchnstr)(WINDOW *win, chtype *str, int n) { return winchnstr(win, str, n); }
|
| 732 |
+
#undef winchnstr
|
| 733 |
+
#define winchnstr UNDEF(winchnstr)
|
| 734 |
+
#endif
|
| 735 |
+
|
| 736 |
+
#ifdef winchstr
|
| 737 |
+
inline int UNDEF(winchstr)(WINDOW *win, chtype *str) { return winchstr(win, str); }
|
| 738 |
+
#undef winchstr
|
| 739 |
+
#define winchstr UNDEF(winchstr)
|
| 740 |
+
#endif
|
| 741 |
+
|
| 742 |
+
#ifdef winsstr
|
| 743 |
+
inline int UNDEF(winsstr)(WINDOW *w, const char *_str) {
|
| 744 |
+
return winsstr(w, _str); }
|
| 745 |
+
#undef winsstr
|
| 746 |
+
#define winsstr UNDEF(winsstr)
|
| 747 |
+
#endif
|
| 748 |
+
|
| 749 |
+
#ifdef wstandend
|
| 750 |
+
inline int UNDEF(wstandend)(WINDOW *win) { return wstandend(win); }
|
| 751 |
+
#undef wstandend
|
| 752 |
+
#define wstandend UNDEF(wstandend)
|
| 753 |
+
#endif
|
| 754 |
+
|
| 755 |
+
#ifdef wstandout
|
| 756 |
+
inline int UNDEF(wstandout)(WINDOW *win) { return wstandout(win); }
|
| 757 |
+
#undef wstandout
|
| 758 |
+
#define wstandout UNDEF(wstandout)
|
| 759 |
+
#endif
|
| 760 |
+
|
| 761 |
+
/*
|
| 762 |
+
*
|
| 763 |
+
* C++ class for windows.
|
| 764 |
+
*
|
| 765 |
+
*/
|
| 766 |
+
|
| 767 |
+
extern "C" int _nc_ripoffline(int, int (*init)(WINDOW*, int));
|
| 768 |
+
extern "C" int _nc_xx_ripoff_init(WINDOW *, int);
|
| 769 |
+
extern "C" int _nc_has_mouse(void);
|
| 770 |
+
|
| 771 |
+
class NCURSES_CXX_IMPEXP NCursesWindow
|
| 772 |
+
{
|
| 773 |
+
friend class NCursesMenu;
|
| 774 |
+
friend class NCursesForm;
|
| 775 |
+
|
| 776 |
+
private:
|
| 777 |
+
static bool b_initialized;
|
| 778 |
+
static void initialize();
|
| 779 |
+
void constructing();
|
| 780 |
+
friend int _nc_xx_ripoff_init(WINDOW *, int);
|
| 781 |
+
|
| 782 |
+
void set_keyboard();
|
| 783 |
+
|
| 784 |
+
NCURSES_COLOR_T getcolor(int getback) const;
|
| 785 |
+
NCURSES_PAIRS_T getPair() const;
|
| 786 |
+
|
| 787 |
+
static int setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back, NCURSES_PAIRS_T pair);
|
| 788 |
+
static int colorInitialized;
|
| 789 |
+
|
| 790 |
+
// This private constructor is only used during the initialization
|
| 791 |
+
// of windows generated by ripoffline() calls.
|
| 792 |
+
NCursesWindow(WINDOW* win, int ncols);
|
| 793 |
+
|
| 794 |
+
protected:
|
| 795 |
+
virtual void err_handler(const char *) const THROWS(NCursesException);
|
| 796 |
+
// Signal an error with the given message text.
|
| 797 |
+
|
| 798 |
+
static long count; // count of all active windows:
|
| 799 |
+
// We rely on the c++ promise that
|
| 800 |
+
// all otherwise uninitialized
|
| 801 |
+
// static class vars are set to 0
|
| 802 |
+
|
| 803 |
+
WINDOW* w; // the curses WINDOW
|
| 804 |
+
|
| 805 |
+
bool alloced; // TRUE if we own the WINDOW
|
| 806 |
+
|
| 807 |
+
NCursesWindow* par; // parent, if subwindow
|
| 808 |
+
NCursesWindow* subwins; // head of subwindows list
|
| 809 |
+
NCursesWindow* sib; // next subwindow of parent
|
| 810 |
+
|
| 811 |
+
void kill_subwindows(); // disable all subwindows
|
| 812 |
+
// Destroy all subwindows.
|
| 813 |
+
|
| 814 |
+
/* Only for use by derived classes. They are then in charge to
|
| 815 |
+
fill the member variables correctly. */
|
| 816 |
+
NCursesWindow();
|
| 817 |
+
|
| 818 |
+
public:
|
| 819 |
+
explicit NCursesWindow(WINDOW* window); // useful only for stdscr
|
| 820 |
+
|
| 821 |
+
NCursesWindow(int nlines, // number of lines
|
| 822 |
+
int ncols, // number of columns
|
| 823 |
+
int begin_y, // line origin
|
| 824 |
+
int begin_x); // col origin
|
| 825 |
+
|
| 826 |
+
NCursesWindow(NCursesWindow& par,// parent window
|
| 827 |
+
int nlines, // number of lines
|
| 828 |
+
int ncols, // number of columns
|
| 829 |
+
int begin_y, // absolute or relative
|
| 830 |
+
int begin_x, // origins:
|
| 831 |
+
char absrel = 'a');// if `a', begin_y & begin_x are
|
| 832 |
+
// absolute screen pos, else if `r', they are relative to par origin
|
| 833 |
+
|
| 834 |
+
NCursesWindow(NCursesWindow& par,// parent window
|
| 835 |
+
bool do_box = TRUE);
|
| 836 |
+
// this is the very common case that we want to create the subwindow that
|
| 837 |
+
// is two lines and two columns smaller and begins at (1,1).
|
| 838 |
+
// We may automatically request the box around it.
|
| 839 |
+
|
| 840 |
+
NCursesWindow& operator=(const NCursesWindow& rhs)
|
| 841 |
+
{
|
| 842 |
+
if (this != &rhs)
|
| 843 |
+
*this = rhs;
|
| 844 |
+
return *this;
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
NCursesWindow(const NCursesWindow& rhs)
|
| 848 |
+
: w(rhs.w), alloced(rhs.alloced), par(rhs.par), subwins(rhs.subwins), sib(rhs.sib)
|
| 849 |
+
{
|
| 850 |
+
}
|
| 851 |
+
|
| 852 |
+
virtual ~NCursesWindow() THROWS(NCursesException);
|
| 853 |
+
|
| 854 |
+
NCursesWindow Clone();
|
| 855 |
+
// Make an exact copy of the window.
|
| 856 |
+
|
| 857 |
+
// Initialization.
|
| 858 |
+
static void useColors(void);
|
| 859 |
+
// Call this routine very early if you want to have colors.
|
| 860 |
+
|
| 861 |
+
static int ripoffline(int ripoff_lines,
|
| 862 |
+
int (*init)(NCursesWindow& win));
|
| 863 |
+
// This function is used to generate a window of ripped-of lines.
|
| 864 |
+
// If the argument is positive, lines are removed from the top, if it
|
| 865 |
+
// is negative lines are removed from the bottom. This enhances the
|
| 866 |
+
// lowlevel ripoffline() function because it uses the internal
|
| 867 |
+
// implementation that allows to remove more than just a single line.
|
| 868 |
+
// This function must be called before any other ncurses function. The
|
| 869 |
+
// creation of the window is deferred until ncurses gets initialized.
|
| 870 |
+
// The initialization function is then called.
|
| 871 |
+
|
| 872 |
+
// -------------------------------------------------------------------------
|
| 873 |
+
// terminal status
|
| 874 |
+
// -------------------------------------------------------------------------
|
| 875 |
+
int lines() const { initialize(); return LINES; }
|
| 876 |
+
// Number of lines on terminal, *not* window
|
| 877 |
+
|
| 878 |
+
int cols() const { initialize(); return COLS; }
|
| 879 |
+
// Number of cols on terminal, *not* window
|
| 880 |
+
|
| 881 |
+
int tabsize() const { initialize(); return TABSIZE; }
|
| 882 |
+
// Size of a tab on terminal, *not* window
|
| 883 |
+
|
| 884 |
+
static int NumberOfColors();
|
| 885 |
+
// Number of available colors
|
| 886 |
+
|
| 887 |
+
int colors() const { return NumberOfColors(); }
|
| 888 |
+
// Number of available colors
|
| 889 |
+
|
| 890 |
+
// -------------------------------------------------------------------------
|
| 891 |
+
// window status
|
| 892 |
+
// -------------------------------------------------------------------------
|
| 893 |
+
int height() const { return maxy() + 1; }
|
| 894 |
+
// Number of lines in this window
|
| 895 |
+
|
| 896 |
+
int width() const { return maxx() + 1; }
|
| 897 |
+
// Number of columns in this window
|
| 898 |
+
|
| 899 |
+
int begx() const { return getbegx(w); }
|
| 900 |
+
// Column of top left corner relative to stdscr
|
| 901 |
+
|
| 902 |
+
int begy() const { return getbegy(w); }
|
| 903 |
+
// Line of top left corner relative to stdscr
|
| 904 |
+
|
| 905 |
+
int curx() const { return getcurx(w); }
|
| 906 |
+
// Column of top left corner relative to stdscr
|
| 907 |
+
|
| 908 |
+
int cury() const { return getcury(w); }
|
| 909 |
+
// Line of top left corner relative to stdscr
|
| 910 |
+
|
| 911 |
+
int maxx() const { return getmaxx(w) == ERR ? ERR : getmaxx(w)-1; }
|
| 912 |
+
// Largest x coord in window
|
| 913 |
+
|
| 914 |
+
int maxy() const { return getmaxy(w) == ERR ? ERR : getmaxy(w)-1; }
|
| 915 |
+
// Largest y coord in window
|
| 916 |
+
|
| 917 |
+
NCURSES_PAIRS_T getcolor() const;
|
| 918 |
+
// Actual color pair
|
| 919 |
+
|
| 920 |
+
NCURSES_COLOR_T foreground() const { return getcolor(0); }
|
| 921 |
+
// Actual foreground color
|
| 922 |
+
|
| 923 |
+
NCURSES_COLOR_T background() const { return getcolor(1); }
|
| 924 |
+
// Actual background color
|
| 925 |
+
|
| 926 |
+
int setpalette(NCURSES_COLOR_T fore, NCURSES_COLOR_T back);
|
| 927 |
+
// Set color palette entry
|
| 928 |
+
|
| 929 |
+
int setcolor(NCURSES_PAIRS_T pair);
|
| 930 |
+
// Set actually used palette entry
|
| 931 |
+
|
| 932 |
+
// -------------------------------------------------------------------------
|
| 933 |
+
// window positioning
|
| 934 |
+
// -------------------------------------------------------------------------
|
| 935 |
+
virtual int mvwin(int begin_y, int begin_x) {
|
| 936 |
+
return ::mvwin(w, begin_y, begin_x); }
|
| 937 |
+
// Move window to new position with the new position as top left corner.
|
| 938 |
+
// This is virtual because it is redefined in NCursesPanel.
|
| 939 |
+
|
| 940 |
+
// -------------------------------------------------------------------------
|
| 941 |
+
// coordinate positioning
|
| 942 |
+
// -------------------------------------------------------------------------
|
| 943 |
+
int move(int y, int x) { return ::wmove(w, y, x); }
|
| 944 |
+
// Move cursor the this position
|
| 945 |
+
|
| 946 |
+
void getyx(int& y, int& x) const { ::getyx(w, y, x); }
|
| 947 |
+
// Get current position of the cursor
|
| 948 |
+
|
| 949 |
+
void getbegyx(int& y, int& x) const { ::getbegyx(w, y, x); }
|
| 950 |
+
// Get beginning of the window
|
| 951 |
+
|
| 952 |
+
void getmaxyx(int& y, int& x) const { ::getmaxyx(w, y, x); }
|
| 953 |
+
// Get size of the window
|
| 954 |
+
|
| 955 |
+
void getparyx(int& y, int& x) const { ::getparyx(w, y, x); }
|
| 956 |
+
// Get parent's beginning of the window
|
| 957 |
+
|
| 958 |
+
int mvcur(int oldrow, int oldcol, int newrow, int newcol) const {
|
| 959 |
+
return ::mvcur(oldrow, oldcol, newrow, newcol); }
|
| 960 |
+
// Perform lowlevel cursor motion that takes effect immediately.
|
| 961 |
+
|
| 962 |
+
// -------------------------------------------------------------------------
|
| 963 |
+
// input
|
| 964 |
+
// -------------------------------------------------------------------------
|
| 965 |
+
int getch() { return ::wgetch(w); }
|
| 966 |
+
// Get a keystroke from the window.
|
| 967 |
+
|
| 968 |
+
int getch(int y, int x) { return ::mvwgetch(w, y, x); }
|
| 969 |
+
// Move cursor to position and get a keystroke from the window
|
| 970 |
+
|
| 971 |
+
int getstr(char* str, int n=-1) {
|
| 972 |
+
return ::wgetnstr(w, str, n); }
|
| 973 |
+
// Read a series of characters into str until a newline or carriage return
|
| 974 |
+
// is received. Read at most n characters. If n is negative, the limit is
|
| 975 |
+
// ignored.
|
| 976 |
+
|
| 977 |
+
int getstr(int y, int x, char* str, int n=-1) {
|
| 978 |
+
return ::mvwgetnstr(w, y, x, str, n); }
|
| 979 |
+
// Move the cursor to the requested position and then perform the getstr()
|
| 980 |
+
// as described above.
|
| 981 |
+
|
| 982 |
+
int instr(char *s, int n=-1) { return ::winnstr(w, s, n); }
|
| 983 |
+
// Get a string of characters from the window into the buffer s. Retrieve
|
| 984 |
+
// at most n characters, if n is negative retrieve all characters up to the
|
| 985 |
+
// end of the current line. Attributes are stripped from the characters.
|
| 986 |
+
|
| 987 |
+
int instr(int y, int x, char *s, int n=-1) {
|
| 988 |
+
return ::mvwinnstr(w, y, x, s, n); }
|
| 989 |
+
// Move the cursor to the requested position and then perform the instr()
|
| 990 |
+
// as described above.
|
| 991 |
+
|
| 992 |
+
int scanw(const char* fmt, ...)
|
| 993 |
+
// Perform a scanw function from the window.
|
| 994 |
+
#if __GNUG__ >= 2
|
| 995 |
+
__attribute__ ((format (scanf, 2, 3)));
|
| 996 |
+
#else
|
| 997 |
+
;
|
| 998 |
+
#endif
|
| 999 |
+
|
| 1000 |
+
int scanw(const char*, va_list);
|
| 1001 |
+
// Perform a scanw function from the window.
|
| 1002 |
+
|
| 1003 |
+
int scanw(int y, int x, const char* fmt, ...)
|
| 1004 |
+
// Move the cursor to the requested position and then perform a scanw
|
| 1005 |
+
// from the window.
|
| 1006 |
+
#if __GNUG__ >= 2
|
| 1007 |
+
__attribute__ ((format (scanf, 4, 5)));
|
| 1008 |
+
#else
|
| 1009 |
+
;
|
| 1010 |
+
#endif
|
| 1011 |
+
|
| 1012 |
+
int scanw(int y, int x, const char* fmt, va_list);
|
| 1013 |
+
// Move the cursor to the requested position and then perform a scanw
|
| 1014 |
+
// from the window.
|
| 1015 |
+
|
| 1016 |
+
// -------------------------------------------------------------------------
|
| 1017 |
+
// output
|
| 1018 |
+
// -------------------------------------------------------------------------
|
| 1019 |
+
int addch(const chtype ch) { return ::waddch(w, ch); }
|
| 1020 |
+
// Put attributed character to the window.
|
| 1021 |
+
|
| 1022 |
+
int addch(int y, int x, const chtype ch) {
|
| 1023 |
+
return ::mvwaddch(w, y, x, ch); }
|
| 1024 |
+
// Move cursor to the requested position and then put attributed character
|
| 1025 |
+
// to the window.
|
| 1026 |
+
|
| 1027 |
+
int echochar(const chtype ch) { return ::wechochar(w, ch); }
|
| 1028 |
+
// Put attributed character to the window and refresh it immediately.
|
| 1029 |
+
|
| 1030 |
+
int addstr(const char* str, int n=-1) {
|
| 1031 |
+
return ::waddnstr(w, str, n); }
|
| 1032 |
+
// Write the string str to the window, stop writing if the terminating
|
| 1033 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1034 |
+
|
| 1035 |
+
int addstr(int y, int x, const char * str, int n=-1) {
|
| 1036 |
+
return ::mvwaddnstr(w, y, x, str, n); }
|
| 1037 |
+
// Move the cursor to the requested position and then perform the addchstr
|
| 1038 |
+
// as described above.
|
| 1039 |
+
|
| 1040 |
+
int addchstr(const chtype* str, int n=-1) {
|
| 1041 |
+
return ::waddchnstr(w, str, n); }
|
| 1042 |
+
// Write the string str to the window, stop writing if the terminating
|
| 1043 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1044 |
+
|
| 1045 |
+
int addchstr(int y, int x, const chtype * str, int n=-1) {
|
| 1046 |
+
return ::mvwaddchnstr(w, y, x, str, n); }
|
| 1047 |
+
// Move the cursor to the requested position and then perform the addchstr
|
| 1048 |
+
// as described above.
|
| 1049 |
+
|
| 1050 |
+
int printw(const char* fmt, ...)
|
| 1051 |
+
// Do a formatted print to the window.
|
| 1052 |
+
#if (__GNUG__ >= 2) && !defined(printf)
|
| 1053 |
+
__attribute__ ((format (printf, 2, 3)));
|
| 1054 |
+
#else
|
| 1055 |
+
;
|
| 1056 |
+
#endif
|
| 1057 |
+
|
| 1058 |
+
int printw(int y, int x, const char * fmt, ...)
|
| 1059 |
+
// Move the cursor and then do a formatted print to the window.
|
| 1060 |
+
#if (__GNUG__ >= 2) && !defined(printf)
|
| 1061 |
+
__attribute__ ((format (printf, 4, 5)));
|
| 1062 |
+
#else
|
| 1063 |
+
;
|
| 1064 |
+
#endif
|
| 1065 |
+
|
| 1066 |
+
int printw(const char* fmt, va_list args);
|
| 1067 |
+
// Do a formatted print to the window.
|
| 1068 |
+
|
| 1069 |
+
int printw(int y, int x, const char * fmt, va_list args);
|
| 1070 |
+
// Move the cursor and then do a formatted print to the window.
|
| 1071 |
+
|
| 1072 |
+
chtype inch() const { return ::winch(w); }
|
| 1073 |
+
// Retrieve attributed character under the current cursor position.
|
| 1074 |
+
|
| 1075 |
+
chtype inch(int y, int x) { return ::mvwinch(w, y, x); }
|
| 1076 |
+
// Move cursor to requested position and then retrieve attributed character
|
| 1077 |
+
// at this position.
|
| 1078 |
+
|
| 1079 |
+
int inchstr(chtype* str, int n=-1) {
|
| 1080 |
+
return ::winchnstr(w, str, n); }
|
| 1081 |
+
// Read the string str from the window, stop reading if the terminating
|
| 1082 |
+
// NUL or the limit n is reached. If n is negative, it is ignored.
|
| 1083 |
+
|
| 1084 |
+
int inchstr(int y, int x, chtype * str, int n=-1) {
|
| 1085 |
+
return ::mvwinchnstr(w, y, x, str, n); }
|
| 1086 |
+
// Move the cursor to the requested position and then perform the inchstr
|
| 1087 |
+
// as described above.
|
| 1088 |
+
|
| 1089 |
+
int insch(chtype ch) { return ::winsch(w, ch); }
|
| 1090 |
+
// Insert attributed character into the window before current cursor
|
| 1091 |
+
// position.
|
| 1092 |
+
|
| 1093 |
+
int insch(int y, int x, chtype ch) {
|
| 1094 |
+
return ::mvwinsch(w, y, x, ch); }
|
| 1095 |
+
// Move cursor to requested position and then insert the attributed
|
| 1096 |
+
// character before that position.
|
| 1097 |
+
|
| 1098 |
+
int insertln() { return ::winsdelln(w, 1); }
|
| 1099 |
+
// Insert an empty line above the current line.
|
| 1100 |
+
|
| 1101 |
+
int insdelln(int n=1) { return ::winsdelln(w, n); }
|
| 1102 |
+
// If n>0 insert that many lines above the current line. If n<0 delete
|
| 1103 |
+
// that many lines beginning with the current line.
|
| 1104 |
+
|
| 1105 |
+
int insstr(const char *s, int n=-1) {
|
| 1106 |
+
return ::winsnstr(w, s, n); }
|
| 1107 |
+
// Insert the string into the window before the current cursor position.
|
| 1108 |
+
// Insert stops at end of string or when the limit n is reached. If n is
|
| 1109 |
+
// negative, it is ignored.
|
| 1110 |
+
|
| 1111 |
+
int insstr(int y, int x, const char *s, int n=-1) {
|
| 1112 |
+
return ::mvwinsnstr(w, y, x, s, n); }
|
| 1113 |
+
// Move the cursor to the requested position and then perform the insstr()
|
| 1114 |
+
// as described above.
|
| 1115 |
+
|
| 1116 |
+
int attron (chtype at) { return ::wattron (w, at); }
|
| 1117 |
+
// Switch on the window attributes;
|
| 1118 |
+
|
| 1119 |
+
int attroff(chtype at) { return ::wattroff(w, static_cast<int>(at)); }
|
| 1120 |
+
// Switch off the window attributes;
|
| 1121 |
+
|
| 1122 |
+
int attrset(chtype at) { return ::wattrset(w, static_cast<int>(at)); }
|
| 1123 |
+
// Set the window attributes;
|
| 1124 |
+
|
| 1125 |
+
chtype attrget() { return ::getattrs(w); }
|
| 1126 |
+
// Get the window attributes;
|
| 1127 |
+
|
| 1128 |
+
int color_set(NCURSES_PAIRS_T color_pair_number, void* opts=NULL) {
|
| 1129 |
+
return ::wcolor_set(w, color_pair_number, opts); }
|
| 1130 |
+
// Set the window color attribute;
|
| 1131 |
+
|
| 1132 |
+
int chgat(int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
|
| 1133 |
+
return ::wchgat(w, n, attr, color, opts); }
|
| 1134 |
+
// Change the attributes of the next n characters in the current line. If
|
| 1135 |
+
// n is negative or greater than the number of remaining characters in the
|
| 1136 |
+
// line, the attributes will be changed up to the end of the line.
|
| 1137 |
+
|
| 1138 |
+
int chgat(int y, int x,
|
| 1139 |
+
int n, attr_t attr, NCURSES_PAIRS_T color, const void *opts=NULL) {
|
| 1140 |
+
return ::mvwchgat(w, y, x, n, attr, color, opts); }
|
| 1141 |
+
// Move the cursor to the requested position and then perform chgat() as
|
| 1142 |
+
// described above.
|
| 1143 |
+
|
| 1144 |
+
// -------------------------------------------------------------------------
|
| 1145 |
+
// background
|
| 1146 |
+
// -------------------------------------------------------------------------
|
| 1147 |
+
chtype getbkgd() const { return ::getbkgd(w); }
|
| 1148 |
+
// Get current background setting.
|
| 1149 |
+
|
| 1150 |
+
int bkgd(const chtype ch) { return ::wbkgd(w, ch); }
|
| 1151 |
+
// Set the background property and apply it to the window.
|
| 1152 |
+
|
| 1153 |
+
void bkgdset(chtype ch) { ::wbkgdset(w, ch); }
|
| 1154 |
+
// Set the background property.
|
| 1155 |
+
|
| 1156 |
+
// -------------------------------------------------------------------------
|
| 1157 |
+
// borders
|
| 1158 |
+
// -------------------------------------------------------------------------
|
| 1159 |
+
int box(chtype vert=0, chtype hor=0) {
|
| 1160 |
+
return ::wborder(w, vert, vert, hor, hor, 0, 0, 0, 0); }
|
| 1161 |
+
// Draw a box around the window with the given vertical and horizontal
|
| 1162 |
+
// drawing characters. If you specify a zero as character, curses will try
|
| 1163 |
+
// to find a "nice" character.
|
| 1164 |
+
|
| 1165 |
+
int border(chtype left=0, chtype right=0,
|
| 1166 |
+
chtype top =0, chtype bottom=0,
|
| 1167 |
+
chtype top_left =0, chtype top_right=0,
|
| 1168 |
+
chtype bottom_left =0, chtype bottom_right=0) {
|
| 1169 |
+
return ::wborder(w, left, right, top, bottom, top_left, top_right,
|
| 1170 |
+
bottom_left, bottom_right); }
|
| 1171 |
+
// Draw a border around the window with the given characters for the
|
| 1172 |
+
// various parts of the border. If you pass zero for a character, curses
|
| 1173 |
+
// will try to find "nice" characters.
|
| 1174 |
+
|
| 1175 |
+
// -------------------------------------------------------------------------
|
| 1176 |
+
// lines and boxes
|
| 1177 |
+
// -------------------------------------------------------------------------
|
| 1178 |
+
int hline(int len, chtype ch=0) { return ::whline(w, ch, len); }
|
| 1179 |
+
// Draw a horizontal line of len characters with the given character. If
|
| 1180 |
+
// you pass zero for the character, curses will try to find a "nice" one.
|
| 1181 |
+
|
| 1182 |
+
int hline(int y, int x, int len, chtype ch=0) {
|
| 1183 |
+
return ::mvwhline(w, y, x, ch, len); }
|
| 1184 |
+
// Move the cursor to the requested position and then draw a horizontal line.
|
| 1185 |
+
|
| 1186 |
+
int vline(int len, chtype ch=0) { return ::wvline(w, ch, len); }
|
| 1187 |
+
// Draw a vertical line of len characters with the given character. If
|
| 1188 |
+
// you pass zero for the character, curses will try to find a "nice" one.
|
| 1189 |
+
|
| 1190 |
+
int vline(int y, int x, int len, chtype ch=0) {
|
| 1191 |
+
return ::mvwvline(w, y, x, ch, len); }
|
| 1192 |
+
// Move the cursor to the requested position and then draw a vertical line.
|
| 1193 |
+
|
| 1194 |
+
// -------------------------------------------------------------------------
|
| 1195 |
+
// erasure
|
| 1196 |
+
// -------------------------------------------------------------------------
|
| 1197 |
+
int erase() { return ::werase(w); }
|
| 1198 |
+
// Erase the window.
|
| 1199 |
+
|
| 1200 |
+
int clear() { return ::wclear(w); }
|
| 1201 |
+
// Clear the window.
|
| 1202 |
+
|
| 1203 |
+
int clearok(bool bf) { return ::clearok(w, bf); }
|
| 1204 |
+
// Set/Reset the clear flag. If set, the next refresh() will clear the
|
| 1205 |
+
// screen.
|
| 1206 |
+
|
| 1207 |
+
int clrtobot() { return ::wclrtobot(w); }
|
| 1208 |
+
// Clear to the end of the window.
|
| 1209 |
+
|
| 1210 |
+
int clrtoeol() { return ::wclrtoeol(w); }
|
| 1211 |
+
// Clear to the end of the line.
|
| 1212 |
+
|
| 1213 |
+
int delch() { return ::wdelch(w); }
|
| 1214 |
+
// Delete character under the cursor.
|
| 1215 |
+
|
| 1216 |
+
int delch(int y, int x) { return ::mvwdelch(w, y, x); }
|
| 1217 |
+
// Move cursor to requested position and delete the character under the
|
| 1218 |
+
// cursor.
|
| 1219 |
+
|
| 1220 |
+
int deleteln() { return ::winsdelln(w, -1); }
|
| 1221 |
+
// Delete the current line.
|
| 1222 |
+
|
| 1223 |
+
// -------------------------------------------------------------------------
|
| 1224 |
+
// screen control
|
| 1225 |
+
// -------------------------------------------------------------------------
|
| 1226 |
+
int scroll(int amount=1) { return ::wscrl(w, amount); }
|
| 1227 |
+
// Scroll amount lines. If amount is positive, scroll up, otherwise
|
| 1228 |
+
// scroll down.
|
| 1229 |
+
|
| 1230 |
+
int scrollok(bool bf) { return ::scrollok(w, bf); }
|
| 1231 |
+
// If bf is TRUE, window scrolls if cursor is moved off the bottom
|
| 1232 |
+
// edge of the window or a scrolling region, otherwise the cursor is left
|
| 1233 |
+
// at the bottom line.
|
| 1234 |
+
|
| 1235 |
+
int setscrreg(int from, int to) {
|
| 1236 |
+
return ::wsetscrreg(w, from, to); }
|
| 1237 |
+
// Define a soft scrolling region.
|
| 1238 |
+
|
| 1239 |
+
int idlok(bool bf) { return ::idlok(w, bf); }
|
| 1240 |
+
// If bf is TRUE, use insert/delete line hardware support if possible.
|
| 1241 |
+
// Otherwise do it in software.
|
| 1242 |
+
|
| 1243 |
+
void idcok(bool bf) { ::idcok(w, bf); }
|
| 1244 |
+
// If bf is TRUE, use insert/delete character hardware support if possible.
|
| 1245 |
+
// Otherwise do it in software.
|
| 1246 |
+
|
| 1247 |
+
int touchline(int s, int c) { return ::touchline(w, s, c); }
|
| 1248 |
+
// Mark the given lines as modified.
|
| 1249 |
+
|
| 1250 |
+
int touchwin() { return ::wtouchln(w, 0, height(), 1); }
|
| 1251 |
+
// Mark the whole window as modified.
|
| 1252 |
+
|
| 1253 |
+
int untouchwin() { return ::wtouchln(w, 0, height(), 0); }
|
| 1254 |
+
// Mark the whole window as unmodified.
|
| 1255 |
+
|
| 1256 |
+
int touchln(int s, int cnt, bool changed=TRUE) {
|
| 1257 |
+
return ::wtouchln(w, s, cnt, static_cast<int>(changed ? 1 : 0)); }
|
| 1258 |
+
// Mark cnt lines beginning from line s as changed or unchanged, depending
|
| 1259 |
+
// on the value of the changed flag.
|
| 1260 |
+
|
| 1261 |
+
bool is_linetouched(int line) const {
|
| 1262 |
+
return (::is_linetouched(w, line) == TRUE ? TRUE:FALSE); }
|
| 1263 |
+
// Return TRUE if line is marked as changed, FALSE otherwise
|
| 1264 |
+
|
| 1265 |
+
bool is_wintouched() const {
|
| 1266 |
+
return (::is_wintouched(w) ? TRUE:FALSE); }
|
| 1267 |
+
// Return TRUE if window is marked as changed, FALSE otherwise
|
| 1268 |
+
|
| 1269 |
+
int leaveok(bool bf) { return ::leaveok(w, bf); }
|
| 1270 |
+
// If bf is TRUE, curses will leave the cursor after an update wherever
|
| 1271 |
+
// it is after the update.
|
| 1272 |
+
|
| 1273 |
+
int redrawln(int from, int n) { return ::wredrawln(w, from, n); }
|
| 1274 |
+
// Redraw n lines starting from the requested line
|
| 1275 |
+
|
| 1276 |
+
int redrawwin() { return ::wredrawln(w, 0, height()); }
|
| 1277 |
+
// Redraw the whole window
|
| 1278 |
+
|
| 1279 |
+
int doupdate() { return ::doupdate(); }
|
| 1280 |
+
// Do all outputs to make the physical screen looking like the virtual one
|
| 1281 |
+
|
| 1282 |
+
void syncdown() { ::wsyncdown(w); }
|
| 1283 |
+
// Propagate the changes down to all descendant windows
|
| 1284 |
+
|
| 1285 |
+
void syncup() { ::wsyncup(w); }
|
| 1286 |
+
// Propagate the changes up in the hierarchy
|
| 1287 |
+
|
| 1288 |
+
void cursyncup() { ::wcursyncup(w); }
|
| 1289 |
+
// Position the cursor in all ancestor windows corresponding to our setting
|
| 1290 |
+
|
| 1291 |
+
int syncok(bool bf) { return ::syncok(w, bf); }
|
| 1292 |
+
// If called with bf=TRUE, syncup() is called whenever the window is changed
|
| 1293 |
+
|
| 1294 |
+
#ifndef _no_flushok
|
| 1295 |
+
int flushok(bool bf) { return ::flushok(w, bf); }
|
| 1296 |
+
#endif
|
| 1297 |
+
|
| 1298 |
+
void immedok(bool bf) { ::immedok(w, bf); }
|
| 1299 |
+
// If called with bf=TRUE, any change in the window will cause an
|
| 1300 |
+
// automatic immediate refresh()
|
| 1301 |
+
|
| 1302 |
+
int intrflush(bool bf) { return ::intrflush(w, bf); }
|
| 1303 |
+
|
| 1304 |
+
int keypad(bool bf) { return ::keypad(w, bf); }
|
| 1305 |
+
// If called with bf=TRUE, the application will interpret function keys.
|
| 1306 |
+
|
| 1307 |
+
int nodelay(bool bf) { return ::nodelay(w, bf); }
|
| 1308 |
+
|
| 1309 |
+
int meta(bool bf) { return ::meta(w, bf); }
|
| 1310 |
+
// If called with bf=TRUE, keys may generate 8-Bit characters. Otherwise
|
| 1311 |
+
// 7-Bit characters are generated.
|
| 1312 |
+
|
| 1313 |
+
int standout() { return ::wstandout(w); }
|
| 1314 |
+
// Enable "standout" attributes
|
| 1315 |
+
|
| 1316 |
+
int standend() { return ::wstandend(w); }
|
| 1317 |
+
// Disable "standout" attributes
|
| 1318 |
+
|
| 1319 |
+
// -------------------------------------------------------------------------
|
| 1320 |
+
// The next two are virtual, because we redefine them in the
|
| 1321 |
+
// NCursesPanel class.
|
| 1322 |
+
// -------------------------------------------------------------------------
|
| 1323 |
+
virtual int refresh() { return ::wrefresh(w); }
|
| 1324 |
+
// Propagate the changes in this window to the virtual screen and call
|
| 1325 |
+
// doupdate(). This is redefined in NCursesPanel.
|
| 1326 |
+
|
| 1327 |
+
virtual int noutrefresh() { return ::wnoutrefresh(w); }
|
| 1328 |
+
// Propagate the changes in this window to the virtual screen. This is
|
| 1329 |
+
// redefined in NCursesPanel.
|
| 1330 |
+
|
| 1331 |
+
// -------------------------------------------------------------------------
|
| 1332 |
+
// multiple window control
|
| 1333 |
+
// -------------------------------------------------------------------------
|
| 1334 |
+
int overlay(NCursesWindow& win) {
|
| 1335 |
+
return ::overlay(w, win.w); }
|
| 1336 |
+
// Overlay this window over win.
|
| 1337 |
+
|
| 1338 |
+
int overwrite(NCursesWindow& win) {
|
| 1339 |
+
return ::overwrite(w, win.w); }
|
| 1340 |
+
// Overwrite win with this window.
|
| 1341 |
+
|
| 1342 |
+
int copywin(NCursesWindow& win,
|
| 1343 |
+
int sminrow, int smincol,
|
| 1344 |
+
int dminrow, int dmincol,
|
| 1345 |
+
int dmaxrow, int dmaxcol, bool overlaywin=TRUE) {
|
| 1346 |
+
return ::copywin(w, win.w, sminrow, smincol, dminrow, dmincol,
|
| 1347 |
+
dmaxrow, dmaxcol, static_cast<int>(overlaywin ? 1 : 0)); }
|
| 1348 |
+
// Overlay or overwrite the rectangle in win given by dminrow,dmincol,
|
| 1349 |
+
// dmaxrow,dmaxcol with the rectangle in this window beginning at
|
| 1350 |
+
// sminrow,smincol.
|
| 1351 |
+
|
| 1352 |
+
// -------------------------------------------------------------------------
|
| 1353 |
+
// Extended functions
|
| 1354 |
+
// -------------------------------------------------------------------------
|
| 1355 |
+
#if defined(NCURSES_EXT_FUNCS) && (NCURSES_EXT_FUNCS != 0)
|
| 1356 |
+
int wresize(int newLines, int newColumns) {
|
| 1357 |
+
return ::wresize(w, newLines, newColumns); }
|
| 1358 |
+
#endif
|
| 1359 |
+
|
| 1360 |
+
// -------------------------------------------------------------------------
|
| 1361 |
+
// Mouse related
|
| 1362 |
+
// -------------------------------------------------------------------------
|
| 1363 |
+
bool has_mouse() const;
|
| 1364 |
+
// Return TRUE if terminal supports a mouse, FALSE otherwise
|
| 1365 |
+
|
| 1366 |
+
// -------------------------------------------------------------------------
|
| 1367 |
+
// traversal support
|
| 1368 |
+
// -------------------------------------------------------------------------
|
| 1369 |
+
NCursesWindow* child() { return subwins; }
|
| 1370 |
+
// Get the first child window.
|
| 1371 |
+
|
| 1372 |
+
NCursesWindow* sibling() { return sib; }
|
| 1373 |
+
// Get the next child of my parent.
|
| 1374 |
+
|
| 1375 |
+
NCursesWindow* parent() { return par; }
|
| 1376 |
+
// Get my parent.
|
| 1377 |
+
|
| 1378 |
+
bool isDescendant(NCursesWindow& win);
|
| 1379 |
+
// Return TRUE if win is a descendant of this.
|
| 1380 |
+
};
|
| 1381 |
+
|
| 1382 |
+
// -------------------------------------------------------------------------
|
| 1383 |
+
// We leave this here for compatibility reasons.
|
| 1384 |
+
// -------------------------------------------------------------------------
|
| 1385 |
+
class NCURSES_CXX_IMPEXP NCursesColorWindow : public NCursesWindow
|
| 1386 |
+
{
|
| 1387 |
+
public:
|
| 1388 |
+
explicit NCursesColorWindow(WINDOW* &window) // useful only for stdscr
|
| 1389 |
+
: NCursesWindow(window) {
|
| 1390 |
+
useColors(); }
|
| 1391 |
+
|
| 1392 |
+
NCursesColorWindow(int nlines, // number of lines
|
| 1393 |
+
int ncols, // number of columns
|
| 1394 |
+
int begin_y, // line origin
|
| 1395 |
+
int begin_x) // col origin
|
| 1396 |
+
: NCursesWindow(nlines, ncols, begin_y, begin_x) {
|
| 1397 |
+
useColors(); }
|
| 1398 |
+
|
| 1399 |
+
NCursesColorWindow(NCursesWindow& parentWin,// parent window
|
| 1400 |
+
int nlines, // number of lines
|
| 1401 |
+
int ncols, // number of columns
|
| 1402 |
+
int begin_y, // absolute or relative
|
| 1403 |
+
int begin_x, // origins:
|
| 1404 |
+
char absrel = 'a') // if `a', by & bx are
|
| 1405 |
+
: NCursesWindow(parentWin,
|
| 1406 |
+
nlines, ncols, // absolute screen pos,
|
| 1407 |
+
begin_y, begin_x, // else if `r', they are
|
| 1408 |
+
absrel ) { // relative to par origin
|
| 1409 |
+
useColors(); }
|
| 1410 |
+
};
|
| 1411 |
+
|
| 1412 |
+
// These enum definitions really belong inside the NCursesPad class, but only
|
| 1413 |
+
// recent compilers support that feature.
|
| 1414 |
+
|
| 1415 |
+
typedef enum {
|
| 1416 |
+
REQ_PAD_REFRESH = KEY_MAX + 1,
|
| 1417 |
+
REQ_PAD_UP,
|
| 1418 |
+
REQ_PAD_DOWN,
|
| 1419 |
+
REQ_PAD_LEFT,
|
| 1420 |
+
REQ_PAD_RIGHT,
|
| 1421 |
+
REQ_PAD_EXIT
|
| 1422 |
+
} Pad_Request;
|
| 1423 |
+
|
| 1424 |
+
const Pad_Request PAD_LOW = REQ_PAD_REFRESH; // lowest op-code
|
| 1425 |
+
const Pad_Request PAD_HIGH = REQ_PAD_EXIT; // highest op-code
|
| 1426 |
+
|
| 1427 |
+
// -------------------------------------------------------------------------
|
| 1428 |
+
// Pad Support. We allow an association of a pad with a "real" window
|
| 1429 |
+
// through which the pad may be viewed.
|
| 1430 |
+
// -------------------------------------------------------------------------
|
| 1431 |
+
class NCURSES_CXX_IMPEXP NCursesPad : public NCursesWindow
|
| 1432 |
+
{
|
| 1433 |
+
private:
|
| 1434 |
+
NCursesWindow* viewWin; // the "viewport" window
|
| 1435 |
+
NCursesWindow* viewSub; // the "viewport" subwindow
|
| 1436 |
+
|
| 1437 |
+
int h_gridsize, v_gridsize;
|
| 1438 |
+
|
| 1439 |
+
protected:
|
| 1440 |
+
int min_row, min_col; // top left row/col of the pads display area
|
| 1441 |
+
|
| 1442 |
+
NCursesWindow* Win(void) const {
|
| 1443 |
+
// Get the window into which the pad should be copied (if any)
|
| 1444 |
+
return (viewSub?viewSub:(viewWin?viewWin:0));
|
| 1445 |
+
}
|
| 1446 |
+
|
| 1447 |
+
NCursesWindow* getWindow(void) const {
|
| 1448 |
+
return viewWin;
|
| 1449 |
+
}
|
| 1450 |
+
|
| 1451 |
+
NCursesWindow* getSubWindow(void) const {
|
| 1452 |
+
return viewSub;
|
| 1453 |
+
}
|
| 1454 |
+
|
| 1455 |
+
virtual int driver (int key); // Virtualize keystroke key
|
| 1456 |
+
// The driver translates the keystroke c into an Pad_Request
|
| 1457 |
+
|
| 1458 |
+
virtual void OnUnknownOperation(int pad_req) {
|
| 1459 |
+
(void) pad_req;
|
| 1460 |
+
::beep();
|
| 1461 |
+
}
|
| 1462 |
+
// This is called if the driver returns an unknown op-code
|
| 1463 |
+
|
| 1464 |
+
virtual void OnNavigationError(int pad_req) {
|
| 1465 |
+
(void) pad_req;
|
| 1466 |
+
::beep();
|
| 1467 |
+
}
|
| 1468 |
+
// This is called if a navigation request couldn't be satisfied
|
| 1469 |
+
|
| 1470 |
+
virtual void OnOperation(int pad_req) {
|
| 1471 |
+
(void) pad_req;
|
| 1472 |
+
};
|
| 1473 |
+
// OnOperation is called if a Pad_Operation was executed and just before
|
| 1474 |
+
// the refresh() operation is done.
|
| 1475 |
+
|
| 1476 |
+
public:
|
| 1477 |
+
NCursesPad(int nlines, int ncols);
|
| 1478 |
+
// create a pad with the given size
|
| 1479 |
+
|
| 1480 |
+
NCursesPad& operator=(const NCursesPad& rhs)
|
| 1481 |
+
{
|
| 1482 |
+
if (this != &rhs) {
|
| 1483 |
+
*this = rhs;
|
| 1484 |
+
NCursesWindow::operator=(rhs);
|
| 1485 |
+
}
|
| 1486 |
+
return *this;
|
| 1487 |
+
}
|
| 1488 |
+
|
| 1489 |
+
NCursesPad(const NCursesPad& rhs)
|
| 1490 |
+
: NCursesWindow(rhs),
|
| 1491 |
+
viewWin(rhs.viewWin),
|
| 1492 |
+
viewSub(rhs.viewSub),
|
| 1493 |
+
h_gridsize(rhs.h_gridsize),
|
| 1494 |
+
v_gridsize(rhs.v_gridsize),
|
| 1495 |
+
min_row(rhs.min_row),
|
| 1496 |
+
min_col(rhs.min_col)
|
| 1497 |
+
{
|
| 1498 |
+
}
|
| 1499 |
+
|
| 1500 |
+
virtual ~NCursesPad() THROWS(NCursesException) {}
|
| 1501 |
+
|
| 1502 |
+
int echochar(const chtype ch) { return ::pechochar(w, ch); }
|
| 1503 |
+
// Put the attributed character onto the pad and immediately do a
|
| 1504 |
+
// prefresh().
|
| 1505 |
+
|
| 1506 |
+
int refresh() NCURSES_OVERRIDE;
|
| 1507 |
+
// If a viewport is defined the pad is displayed in this window, otherwise
|
| 1508 |
+
// this is a noop.
|
| 1509 |
+
|
| 1510 |
+
int refresh(int pminrow, int pmincol,
|
| 1511 |
+
int sminrow, int smincol,
|
| 1512 |
+
int smaxrow, int smaxcol) {
|
| 1513 |
+
return ::prefresh(w, pminrow, pmincol,
|
| 1514 |
+
sminrow, smincol, smaxrow, smaxcol);
|
| 1515 |
+
}
|
| 1516 |
+
// The coordinates sminrow,smincol,smaxrow,smaxcol describe a rectangle
|
| 1517 |
+
// on the screen. <b>refresh</b> copies a rectangle of this size beginning
|
| 1518 |
+
// with top left corner pminrow,pmincol onto the screen and calls doupdate().
|
| 1519 |
+
|
| 1520 |
+
int noutrefresh() NCURSES_OVERRIDE;
|
| 1521 |
+
// If a viewport is defined the pad is displayed in this window, otherwise
|
| 1522 |
+
// this is a noop.
|
| 1523 |
+
|
| 1524 |
+
int noutrefresh(int pminrow, int pmincol,
|
| 1525 |
+
int sminrow, int smincol,
|
| 1526 |
+
int smaxrow, int smaxcol) {
|
| 1527 |
+
return ::pnoutrefresh(w, pminrow, pmincol,
|
| 1528 |
+
sminrow, smincol, smaxrow, smaxcol);
|
| 1529 |
+
}
|
| 1530 |
+
// Does the same as refresh() but without calling doupdate().
|
| 1531 |
+
|
| 1532 |
+
virtual void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1);
|
| 1533 |
+
// Add the window "view" as viewing window to the pad.
|
| 1534 |
+
|
| 1535 |
+
virtual void setSubWindow(NCursesWindow& sub);
|
| 1536 |
+
// Use the subwindow "sub" of the viewport window for the actual viewing.
|
| 1537 |
+
// The full viewport window is usually used to provide some decorations
|
| 1538 |
+
// like frames, titles etc.
|
| 1539 |
+
|
| 1540 |
+
virtual void operator() (void);
|
| 1541 |
+
// Perform Pad's operation
|
| 1542 |
+
};
|
| 1543 |
+
|
| 1544 |
+
// A FramedPad is constructed always with a viewport window. This viewport
|
| 1545 |
+
// will be framed (by a box() command) and the interior of the box is the
|
| 1546 |
+
// viewport subwindow. On the frame we display scrollbar sliders.
|
| 1547 |
+
class NCURSES_CXX_IMPEXP NCursesFramedPad : public NCursesPad
|
| 1548 |
+
{
|
| 1549 |
+
protected:
|
| 1550 |
+
virtual void OnOperation(int pad_req) NCURSES_OVERRIDE;
|
| 1551 |
+
|
| 1552 |
+
public:
|
| 1553 |
+
NCursesFramedPad(NCursesWindow& win, int nlines, int ncols,
|
| 1554 |
+
int v_grid = 1, int h_grid = 1)
|
| 1555 |
+
: NCursesPad(nlines, ncols) {
|
| 1556 |
+
NCursesPad::setWindow(win, v_grid, h_grid);
|
| 1557 |
+
NCursesPad::setSubWindow(*(new NCursesWindow(win)));
|
| 1558 |
+
}
|
| 1559 |
+
// Construct the FramedPad with the given Window win as viewport.
|
| 1560 |
+
|
| 1561 |
+
virtual ~NCursesFramedPad() THROWS(NCursesException) {
|
| 1562 |
+
delete getSubWindow();
|
| 1563 |
+
}
|
| 1564 |
+
|
| 1565 |
+
void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1) NCURSES_OVERRIDE {
|
| 1566 |
+
(void) view;
|
| 1567 |
+
(void) v_grid;
|
| 1568 |
+
(void) h_grid;
|
| 1569 |
+
err_handler("Operation not allowed");
|
| 1570 |
+
}
|
| 1571 |
+
// Disable this call; the viewport is already defined
|
| 1572 |
+
|
| 1573 |
+
void setSubWindow(NCursesWindow& sub) NCURSES_OVERRIDE {
|
| 1574 |
+
(void) sub;
|
| 1575 |
+
err_handler("Operation not allowed");
|
| 1576 |
+
}
|
| 1577 |
+
// Disable this call; the viewport subwindow is already defined
|
| 1578 |
+
|
| 1579 |
+
};
|
| 1580 |
+
|
| 1581 |
+
#endif /* NCURSES_CURSESW_H_incl */
|
evalkit_cambrian/include/eti.h
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2002,2003 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: eti.h,v 1.9 2020/02/02 23:34:34 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef NCURSES_ETI_H_incl
|
| 37 |
+
#define NCURSES_ETI_H_incl 1
|
| 38 |
+
|
| 39 |
+
#define E_OK (0)
|
| 40 |
+
#define E_SYSTEM_ERROR (-1)
|
| 41 |
+
#define E_BAD_ARGUMENT (-2)
|
| 42 |
+
#define E_POSTED (-3)
|
| 43 |
+
#define E_CONNECTED (-4)
|
| 44 |
+
#define E_BAD_STATE (-5)
|
| 45 |
+
#define E_NO_ROOM (-6)
|
| 46 |
+
#define E_NOT_POSTED (-7)
|
| 47 |
+
#define E_UNKNOWN_COMMAND (-8)
|
| 48 |
+
#define E_NO_MATCH (-9)
|
| 49 |
+
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* fakemysql.h --
|
| 3 |
+
*
|
| 4 |
+
* Fake definitions of the MySQL API sufficient to build tdbc::mysql
|
| 5 |
+
* without having an MySQL installation on the build system. This file
|
| 6 |
+
* comprises only data type, constant and function definitions.
|
| 7 |
+
*
|
| 8 |
+
* The programmers of this file believe that it contains material not
|
| 9 |
+
* subject to copyright under the doctrines of scenes a faire and
|
| 10 |
+
* of merger of idea and expression. Accordingly, this file is in the
|
| 11 |
+
* public domain.
|
| 12 |
+
*
|
| 13 |
+
*-----------------------------------------------------------------------------
|
| 14 |
+
*/
|
| 15 |
+
|
| 16 |
+
#ifndef FAKEMYSQL_H_INCLUDED
|
| 17 |
+
#define FAKEMYSQL_H_INCLUDED
|
| 18 |
+
|
| 19 |
+
#include <stddef.h>
|
| 20 |
+
|
| 21 |
+
#ifndef MODULE_SCOPE
|
| 22 |
+
#define MODULE_SCOPE extern
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
MODULE_SCOPE Tcl_LoadHandle MysqlInitStubs(Tcl_Interp*);
|
| 26 |
+
|
| 27 |
+
#ifdef _WIN32
|
| 28 |
+
#define STDCALL __stdcall
|
| 29 |
+
#else
|
| 30 |
+
#define STDCALL /* nothing */
|
| 31 |
+
#endif
|
| 32 |
+
|
| 33 |
+
enum enum_field_types {
|
| 34 |
+
MYSQL_TYPE_DECIMAL=0,
|
| 35 |
+
MYSQL_TYPE_TINY=1,
|
| 36 |
+
MYSQL_TYPE_SHORT=2,
|
| 37 |
+
MYSQL_TYPE_LONG=3,
|
| 38 |
+
MYSQL_TYPE_FLOAT=4,
|
| 39 |
+
MYSQL_TYPE_DOUBLE=5,
|
| 40 |
+
MYSQL_TYPE_NULL=6,
|
| 41 |
+
MYSQL_TYPE_TIMESTAMP=7,
|
| 42 |
+
MYSQL_TYPE_LONGLONG=8,
|
| 43 |
+
MYSQL_TYPE_INT24=9,
|
| 44 |
+
MYSQL_TYPE_DATE=10,
|
| 45 |
+
MYSQL_TYPE_TIME=11,
|
| 46 |
+
MYSQL_TYPE_DATETIME=12,
|
| 47 |
+
MYSQL_TYPE_YEAR=13,
|
| 48 |
+
MYSQL_TYPE_NEWDATE=14,
|
| 49 |
+
MYSQL_TYPE_VARCHAR=15,
|
| 50 |
+
MYSQL_TYPE_BIT=16,
|
| 51 |
+
MYSQL_TYPE_NEWDECIMAL=246,
|
| 52 |
+
MYSQL_TYPE_ENUM=247,
|
| 53 |
+
MYSQL_TYPE_SET=248,
|
| 54 |
+
MYSQL_TYPE_TINY_BLOB=249,
|
| 55 |
+
MYSQL_TYPE_MEDIUM_BLOB=250,
|
| 56 |
+
MYSQL_TYPE_LONG_BLOB=251,
|
| 57 |
+
MYSQL_TYPE_BLOB=252,
|
| 58 |
+
MYSQL_TYPE_VAR_STRING=253,
|
| 59 |
+
MYSQL_TYPE_STRING=254,
|
| 60 |
+
MYSQL_TYPE_GEOMETRY=255
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
enum mysql_option {
|
| 64 |
+
MYSQL_SET_CHARSET_NAME=7,
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
enum mysql_status {
|
| 68 |
+
MYSQL_STATUS_READY=0,
|
| 69 |
+
};
|
| 70 |
+
|
| 71 |
+
#define CLIENT_COMPRESS 32
|
| 72 |
+
#define CLIENT_INTERACTIVE 1024
|
| 73 |
+
#define MYSQL_DATA_TRUNCATED 101
|
| 74 |
+
#define MYSQL_ERRMSG_SIZE 512
|
| 75 |
+
#define MYSQL_NO_DATA 100
|
| 76 |
+
#define SCRAMBLE_LENGTH 20
|
| 77 |
+
#define SQLSTATE_LENGTH 5
|
| 78 |
+
|
| 79 |
+
typedef struct st_list LIST;
|
| 80 |
+
typedef struct st_mem_root MEM_ROOT;
|
| 81 |
+
typedef struct st_mysql MYSQL;
|
| 82 |
+
typedef struct st_mysql_bind MYSQL_BIND;
|
| 83 |
+
typedef struct st_mysql_field MYSQL_FIELD;
|
| 84 |
+
typedef struct st_mysql_res MYSQL_RES;
|
| 85 |
+
typedef char** MYSQL_ROW;
|
| 86 |
+
typedef struct st_mysql_stmt MYSQL_STMT;
|
| 87 |
+
typedef char my_bool;
|
| 88 |
+
#ifndef Socket_defined
|
| 89 |
+
typedef int my_socket;
|
| 90 |
+
#define INVALID_SOCKET -1
|
| 91 |
+
#endif
|
| 92 |
+
typedef Tcl_WideUInt my_ulonglong;
|
| 93 |
+
typedef struct st_net NET;
|
| 94 |
+
typedef struct st_used_mem USED_MEM;
|
| 95 |
+
typedef struct st_vio Vio;
|
| 96 |
+
|
| 97 |
+
struct st_mem_root {
|
| 98 |
+
USED_MEM *free;
|
| 99 |
+
USED_MEM *used;
|
| 100 |
+
USED_MEM *pre_alloc;
|
| 101 |
+
size_t min_malloc;
|
| 102 |
+
size_t block_size;
|
| 103 |
+
unsigned int block_num;
|
| 104 |
+
unsigned int first_block_usage;
|
| 105 |
+
void (*error_handler)(void);
|
| 106 |
+
};
|
| 107 |
+
|
| 108 |
+
struct st_mysql_options {
|
| 109 |
+
unsigned int connect_timeout;
|
| 110 |
+
unsigned int read_timeout;
|
| 111 |
+
unsigned int write_timeout;
|
| 112 |
+
unsigned int port;
|
| 113 |
+
unsigned int protocol;
|
| 114 |
+
unsigned long client_flag;
|
| 115 |
+
char *host;
|
| 116 |
+
char *user;
|
| 117 |
+
char *password;
|
| 118 |
+
char *unix_socket;
|
| 119 |
+
char *db;
|
| 120 |
+
struct st_dynamic_array *init_commands;
|
| 121 |
+
char *my_cnf_file;
|
| 122 |
+
char *my_cnf_group;
|
| 123 |
+
char *charset_dir;
|
| 124 |
+
char *charset_name;
|
| 125 |
+
char *ssl_key;
|
| 126 |
+
char *ssl_cert;
|
| 127 |
+
char *ssl_ca;
|
| 128 |
+
char *ssl_capath;
|
| 129 |
+
char *ssl_cipher;
|
| 130 |
+
char *shared_memory_base_name;
|
| 131 |
+
unsigned long max_allowed_packet;
|
| 132 |
+
my_bool use_ssl;
|
| 133 |
+
my_bool compress,named_pipe;
|
| 134 |
+
my_bool rpl_probe;
|
| 135 |
+
my_bool rpl_parse;
|
| 136 |
+
my_bool no_master_reads;
|
| 137 |
+
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
|
| 138 |
+
my_bool separate_thread;
|
| 139 |
+
#endif
|
| 140 |
+
enum mysql_option methods_to_use;
|
| 141 |
+
char *client_ip;
|
| 142 |
+
my_bool secure_auth;
|
| 143 |
+
my_bool report_data_truncation;
|
| 144 |
+
int (*local_infile_init)(void **, const char *, void *);
|
| 145 |
+
int (*local_infile_read)(void *, char *, unsigned int);
|
| 146 |
+
void (*local_infile_end)(void *);
|
| 147 |
+
int (*local_infile_error)(void *, char *, unsigned int);
|
| 148 |
+
void *local_infile_userdata;
|
| 149 |
+
void *extension;
|
| 150 |
+
};
|
| 151 |
+
|
| 152 |
+
struct st_net {
|
| 153 |
+
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
|
| 154 |
+
Vio *vio;
|
| 155 |
+
unsigned char *buff;
|
| 156 |
+
unsigned char *buff_end;
|
| 157 |
+
unsigned char *write_pos;
|
| 158 |
+
unsigned char *read_pos;
|
| 159 |
+
my_socket fd;
|
| 160 |
+
unsigned long remain_in_buf;
|
| 161 |
+
unsigned long length;
|
| 162 |
+
unsigned long buf_length;
|
| 163 |
+
unsigned long where_b;
|
| 164 |
+
unsigned long max_packet;
|
| 165 |
+
unsigned long max_packet_size;
|
| 166 |
+
unsigned int pkt_nr;
|
| 167 |
+
unsigned int compress_pkt_nr;
|
| 168 |
+
unsigned int write_timeout;
|
| 169 |
+
unsigned int read_timeout;
|
| 170 |
+
unsigned int retry_count;
|
| 171 |
+
int fcntl;
|
| 172 |
+
unsigned int *return_status;
|
| 173 |
+
unsigned char reading_or_writing;
|
| 174 |
+
char save_char;
|
| 175 |
+
my_bool unused0;
|
| 176 |
+
my_bool unused;
|
| 177 |
+
my_bool compress;
|
| 178 |
+
my_bool unused1;
|
| 179 |
+
#endif
|
| 180 |
+
unsigned char *query_cache_query;
|
| 181 |
+
unsigned int last_errno;
|
| 182 |
+
unsigned char error;
|
| 183 |
+
my_bool unused2;
|
| 184 |
+
my_bool return_errno;
|
| 185 |
+
char last_error[MYSQL_ERRMSG_SIZE];
|
| 186 |
+
char sqlstate[SQLSTATE_LENGTH+1];
|
| 187 |
+
void *extension;
|
| 188 |
+
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
|
| 189 |
+
my_bool skip_big_packet;
|
| 190 |
+
#endif
|
| 191 |
+
};
|
| 192 |
+
|
| 193 |
+
/*
|
| 194 |
+
* st_mysql differs between 5.0 and 5.1, but the 5.0 version is a
|
| 195 |
+
* strict subset, we don't use any of the 5.1 fields, and we don't
|
| 196 |
+
* ever allocate the structure ourselves.
|
| 197 |
+
*/
|
| 198 |
+
|
| 199 |
+
struct st_mysql {
|
| 200 |
+
NET net;
|
| 201 |
+
unsigned char *connector_fd;
|
| 202 |
+
char *host;
|
| 203 |
+
char *user;
|
| 204 |
+
char *passwd;
|
| 205 |
+
char *unix_socket;
|
| 206 |
+
char *server_version;
|
| 207 |
+
char *host_info;
|
| 208 |
+
char *info;
|
| 209 |
+
char *db;
|
| 210 |
+
struct charset_info_st *charset;
|
| 211 |
+
MYSQL_FIELD *fields;
|
| 212 |
+
MEM_ROOT field_alloc;
|
| 213 |
+
my_ulonglong affected_rows;
|
| 214 |
+
my_ulonglong insert_id;
|
| 215 |
+
my_ulonglong extra_info;
|
| 216 |
+
unsigned long thread_id;
|
| 217 |
+
unsigned long packet_length;
|
| 218 |
+
unsigned int port;
|
| 219 |
+
unsigned long client_flag;
|
| 220 |
+
unsigned long server_capabilities;
|
| 221 |
+
unsigned int protocol_version;
|
| 222 |
+
unsigned int field_count;
|
| 223 |
+
unsigned int server_status;
|
| 224 |
+
unsigned int server_language;
|
| 225 |
+
unsigned int warning_count;
|
| 226 |
+
struct st_mysql_options options;
|
| 227 |
+
enum mysql_status status;
|
| 228 |
+
my_bool free_me;
|
| 229 |
+
my_bool reconnect;
|
| 230 |
+
char scramble[SCRAMBLE_LENGTH+1];
|
| 231 |
+
my_bool rpl_pivot;
|
| 232 |
+
struct st_mysql *master;
|
| 233 |
+
struct st_mysql *next_slave;
|
| 234 |
+
struct st_mysql* last_used_slave;
|
| 235 |
+
struct st_mysql* last_used_con;
|
| 236 |
+
LIST *stmts;
|
| 237 |
+
const struct st_mysql_methods *methods;
|
| 238 |
+
void *thd;
|
| 239 |
+
my_bool *unbuffered_fetch_owner;
|
| 240 |
+
char *info_buffer;
|
| 241 |
+
};
|
| 242 |
+
|
| 243 |
+
/*
|
| 244 |
+
* There are different version of the MYSQL_BIND structure before and after
|
| 245 |
+
* MySQL 5.1. We go after the fields of the structure using accessor functions
|
| 246 |
+
* so that the code in this file is compatible with both versions.
|
| 247 |
+
*/
|
| 248 |
+
|
| 249 |
+
struct st_mysql_bind_51 { /* Post-5.1 */
|
| 250 |
+
unsigned long* length;
|
| 251 |
+
my_bool* is_null;
|
| 252 |
+
void* buffer;
|
| 253 |
+
my_bool* error;
|
| 254 |
+
unsigned char* row_ptr;
|
| 255 |
+
void (*store_param_func)(NET* net, MYSQL_BIND* param);
|
| 256 |
+
void (*fetch_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 257 |
+
void (*skip_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 258 |
+
unsigned long buffer_length;
|
| 259 |
+
unsigned long offset;
|
| 260 |
+
unsigned long length_value;
|
| 261 |
+
unsigned int param_number;
|
| 262 |
+
unsigned int pack_length;
|
| 263 |
+
enum enum_field_types buffer_type;
|
| 264 |
+
my_bool error_value;
|
| 265 |
+
my_bool is_unsigned;
|
| 266 |
+
my_bool long_data_used;
|
| 267 |
+
my_bool is_null_value;
|
| 268 |
+
void* extension;
|
| 269 |
+
};
|
| 270 |
+
|
| 271 |
+
struct st_mysql_bind_50 { /* Pre-5.1 */
|
| 272 |
+
unsigned long* length;
|
| 273 |
+
my_bool* is_null;
|
| 274 |
+
void* buffer;
|
| 275 |
+
my_bool* error;
|
| 276 |
+
enum enum_field_types buffer_type;
|
| 277 |
+
unsigned long buffer_length;
|
| 278 |
+
unsigned char* row_ptr;
|
| 279 |
+
unsigned long offset;
|
| 280 |
+
unsigned long length_value;
|
| 281 |
+
unsigned int param_number;
|
| 282 |
+
unsigned int pack_length;
|
| 283 |
+
my_bool error_value;
|
| 284 |
+
my_bool is_unsigned;
|
| 285 |
+
my_bool long_data_used;
|
| 286 |
+
my_bool is_null_value;
|
| 287 |
+
void (*store_param_func)(NET* net, MYSQL_BIND* param);
|
| 288 |
+
void (*fetch_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 289 |
+
void (*skip_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**);
|
| 290 |
+
};
|
| 291 |
+
|
| 292 |
+
/*
|
| 293 |
+
* There are also different versions of the MYSQL_FIELD structure; fortunately,
|
| 294 |
+
* the 5.1 version is a strict extension of the 5.0 version.
|
| 295 |
+
*/
|
| 296 |
+
|
| 297 |
+
struct st_mysql_field {
|
| 298 |
+
char* name;
|
| 299 |
+
char *org_name;
|
| 300 |
+
char* table;
|
| 301 |
+
char* org_table;
|
| 302 |
+
char* db;
|
| 303 |
+
char* catalog;
|
| 304 |
+
char* def;
|
| 305 |
+
unsigned long length;
|
| 306 |
+
unsigned long max_length;
|
| 307 |
+
unsigned int name_length;
|
| 308 |
+
unsigned int org_name_length;
|
| 309 |
+
unsigned int table_length;
|
| 310 |
+
unsigned int org_table_length;
|
| 311 |
+
unsigned int db_length;
|
| 312 |
+
unsigned int catalog_length;
|
| 313 |
+
unsigned int def_length;
|
| 314 |
+
unsigned int flags;
|
| 315 |
+
unsigned int decimals;
|
| 316 |
+
unsigned int charsetnr;
|
| 317 |
+
enum enum_field_types type;
|
| 318 |
+
};
|
| 319 |
+
struct st_mysql_field_50 {
|
| 320 |
+
struct st_mysql_field field;
|
| 321 |
+
};
|
| 322 |
+
struct st_mysql_field_51 {
|
| 323 |
+
struct st_mysql_field field;
|
| 324 |
+
void* extension;
|
| 325 |
+
};
|
| 326 |
+
#define NOT_NULL_FLAG 1
|
| 327 |
+
|
| 328 |
+
#define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
|
| 329 |
+
|
| 330 |
+
#define mysql_library_init mysql_server_init
|
| 331 |
+
#define mysql_library_end mysql_server_end
|
| 332 |
+
|
| 333 |
+
#include "mysqlStubs.h"
|
| 334 |
+
|
| 335 |
+
#endif /* not FAKEMYSQL_H_INCLUDED */
|
evalkit_cambrian/include/itclTclIntStubsFcn.h
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* these functions are Tcl internal stubs so make an Itcl_* wrapper */
|
| 2 |
+
MODULE_SCOPE void Itcl_GetVariableFullName (Tcl_Interp * interp,
|
| 3 |
+
Tcl_Var variable, Tcl_Obj * objPtr);
|
| 4 |
+
MODULE_SCOPE Tcl_Var Itcl_FindNamespaceVar (Tcl_Interp * interp,
|
| 5 |
+
const char * name, Tcl_Namespace * contextNsPtr, int flags);
|
| 6 |
+
MODULE_SCOPE void Itcl_SetNamespaceResolvers (Tcl_Namespace * namespacePtr,
|
| 7 |
+
Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc,
|
| 8 |
+
Tcl_ResolveCompiledVarProc * compiledVarProc);
|
| 9 |
+
|
| 10 |
+
#ifndef _TCL_PROC_DEFINED
|
| 11 |
+
typedef struct Tcl_Proc_ *Tcl_Proc;
|
| 12 |
+
#define _TCL_PROC_DEFINED 1
|
| 13 |
+
#endif
|
| 14 |
+
#ifndef _TCL_RESOLVE_DEFINED
|
| 15 |
+
struct Tcl_Resolve;
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
#define Tcl_GetOriginalCommand _Tcl_GetOriginalCommand
|
| 19 |
+
#define Tcl_CreateProc _Tcl_CreateProc
|
| 20 |
+
#define Tcl_ProcDeleteProc _Tcl_ProcDeleteProc
|
| 21 |
+
#define Tcl_GetObjInterpProc _Tcl_GetObjInterpProc
|
| 22 |
+
|
| 23 |
+
MODULE_SCOPE Tcl_Command _Tcl_GetOriginalCommand(Tcl_Command command);
|
| 24 |
+
MODULE_SCOPE int _Tcl_CreateProc(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
|
| 25 |
+
const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr,
|
| 26 |
+
Tcl_Proc *procPtrPtr);
|
| 27 |
+
MODULE_SCOPE void _Tcl_ProcDeleteProc(void *clientData);
|
| 28 |
+
MODULE_SCOPE Tcl_ObjCmdProc *_Tcl_GetObjInterpProc(void);
|
| 29 |
+
MODULE_SCOPE int Tcl_RenameCommand(Tcl_Interp *interp, const char *oldName,
|
| 30 |
+
const char *newName);
|
| 31 |
+
MODULE_SCOPE Tcl_HashTable *Itcl_GetNamespaceChildTable(Tcl_Namespace *nsPtr);
|
| 32 |
+
MODULE_SCOPE Tcl_HashTable *Itcl_GetNamespaceCommandTable(Tcl_Namespace *nsPtr);
|
| 33 |
+
MODULE_SCOPE int Itcl_InitRewriteEnsemble(Tcl_Interp *interp, size_t numRemoved,
|
| 34 |
+
size_t numInserted, size_t objc, Tcl_Obj *const *objv);
|
| 35 |
+
MODULE_SCOPE void Itcl_ResetRewriteEnsemble(Tcl_Interp *interp,
|
| 36 |
+
int isRootEnsemble);
|
| 37 |
+
|
| 38 |
+
|
evalkit_cambrian/include/menu.h
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/****************************************************************************
|
| 2 |
+
* Copyright 2020 Thomas E. Dickey *
|
| 3 |
+
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
|
| 4 |
+
* *
|
| 5 |
+
* Permission is hereby granted, free of charge, to any person obtaining a *
|
| 6 |
+
* copy of this software and associated documentation files (the *
|
| 7 |
+
* "Software"), to deal in the Software without restriction, including *
|
| 8 |
+
* without limitation the rights to use, copy, modify, merge, publish, *
|
| 9 |
+
* distribute, distribute with modifications, sublicense, and/or sell *
|
| 10 |
+
* copies of the Software, and to permit persons to whom the Software is *
|
| 11 |
+
* furnished to do so, subject to the following conditions: *
|
| 12 |
+
* *
|
| 13 |
+
* The above copyright notice and this permission notice shall be included *
|
| 14 |
+
* in all copies or substantial portions of the Software. *
|
| 15 |
+
* *
|
| 16 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
| 17 |
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
| 18 |
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
| 19 |
+
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
| 20 |
+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
| 21 |
+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
| 22 |
+
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
| 23 |
+
* *
|
| 24 |
+
* Except as contained in this notice, the name(s) of the above copyright *
|
| 25 |
+
* holders shall not be used in advertising or otherwise to promote the *
|
| 26 |
+
* sale, use or other dealings in this Software without prior written *
|
| 27 |
+
* authorization. *
|
| 28 |
+
****************************************************************************/
|
| 29 |
+
|
| 30 |
+
/****************************************************************************
|
| 31 |
+
* Author: Juergen Pfeifer, 1995,1997 *
|
| 32 |
+
****************************************************************************/
|
| 33 |
+
|
| 34 |
+
/* $Id: menu.h,v 1.26 2020/12/12 00:38:02 tom Exp $ */
|
| 35 |
+
|
| 36 |
+
#ifndef ETI_MENU
|
| 37 |
+
#define ETI_MENU
|
| 38 |
+
|
| 39 |
+
#ifdef AMIGA
|
| 40 |
+
#define TEXT TEXT_ncurses
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#include <ncursesw/curses.h>
|
| 44 |
+
#include <ncursesw/eti.h>
|
| 45 |
+
|
| 46 |
+
#ifdef __cplusplus
|
| 47 |
+
extern "C"
|
| 48 |
+
{
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#if defined(BUILDING_MENU)
|
| 52 |
+
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
|
| 53 |
+
#else
|
| 54 |
+
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
|
| 58 |
+
|
| 59 |
+
#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API
|
| 60 |
+
#define MENU_EXPORT_VAR(type) MENU_IMPEXP type
|
| 61 |
+
|
| 62 |
+
typedef int Menu_Options;
|
| 63 |
+
typedef int Item_Options;
|
| 64 |
+
|
| 65 |
+
/* Menu options: */
|
| 66 |
+
#define O_ONEVALUE (0x01)
|
| 67 |
+
#define O_SHOWDESC (0x02)
|
| 68 |
+
#define O_ROWMAJOR (0x04)
|
| 69 |
+
#define O_IGNORECASE (0x08)
|
| 70 |
+
#define O_SHOWMATCH (0x10)
|
| 71 |
+
#define O_NONCYCLIC (0x20)
|
| 72 |
+
#define O_MOUSE_MENU (0x40)
|
| 73 |
+
|
| 74 |
+
/* Item options: */
|
| 75 |
+
#define O_SELECTABLE (0x01)
|
| 76 |
+
|
| 77 |
+
#if !NCURSES_OPAQUE_MENU
|
| 78 |
+
typedef struct
|
| 79 |
+
{
|
| 80 |
+
const char *str;
|
| 81 |
+
unsigned short length;
|
| 82 |
+
}
|
| 83 |
+
TEXT;
|
| 84 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 85 |
+
|
| 86 |
+
struct tagMENU;
|
| 87 |
+
|
| 88 |
+
typedef struct tagITEM
|
| 89 |
+
#if !NCURSES_OPAQUE_MENU
|
| 90 |
+
{
|
| 91 |
+
TEXT name; /* name of menu item */
|
| 92 |
+
TEXT description; /* description of item, optional in display */
|
| 93 |
+
struct tagMENU *imenu; /* Pointer to parent menu */
|
| 94 |
+
void *userptr; /* Pointer to user defined per item data */
|
| 95 |
+
Item_Options opt; /* Item options */
|
| 96 |
+
short index; /* Item number if connected to a menu */
|
| 97 |
+
short y; /* y and x location of item in menu */
|
| 98 |
+
short x;
|
| 99 |
+
bool value; /* Selection value */
|
| 100 |
+
|
| 101 |
+
struct tagITEM *left; /* neighbor items */
|
| 102 |
+
struct tagITEM *right;
|
| 103 |
+
struct tagITEM *up;
|
| 104 |
+
struct tagITEM *down;
|
| 105 |
+
|
| 106 |
+
}
|
| 107 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 108 |
+
ITEM;
|
| 109 |
+
|
| 110 |
+
typedef void (*Menu_Hook) (struct tagMENU *);
|
| 111 |
+
|
| 112 |
+
typedef struct tagMENU
|
| 113 |
+
#if 1 /* not yet: !NCURSES_OPAQUE_MENU */
|
| 114 |
+
{
|
| 115 |
+
short height; /* Nr. of chars high */
|
| 116 |
+
short width; /* Nr. of chars wide */
|
| 117 |
+
short rows; /* Nr. of items high */
|
| 118 |
+
short cols; /* Nr. of items wide */
|
| 119 |
+
short frows; /* Nr. of formatted items high */
|
| 120 |
+
short fcols; /* Nr. of formatted items wide */
|
| 121 |
+
short arows; /* Nr. of items high (actual) */
|
| 122 |
+
short namelen; /* Max. name length */
|
| 123 |
+
short desclen; /* Max. description length */
|
| 124 |
+
short marklen; /* Length of mark, if any */
|
| 125 |
+
short itemlen; /* Length of one item */
|
| 126 |
+
short spc_desc; /* Spacing for descriptor */
|
| 127 |
+
short spc_cols; /* Spacing for columns */
|
| 128 |
+
short spc_rows; /* Spacing for rows */
|
| 129 |
+
char *pattern; /* Buffer to store match chars */
|
| 130 |
+
short pindex; /* Index into pattern buffer */
|
| 131 |
+
WINDOW *win; /* Window containing menu */
|
| 132 |
+
WINDOW *sub; /* Subwindow for menu display */
|
| 133 |
+
WINDOW *userwin; /* User's window */
|
| 134 |
+
WINDOW *usersub; /* User's subwindow */
|
| 135 |
+
ITEM **items; /* array of items */
|
| 136 |
+
short nitems; /* Nr. of items in menu */
|
| 137 |
+
ITEM *curitem; /* Current item */
|
| 138 |
+
short toprow; /* Top row of menu */
|
| 139 |
+
chtype fore; /* Selection attribute */
|
| 140 |
+
chtype back; /* Nonselection attribute */
|
| 141 |
+
chtype grey; /* Inactive attribute */
|
| 142 |
+
unsigned char pad; /* Pad character */
|
| 143 |
+
|
| 144 |
+
Menu_Hook menuinit; /* User hooks */
|
| 145 |
+
Menu_Hook menuterm;
|
| 146 |
+
Menu_Hook iteminit;
|
| 147 |
+
Menu_Hook itemterm;
|
| 148 |
+
|
| 149 |
+
void *userptr; /* Pointer to menus user data */
|
| 150 |
+
char *mark; /* Pointer to marker string */
|
| 151 |
+
|
| 152 |
+
Menu_Options opt; /* Menu options */
|
| 153 |
+
unsigned short status; /* Internal state of menu */
|
| 154 |
+
}
|
| 155 |
+
#endif /* !NCURSES_OPAQUE_MENU */
|
| 156 |
+
MENU;
|
| 157 |
+
|
| 158 |
+
/* Define keys */
|
| 159 |
+
|
| 160 |
+
#define REQ_LEFT_ITEM (KEY_MAX + 1)
|
| 161 |
+
#define REQ_RIGHT_ITEM (KEY_MAX + 2)
|
| 162 |
+
#define REQ_UP_ITEM (KEY_MAX + 3)
|
| 163 |
+
#define REQ_DOWN_ITEM (KEY_MAX + 4)
|
| 164 |
+
#define REQ_SCR_ULINE (KEY_MAX + 5)
|
| 165 |
+
#define REQ_SCR_DLINE (KEY_MAX + 6)
|
| 166 |
+
#define REQ_SCR_DPAGE (KEY_MAX + 7)
|
| 167 |
+
#define REQ_SCR_UPAGE (KEY_MAX + 8)
|
| 168 |
+
#define REQ_FIRST_ITEM (KEY_MAX + 9)
|
| 169 |
+
#define REQ_LAST_ITEM (KEY_MAX + 10)
|
| 170 |
+
#define REQ_NEXT_ITEM (KEY_MAX + 11)
|
| 171 |
+
#define REQ_PREV_ITEM (KEY_MAX + 12)
|
| 172 |
+
#define REQ_TOGGLE_ITEM (KEY_MAX + 13)
|
| 173 |
+
#define REQ_CLEAR_PATTERN (KEY_MAX + 14)
|
| 174 |
+
#define REQ_BACK_PATTERN (KEY_MAX + 15)
|
| 175 |
+
#define REQ_NEXT_MATCH (KEY_MAX + 16)
|
| 176 |
+
#define REQ_PREV_MATCH (KEY_MAX + 17)
|
| 177 |
+
|
| 178 |
+
#define MIN_MENU_COMMAND (KEY_MAX + 1)
|
| 179 |
+
#define MAX_MENU_COMMAND (KEY_MAX + 17)
|
| 180 |
+
|
| 181 |
+
/*
|
| 182 |
+
* Some AT&T code expects MAX_COMMAND to be out-of-band not
|
| 183 |
+
* just for menu commands but for forms ones as well.
|
| 184 |
+
*/
|
| 185 |
+
#if defined(MAX_COMMAND)
|
| 186 |
+
# if (MAX_MENU_COMMAND > MAX_COMMAND)
|
| 187 |
+
# error Something is wrong -- MAX_MENU_COMMAND is greater than MAX_COMMAND
|
| 188 |
+
# elif (MAX_COMMAND != (KEY_MAX + 128))
|
| 189 |
+
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
|
| 190 |
+
# endif
|
| 191 |
+
#else
|
| 192 |
+
# define MAX_COMMAND (KEY_MAX + 128)
|
| 193 |
+
#endif
|
| 194 |
+
|
| 195 |
+
/* --------- prototypes for libmenu functions ----------------------------- */
|
| 196 |
+
|
| 197 |
+
extern MENU_EXPORT(ITEM **) menu_items(const MENU *);
|
| 198 |
+
extern MENU_EXPORT(ITEM *) current_item(const MENU *);
|
| 199 |
+
extern MENU_EXPORT(ITEM *) new_item(const char *, const char *);
|
| 200 |
+
|
| 201 |
+
extern MENU_EXPORT(MENU *) new_menu(ITEM **);
|
| 202 |
+
|
| 203 |
+
extern MENU_EXPORT(Item_Options) item_opts(const ITEM *);
|
| 204 |
+
extern MENU_EXPORT(Menu_Options) menu_opts(const MENU *);
|
| 205 |
+
|
| 206 |
+
extern MENU_EXPORT(Menu_Hook) item_init(const MENU *);
|
| 207 |
+
extern MENU_EXPORT(Menu_Hook) item_term(const MENU *);
|
| 208 |
+
extern MENU_EXPORT(Menu_Hook) menu_init(const MENU *);
|
| 209 |
+
extern MENU_EXPORT(Menu_Hook) menu_term(const MENU *);
|
| 210 |
+
|
| 211 |
+
extern MENU_EXPORT(WINDOW *) menu_sub(const MENU *);
|
| 212 |
+
extern MENU_EXPORT(WINDOW *) menu_win(const MENU *);
|
| 213 |
+
|
| 214 |
+
extern MENU_EXPORT(const char *) item_description(const ITEM *);
|
| 215 |
+
extern MENU_EXPORT(const char *) item_name(const ITEM *);
|
| 216 |
+
extern MENU_EXPORT(const char *) menu_mark(const MENU *);
|
| 217 |
+
extern MENU_EXPORT(const char *) menu_request_name(int);
|
| 218 |
+
|
| 219 |
+
extern MENU_EXPORT(char *) menu_pattern(const MENU *);
|
| 220 |
+
|
| 221 |
+
extern MENU_EXPORT(void *) menu_userptr(const MENU *);
|
| 222 |
+
extern MENU_EXPORT(void *) item_userptr(const ITEM *);
|
| 223 |
+
|
| 224 |
+
extern MENU_EXPORT(chtype) menu_back(const MENU *);
|
| 225 |
+
extern MENU_EXPORT(chtype) menu_fore(const MENU *);
|
| 226 |
+
extern MENU_EXPORT(chtype) menu_grey(const MENU *);
|
| 227 |
+
|
| 228 |
+
extern MENU_EXPORT(int) free_item(ITEM *);
|
| 229 |
+
extern MENU_EXPORT(int) free_menu(MENU *);
|
| 230 |
+
extern MENU_EXPORT(int) item_count(const MENU *);
|
| 231 |
+
extern MENU_EXPORT(int) item_index(const ITEM *);
|
| 232 |
+
extern MENU_EXPORT(int) item_opts_off(ITEM *, Item_Options);
|
| 233 |
+
extern MENU_EXPORT(int) item_opts_on(ITEM *, Item_Options);
|
| 234 |
+
extern MENU_EXPORT(int) menu_driver(MENU *, int);
|
| 235 |
+
extern MENU_EXPORT(int) menu_opts_off(MENU *, Menu_Options);
|
| 236 |
+
extern MENU_EXPORT(int) menu_opts_on(MENU *, Menu_Options);
|
| 237 |
+
extern MENU_EXPORT(int) menu_pad(const MENU *);
|
| 238 |
+
extern MENU_EXPORT(int) pos_menu_cursor(const MENU *);
|
| 239 |
+
extern MENU_EXPORT(int) post_menu(MENU *);
|
| 240 |
+
extern MENU_EXPORT(int) scale_menu(const MENU *, int *, int *);
|
| 241 |
+
extern MENU_EXPORT(int) set_current_item(MENU *menu, ITEM *item);
|
| 242 |
+
extern MENU_EXPORT(int) set_item_init(MENU *, Menu_Hook);
|
| 243 |
+
extern MENU_EXPORT(int) set_item_opts(ITEM *, Item_Options);
|
| 244 |
+
extern MENU_EXPORT(int) set_item_term(MENU *, Menu_Hook);
|
| 245 |
+
extern MENU_EXPORT(int) set_item_userptr(ITEM *, void *);
|
| 246 |
+
extern MENU_EXPORT(int) set_item_value(ITEM *, bool);
|
| 247 |
+
extern MENU_EXPORT(int) set_menu_back(MENU *, chtype);
|
| 248 |
+
extern MENU_EXPORT(int) set_menu_fore(MENU *, chtype);
|
| 249 |
+
extern MENU_EXPORT(int) set_menu_format(MENU *, int, int);
|
| 250 |
+
extern MENU_EXPORT(int) set_menu_grey(MENU *, chtype);
|
| 251 |
+
extern MENU_EXPORT(int) set_menu_init(MENU *, Menu_Hook);
|
| 252 |
+
extern MENU_EXPORT(int) set_menu_items(MENU *, ITEM **);
|
| 253 |
+
extern MENU_EXPORT(int) set_menu_mark(MENU *, const char *);
|
| 254 |
+
extern MENU_EXPORT(int) set_menu_opts(MENU *, Menu_Options);
|
| 255 |
+
extern MENU_EXPORT(int) set_menu_pad(MENU *, int);
|
| 256 |
+
extern MENU_EXPORT(int) set_menu_pattern(MENU *, const char *);
|
| 257 |
+
extern MENU_EXPORT(int) set_menu_sub(MENU *, WINDOW *);
|
| 258 |
+
extern MENU_EXPORT(int) set_menu_term(MENU *, Menu_Hook);
|
| 259 |
+
extern MENU_EXPORT(int) set_menu_userptr(MENU *, void *);
|
| 260 |
+
extern MENU_EXPORT(int) set_menu_win(MENU *, WINDOW *);
|
| 261 |
+
extern MENU_EXPORT(int) set_top_row(MENU *, int);
|
| 262 |
+
extern MENU_EXPORT(int) top_row(const MENU *);
|
| 263 |
+
extern MENU_EXPORT(int) unpost_menu(MENU *);
|
| 264 |
+
extern MENU_EXPORT(int) menu_request_by_name(const char *);
|
| 265 |
+
extern MENU_EXPORT(int) set_menu_spacing(MENU *, int, int, int);
|
| 266 |
+
extern MENU_EXPORT(int) menu_spacing(const MENU *, int *, int *, int *);
|
| 267 |
+
|
| 268 |
+
extern MENU_EXPORT(bool) item_value(const ITEM *);
|
| 269 |
+
extern MENU_EXPORT(bool) item_visible(const ITEM *);
|
| 270 |
+
|
| 271 |
+
extern MENU_EXPORT(void) menu_format(const MENU *, int *, int *);
|
| 272 |
+
|
| 273 |
+
#if NCURSES_SP_FUNCS
|
| 274 |
+
extern MENU_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN *, ITEM **);
|
| 275 |
+
#endif
|
| 276 |
+
|
| 277 |
+
#ifdef __cplusplus
|
| 278 |
+
}
|
| 279 |
+
#endif
|
| 280 |
+
|
| 281 |
+
#endif /* ETI_MENU */
|
evalkit_cambrian/include/pqStubs.h
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
*-----------------------------------------------------------------------------
|
| 3 |
+
*
|
| 4 |
+
* ../generic/pqStubs.h --
|
| 5 |
+
*
|
| 6 |
+
* Stubs for procedures in pqStubDefs.txt
|
| 7 |
+
*
|
| 8 |
+
* Generated by genExtStubs.tcl: DO NOT EDIT
|
| 9 |
+
* 2015-06-26 12:55:15Z
|
| 10 |
+
*
|
| 11 |
+
*-----------------------------------------------------------------------------
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
typedef struct pqStubDefs {
|
| 15 |
+
|
| 16 |
+
/* Functions from libraries: pq */
|
| 17 |
+
|
| 18 |
+
const char* (*pg_encoding_to_charPtr)(int);
|
| 19 |
+
void (*PQclearPtr)(PGresult*);
|
| 20 |
+
int (*PQclientEncodingPtr)(const PGconn*);
|
| 21 |
+
char* (*PQcmdTuplesPtr)(PGresult*);
|
| 22 |
+
PGconn* (*PQconnectdbPtr)(const char*);
|
| 23 |
+
char* (*PQerrorMessagePtr)(const PGconn*);
|
| 24 |
+
PGresult* (*PQdescribePreparedPtr)(PGconn*, const char*);
|
| 25 |
+
PGresult* (*PQexecPtr)(PGconn*, const char*);
|
| 26 |
+
PGresult* (*PQexecPreparedPtr)(PGconn*, const char*, int, const char *const*, const int*, const int*, int);
|
| 27 |
+
char* (*PQdbPtr)(const PGconn *);
|
| 28 |
+
void (*PQfinishPtr)(PGconn*);
|
| 29 |
+
char* (*PQfnamePtr)(PGresult*, int);
|
| 30 |
+
int (*PQfnumberPtr)(const PGresult*, const char*);
|
| 31 |
+
Oid (*PQftypePtr)(const PGresult*, int);
|
| 32 |
+
int (*PQgetisnullPtr)(const PGresult*, int, int);
|
| 33 |
+
int (*PQgetlengthPtr)(const PGresult*, int, int);
|
| 34 |
+
char* (*PQgetvaluePtr)(const PGresult*, int, int);
|
| 35 |
+
char* (*PQhostPtr)(const PGconn*);
|
| 36 |
+
int (*PQnfieldsPtr)(const PGresult*);
|
| 37 |
+
int (*PQnparamsPtr)(const PGresult*);
|
| 38 |
+
int (*PQntuplesPtr)(const PGresult*);
|
| 39 |
+
char* (*PQoptionsPtr)(const PGconn*);
|
| 40 |
+
Oid (*PQparamtypePtr)(const PGresult*, int);
|
| 41 |
+
char* (*PQpassPtr)(const PGconn*);
|
| 42 |
+
char* (*PQportPtr)(const PGconn*);
|
| 43 |
+
PGresult* (*PQpreparePtr)(PGconn*, const char*, const char*, int, const Oid*);
|
| 44 |
+
char* (*PQresultErrorFieldPtr)(const PGresult*, int);
|
| 45 |
+
ExecStatusType (*PQresultStatusPtr)(const PGresult*);
|
| 46 |
+
int (*PQsetClientEncodingPtr)(PGconn*, const char*);
|
| 47 |
+
PQnoticeProcessor (*PQsetNoticeProcessorPtr)(PGconn*, PQnoticeProcessor, void*);
|
| 48 |
+
ConnStatusType (*PQstatusPtr)(PGconn*);
|
| 49 |
+
char* (*PQuserPtr)(const PGconn*);
|
| 50 |
+
char* (*PQttyPtr)(const PGconn*);
|
| 51 |
+
} pqStubDefs;
|
| 52 |
+
#define pg_encoding_to_char (pqStubs->pg_encoding_to_charPtr)
|
| 53 |
+
#define PQclear (pqStubs->PQclearPtr)
|
| 54 |
+
#define PQclientEncoding (pqStubs->PQclientEncodingPtr)
|
| 55 |
+
#define PQcmdTuples (pqStubs->PQcmdTuplesPtr)
|
| 56 |
+
#define PQconnectdb (pqStubs->PQconnectdbPtr)
|
| 57 |
+
#define PQerrorMessage (pqStubs->PQerrorMessagePtr)
|
| 58 |
+
#define PQdescribePrepared (pqStubs->PQdescribePreparedPtr)
|
| 59 |
+
#define PQexec (pqStubs->PQexecPtr)
|
| 60 |
+
#define PQexecPrepared (pqStubs->PQexecPreparedPtr)
|
| 61 |
+
#define PQdb (pqStubs->PQdbPtr)
|
| 62 |
+
#define PQfinish (pqStubs->PQfinishPtr)
|
| 63 |
+
#define PQfname (pqStubs->PQfnamePtr)
|
| 64 |
+
#define PQfnumber (pqStubs->PQfnumberPtr)
|
| 65 |
+
#define PQftype (pqStubs->PQftypePtr)
|
| 66 |
+
#define PQgetisnull (pqStubs->PQgetisnullPtr)
|
| 67 |
+
#define PQgetlength (pqStubs->PQgetlengthPtr)
|
| 68 |
+
#define PQgetvalue (pqStubs->PQgetvaluePtr)
|
| 69 |
+
#define PQhost (pqStubs->PQhostPtr)
|
| 70 |
+
#define PQnfields (pqStubs->PQnfieldsPtr)
|
| 71 |
+
#define PQnparams (pqStubs->PQnparamsPtr)
|
| 72 |
+
#define PQntuples (pqStubs->PQntuplesPtr)
|
| 73 |
+
#define PQoptions (pqStubs->PQoptionsPtr)
|
| 74 |
+
#define PQparamtype (pqStubs->PQparamtypePtr)
|
| 75 |
+
#define PQpass (pqStubs->PQpassPtr)
|
| 76 |
+
#define PQport (pqStubs->PQportPtr)
|
| 77 |
+
#define PQprepare (pqStubs->PQpreparePtr)
|
| 78 |
+
#define PQresultErrorField (pqStubs->PQresultErrorFieldPtr)
|
| 79 |
+
#define PQresultStatus (pqStubs->PQresultStatusPtr)
|
| 80 |
+
#define PQsetClientEncoding (pqStubs->PQsetClientEncodingPtr)
|
| 81 |
+
#define PQsetNoticeProcessor (pqStubs->PQsetNoticeProcessorPtr)
|
| 82 |
+
#define PQstatus (pqStubs->PQstatusPtr)
|
| 83 |
+
#define PQuser (pqStubs->PQuserPtr)
|
| 84 |
+
#define PQtty (pqStubs->PQttyPtr)
|
| 85 |
+
MODULE_SCOPE const pqStubDefs *pqStubs;
|
evalkit_cambrian/include/python3.10/boolobject.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Boolean object interface */
|
| 2 |
+
|
| 3 |
+
#ifndef Py_BOOLOBJECT_H
|
| 4 |
+
#define Py_BOOLOBJECT_H
|
| 5 |
+
#ifdef __cplusplus
|
| 6 |
+
extern "C" {
|
| 7 |
+
#endif
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
PyAPI_DATA(PyTypeObject) PyBool_Type;
|
| 11 |
+
|
| 12 |
+
#define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type)
|
| 13 |
+
|
| 14 |
+
/* Py_False and Py_True are the only two bools in existence.
|
| 15 |
+
Don't forget to apply Py_INCREF() when returning either!!! */
|
| 16 |
+
|
| 17 |
+
/* Don't use these directly */
|
| 18 |
+
PyAPI_DATA(struct _longobject) _Py_FalseStruct;
|
| 19 |
+
PyAPI_DATA(struct _longobject) _Py_TrueStruct;
|
| 20 |
+
|
| 21 |
+
/* Use these macros */
|
| 22 |
+
#define Py_False ((PyObject *) &_Py_FalseStruct)
|
| 23 |
+
#define Py_True ((PyObject *) &_Py_TrueStruct)
|
| 24 |
+
|
| 25 |
+
// Test if an object is the True singleton, the same as "x is True" in Python.
|
| 26 |
+
PyAPI_FUNC(int) Py_IsTrue(PyObject *x);
|
| 27 |
+
#define Py_IsTrue(x) Py_Is((x), Py_True)
|
| 28 |
+
|
| 29 |
+
// Test if an object is the False singleton, the same as "x is False" in Python.
|
| 30 |
+
PyAPI_FUNC(int) Py_IsFalse(PyObject *x);
|
| 31 |
+
#define Py_IsFalse(x) Py_Is((x), Py_False)
|
| 32 |
+
|
| 33 |
+
/* Macros for returning Py_True or Py_False, respectively */
|
| 34 |
+
#define Py_RETURN_TRUE return Py_NewRef(Py_True)
|
| 35 |
+
#define Py_RETURN_FALSE return Py_NewRef(Py_False)
|
| 36 |
+
|
| 37 |
+
/* Function to return a bool from a C long */
|
| 38 |
+
PyAPI_FUNC(PyObject *) PyBool_FromLong(long);
|
| 39 |
+
|
| 40 |
+
#ifdef __cplusplus
|
| 41 |
+
}
|
| 42 |
+
#endif
|
| 43 |
+
#endif /* !Py_BOOLOBJECT_H */
|
evalkit_cambrian/include/python3.10/cellobject.h
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Cell object interface */
|
| 2 |
+
#ifndef Py_LIMITED_API
|
| 3 |
+
#ifndef Py_CELLOBJECT_H
|
| 4 |
+
#define Py_CELLOBJECT_H
|
| 5 |
+
#ifdef __cplusplus
|
| 6 |
+
extern "C" {
|
| 7 |
+
#endif
|
| 8 |
+
|
| 9 |
+
typedef struct {
|
| 10 |
+
PyObject_HEAD
|
| 11 |
+
PyObject *ob_ref; /* Content of the cell or NULL when empty */
|
| 12 |
+
} PyCellObject;
|
| 13 |
+
|
| 14 |
+
PyAPI_DATA(PyTypeObject) PyCell_Type;
|
| 15 |
+
|
| 16 |
+
#define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type)
|
| 17 |
+
|
| 18 |
+
PyAPI_FUNC(PyObject *) PyCell_New(PyObject *);
|
| 19 |
+
PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
|
| 20 |
+
PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *);
|
| 21 |
+
|
| 22 |
+
#define PyCell_GET(op) (((P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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CEVAL_H
|
| 2 |
+
#define Py_CEVAL_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
/* Interface to random parts in ceval.c */
|
| 9 |
+
|
| 10 |
+
/* PyEval_CallObjectWithKeywords(), PyEval_CallObject(), PyEval_CallFunction
|
| 11 |
+
* and PyEval_CallMethod are deprecated. Since they are officially part of the
|
| 12 |
+
* stable ABI (PEP 384), they must be kept for backward compatibility.
|
| 13 |
+
* PyObject_Call(), PyObject_CallFunction() and PyObject_CallMethod() are
|
| 14 |
+
* recommended to call a callable object.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
|
| 18 |
+
PyObject *callable,
|
| 19 |
+
PyObject *args,
|
| 20 |
+
PyObject *kwargs);
|
| 21 |
+
|
| 22 |
+
/* Deprecated since PyEval_CallObjectWithKeywords is deprecated */
|
| 23 |
+
#define PyEval_CallObject(callable, arg) \
|
| 24 |
+
PyEval_CallObjectWithKeywords(callable, arg, (PyObject *)NULL)
|
| 25 |
+
|
| 26 |
+
Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
|
| 27 |
+
PyObject *callable, const char *format, ...);
|
| 28 |
+
Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
|
| 29 |
+
PyObject *obj, const char *name, const char *format, ...);
|
| 30 |
+
|
| 31 |
+
PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void);
|
| 32 |
+
PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void);
|
| 33 |
+
PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
|
| 34 |
+
PyAPI_FUNC(PyFrameObject *) PyEval_GetFrame(void);
|
| 35 |
+
|
| 36 |
+
PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg);
|
| 37 |
+
PyAPI_FUNC(int) Py_MakePendingCalls(void);
|
| 38 |
+
|
| 39 |
+
/* Protection against deeply nested recursive calls
|
| 40 |
+
|
| 41 |
+
In Python 3.0, this protection has two levels:
|
| 42 |
+
* normal anti-recursion protection is triggered when the recursion level
|
| 43 |
+
exceeds the current recursion limit. It raises a RecursionError, and sets
|
| 44 |
+
the "overflowed" flag in the thread state structure. This flag
|
| 45 |
+
temporarily *disables* the normal protection; this allows cleanup code
|
| 46 |
+
to potentially outgrow the recursion limit while processing the
|
| 47 |
+
RecursionError.
|
| 48 |
+
* "last chance" anti-recursion protection is triggered when the recursion
|
| 49 |
+
level exceeds "current recursion limit + 50". By construction, this
|
| 50 |
+
protection can only be triggered when the "overflowed" flag is set. It
|
| 51 |
+
means the cleanup code has itself gone into an infinite loop, or the
|
| 52 |
+
RecursionError has been mistakingly ignored. When this protection is
|
| 53 |
+
triggered, the interpreter aborts with a Fatal Error.
|
| 54 |
+
|
| 55 |
+
In addition, the "overflowed" flag is automatically reset when the
|
| 56 |
+
recursion level drops below "current recursion limit - 50". This heuristic
|
| 57 |
+
is meant to ensure that the normal anti-recursion protection doesn't get
|
| 58 |
+
disabled too long.
|
| 59 |
+
|
| 60 |
+
Please note: this scheme has its own limitations. See:
|
| 61 |
+
http://mail.python.org/pipermail/python-dev/2008-August/082106.html
|
| 62 |
+
for some observations.
|
| 63 |
+
*/
|
| 64 |
+
PyAPI_FUNC(void) Py_SetRecursionLimit(int);
|
| 65 |
+
PyAPI_FUNC(int) Py_GetRecursionLimit(void);
|
| 66 |
+
|
| 67 |
+
PyAPI_FUNC(int) Py_EnterRecursiveCall(const char *where);
|
| 68 |
+
PyAPI_FUNC(void) Py_LeaveRecursiveCall(void);
|
| 69 |
+
|
| 70 |
+
PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
|
| 71 |
+
PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
|
| 72 |
+
|
| 73 |
+
PyAPI_FUNC(PyObject *) PyEval_EvalFrame(PyFrameObject *);
|
| 74 |
+
PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(PyFrameObject *f, int exc);
|
| 75 |
+
|
| 76 |
+
/* Interface for threads.
|
| 77 |
+
|
| 78 |
+
A module that plans to do a blocking system call (or something else
|
| 79 |
+
that lasts a long time and doesn't touch Python data) can allow other
|
| 80 |
+
threads to run as follows:
|
| 81 |
+
|
| 82 |
+
...preparations here...
|
| 83 |
+
Py_BEGIN_ALLOW_THREADS
|
| 84 |
+
...blocking system call here...
|
| 85 |
+
Py_END_ALLOW_THREADS
|
| 86 |
+
...interpret result here...
|
| 87 |
+
|
| 88 |
+
The Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pair expands to a
|
| 89 |
+
{}-surrounded block.
|
| 90 |
+
To leave the block in the middle (e.g., with return), you must insert
|
| 91 |
+
a line containing Py_BLOCK_THREADS before the return, e.g.
|
| 92 |
+
|
| 93 |
+
if (...premature_exit...) {
|
| 94 |
+
Py_BLOCK_THREADS
|
| 95 |
+
PyErr_SetFromErrno(PyExc_OSError);
|
| 96 |
+
return NULL;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
An alternative is:
|
| 100 |
+
|
| 101 |
+
Py_BLOCK_THREADS
|
| 102 |
+
if (...premature_exit...) {
|
| 103 |
+
PyErr_SetFromErrno(PyExc_OSError);
|
| 104 |
+
return NULL;
|
| 105 |
+
}
|
| 106 |
+
Py_UNBLOCK_THREADS
|
| 107 |
+
|
| 108 |
+
For convenience, that the value of 'errno' is restored across
|
| 109 |
+
Py_END_ALLOW_THREADS and Py_BLOCK_THREADS.
|
| 110 |
+
|
| 111 |
+
WARNING: NEVER NEST CALLS TO Py_BEGIN_ALLOW_THREADS AND
|
| 112 |
+
Py_END_ALLOW_THREADS!!!
|
| 113 |
+
|
| 114 |
+
Note that not yet all candidates have been converted to use this
|
| 115 |
+
mechanism!
|
| 116 |
+
*/
|
| 117 |
+
|
| 118 |
+
PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
|
| 119 |
+
PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
|
| 120 |
+
|
| 121 |
+
Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
|
| 122 |
+
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
|
| 123 |
+
/* PyEval_AcquireLock() and PyEval_ReleaseLock() are part of stable ABI.
|
| 124 |
+
* They will be removed from this header file in the future version.
|
| 125 |
+
* But they will be remained in ABI until Python 4.0.
|
| 126 |
+
*/
|
| 127 |
+
Py_DEPRECATED(3.2) PyAPI_FUNC(void) PyEval_AcquireLock(void);
|
| 128 |
+
Py_DEPRECATED(3.2) PyAPI_FUNC(void) PyEval_ReleaseLock(void);
|
| 129 |
+
PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
|
| 130 |
+
PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
|
| 131 |
+
|
| 132 |
+
#define Py_BEGIN_ALLOW_THREADS { \
|
| 133 |
+
PyThreadState *_save; \
|
| 134 |
+
_save = PyEval_SaveThread();
|
| 135 |
+
#define Py_BLOCK_THREADS PyEval_RestoreThread(_save);
|
| 136 |
+
#define Py_UNBLOCK_THREADS _save = PyEval_SaveThread();
|
| 137 |
+
#define Py_END_ALLOW_THREADS PyEval_RestoreThread(_save); \
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
/* Masks and values used by FORMAT_VALUE opcode. */
|
| 141 |
+
#define FVC_MASK 0x3
|
| 142 |
+
#define FVC_NONE 0x0
|
| 143 |
+
#define FVC_STR 0x1
|
| 144 |
+
#define FVC_REPR 0x2
|
| 145 |
+
#define FVC_ASCII 0x3
|
| 146 |
+
#define FVS_MASK 0x4
|
| 147 |
+
#define FVS_HAVE_SPEC 0x4
|
| 148 |
+
|
| 149 |
+
#ifndef Py_LIMITED_API
|
| 150 |
+
# define Py_CPYTHON_CEVAL_H
|
| 151 |
+
# include "cpython/ceval.h"
|
| 152 |
+
# undef Py_CPYTHON_CEVAL_H
|
| 153 |
+
#endif
|
| 154 |
+
|
| 155 |
+
#ifdef __cplusplus
|
| 156 |
+
}
|
| 157 |
+
#endif
|
| 158 |
+
#endif /* !Py_CEVAL_H */
|
evalkit_cambrian/include/python3.10/context.h
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CONTEXT_H
|
| 2 |
+
#define Py_CONTEXT_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_LIMITED_API
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
PyAPI_DATA(PyTypeObject) PyContext_Type;
|
| 11 |
+
typedef struct _pycontextobject PyContext;
|
| 12 |
+
|
| 13 |
+
PyAPI_DATA(PyTypeObject) PyContextVar_Type;
|
| 14 |
+
typedef struct _pycontextvarobject PyContextVar;
|
| 15 |
+
|
| 16 |
+
PyAPI_DATA(PyTypeObject) PyContextToken_Type;
|
| 17 |
+
typedef struct _pycontexttokenobject PyContextToken;
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
#define PyContext_CheckExact(o) Py_IS_TYPE(o, &PyContext_Type)
|
| 21 |
+
#define PyContextVar_CheckExact(o) Py_IS_TYPE(o, &PyContextVar_Type)
|
| 22 |
+
#define PyContextToken_CheckExact(o) Py_IS_TYPE(o, &PyContextToken_Type)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
PyAPI_FUNC(PyObject *) PyContext_New(void);
|
| 26 |
+
PyAPI_FUNC(PyObject *) PyContext_Copy(PyObject *);
|
| 27 |
+
PyAPI_FUNC(PyObject *) PyContext_CopyCurrent(void);
|
| 28 |
+
|
| 29 |
+
PyAPI_FUNC(int) PyContext_Enter(PyObject *);
|
| 30 |
+
PyAPI_FUNC(int) PyContext_Exit(PyObject *);
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
/* Create a new context variable.
|
| 34 |
+
|
| 35 |
+
default_value can be NULL.
|
| 36 |
+
*/
|
| 37 |
+
PyAPI_FUNC(PyObject *) PyContextVar_New(
|
| 38 |
+
const char *name, PyObject *default_value);
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
/* Get a value for the variable.
|
| 42 |
+
|
| 43 |
+
Returns -1 if an error occurred during lookup.
|
| 44 |
+
|
| 45 |
+
Returns 0 if value either was or was not found.
|
| 46 |
+
|
| 47 |
+
If value was found, *value will point to it.
|
| 48 |
+
If not, it will point to:
|
| 49 |
+
|
| 50 |
+
- default_value, if not NULL;
|
| 51 |
+
- the default value of "var", if not NULL;
|
| 52 |
+
- NULL.
|
| 53 |
+
|
| 54 |
+
'*value' will be a new ref, if not NULL.
|
| 55 |
+
*/
|
| 56 |
+
PyAPI_FUNC(int) PyContextVar_Get(
|
| 57 |
+
PyObject *var, PyObject *default_value, PyObject **value);
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
/* Set a new value for the variable.
|
| 61 |
+
Returns NULL if an error occurs.
|
| 62 |
+
*/
|
| 63 |
+
PyAPI_FUNC(PyObject *) PyContextVar_Set(PyObject *var, PyObject *value);
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
/* Reset a variable to its previous value.
|
| 67 |
+
Returns 0 on success, -1 on error.
|
| 68 |
+
*/
|
| 69 |
+
PyAPI_FUNC(int) PyContextVar_Reset(PyObject *var, PyObject *token);
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
/* This method is exposed only for CPython tests. Don not use it. */
|
| 73 |
+
PyAPI_FUNC(PyObject *) _PyContext_NewHamtForTests(void);
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
#endif /* !Py_LIMITED_API */
|
| 77 |
+
|
| 78 |
+
#ifdef __cplusplus
|
| 79 |
+
}
|
| 80 |
+
#endif
|
| 81 |
+
#endif /* !Py_CONTEXT_H */
|
evalkit_cambrian/include/python3.10/cpython/interpreteridobject.h
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H
|
| 2 |
+
# error "this header file must not be included directly"
|
| 3 |
+
#endif
|
| 4 |
+
|
| 5 |
+
/* Interpreter ID Object */
|
| 6 |
+
|
| 7 |
+
PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type;
|
| 8 |
+
|
| 9 |
+
PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t);
|
| 10 |
+
PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *);
|
| 11 |
+
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *);
|
evalkit_cambrian/include/python3.10/enumobject.h
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_ENUMOBJECT_H
|
| 2 |
+
#define Py_ENUMOBJECT_H
|
| 3 |
+
|
| 4 |
+
/* Enumerate Object */
|
| 5 |
+
|
| 6 |
+
#ifdef __cplusplus
|
| 7 |
+
extern "C" {
|
| 8 |
+
#endif
|
| 9 |
+
|
| 10 |
+
PyAPI_DATA(PyTypeObject) PyEnum_Type;
|
| 11 |
+
PyAPI_DATA(PyTypeObject) PyReversed_Type;
|
| 12 |
+
|
| 13 |
+
#ifdef __cplusplus
|
| 14 |
+
}
|
| 15 |
+
#endif
|
| 16 |
+
|
| 17 |
+
#endif /* !Py_ENUMOBJECT_H */
|
evalkit_cambrian/include/python3.10/errcode.h
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_ERRCODE_H
|
| 2 |
+
#define Py_ERRCODE_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
/* Error codes passed around between file input, tokenizer, parser and
|
| 9 |
+
interpreter. This is necessary so we can turn them into Python
|
| 10 |
+
exceptions at a higher level. Note that some errors have a
|
| 11 |
+
slightly different meaning when passed from the tokenizer to the
|
| 12 |
+
parser than when passed from the parser to the interpreter; e.g.
|
| 13 |
+
the parser only returns E_EOF when it hits EOF immediately, and it
|
| 14 |
+
never returns E_OK. */
|
| 15 |
+
|
| 16 |
+
#define E_OK 10 /* No error */
|
| 17 |
+
#define E_EOF 11 /* End Of File */
|
| 18 |
+
#define E_INTR 12 /* Interrupted */
|
| 19 |
+
#define E_TOKEN 13 /* Bad token */
|
| 20 |
+
#define E_SYNTAX 14 /* Syntax error */
|
| 21 |
+
#define E_NOMEM 15 /* Ran out of memory */
|
| 22 |
+
#define E_DONE 16 /* Parsing complete */
|
| 23 |
+
#define E_ERROR 17 /* Execution error */
|
| 24 |
+
#define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */
|
| 25 |
+
#define E_OVERFLOW 19 /* Node had too many children */
|
| 26 |
+
#define E_TOODEEP 20 /* Too many indentation levels */
|
| 27 |
+
#define E_DEDENT 21 /* No matching outer block for dedent */
|
| 28 |
+
#define E_DECODE 22 /* Error in decoding into Unicode */
|
| 29 |
+
#define E_EOFS 23 /* EOF in triple-quoted string */
|
| 30 |
+
#define E_EOLS 24 /* EOL in single-quoted string */
|
| 31 |
+
#define E_LINECONT 25 /* Unexpected characters after a line continuation */
|
| 32 |
+
#define E_BADSINGLE 27 /* Ill-formed single statement input */
|
| 33 |
+
#define E_INTERACT_STOP 28 /* Interactive mode stopped tokenization */
|
| 34 |
+
|
| 35 |
+
#ifdef __cplusplus
|
| 36 |
+
}
|
| 37 |
+
#endif
|
| 38 |
+
#endif /* !Py_ERRCODE_H */
|
evalkit_cambrian/include/python3.10/eval.h
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* Interface to execute compiled code */
|
| 3 |
+
|
| 4 |
+
#ifndef Py_EVAL_H
|
| 5 |
+
#define Py_EVAL_H
|
| 6 |
+
#ifdef __cplusplus
|
| 7 |
+
extern "C" {
|
| 8 |
+
#endif
|
| 9 |
+
|
| 10 |
+
PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *);
|
| 11 |
+
|
| 12 |
+
PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
|
| 13 |
+
PyObject *globals,
|
| 14 |
+
PyObject *locals,
|
| 15 |
+
PyObject *const *args, int argc,
|
| 16 |
+
PyObject *const *kwds, int kwdc,
|
| 17 |
+
PyObject *const *defs, int defc,
|
| 18 |
+
PyObject *kwdefs, PyObject *closure);
|
| 19 |
+
|
| 20 |
+
#ifndef Py_LIMITED_API
|
| 21 |
+
PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args);
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
#ifdef __cplusplus
|
| 25 |
+
}
|
| 26 |
+
#endif
|
| 27 |
+
#endif /* !Py_EVAL_H */
|
evalkit_cambrian/include/python3.10/exports.h
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_EXPORTS_H
|
| 2 |
+
#define Py_EXPORTS_H
|
| 3 |
+
|
| 4 |
+
#if defined(_WIN32) || defined(__CYGWIN__)
|
| 5 |
+
#define Py_IMPORTED_SYMBOL __declspec(dllimport)
|
| 6 |
+
#define Py_EXPORTED_SYMBOL __declspec(dllexport)
|
| 7 |
+
#define Py_LOCAL_SYMBOL
|
| 8 |
+
#else
|
| 9 |
+
/*
|
| 10 |
+
* If we only ever used gcc >= 5, we could use __has_attribute(visibility)
|
| 11 |
+
* as a cross-platform way to determine if visibility is supported. However,
|
| 12 |
+
* we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions
|
| 13 |
+
* have 4 < gcc < 5.
|
| 14 |
+
*/
|
| 15 |
+
#ifndef __has_attribute
|
| 16 |
+
#define __has_attribute(x) 0 // Compatibility with non-clang compilers.
|
| 17 |
+
#endif
|
| 18 |
+
#if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\
|
| 19 |
+
(defined(__clang__) && __has_attribute(visibility))
|
| 20 |
+
#define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default")))
|
| 21 |
+
#define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
|
| 22 |
+
#define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden")))
|
| 23 |
+
#else
|
| 24 |
+
#define Py_IMPORTED_SYMBOL
|
| 25 |
+
#define Py_EXPORTED_SYMBOL
|
| 26 |
+
#define Py_LOCAL_SYMBOL
|
| 27 |
+
#endif
|
| 28 |
+
#endif
|
| 29 |
+
|
| 30 |
+
#endif /* Py_EXPORTS_H */
|
evalkit_cambrian/include/python3.10/frameobject.h
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Frame object interface */
|
| 2 |
+
|
| 3 |
+
#ifndef Py_FRAMEOBJECT_H
|
| 4 |
+
#define Py_FRAMEOBJECT_H
|
| 5 |
+
#ifdef __cplusplus
|
| 6 |
+
extern "C" {
|
| 7 |
+
#endif
|
| 8 |
+
|
| 9 |
+
#include "pyframe.h"
|
| 10 |
+
|
| 11 |
+
#ifndef Py_LIMITED_API
|
| 12 |
+
# define Py_CPYTHON_FRAMEOBJECT_H
|
| 13 |
+
# include "cpython/frameobject.h"
|
| 14 |
+
# undef Py_CPYTHON_FRAMEOBJECT_H
|
| 15 |
+
#endif
|
| 16 |
+
|
| 17 |
+
#ifdef __cplusplus
|
| 18 |
+
}
|
| 19 |
+
#endif
|
| 20 |
+
#endif /* !Py_FRAMEOBJECT_H */
|
evalkit_cambrian/include/python3.10/interpreteridobject.h
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERPRETERIDOBJECT_H
|
| 2 |
+
#define Py_INTERPRETERIDOBJECT_H
|
| 3 |
+
|
| 4 |
+
#ifdef __cplusplus
|
| 5 |
+
extern "C" {
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
#ifndef Py_LIMITED_API
|
| 9 |
+
# define Py_CPYTHON_INTERPRETERIDOBJECT_H
|
| 10 |
+
# include "cpython/interpreteridobject.h"
|
| 11 |
+
# undef Py_CPYTHON_INTERPRETERIDOBJECT_H
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#ifdef __cplusplus
|
| 15 |
+
}
|
| 16 |
+
#endif
|
| 17 |
+
#endif /* !Py_INTERPRETERIDOBJECT_H */
|
evalkit_cambrian/include/python3.10/listobject.h
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* List object interface
|
| 2 |
+
|
| 3 |
+
Another generally useful object type is a list of object pointers.
|
| 4 |
+
This is a mutable type: the list items can be changed, and items can be
|
| 5 |
+
added or removed. Out-of-range indices or non-list objects are ignored.
|
| 6 |
+
|
| 7 |
+
WARNING: PyList_SetItem does not increment the new item's reference count,
|
| 8 |
+
but does decrement the reference count of the item it replaces, if not nil.
|
| 9 |
+
It does *decrement* the reference count if it is *not* inserted in the list.
|
| 10 |
+
Similarly, PyList_GetItem does not increment the returned item's reference
|
| 11 |
+
count.
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef Py_LISTOBJECT_H
|
| 15 |
+
#define Py_LISTOBJECT_H
|
| 16 |
+
#ifdef __cplusplus
|
| 17 |
+
extern "C" {
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
PyAPI_DATA(PyTypeObject) PyList_Type;
|
| 21 |
+
PyAPI_DATA(PyTypeObject) PyListIter_Type;
|
| 22 |
+
PyAPI_DATA(PyTypeObject) PyListRevIter_Type;
|
| 23 |
+
|
| 24 |
+
#define PyList_Check(op) \
|
| 25 |
+
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
|
| 26 |
+
#define PyList_CheckExact(op) Py_IS_TYPE(op, &PyList_Type)
|
| 27 |
+
|
| 28 |
+
PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);
|
| 29 |
+
PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);
|
| 30 |
+
|
| 31 |
+
PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t);
|
| 32 |
+
PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
|
| 33 |
+
PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);
|
| 34 |
+
PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *);
|
| 35 |
+
|
| 36 |
+
PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
|
| 37 |
+
PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
|
| 38 |
+
|
| 39 |
+
PyAPI_FUNC(int) PyList_Sort(PyObject *);
|
| 40 |
+
PyAPI_FUNC(int) PyList_Reverse(PyObject *);
|
| 41 |
+
PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);
|
| 42 |
+
|
| 43 |
+
#ifndef Py_LIMITED_API
|
| 44 |
+
# define Py_CPYTHON_LISTOBJECT_H
|
| 45 |
+
# include "cpython/listobject.h"
|
| 46 |
+
# undef Py_CPYTHON_LISTOBJECT_H
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#ifdef __cplusplus
|
| 50 |
+
}
|
| 51 |
+
#endif
|
| 52 |
+
#endif /* !Py_LISTOBJECT_H */
|
evalkit_cambrian/include/python3.10/longintrepr.h
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_LIMITED_API
|
| 2 |
+
#ifndef Py_LONGINTREPR_H
|
| 3 |
+
#define Py_LONGINTREPR_H
|
| 4 |
+
#ifdef __cplusplus
|
| 5 |
+
extern "C" {
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
/* This is published for the benefit of "friends" marshal.c and _decimal.c. */
|
| 10 |
+
|
| 11 |
+
/* Parameters of the integer representation. There are two different
|
| 12 |
+
sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit
|
| 13 |
+
integer type, and one set for 15-bit digits with each digit stored in an
|
| 14 |
+
unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at
|
| 15 |
+
configure time or in pyport.h, is used to decide which digit size to use.
|
| 16 |
+
|
| 17 |
+
Type 'digit' should be able to hold 2*PyLong_BASE-1, and type 'twodigits'
|
| 18 |
+
should be an unsigned integer type able to hold all integers up to
|
| 19 |
+
PyLong_BASE*PyLong_BASE-1. x_sub assumes that 'digit' is an unsigned type,
|
| 20 |
+
and that overflow is handled by taking the result modulo 2**N for some N >
|
| 21 |
+
PyLong_SHIFT. The majority of the code doesn't care about the precise
|
| 22 |
+
value of PyLong_SHIFT, but there are some notable exceptions:
|
| 23 |
+
|
| 24 |
+
- long_pow() requires that PyLong_SHIFT be divisible by 5
|
| 25 |
+
|
| 26 |
+
- PyLong_{As,From}ByteArray require that PyLong_SHIFT be at least 8
|
| 27 |
+
|
| 28 |
+
- long_hash() requires that PyLong_SHIFT is *strictly* less than the number
|
| 29 |
+
of bits in an unsigned long, as do the PyLong <-> long (or unsigned long)
|
| 30 |
+
conversion functions
|
| 31 |
+
|
| 32 |
+
- the Python int <-> size_t/Py_ssize_t conversion functions expect that
|
| 33 |
+
PyLong_SHIFT is strictly less than the number of bits in a size_t
|
| 34 |
+
|
| 35 |
+
- the marshal code currently expects that PyLong_SHIFT is a multiple of 15
|
| 36 |
+
|
| 37 |
+
- NSMALLNEGINTS and NSMALLPOSINTS should be small enough to fit in a single
|
| 38 |
+
digit; with the current values this forces PyLong_SHIFT >= 9
|
| 39 |
+
|
| 40 |
+
The values 15 and 30 should fit all of the above requirements, on any
|
| 41 |
+
platform.
|
| 42 |
+
*/
|
| 43 |
+
|
| 44 |
+
#if PYLONG_BITS_IN_DIGIT == 30
|
| 45 |
+
typedef uint32_t digit;
|
| 46 |
+
typedef int32_t sdigit; /* signed variant of digit */
|
| 47 |
+
typedef uint64_t twodigits;
|
| 48 |
+
typedef int64_t stwodigits; /* signed variant of twodigits */
|
| 49 |
+
#define PyLong_SHIFT 30
|
| 50 |
+
#define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */
|
| 51 |
+
#define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */
|
| 52 |
+
#elif PYLONG_BITS_IN_DIGIT == 15
|
| 53 |
+
typedef unsigned short digit;
|
| 54 |
+
typedef short sdigit; /* signed variant of digit */
|
| 55 |
+
typedef unsigned long twodigits;
|
| 56 |
+
typedef long stwodigits; /* signed variant of twodigits */
|
| 57 |
+
#define PyLong_SHIFT 15
|
| 58 |
+
#define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */
|
| 59 |
+
#define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */
|
| 60 |
+
#else
|
| 61 |
+
#error "PYLONG_BITS_IN_DIGIT should be 15 or 30"
|
| 62 |
+
#endif
|
| 63 |
+
#define PyLong_BASE ((digit)1 << PyLong_SHIFT)
|
| 64 |
+
#define PyLong_MASK ((digit)(PyLong_BASE - 1))
|
| 65 |
+
|
| 66 |
+
#if PyLong_SHIFT % 5 != 0
|
| 67 |
+
#error "longobject.c requires that PyLong_SHIFT be divisible by 5"
|
| 68 |
+
#endif
|
| 69 |
+
|
| 70 |
+
/* Long integer representation.
|
| 71 |
+
The absolute value of a number is equal to
|
| 72 |
+
SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i)
|
| 73 |
+
Negative numbers are represented with ob_size < 0;
|
| 74 |
+
zero is represented by ob_size == 0.
|
| 75 |
+
In a normalized number, ob_digit[abs(ob_size)-1] (the most significant
|
| 76 |
+
digit) is never zero. Also, in all cases, for all valid i,
|
| 77 |
+
0 <= ob_digit[i] <= MASK.
|
| 78 |
+
The allocation function takes care of allocating extra memory
|
| 79 |
+
so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available.
|
| 80 |
+
|
| 81 |
+
CAUTION: Generic code manipulating subtypes of PyVarObject has to
|
| 82 |
+
aware that ints abuse ob_size's sign bit.
|
| 83 |
+
*/
|
| 84 |
+
|
| 85 |
+
struct _longobject {
|
| 86 |
+
PyObject_VAR_HEAD
|
| 87 |
+
digit ob_digit[1];
|
| 88 |
+
};
|
| 89 |
+
|
| 90 |
+
PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t);
|
| 91 |
+
|
| 92 |
+
/* Return a copy of src. */
|
| 93 |
+
PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src);
|
| 94 |
+
|
| 95 |
+
#ifdef __cplusplus
|
| 96 |
+
}
|
| 97 |
+
#endif
|
| 98 |
+
#endif /* !Py_LONGINTREPR_H */
|
| 99 |
+
#endif /* Py_LIMITED_API */
|
evalkit_cambrian/include/python3.10/marshal.h
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* Interface for marshal.c */
|
| 3 |
+
|
| 4 |
+
#ifndef Py_MARSHAL_H
|
| 5 |
+
#define Py_MARSHAL_H
|
| 6 |
+
#ifdef __cplusplus
|
| 7 |
+
extern "C" {
|
| 8 |
+
#endif
|
| 9 |
+
|
| 10 |
+
#define Py_MARSHAL_VERSION 4
|
| 11 |
+
|
| 12 |
+
PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
|
| 13 |
+
PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);
|
| 14 |
+
PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int);
|
| 15 |
+
|
| 16 |
+
#ifndef Py_LIMITED_API
|
| 17 |
+
PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *);
|
| 18 |
+
PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *);
|
| 19 |
+
PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *);
|
| 20 |
+
PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
|
| 21 |
+
#endif
|
| 22 |
+
PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *,
|
| 23 |
+
Py_ssize_t);
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
}
|
| 27 |
+
#endif
|
| 28 |
+
#endif /* !Py_MARSHAL_H */
|
evalkit_cambrian/include/python3.10/moduleobject.h
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* Module object interface */
|
| 3 |
+
|
| 4 |
+
#ifndef Py_MODULEOBJECT_H
|
| 5 |
+
#define Py_MODULEOBJECT_H
|
| 6 |
+
#ifdef __cplusplus
|
| 7 |
+
extern "C" {
|
| 8 |
+
#endif
|
| 9 |
+
|
| 10 |
+
PyAPI_DATA(PyTypeObject) PyModule_Type;
|
| 11 |
+
|
| 12 |
+
#define PyModule_Check(op) PyObject_TypeCheck(op, &PyModule_Type)
|
| 13 |
+
#define PyModule_CheckExact(op) Py_IS_TYPE(op, &PyModule_Type)
|
| 14 |
+
|
| 15 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
| 16 |
+
PyAPI_FUNC(PyObject *) PyModule_NewObject(
|
| 17 |
+
PyObject *name
|
| 18 |
+
);
|
| 19 |
+
#endif
|
| 20 |
+
PyAPI_FUNC(PyObject *) PyModule_New(
|
| 21 |
+
const char *name /* UTF-8 encoded string */
|
| 22 |
+
);
|
| 23 |
+
PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *);
|
| 24 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
| 25 |
+
PyAPI_FUNC(PyObject *) PyModule_GetNameObject(PyObject *);
|
| 26 |
+
#endif
|
| 27 |
+
PyAPI_FUNC(const char *) PyModule_GetName(PyObject *);
|
| 28 |
+
Py_DEPRECATED(3.2) PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *);
|
| 29 |
+
PyAPI_FUNC(PyObject *) PyModule_GetFilenameObject(PyObject *);
|
| 30 |
+
#ifndef Py_LIMITED_API
|
| 31 |
+
PyAPI_FUNC(void) _PyModule_Clear(PyObject *);
|
| 32 |
+
PyAPI_FUNC(void) _PyModule_ClearDict(PyObject *);
|
| 33 |
+
PyAPI_FUNC(int) _PyModuleSpec_IsInitializing(PyObject *);
|
| 34 |
+
#endif
|
| 35 |
+
PyAPI_FUNC(struct PyModuleDef*) PyModule_GetDef(PyObject*);
|
| 36 |
+
PyAPI_FUNC(void*) PyModule_GetState(PyObject*);
|
| 37 |
+
|
| 38 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
| 39 |
+
/* New in 3.5 */
|
| 40 |
+
PyAPI_FUNC(PyObject *) PyModuleDef_Init(struct PyModuleDef*);
|
| 41 |
+
PyAPI_DATA(PyTypeObject) PyModuleDef_Type;
|
| 42 |
+
#endif
|
| 43 |
+
|
| 44 |
+
typedef struct PyModuleDef_Base {
|
| 45 |
+
PyObject_HEAD
|
| 46 |
+
PyObject* (*m_init)(void);
|
| 47 |
+
Py_ssize_t m_index;
|
| 48 |
+
PyObject* m_copy;
|
| 49 |
+
} PyModuleDef_Base;
|
| 50 |
+
|
| 51 |
+
#define PyModuleDef_HEAD_INIT { \
|
| 52 |
+
PyObject_HEAD_INIT(NULL) \
|
| 53 |
+
NULL, /* m_init */ \
|
| 54 |
+
0, /* m_index */ \
|
| 55 |
+
NULL, /* m_copy */ \
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
struct PyModuleDef_Slot;
|
| 59 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
| 60 |
+
/* New in 3.5 */
|
| 61 |
+
typedef struct PyModuleDef_Slot{
|
| 62 |
+
int slot;
|
| 63 |
+
void *value;
|
| 64 |
+
} PyModuleDef_Slot;
|
| 65 |
+
|
| 66 |
+
#define Py_mod_create 1
|
| 67 |
+
#define Py_mod_exec 2
|
| 68 |
+
|
| 69 |
+
#ifndef Py_LIMITED_API
|
| 70 |
+
#define _Py_mod_LAST_SLOT 2
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#endif /* New in 3.5 */
|
| 74 |
+
|
| 75 |
+
typedef struct PyModuleDef{
|
| 76 |
+
PyModuleDef_Base m_base;
|
| 77 |
+
const char* m_name;
|
| 78 |
+
const char* m_doc;
|
| 79 |
+
Py_ssize_t m_size;
|
| 80 |
+
PyMethodDef *m_methods;
|
| 81 |
+
struct PyModuleDef_Slot* m_slots;
|
| 82 |
+
traverseproc m_traverse;
|
| 83 |
+
inquiry m_clear;
|
| 84 |
+
freefunc m_free;
|
| 85 |
+
} PyModuleDef;
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
// Internal C API
|
| 89 |
+
#ifdef Py_BUILD_CORE
|
| 90 |
+
extern int _PyModule_IsExtension(PyObject *obj);
|
| 91 |
+
#endif
|
| 92 |
+
|
| 93 |
+
#ifdef __cplusplus
|
| 94 |
+
}
|
| 95 |
+
#endif
|
| 96 |
+
#endif /* !Py_MODULEOBJECT_H */
|
evalkit_cambrian/include/python3.10/namespaceobject.h
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* simple namespace object interface */
|
| 3 |
+
|
| 4 |
+
#ifndef NAMESPACEOBJECT_H
|
| 5 |
+
#define NAMESPACEOBJECT_H
|
| 6 |
+
#ifdef __cplusplus
|
| 7 |
+
extern "C" {
|
| 8 |
+
#endif
|
| 9 |
+
|
| 10 |
+
#ifndef Py_LIMITED_API
|
| 11 |
+
PyAPI_DATA(PyTypeObject) _PyNamespace_Type;
|
| 12 |
+
|
| 13 |
+
PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds);
|
| 14 |
+
#endif /* !Py_LIMITED_API */
|
| 15 |
+
|
| 16 |
+
#ifdef __cplusplus
|
| 17 |
+
}
|
| 18 |
+
#endif
|
| 19 |
+
#endif /* !NAMESPACEOBJECT_H */
|
evalkit_cambrian/include/python3.10/py_curses.h
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
#ifndef Py_CURSES_H
|
| 3 |
+
#define Py_CURSES_H
|
| 4 |
+
|
| 5 |
+
#ifdef __APPLE__
|
| 6 |
+
/*
|
| 7 |
+
** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
|
| 8 |
+
** against multiple definition of wchar_t.
|
| 9 |
+
*/
|
| 10 |
+
#ifdef _BSD_WCHAR_T_DEFINED_
|
| 11 |
+
#define _WCHAR_T
|
| 12 |
+
#endif
|
| 13 |
+
#endif /* __APPLE__ */
|
| 14 |
+
|
| 15 |
+
/* On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
|
| 16 |
+
against multiple definition of wchar_t and wint_t. */
|
| 17 |
+
#if defined(__FreeBSD__) && defined(_XOPEN_SOURCE_EXTENDED)
|
| 18 |
+
# ifndef __wchar_t
|
| 19 |
+
# define __wchar_t
|
| 20 |
+
# endif
|
| 21 |
+
# ifndef __wint_t
|
| 22 |
+
# define __wint_t
|
| 23 |
+
# endif
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS)
|
| 27 |
+
/* The following definition is necessary for ncurses 5.7; without it,
|
| 28 |
+
some of [n]curses.h set NCURSES_OPAQUE to 1, and then Python
|
| 29 |
+
can't get at the WINDOW flags field. */
|
| 30 |
+
#define NCURSES_OPAQUE 0
|
| 31 |
+
#endif
|
| 32 |
+
|
| 33 |
+
#ifdef HAVE_NCURSES_H
|
| 34 |
+
#include <ncurses.h>
|
| 35 |
+
#else
|
| 36 |
+
#include <curses.h>
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
#ifdef HAVE_NCURSES_H
|
| 40 |
+
/* configure was checking <curses.h>, but we will
|
| 41 |
+
use <ncurses.h>, which has some or all these features. */
|
| 42 |
+
#if !defined(WINDOW_HAS_FLAGS) && !(NCURSES_OPAQUE+0)
|
| 43 |
+
#define WINDOW_HAS_FLAGS 1
|
| 44 |
+
#endif
|
| 45 |
+
#if !defined(HAVE_CURSES_IS_PAD) && NCURSES_VERSION_PATCH+0 >= 20090906
|
| 46 |
+
#define HAVE_CURSES_IS_PAD 1
|
| 47 |
+
#endif
|
| 48 |
+
#ifndef MVWDELCH_IS_EXPRESSION
|
| 49 |
+
#define MVWDELCH_IS_EXPRESSION 1
|
| 50 |
+
#endif
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
#ifdef __cplusplus
|
| 54 |
+
extern "C" {
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#define PyCurses_API_pointers 4
|
| 58 |
+
|
| 59 |
+
/* Type declarations */
|
| 60 |
+
|
| 61 |
+
typedef struct {
|
| 62 |
+
PyObject_HEAD
|
| 63 |
+
WINDOW *win;
|
| 64 |
+
char *encoding;
|
| 65 |
+
} PyCursesWindowObject;
|
| 66 |
+
|
| 67 |
+
#define PyCursesWindow_Check(v) Py_IS_TYPE(v, &PyCursesWindow_Type)
|
| 68 |
+
|
| 69 |
+
#define PyCurses_CAPSULE_NAME "_curses._C_API"
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
#ifdef CURSES_MODULE
|
| 73 |
+
/* This section is used when compiling _cursesmodule.c */
|
| 74 |
+
|
| 75 |
+
#else
|
| 76 |
+
/* This section is used in modules that use the _cursesmodule API */
|
| 77 |
+
|
| 78 |
+
static void **PyCurses_API;
|
| 79 |
+
|
| 80 |
+
#define PyCursesWindow_Type (*(PyTypeObject *) PyCurses_API[0])
|
| 81 |
+
#define PyCursesSetupTermCalled {if (! ((int (*)(void))PyCurses_API[1]) () ) return NULL;}
|
| 82 |
+
#define PyCursesInitialised {if (! ((int (*)(void))PyCurses_API[2]) () ) return NULL;}
|
| 83 |
+
#define PyCursesInitialisedColor {if (! ((int (*)(void))PyCurses_API[3]) () ) return NULL;}
|
| 84 |
+
|
| 85 |
+
#define import_curses() \
|
| 86 |
+
PyCurses_API = (void **)PyCapsule_Import(PyCurses_CAPSULE_NAME, 1);
|
| 87 |
+
|
| 88 |
+
#endif
|
| 89 |
+
|
| 90 |
+
/* general error messages */
|
| 91 |
+
static const char catchall_ERR[] = "curses function returned ERR";
|
| 92 |
+
static const char catchall_NULL[] = "curses function returned NULL";
|
| 93 |
+
|
| 94 |
+
#ifdef __cplusplus
|
| 95 |
+
}
|
| 96 |
+
#endif
|
| 97 |
+
|
| 98 |
+
#endif /* !defined(Py_CURSES_H) */
|
| 99 |
+
|
evalkit_cambrian/include/python3.10/pycapsule.h
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* Capsule objects let you wrap a C "void *" pointer in a Python
|
| 3 |
+
object. They're a way of passing data through the Python interpreter
|
| 4 |
+
without creating your own custom type.
|
| 5 |
+
|
| 6 |
+
Capsules are used for communication between extension modules.
|
| 7 |
+
They provide a way for an extension module to export a C interface
|
| 8 |
+
to other extension modules, so that extension modules can use the
|
| 9 |
+
Python import mechanism to link to one another.
|
| 10 |
+
|
| 11 |
+
For more information, please see "c-api/capsule.html" in the
|
| 12 |
+
documentation.
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
#ifndef Py_CAPSULE_H
|
| 16 |
+
#define Py_CAPSULE_H
|
| 17 |
+
#ifdef __cplusplus
|
| 18 |
+
extern "C" {
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
PyAPI_DATA(PyTypeObject) PyCapsule_Type;
|
| 22 |
+
|
| 23 |
+
typedef void (*PyCapsule_Destructor)(PyObject *);
|
| 24 |
+
|
| 25 |
+
#define PyCapsule_CheckExact(op) Py_IS_TYPE(op, &PyCapsule_Type)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
PyAPI_FUNC(PyObject *) PyCapsule_New(
|
| 29 |
+
void *pointer,
|
| 30 |
+
const char *name,
|
| 31 |
+
PyCapsule_Destructor destructor);
|
| 32 |
+
|
| 33 |
+
PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name);
|
| 34 |
+
|
| 35 |
+
PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule);
|
| 36 |
+
|
| 37 |
+
PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule);
|
| 38 |
+
|
| 39 |
+
PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule);
|
| 40 |
+
|
| 41 |
+
PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name);
|
| 42 |
+
|
| 43 |
+
PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer);
|
| 44 |
+
|
| 45 |
+
PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor);
|
| 46 |
+
|
| 47 |
+
PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name);
|
| 48 |
+
|
| 49 |
+
PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context);
|
| 50 |
+
|
| 51 |
+
PyAPI_FUNC(void *) PyCapsule_Import(
|
| 52 |
+
const char *name, /* UTF-8 encoded string */
|
| 53 |
+
int no_block);
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
#ifdef __cplusplus
|
| 57 |
+
}
|
| 58 |
+
#endif
|
| 59 |
+
#endif /* !Py_CAPSULE_H */
|
evalkit_cambrian/include/python3.10/pyconfig.h
ADDED
|
@@ -0,0 +1,1703 @@
|
|
|
|
|
|
|
|
|
|
|
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
|
| 2 |
+
/* pyconfig.h.in. Generated from configure.ac by autoheader. */
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
#ifndef Py_PYCONFIG_H
|
| 6 |
+
#define Py_PYCONFIG_H
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
/* Define if building universal (internal helper macro) */
|
| 10 |
+
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
| 11 |
+
|
| 12 |
+
/* BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the PEP425 tag of the
|
| 13 |
+
build system. */
|
| 14 |
+
/* #undef AIX_BUILDDATE */
|
| 15 |
+
|
| 16 |
+
/* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want
|
| 17 |
+
support for AIX C++ shared extension modules. */
|
| 18 |
+
/* #undef AIX_GENUINE_CPLUSPLUS */
|
| 19 |
+
|
| 20 |
+
/* The normal alignment of `long', in bytes. */
|
| 21 |
+
#define ALIGNOF_LONG 8
|
| 22 |
+
|
| 23 |
+
/* The normal alignment of `size_t', in bytes. */
|
| 24 |
+
#define ALIGNOF_SIZE_T 8
|
| 25 |
+
|
| 26 |
+
/* Alternative SOABI used in debug build to load C extensions built in release
|
| 27 |
+
mode */
|
| 28 |
+
/* #undef ALT_SOABI */
|
| 29 |
+
|
| 30 |
+
/* The Android API level. */
|
| 31 |
+
/* #undef ANDROID_API_LEVEL */
|
| 32 |
+
|
| 33 |
+
/* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
|
| 34 |
+
mixed-endian order (byte order 45670123) */
|
| 35 |
+
/* #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 */
|
| 36 |
+
|
| 37 |
+
/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the most
|
| 38 |
+
significant byte first */
|
| 39 |
+
/* #undef DOUBLE_IS_BIG_ENDIAN_IEEE754 */
|
| 40 |
+
|
| 41 |
+
/* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
|
| 42 |
+
least significant byte first */
|
| 43 |
+
#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
|
| 44 |
+
|
| 45 |
+
/* Define if --enable-ipv6 is specified */
|
| 46 |
+
#define ENABLE_IPV6 1
|
| 47 |
+
|
| 48 |
+
/* Better isolate subinterpreters, experimental build mode. */
|
| 49 |
+
/* #undef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS */
|
| 50 |
+
|
| 51 |
+
/* Define to 1 if your system stores words within floats with the most
|
| 52 |
+
significant word first */
|
| 53 |
+
/* #undef FLOAT_WORDS_BIGENDIAN */
|
| 54 |
+
|
| 55 |
+
/* Define if flock needs to be linked with bsd library. */
|
| 56 |
+
/* #undef FLOCK_NEEDS_LIBBSD */
|
| 57 |
+
|
| 58 |
+
/* Define if getpgrp() must be called as getpgrp(0). */
|
| 59 |
+
/* #undef GETPGRP_HAVE_ARG */
|
| 60 |
+
|
| 61 |
+
/* Define to 1 if you have the `accept4' function. */
|
| 62 |
+
#define HAVE_ACCEPT4 1
|
| 63 |
+
|
| 64 |
+
/* Define to 1 if you have the `acosh' function. */
|
| 65 |
+
#define HAVE_ACOSH 1
|
| 66 |
+
|
| 67 |
+
/* struct addrinfo (netdb.h) */
|
| 68 |
+
#define HAVE_ADDRINFO 1
|
| 69 |
+
|
| 70 |
+
/* Define to 1 if you have the `alarm' function. */
|
| 71 |
+
#define HAVE_ALARM 1
|
| 72 |
+
|
| 73 |
+
/* Define if aligned memory access is required */
|
| 74 |
+
/* #undef HAVE_ALIGNED_REQUIRED */
|
| 75 |
+
|
| 76 |
+
/* Define to 1 if you have the <alloca.h> header file. */
|
| 77 |
+
#define HAVE_ALLOCA_H 1
|
| 78 |
+
|
| 79 |
+
/* Define this if your time.h defines altzone. */
|
| 80 |
+
/* #undef HAVE_ALTZONE */
|
| 81 |
+
|
| 82 |
+
/* Define to 1 if you have the `asinh' function. */
|
| 83 |
+
#define HAVE_ASINH 1
|
| 84 |
+
|
| 85 |
+
/* Define to 1 if you have the <asm/types.h> header file. */
|
| 86 |
+
#define HAVE_ASM_TYPES_H 1
|
| 87 |
+
|
| 88 |
+
/* Define to 1 if you have the `atanh' function. */
|
| 89 |
+
#define HAVE_ATANH 1
|
| 90 |
+
|
| 91 |
+
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
| 92 |
+
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
|
| 93 |
+
|
| 94 |
+
/* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
|
| 95 |
+
/* #undef HAVE_BLUETOOTH_BLUETOOTH_H */
|
| 96 |
+
|
| 97 |
+
/* Define to 1 if you have the <bluetooth.h> header file. */
|
| 98 |
+
/* #undef HAVE_BLUETOOTH_H */
|
| 99 |
+
|
| 100 |
+
/* Define if mbstowcs(NULL, "text", 0) does not return the number of wide
|
| 101 |
+
chars that would be converted. */
|
| 102 |
+
/* #undef HAVE_BROKEN_MBSTOWCS */
|
| 103 |
+
|
| 104 |
+
/* Define if nice() returns success/failure instead of the new priority. */
|
| 105 |
+
/* #undef HAVE_BROKEN_NICE */
|
| 106 |
+
|
| 107 |
+
/* Define if the system reports an invalid PIPE_BUF value. */
|
| 108 |
+
/* #undef HAVE_BROKEN_PIPE_BUF */
|
| 109 |
+
|
| 110 |
+
/* Define if poll() sets errno on invalid file descriptors. */
|
| 111 |
+
/* #undef HAVE_BROKEN_POLL */
|
| 112 |
+
|
| 113 |
+
/* Define if the Posix semaphores do not work on your system */
|
| 114 |
+
/* #undef HAVE_BROKEN_POSIX_SEMAPHORES */
|
| 115 |
+
|
| 116 |
+
/* Define if pthread_sigmask() does not work on your system. */
|
| 117 |
+
/* #undef HAVE_BROKEN_PTHREAD_SIGMASK */
|
| 118 |
+
|
| 119 |
+
/* define to 1 if your sem_getvalue is broken. */
|
| 120 |
+
/* #undef HAVE_BROKEN_SEM_GETVALUE */
|
| 121 |
+
|
| 122 |
+
/* Define if `unsetenv` does not return an int. */
|
| 123 |
+
/* #undef HAVE_BROKEN_UNSETENV */
|
| 124 |
+
|
| 125 |
+
/* Has builtin __atomic_load_n() and __atomic_store_n() functions */
|
| 126 |
+
#define HAVE_BUILTIN_ATOMIC 1
|
| 127 |
+
|
| 128 |
+
/* Define to 1 if you have the 'chflags' function. */
|
| 129 |
+
/* #undef HAVE_CHFLAGS */
|
| 130 |
+
|
| 131 |
+
/* Define to 1 if you have the `chown' function. */
|
| 132 |
+
#define HAVE_CHOWN 1
|
| 133 |
+
|
| 134 |
+
/* Define if you have the 'chroot' function. */
|
| 135 |
+
#define HAVE_CHROOT 1
|
| 136 |
+
|
| 137 |
+
/* Define to 1 if you have the `clock' function. */
|
| 138 |
+
#define HAVE_CLOCK 1
|
| 139 |
+
|
| 140 |
+
/* Define to 1 if you have the `clock_getres' function. */
|
| 141 |
+
#define HAVE_CLOCK_GETRES 1
|
| 142 |
+
|
| 143 |
+
/* Define to 1 if you have the `clock_gettime' function. */
|
| 144 |
+
#define HAVE_CLOCK_GETTIME 1
|
| 145 |
+
|
| 146 |
+
/* Define to 1 if you have the `clock_settime' function. */
|
| 147 |
+
#define HAVE_CLOCK_SETTIME 1
|
| 148 |
+
|
| 149 |
+
/* Define to 1 if you have the `close_range' function. */
|
| 150 |
+
/* #undef HAVE_CLOSE_RANGE */
|
| 151 |
+
|
| 152 |
+
/* Define if the C compiler supports computed gotos. */
|
| 153 |
+
#define HAVE_COMPUTED_GOTOS 1
|
| 154 |
+
|
| 155 |
+
/* Define to 1 if you have the `confstr' function. */
|
| 156 |
+
#define HAVE_CONFSTR 1
|
| 157 |
+
|
| 158 |
+
/* Define to 1 if you have the <conio.h> header file. */
|
| 159 |
+
/* #undef HAVE_CONIO_H */
|
| 160 |
+
|
| 161 |
+
/* Define to 1 if you have the `copysign' function. */
|
| 162 |
+
#define HAVE_COPYSIGN 1
|
| 163 |
+
|
| 164 |
+
/* Define to 1 if you have the `copy_file_range' function. */
|
| 165 |
+
/* #undef HAVE_COPY_FILE_RANGE */
|
| 166 |
+
|
| 167 |
+
/* Define to 1 if you have the <crypt.h> header file. */
|
| 168 |
+
#define HAVE_CRYPT_H 1
|
| 169 |
+
|
| 170 |
+
/* Define if you have the crypt_r() function. */
|
| 171 |
+
#define HAVE_CRYPT_R 1
|
| 172 |
+
|
| 173 |
+
/* Define to 1 if you have the `ctermid' function. */
|
| 174 |
+
#define HAVE_CTERMID 1
|
| 175 |
+
|
| 176 |
+
/* Define if you have the 'ctermid_r' function. */
|
| 177 |
+
/* #undef HAVE_CTERMID_R */
|
| 178 |
+
|
| 179 |
+
/* Define if you have the 'filter' function. */
|
| 180 |
+
#define HAVE_CURSES_FILTER 1
|
| 181 |
+
|
| 182 |
+
/* Define to 1 if you have the <curses.h> header file. */
|
| 183 |
+
#define HAVE_CURSES_H 1
|
| 184 |
+
|
| 185 |
+
/* Define if you have the 'has_key' function. */
|
| 186 |
+
#define HAVE_CURSES_HAS_KEY 1
|
| 187 |
+
|
| 188 |
+
/* Define if you have the 'immedok' function. */
|
| 189 |
+
#define HAVE_CURSES_IMMEDOK 1
|
| 190 |
+
|
| 191 |
+
/* Define if you have the 'is_pad' function or macro. */
|
| 192 |
+
#define HAVE_CURSES_IS_PAD 1
|
| 193 |
+
|
| 194 |
+
/* Define if you have the 'is_term_resized' function. */
|
| 195 |
+
#define HAVE_CURSES_IS_TERM_RESIZED 1
|
| 196 |
+
|
| 197 |
+
/* Define if you have the 'resizeterm' function. */
|
| 198 |
+
#define HAVE_CURSES_RESIZETERM 1
|
| 199 |
+
|
| 200 |
+
/* Define if you have the 'resize_term' function. */
|
| 201 |
+
#define HAVE_CURSES_RESIZE_TERM 1
|
| 202 |
+
|
| 203 |
+
/* Define if you have the 'syncok' function. */
|
| 204 |
+
#define HAVE_CURSES_SYNCOK 1
|
| 205 |
+
|
| 206 |
+
/* Define if you have the 'typeahead' function. */
|
| 207 |
+
#define HAVE_CURSES_TYPEAHEAD 1
|
| 208 |
+
|
| 209 |
+
/* Define if you have the 'use_env' function. */
|
| 210 |
+
#define HAVE_CURSES_USE_ENV 1
|
| 211 |
+
|
| 212 |
+
/* Define if you have the 'wchgat' function. */
|
| 213 |
+
#define HAVE_CURSES_WCHGAT 1
|
| 214 |
+
|
| 215 |
+
/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
|
| 216 |
+
don't. */
|
| 217 |
+
#define HAVE_DECL_ISFINITE 1
|
| 218 |
+
|
| 219 |
+
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
|
| 220 |
+
*/
|
| 221 |
+
#define HAVE_DECL_ISINF 1
|
| 222 |
+
|
| 223 |
+
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
|
| 224 |
+
*/
|
| 225 |
+
#define HAVE_DECL_ISNAN 1
|
| 226 |
+
|
| 227 |
+
/* Define to 1 if you have the declaration of `RTLD_DEEPBIND', and to 0 if you
|
| 228 |
+
don't. */
|
| 229 |
+
#define HAVE_DECL_RTLD_DEEPBIND 1
|
| 230 |
+
|
| 231 |
+
/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
|
| 232 |
+
don't. */
|
| 233 |
+
#define HAVE_DECL_RTLD_GLOBAL 1
|
| 234 |
+
|
| 235 |
+
/* Define to 1 if you have the declaration of `RTLD_LAZY', and to 0 if you
|
| 236 |
+
don't. */
|
| 237 |
+
#define HAVE_DECL_RTLD_LAZY 1
|
| 238 |
+
|
| 239 |
+
/* Define to 1 if you have the declaration of `RTLD_LOCAL', and to 0 if you
|
| 240 |
+
don't. */
|
| 241 |
+
#define HAVE_DECL_RTLD_LOCAL 1
|
| 242 |
+
|
| 243 |
+
/* Define to 1 if you have the declaration of `RTLD_MEMBER', and to 0 if you
|
| 244 |
+
don't. */
|
| 245 |
+
#define HAVE_DECL_RTLD_MEMBER 0
|
| 246 |
+
|
| 247 |
+
/* Define to 1 if you have the declaration of `RTLD_NODELETE', and to 0 if you
|
| 248 |
+
don't. */
|
| 249 |
+
#define HAVE_DECL_RTLD_NODELETE 1
|
| 250 |
+
|
| 251 |
+
/* Define to 1 if you have the declaration of `RTLD_NOLOAD', and to 0 if you
|
| 252 |
+
don't. */
|
| 253 |
+
#define HAVE_DECL_RTLD_NOLOAD 1
|
| 254 |
+
|
| 255 |
+
/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
|
| 256 |
+
don't. */
|
| 257 |
+
#define HAVE_DECL_RTLD_NOW 1
|
| 258 |
+
|
| 259 |
+
/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
|
| 260 |
+
*/
|
| 261 |
+
/* #undef HAVE_DECL_TZNAME */
|
| 262 |
+
|
| 263 |
+
/* Define to 1 if you have the device macros. */
|
| 264 |
+
#define HAVE_DEVICE_MACROS 1
|
| 265 |
+
|
| 266 |
+
/* Define to 1 if you have the /dev/ptc device file. */
|
| 267 |
+
/* #undef HAVE_DEV_PTC */
|
| 268 |
+
|
| 269 |
+
/* Define to 1 if you have the /dev/ptmx device file. */
|
| 270 |
+
#define HAVE_DEV_PTMX 1
|
| 271 |
+
|
| 272 |
+
/* Define to 1 if you have the <direct.h> header file. */
|
| 273 |
+
/* #undef HAVE_DIRECT_H */
|
| 274 |
+
|
| 275 |
+
/* Define to 1 if the dirent structure has a d_type field */
|
| 276 |
+
#define HAVE_DIRENT_D_TYPE 1
|
| 277 |
+
|
| 278 |
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
| 279 |
+
*/
|
| 280 |
+
#define HAVE_DIRENT_H 1
|
| 281 |
+
|
| 282 |
+
/* Define if you have the 'dirfd' function or macro. */
|
| 283 |
+
#define HAVE_DIRFD 1
|
| 284 |
+
|
| 285 |
+
/* Define to 1 if you have the <dlfcn.h> header file. */
|
| 286 |
+
#define HAVE_DLFCN_H 1
|
| 287 |
+
|
| 288 |
+
/* Define to 1 if you have the `dlopen' function. */
|
| 289 |
+
#define HAVE_DLOPEN 1
|
| 290 |
+
|
| 291 |
+
/* Define to 1 if you have the `dup2' function. */
|
| 292 |
+
#define HAVE_DUP2 1
|
| 293 |
+
|
| 294 |
+
/* Define to 1 if you have the `dup3' function. */
|
| 295 |
+
#define HAVE_DUP3 1
|
| 296 |
+
|
| 297 |
+
/* Define if you have the '_dyld_shared_cache_contains_path' function. */
|
| 298 |
+
/* #undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH */
|
| 299 |
+
|
| 300 |
+
/* Defined when any dynamic module loading is enabled. */
|
| 301 |
+
#define HAVE_DYNAMIC_LOADING 1
|
| 302 |
+
|
| 303 |
+
/* Define to 1 if you have the <endian.h> header file. */
|
| 304 |
+
#define HAVE_ENDIAN_H 1
|
| 305 |
+
|
| 306 |
+
/* Define if you have the 'epoll' functions. */
|
| 307 |
+
#define HAVE_EPOLL 1
|
| 308 |
+
|
| 309 |
+
/* Define if you have the 'epoll_create1' function. */
|
| 310 |
+
#define HAVE_EPOLL_CREATE1 1
|
| 311 |
+
|
| 312 |
+
/* Define to 1 if you have the `erf' function. */
|
| 313 |
+
#define HAVE_ERF 1
|
| 314 |
+
|
| 315 |
+
/* Define to 1 if you have the `erfc' function. */
|
| 316 |
+
#define HAVE_ERFC 1
|
| 317 |
+
|
| 318 |
+
/* Define to 1 if you have the <errno.h> header file. */
|
| 319 |
+
#define HAVE_ERRNO_H 1
|
| 320 |
+
|
| 321 |
+
/* Define if you have the 'eventfd' function. */
|
| 322 |
+
#define HAVE_EVENTFD 1
|
| 323 |
+
|
| 324 |
+
/* Define to 1 if you have the `execv' function. */
|
| 325 |
+
#define HAVE_EXECV 1
|
| 326 |
+
|
| 327 |
+
/* Define to 1 if you have the `explicit_bzero' function. */
|
| 328 |
+
/* #undef HAVE_EXPLICIT_BZERO */
|
| 329 |
+
|
| 330 |
+
/* Define to 1 if you have the `explicit_memset' function. */
|
| 331 |
+
/* #undef HAVE_EXPLICIT_MEMSET */
|
| 332 |
+
|
| 333 |
+
/* Define to 1 if you have the `expm1' function. */
|
| 334 |
+
#define HAVE_EXPM1 1
|
| 335 |
+
|
| 336 |
+
/* Define to 1 if you have the `faccessat' function. */
|
| 337 |
+
#define HAVE_FACCESSAT 1
|
| 338 |
+
|
| 339 |
+
/* Define if you have the 'fchdir' function. */
|
| 340 |
+
#define HAVE_FCHDIR 1
|
| 341 |
+
|
| 342 |
+
/* Define to 1 if you have the `fchmod' function. */
|
| 343 |
+
#define HAVE_FCHMOD 1
|
| 344 |
+
|
| 345 |
+
/* Define to 1 if you have the `fchmodat' function. */
|
| 346 |
+
#define HAVE_FCHMODAT 1
|
| 347 |
+
|
| 348 |
+
/* Define to 1 if you have the `fchown' function. */
|
| 349 |
+
#define HAVE_FCHOWN 1
|
| 350 |
+
|
| 351 |
+
/* Define to 1 if you have the `fchownat' function. */
|
| 352 |
+
#define HAVE_FCHOWNAT 1
|
| 353 |
+
|
| 354 |
+
/* Define to 1 if you have the <fcntl.h> header file. */
|
| 355 |
+
#define HAVE_FCNTL_H 1
|
| 356 |
+
|
| 357 |
+
/* Define if you have the 'fdatasync' function. */
|
| 358 |
+
#define HAVE_FDATASYNC 1
|
| 359 |
+
|
| 360 |
+
/* Define to 1 if you have the `fdopendir' function. */
|
| 361 |
+
#define HAVE_FDOPENDIR 1
|
| 362 |
+
|
| 363 |
+
/* Define to 1 if you have the `fdwalk' function. */
|
| 364 |
+
/* #undef HAVE_FDWALK */
|
| 365 |
+
|
| 366 |
+
/* Define to 1 if you have the `fexecve' function. */
|
| 367 |
+
#define HAVE_FEXECVE 1
|
| 368 |
+
|
| 369 |
+
/* Define to 1 if you have the `finite' function. */
|
| 370 |
+
#define HAVE_FINITE 1
|
| 371 |
+
|
| 372 |
+
/* Define to 1 if you have the `flock' function. */
|
| 373 |
+
#define HAVE_FLOCK 1
|
| 374 |
+
|
| 375 |
+
/* Define to 1 if you have the `fork' function. */
|
| 376 |
+
#define HAVE_FORK 1
|
| 377 |
+
|
| 378 |
+
/* Define to 1 if you have the `forkpty' function. */
|
| 379 |
+
#define HAVE_FORKPTY 1
|
| 380 |
+
|
| 381 |
+
/* Define to 1 if you have the `fpathconf' function. */
|
| 382 |
+
#define HAVE_FPATHCONF 1
|
| 383 |
+
|
| 384 |
+
/* Define to 1 if you have the `fseek64' function. */
|
| 385 |
+
/* #undef HAVE_FSEEK64 */
|
| 386 |
+
|
| 387 |
+
/* Define to 1 if you have the `fseeko' function. */
|
| 388 |
+
#define HAVE_FSEEKO 1
|
| 389 |
+
|
| 390 |
+
/* Define to 1 if you have the `fstatat' function. */
|
| 391 |
+
#define HAVE_FSTATAT 1
|
| 392 |
+
|
| 393 |
+
/* Define to 1 if you have the `fstatvfs' function. */
|
| 394 |
+
#define HAVE_FSTATVFS 1
|
| 395 |
+
|
| 396 |
+
/* Define if you have the 'fsync' function. */
|
| 397 |
+
#define HAVE_FSYNC 1
|
| 398 |
+
|
| 399 |
+
/* Define to 1 if you have the `ftell64' function. */
|
| 400 |
+
/* #undef HAVE_FTELL64 */
|
| 401 |
+
|
| 402 |
+
/* Define to 1 if you have the `ftello' function. */
|
| 403 |
+
#define HAVE_FTELLO 1
|
| 404 |
+
|
| 405 |
+
/* Define to 1 if you have the `ftime' function. */
|
| 406 |
+
#define HAVE_FTIME 1
|
| 407 |
+
|
| 408 |
+
/* Define to 1 if you have the `ftruncate' function. */
|
| 409 |
+
#define HAVE_FTRUNCATE 1
|
| 410 |
+
|
| 411 |
+
/* Define to 1 if you have the `futimens' function. */
|
| 412 |
+
#define HAVE_FUTIMENS 1
|
| 413 |
+
|
| 414 |
+
/* Define to 1 if you have the `futimes' function. */
|
| 415 |
+
#define HAVE_FUTIMES 1
|
| 416 |
+
|
| 417 |
+
/* Define to 1 if you have the `futimesat' function. */
|
| 418 |
+
#define HAVE_FUTIMESAT 1
|
| 419 |
+
|
| 420 |
+
/* Define to 1 if you have the `gai_strerror' function. */
|
| 421 |
+
#define HAVE_GAI_STRERROR 1
|
| 422 |
+
|
| 423 |
+
/* Define to 1 if you have the `gamma' function. */
|
| 424 |
+
#define HAVE_GAMMA 1
|
| 425 |
+
|
| 426 |
+
/* Define if we can use gcc inline assembler to get and set mc68881 fpcr */
|
| 427 |
+
/* #undef HAVE_GCC_ASM_FOR_MC68881 */
|
| 428 |
+
|
| 429 |
+
/* Define if we can use x64 gcc inline assembler */
|
| 430 |
+
#define HAVE_GCC_ASM_FOR_X64 1
|
| 431 |
+
|
| 432 |
+
/* Define if we can use gcc inline assembler to get and set x87 control word
|
| 433 |
+
*/
|
| 434 |
+
#define HAVE_GCC_ASM_FOR_X87 1
|
| 435 |
+
|
| 436 |
+
/* Define if your compiler provides __uint128_t */
|
| 437 |
+
#define HAVE_GCC_UINT128_T 1
|
| 438 |
+
|
| 439 |
+
/* Define if you have the getaddrinfo function. */
|
| 440 |
+
#define HAVE_GETADDRINFO 1
|
| 441 |
+
|
| 442 |
+
/* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
|
| 443 |
+
#define HAVE_GETC_UNLOCKED 1
|
| 444 |
+
|
| 445 |
+
/* Define to 1 if you have the `getentropy' function. */
|
| 446 |
+
/* #undef HAVE_GETENTROPY */
|
| 447 |
+
|
| 448 |
+
/* Define to 1 if you have the `getgrgid_r' function. */
|
| 449 |
+
#define HAVE_GETGRGID_R 1
|
| 450 |
+
|
| 451 |
+
/* Define to 1 if you have the `getgrnam_r' function. */
|
| 452 |
+
#define HAVE_GETGRNAM_R 1
|
| 453 |
+
|
| 454 |
+
/* Define to 1 if you have the `getgrouplist' function. */
|
| 455 |
+
#define HAVE_GETGROUPLIST 1
|
| 456 |
+
|
| 457 |
+
/* Define to 1 if you have the `getgroups' function. */
|
| 458 |
+
#define HAVE_GETGROUPS 1
|
| 459 |
+
|
| 460 |
+
/* Define to 1 if you have the `gethostbyname' function. */
|
| 461 |
+
/* #undef HAVE_GETHOSTBYNAME */
|
| 462 |
+
|
| 463 |
+
/* Define this if you have some version of gethostbyname_r() */
|
| 464 |
+
#define HAVE_GETHOSTBYNAME_R 1
|
| 465 |
+
|
| 466 |
+
/* Define this if you have the 3-arg version of gethostbyname_r(). */
|
| 467 |
+
/* #undef HAVE_GETHOSTBYNAME_R_3_ARG */
|
| 468 |
+
|
| 469 |
+
/* Define this if you have the 5-arg version of gethostbyname_r(). */
|
| 470 |
+
/* #undef HAVE_GETHOSTBYNAME_R_5_ARG */
|
| 471 |
+
|
| 472 |
+
/* Define this if you have the 6-arg version of gethostbyname_r(). */
|
| 473 |
+
#define HAVE_GETHOSTBYNAME_R_6_ARG 1
|
| 474 |
+
|
| 475 |
+
/* Define to 1 if you have the `getitimer' function. */
|
| 476 |
+
#define HAVE_GETITIMER 1
|
| 477 |
+
|
| 478 |
+
/* Define to 1 if you have the `getloadavg' function. */
|
| 479 |
+
#define HAVE_GETLOADAVG 1
|
| 480 |
+
|
| 481 |
+
/* Define to 1 if you have the `getlogin' function. */
|
| 482 |
+
#define HAVE_GETLOGIN 1
|
| 483 |
+
|
| 484 |
+
/* Define to 1 if you have the `getnameinfo' function. */
|
| 485 |
+
#define HAVE_GETNAMEINFO 1
|
| 486 |
+
|
| 487 |
+
/* Define if you have the 'getpagesize' function. */
|
| 488 |
+
#define HAVE_GETPAGESIZE 1
|
| 489 |
+
|
| 490 |
+
/* Define to 1 if you have the `getpeername' function. */
|
| 491 |
+
#define HAVE_GETPEERNAME 1
|
| 492 |
+
|
| 493 |
+
/* Define to 1 if you have the `getpgid' function. */
|
| 494 |
+
#define HAVE_GETPGID 1
|
| 495 |
+
|
| 496 |
+
/* Define to 1 if you have the `getpgrp' function. */
|
| 497 |
+
#define HAVE_GETPGRP 1
|
| 498 |
+
|
| 499 |
+
/* Define to 1 if you have the `getpid' function. */
|
| 500 |
+
#define HAVE_GETPID 1
|
| 501 |
+
|
| 502 |
+
/* Define to 1 if you have the `getpriority' function. */
|
| 503 |
+
#define HAVE_GETPRIORITY 1
|
| 504 |
+
|
| 505 |
+
/* Define to 1 if you have the `getpwent' function. */
|
| 506 |
+
#define HAVE_GETPWENT 1
|
| 507 |
+
|
| 508 |
+
/* Define to 1 if you have the `getpwnam_r' function. */
|
| 509 |
+
#define HAVE_GETPWNAM_R 1
|
| 510 |
+
|
| 511 |
+
/* Define to 1 if you have the `getpwuid_r' function. */
|
| 512 |
+
#define HAVE_GETPWUID_R 1
|
| 513 |
+
|
| 514 |
+
/* Define to 1 if the getrandom() function is available */
|
| 515 |
+
/* #undef HAVE_GETRANDOM */
|
| 516 |
+
|
| 517 |
+
/* Define to 1 if the Linux getrandom() syscall is available */
|
| 518 |
+
#define HAVE_GETRANDOM_SYSCALL 1
|
| 519 |
+
|
| 520 |
+
/* Define to 1 if you have the `getresgid' function. */
|
| 521 |
+
#define HAVE_GETRESGID 1
|
| 522 |
+
|
| 523 |
+
/* Define to 1 if you have the `getresuid' function. */
|
| 524 |
+
#define HAVE_GETRESUID 1
|
| 525 |
+
|
| 526 |
+
/* Define to 1 if you have the `getsid' function. */
|
| 527 |
+
#define HAVE_GETSID 1
|
| 528 |
+
|
| 529 |
+
/* Define to 1 if you have the `getspent' function. */
|
| 530 |
+
#define HAVE_GETSPENT 1
|
| 531 |
+
|
| 532 |
+
/* Define to 1 if you have the `getspnam' function. */
|
| 533 |
+
#define HAVE_GETSPNAM 1
|
| 534 |
+
|
| 535 |
+
/* Define to 1 if you have the `getwd' function. */
|
| 536 |
+
#define HAVE_GETWD 1
|
| 537 |
+
|
| 538 |
+
/* Define if glibc has incorrect _FORTIFY_SOURCE wrappers for memmove and
|
| 539 |
+
bcopy. */
|
| 540 |
+
/* #undef HAVE_GLIBC_MEMMOVE_BUG */
|
| 541 |
+
|
| 542 |
+
/* Define to 1 if you have the <grp.h> header file. */
|
| 543 |
+
#define HAVE_GRP_H 1
|
| 544 |
+
|
| 545 |
+
/* Define if you have the 'hstrerror' function. */
|
| 546 |
+
#define HAVE_HSTRERROR 1
|
| 547 |
+
|
| 548 |
+
/* Define this if you have le64toh() */
|
| 549 |
+
#define HAVE_HTOLE64 1
|
| 550 |
+
|
| 551 |
+
/* Define to 1 if you have the `hypot' function. */
|
| 552 |
+
#define HAVE_HYPOT 1
|
| 553 |
+
|
| 554 |
+
/* Define to 1 if you have the <ieeefp.h> header file. */
|
| 555 |
+
/* #undef HAVE_IEEEFP_H */
|
| 556 |
+
|
| 557 |
+
/* Define to 1 if you have the `if_nameindex' function. */
|
| 558 |
+
#define HAVE_IF_NAMEINDEX 1
|
| 559 |
+
|
| 560 |
+
/* Define if you have the 'inet_aton' function. */
|
| 561 |
+
#define HAVE_INET_ATON 1
|
| 562 |
+
|
| 563 |
+
/* Define if you have the 'inet_pton' function. */
|
| 564 |
+
#define HAVE_INET_PTON 1
|
| 565 |
+
|
| 566 |
+
/* Define to 1 if you have the `initgroups' function. */
|
| 567 |
+
#define HAVE_INITGROUPS 1
|
| 568 |
+
|
| 569 |
+
/* Define to 1 if you have the <inttypes.h> header file. */
|
| 570 |
+
#define HAVE_INTTYPES_H 1
|
| 571 |
+
|
| 572 |
+
/* Define to 1 if you have the <io.h> header file. */
|
| 573 |
+
/* #undef HAVE_IO_H */
|
| 574 |
+
|
| 575 |
+
/* Define if gcc has the ipa-pure-const bug. */
|
| 576 |
+
/* #undef HAVE_IPA_PURE_CONST_BUG */
|
| 577 |
+
|
| 578 |
+
/* Define to 1 if you have the `kill' function. */
|
| 579 |
+
#define HAVE_KILL 1
|
| 580 |
+
|
| 581 |
+
/* Define to 1 if you have the `killpg' function. */
|
| 582 |
+
#define HAVE_KILLPG 1
|
| 583 |
+
|
| 584 |
+
/* Define if you have the 'kqueue' functions. */
|
| 585 |
+
/* #undef HAVE_KQUEUE */
|
| 586 |
+
|
| 587 |
+
/* Define to 1 if you have the <langinfo.h> header file. */
|
| 588 |
+
#define HAVE_LANGINFO_H 1
|
| 589 |
+
|
| 590 |
+
/* Defined to enable large file support when an off_t is bigger than a long
|
| 591 |
+
and long long is at least as big as an off_t. You may need to add some
|
| 592 |
+
flags for configuration and compilation to enable this mode. (For Solaris
|
| 593 |
+
and Linux, the necessary defines are already defined.) */
|
| 594 |
+
/* #undef HAVE_LARGEFILE_SUPPORT */
|
| 595 |
+
|
| 596 |
+
/* Define to 1 if you have the 'lchflags' function. */
|
| 597 |
+
/* #undef HAVE_LCHFLAGS */
|
| 598 |
+
|
| 599 |
+
/* Define to 1 if you have the `lchmod' function. */
|
| 600 |
+
/* #undef HAVE_LCHMOD */
|
| 601 |
+
|
| 602 |
+
/* Define to 1 if you have the `lchown' function. */
|
| 603 |
+
#define HAVE_LCHOWN 1
|
| 604 |
+
|
| 605 |
+
/* Define to 1 if you have the `lgamma' function. */
|
| 606 |
+
#define HAVE_LGAMMA 1
|
| 607 |
+
|
| 608 |
+
/* Define to 1 if you have the `dl' library (-ldl). */
|
| 609 |
+
#define HAVE_LIBDL 1
|
| 610 |
+
|
| 611 |
+
/* Define to 1 if you have the `dld' library (-ldld). */
|
| 612 |
+
/* #undef HAVE_LIBDLD */
|
| 613 |
+
|
| 614 |
+
/* Define to 1 if you have the `ieee' library (-lieee). */
|
| 615 |
+
/* #undef HAVE_LIBIEEE */
|
| 616 |
+
|
| 617 |
+
/* Define to 1 if you have the <libintl.h> header file. */
|
| 618 |
+
#define HAVE_LIBINTL_H 1
|
| 619 |
+
|
| 620 |
+
/* Define to build the readline module. */
|
| 621 |
+
#define HAVE_LIBREADLINE 1
|
| 622 |
+
|
| 623 |
+
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
| 624 |
+
/* #undef HAVE_LIBRESOLV */
|
| 625 |
+
|
| 626 |
+
/* Define to 1 if you have the `sendfile' library (-lsendfile). */
|
| 627 |
+
/* #undef HAVE_LIBSENDFILE */
|
| 628 |
+
|
| 629 |
+
/* Define to 1 if you have the <libutil.h> header file. */
|
| 630 |
+
/* #undef HAVE_LIBUTIL_H */
|
| 631 |
+
|
| 632 |
+
/* Define to 1 if you have the `uuid' library (-luuid). */
|
| 633 |
+
#define HAVE_LIBUUID 1
|
| 634 |
+
|
| 635 |
+
/* Define if you have the 'link' function. */
|
| 636 |
+
#define HAVE_LINK 1
|
| 637 |
+
|
| 638 |
+
/* Define to 1 if you have the `linkat' function. */
|
| 639 |
+
#define HAVE_LINKAT 1
|
| 640 |
+
|
| 641 |
+
/* Define to 1 if you have the <linux/auxvec.h> header file. */
|
| 642 |
+
#define HAVE_LINUX_AUXVEC_H 1
|
| 643 |
+
|
| 644 |
+
/* Define to 1 if you have the <linux/can/bcm.h> header file. */
|
| 645 |
+
#define HAVE_LINUX_CAN_BCM_H 1
|
| 646 |
+
|
| 647 |
+
/* Define to 1 if you have the <linux/can.h> header file. */
|
| 648 |
+
#define HAVE_LINUX_CAN_H 1
|
| 649 |
+
|
| 650 |
+
/* Define to 1 if you have the <linux/can/j1939.h> header file. */
|
| 651 |
+
/* #undef HAVE_LINUX_CAN_J1939_H */
|
| 652 |
+
|
| 653 |
+
/* Define if compiling using Linux 3.6 or later. */
|
| 654 |
+
#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1
|
| 655 |
+
|
| 656 |
+
/* Define to 1 if you have the <linux/can/raw.h> header file. */
|
| 657 |
+
#define HAVE_LINUX_CAN_RAW_H 1
|
| 658 |
+
|
| 659 |
+
/* Define if compiling using Linux 4.1 or later. */
|
| 660 |
+
#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1
|
| 661 |
+
|
| 662 |
+
/* Define to 1 if you have the <linux/memfd.h> header file. */
|
| 663 |
+
#define HAVE_LINUX_MEMFD_H 1
|
| 664 |
+
|
| 665 |
+
/* Define to 1 if you have the <linux/netlink.h> header file. */
|
| 666 |
+
#define HAVE_LINUX_NETLINK_H 1
|
| 667 |
+
|
| 668 |
+
/* Define to 1 if you have the <linux/qrtr.h> header file. */
|
| 669 |
+
/* #undef HAVE_LINUX_QRTR_H */
|
| 670 |
+
|
| 671 |
+
/* Define to 1 if you have the <linux/random.h> header file. */
|
| 672 |
+
#define HAVE_LINUX_RANDOM_H 1
|
| 673 |
+
|
| 674 |
+
/* Define to 1 if you have the <linux/tipc.h> header file. */
|
| 675 |
+
#define HAVE_LINUX_TIPC_H 1
|
| 676 |
+
|
| 677 |
+
/* Define to 1 if you have the <linux/vm_sockets.h> header file. */
|
| 678 |
+
#define HAVE_LINUX_VM_SOCKETS_H 1
|
| 679 |
+
|
| 680 |
+
/* Define to 1 if you have the <linux/wait.h> header file. */
|
| 681 |
+
#define HAVE_LINUX_WAIT_H 1
|
| 682 |
+
|
| 683 |
+
/* Define to 1 if you have the `lockf' function. */
|
| 684 |
+
#define HAVE_LOCKF 1
|
| 685 |
+
|
| 686 |
+
/* Define to 1 if you have the `log1p' function. */
|
| 687 |
+
#define HAVE_LOG1P 1
|
| 688 |
+
|
| 689 |
+
/* Define to 1 if you have the `log2' function. */
|
| 690 |
+
#define HAVE_LOG2 1
|
| 691 |
+
|
| 692 |
+
/* Define to 1 if the system has the type `long double'. */
|
| 693 |
+
#define HAVE_LONG_DOUBLE 1
|
| 694 |
+
|
| 695 |
+
/* Define to 1 if you have the `lstat' function. */
|
| 696 |
+
#define HAVE_LSTAT 1
|
| 697 |
+
|
| 698 |
+
/* Define to 1 if you have the `lutimes' function. */
|
| 699 |
+
#define HAVE_LUTIMES 1
|
| 700 |
+
|
| 701 |
+
/* Define to 1 if you have the `madvise' function. */
|
| 702 |
+
#define HAVE_MADVISE 1
|
| 703 |
+
|
| 704 |
+
/* Define this if you have the makedev macro. */
|
| 705 |
+
#define HAVE_MAKEDEV 1
|
| 706 |
+
|
| 707 |
+
/* Define to 1 if you have the `mbrtowc' function. */
|
| 708 |
+
#define HAVE_MBRTOWC 1
|
| 709 |
+
|
| 710 |
+
/* Define if you have the 'memfd_create' function. */
|
| 711 |
+
/* #undef HAVE_MEMFD_CREATE */
|
| 712 |
+
|
| 713 |
+
/* Define to 1 if you have the <memory.h> header file. */
|
| 714 |
+
#define HAVE_MEMORY_H 1
|
| 715 |
+
|
| 716 |
+
/* Define to 1 if you have the `memrchr' function. */
|
| 717 |
+
#define HAVE_MEMRCHR 1
|
| 718 |
+
|
| 719 |
+
/* Define to 1 if you have the `mkdirat' function. */
|
| 720 |
+
#define HAVE_MKDIRAT 1
|
| 721 |
+
|
| 722 |
+
/* Define to 1 if you have the `mkfifo' function. */
|
| 723 |
+
#define HAVE_MKFIFO 1
|
| 724 |
+
|
| 725 |
+
/* Define to 1 if you have the `mkfifoat' function. */
|
| 726 |
+
#define HAVE_MKFIFOAT 1
|
| 727 |
+
|
| 728 |
+
/* Define to 1 if you have the `mknod' function. */
|
| 729 |
+
#define HAVE_MKNOD 1
|
| 730 |
+
|
| 731 |
+
/* Define to 1 if you have the `mknodat' function. */
|
| 732 |
+
#define HAVE_MKNODAT 1
|
| 733 |
+
|
| 734 |
+
/* Define to 1 if you have the `mktime' function. */
|
| 735 |
+
#define HAVE_MKTIME 1
|
| 736 |
+
|
| 737 |
+
/* Define to 1 if you have the `mmap' function. */
|
| 738 |
+
#define HAVE_MMAP 1
|
| 739 |
+
|
| 740 |
+
/* Define to 1 if you have the `mremap' function. */
|
| 741 |
+
#define HAVE_MREMAP 1
|
| 742 |
+
|
| 743 |
+
/* Define to 1 if you have the <ncurses.h> header file. */
|
| 744 |
+
#define HAVE_NCURSES_H 1
|
| 745 |
+
|
| 746 |
+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
| 747 |
+
/* #undef HAVE_NDIR_H */
|
| 748 |
+
|
| 749 |
+
/* Define to 1 if you have the <netpacket/packet.h> header file. */
|
| 750 |
+
#define HAVE_NETPACKET_PACKET_H 1
|
| 751 |
+
|
| 752 |
+
/* Define to 1 if you have the <net/if.h> header file. */
|
| 753 |
+
#define HAVE_NET_IF_H 1
|
| 754 |
+
|
| 755 |
+
/* Define to 1 if you have the `nice' function. */
|
| 756 |
+
#define HAVE_NICE 1
|
| 757 |
+
|
| 758 |
+
/* Define if the internal form of wchar_t in non-Unicode locales is not
|
| 759 |
+
Unicode. */
|
| 760 |
+
/* #undef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION */
|
| 761 |
+
|
| 762 |
+
/* Define to 1 if you have the `openat' function. */
|
| 763 |
+
#define HAVE_OPENAT 1
|
| 764 |
+
|
| 765 |
+
/* Define to 1 if you have the `openpty' function. */
|
| 766 |
+
#define HAVE_OPENPTY 1
|
| 767 |
+
|
| 768 |
+
/* Define to 1 if you have the `pathconf' function. */
|
| 769 |
+
#define HAVE_PATHCONF 1
|
| 770 |
+
|
| 771 |
+
/* Define to 1 if you have the `pause' function. */
|
| 772 |
+
#define HAVE_PAUSE 1
|
| 773 |
+
|
| 774 |
+
/* Define to 1 if you have the `pipe2' function. */
|
| 775 |
+
#define HAVE_PIPE2 1
|
| 776 |
+
|
| 777 |
+
/* Define to 1 if you have the `plock' function. */
|
| 778 |
+
/* #undef HAVE_PLOCK */
|
| 779 |
+
|
| 780 |
+
/* Define to 1 if you have the `poll' function. */
|
| 781 |
+
#define HAVE_POLL 1
|
| 782 |
+
|
| 783 |
+
/* Define to 1 if you have the <poll.h> header file. */
|
| 784 |
+
#define HAVE_POLL_H 1
|
| 785 |
+
|
| 786 |
+
/* Define to 1 if you have the `posix_fadvise' function. */
|
| 787 |
+
#define HAVE_POSIX_FADVISE 1
|
| 788 |
+
|
| 789 |
+
/* Define to 1 if you have the `posix_fallocate' function. */
|
| 790 |
+
#define HAVE_POSIX_FALLOCATE 1
|
| 791 |
+
|
| 792 |
+
/* Define to 1 if you have the `posix_spawn' function. */
|
| 793 |
+
#define HAVE_POSIX_SPAWN 1
|
| 794 |
+
|
| 795 |
+
/* Define to 1 if you have the `posix_spawnp' function. */
|
| 796 |
+
#define HAVE_POSIX_SPAWNP 1
|
| 797 |
+
|
| 798 |
+
/* Define to 1 if you have the `pread' function. */
|
| 799 |
+
#define HAVE_PREAD 1
|
| 800 |
+
|
| 801 |
+
/* Define to 1 if you have the `preadv' function. */
|
| 802 |
+
#define HAVE_PREADV 1
|
| 803 |
+
|
| 804 |
+
/* Define to 1 if you have the `preadv2' function. */
|
| 805 |
+
/* #undef HAVE_PREADV2 */
|
| 806 |
+
|
| 807 |
+
/* Define if you have the 'prlimit' functions. */
|
| 808 |
+
#define HAVE_PRLIMIT 1
|
| 809 |
+
|
| 810 |
+
/* Define to 1 if you have the <process.h> header file. */
|
| 811 |
+
/* #undef HAVE_PROCESS_H */
|
| 812 |
+
|
| 813 |
+
/* Define if your compiler supports function prototype */
|
| 814 |
+
#define HAVE_PROTOTYPES 1
|
| 815 |
+
|
| 816 |
+
/* Define to 1 if you have the `pthread_condattr_setclock' function. */
|
| 817 |
+
#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
|
| 818 |
+
|
| 819 |
+
/* Defined for Solaris 2.6 bug in pthread header. */
|
| 820 |
+
/* #undef HAVE_PTHREAD_DESTRUCTOR */
|
| 821 |
+
|
| 822 |
+
/* Define to 1 if you have the `pthread_getcpuclockid' function. */
|
| 823 |
+
#define HAVE_PTHREAD_GETCPUCLOCKID 1
|
| 824 |
+
|
| 825 |
+
/* Define to 1 if you have the <pthread.h> header file. */
|
| 826 |
+
#define HAVE_PTHREAD_H 1
|
| 827 |
+
|
| 828 |
+
/* Define to 1 if you have the `pthread_init' function. */
|
| 829 |
+
/* #undef HAVE_PTHREAD_INIT */
|
| 830 |
+
|
| 831 |
+
/* Define to 1 if you have the `pthread_kill' function. */
|
| 832 |
+
#define HAVE_PTHREAD_KILL 1
|
| 833 |
+
|
| 834 |
+
/* Define to 1 if you have the `pthread_sigmask' function. */
|
| 835 |
+
#define HAVE_PTHREAD_SIGMASK 1
|
| 836 |
+
|
| 837 |
+
/* Define to 1 if you have the <pty.h> header file. */
|
| 838 |
+
#define HAVE_PTY_H 1
|
| 839 |
+
|
| 840 |
+
/* Define to 1 if you have the `pwrite' function. */
|
| 841 |
+
#define HAVE_PWRITE 1
|
| 842 |
+
|
| 843 |
+
/* Define to 1 if you have the `pwritev' function. */
|
| 844 |
+
#define HAVE_PWRITEV 1
|
| 845 |
+
|
| 846 |
+
/* Define to 1 if you have the `pwritev2' function. */
|
| 847 |
+
/* #undef HAVE_PWRITEV2 */
|
| 848 |
+
|
| 849 |
+
/* Define to 1 if you have the `readlink' function. */
|
| 850 |
+
#define HAVE_READLINK 1
|
| 851 |
+
|
| 852 |
+
/* Define to 1 if you have the `readlinkat' function. */
|
| 853 |
+
#define HAVE_READLINKAT 1
|
| 854 |
+
|
| 855 |
+
/* Define to 1 if you have the `readv' function. */
|
| 856 |
+
#define HAVE_READV 1
|
| 857 |
+
|
| 858 |
+
/* Define to 1 if you have the `realpath' function. */
|
| 859 |
+
#define HAVE_REALPATH 1
|
| 860 |
+
|
| 861 |
+
/* Define to 1 if you have the `renameat' function. */
|
| 862 |
+
#define HAVE_RENAMEAT 1
|
| 863 |
+
|
| 864 |
+
/* Define if readline supports append_history */
|
| 865 |
+
#define HAVE_RL_APPEND_HISTORY 1
|
| 866 |
+
|
| 867 |
+
/* Define if you can turn off readline's signal handling. */
|
| 868 |
+
#define HAVE_RL_CATCH_SIGNAL 1
|
| 869 |
+
|
| 870 |
+
/* Define if you have readline 2.2 */
|
| 871 |
+
#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
|
| 872 |
+
|
| 873 |
+
/* Define if you have readline 4.0 */
|
| 874 |
+
#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
|
| 875 |
+
|
| 876 |
+
/* Define if you have readline 4.2 */
|
| 877 |
+
#define HAVE_RL_COMPLETION_MATCHES 1
|
| 878 |
+
|
| 879 |
+
/* Define if you have rl_completion_suppress_append */
|
| 880 |
+
#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
|
| 881 |
+
|
| 882 |
+
/* Define if you have readline 4.0 */
|
| 883 |
+
#define HAVE_RL_PRE_INPUT_HOOK 1
|
| 884 |
+
|
| 885 |
+
/* Define if you have readline 4.0 */
|
| 886 |
+
#define HAVE_RL_RESIZE_TERMINAL 1
|
| 887 |
+
|
| 888 |
+
/* Define to 1 if you have the `round' function. */
|
| 889 |
+
#define HAVE_ROUND 1
|
| 890 |
+
|
| 891 |
+
/* Define to 1 if you have the `rtpSpawn' function. */
|
| 892 |
+
/* #undef HAVE_RTPSPAWN */
|
| 893 |
+
|
| 894 |
+
/* Define to 1 if you have the `sched_get_priority_max' function. */
|
| 895 |
+
#define HAVE_SCHED_GET_PRIORITY_MAX 1
|
| 896 |
+
|
| 897 |
+
/* Define to 1 if you have the <sched.h> header file. */
|
| 898 |
+
#define HAVE_SCHED_H 1
|
| 899 |
+
|
| 900 |
+
/* Define to 1 if you have the `sched_rr_get_interval' function. */
|
| 901 |
+
#define HAVE_SCHED_RR_GET_INTERVAL 1
|
| 902 |
+
|
| 903 |
+
/* Define to 1 if you have the `sched_setaffinity' function. */
|
| 904 |
+
#define HAVE_SCHED_SETAFFINITY 1
|
| 905 |
+
|
| 906 |
+
/* Define to 1 if you have the `sched_setparam' function. */
|
| 907 |
+
#define HAVE_SCHED_SETPARAM 1
|
| 908 |
+
|
| 909 |
+
/* Define to 1 if you have the `sched_setscheduler' function. */
|
| 910 |
+
#define HAVE_SCHED_SETSCHEDULER 1
|
| 911 |
+
|
| 912 |
+
/* Define to 1 if you have the `sem_clockwait' function. */
|
| 913 |
+
/* #undef HAVE_SEM_CLOCKWAIT */
|
| 914 |
+
|
| 915 |
+
/* Define to 1 if you have the `sem_getvalue' function. */
|
| 916 |
+
#define HAVE_SEM_GETVALUE 1
|
| 917 |
+
|
| 918 |
+
/* Define to 1 if you have the `sem_open' function. */
|
| 919 |
+
#define HAVE_SEM_OPEN 1
|
| 920 |
+
|
| 921 |
+
/* Define to 1 if you have the `sem_timedwait' function. */
|
| 922 |
+
#define HAVE_SEM_TIMEDWAIT 1
|
| 923 |
+
|
| 924 |
+
/* Define to 1 if you have the `sem_unlink' function. */
|
| 925 |
+
#define HAVE_SEM_UNLINK 1
|
| 926 |
+
|
| 927 |
+
/* Define to 1 if you have the `sendfile' function. */
|
| 928 |
+
#define HAVE_SENDFILE 1
|
| 929 |
+
|
| 930 |
+
/* Define to 1 if you have the `setegid' function. */
|
| 931 |
+
#define HAVE_SETEGID 1
|
| 932 |
+
|
| 933 |
+
/* Define to 1 if you have the `seteuid' function. */
|
| 934 |
+
#define HAVE_SETEUID 1
|
| 935 |
+
|
| 936 |
+
/* Define to 1 if you have the `setgid' function. */
|
| 937 |
+
#define HAVE_SETGID 1
|
| 938 |
+
|
| 939 |
+
/* Define if you have the 'setgroups' function. */
|
| 940 |
+
#define HAVE_SETGROUPS 1
|
| 941 |
+
|
| 942 |
+
/* Define to 1 if you have the `sethostname' function. */
|
| 943 |
+
#define HAVE_SETHOSTNAME 1
|
| 944 |
+
|
| 945 |
+
/* Define to 1 if you have the `setitimer' function. */
|
| 946 |
+
#define HAVE_SETITIMER 1
|
| 947 |
+
|
| 948 |
+
/* Define to 1 if you have the `setlocale' function. */
|
| 949 |
+
#define HAVE_SETLOCALE 1
|
| 950 |
+
|
| 951 |
+
/* Define to 1 if you have the `setpgid' function. */
|
| 952 |
+
#define HAVE_SETPGID 1
|
| 953 |
+
|
| 954 |
+
/* Define to 1 if you have the `setpgrp' function. */
|
| 955 |
+
#define HAVE_SETPGRP 1
|
| 956 |
+
|
| 957 |
+
/* Define to 1 if you have the `setpriority' function. */
|
| 958 |
+
#define HAVE_SETPRIORITY 1
|
| 959 |
+
|
| 960 |
+
/* Define to 1 if you have the `setregid' function. */
|
| 961 |
+
#define HAVE_SETREGID 1
|
| 962 |
+
|
| 963 |
+
/* Define to 1 if you have the `setresgid' function. */
|
| 964 |
+
#define HAVE_SETRESGID 1
|
| 965 |
+
|
| 966 |
+
/* Define to 1 if you have the `setresuid' function. */
|
| 967 |
+
#define HAVE_SETRESUID 1
|
| 968 |
+
|
| 969 |
+
/* Define to 1 if you have the `setreuid' function. */
|
| 970 |
+
#define HAVE_SETREUID 1
|
| 971 |
+
|
| 972 |
+
/* Define to 1 if you have the `setsid' function. */
|
| 973 |
+
#define HAVE_SETSID 1
|
| 974 |
+
|
| 975 |
+
/* Define to 1 if you have the `setuid' function. */
|
| 976 |
+
#define HAVE_SETUID 1
|
| 977 |
+
|
| 978 |
+
/* Define to 1 if you have the `setvbuf' function. */
|
| 979 |
+
#define HAVE_SETVBUF 1
|
| 980 |
+
|
| 981 |
+
/* Define to 1 if you have the <shadow.h> header file. */
|
| 982 |
+
#define HAVE_SHADOW_H 1
|
| 983 |
+
|
| 984 |
+
/* Define to 1 if you have the `shm_open' function. */
|
| 985 |
+
#define HAVE_SHM_OPEN 1
|
| 986 |
+
|
| 987 |
+
/* Define to 1 if you have the `shm_unlink' function. */
|
| 988 |
+
#define HAVE_SHM_UNLINK 1
|
| 989 |
+
|
| 990 |
+
/* Define to 1 if you have the `sigaction' function. */
|
| 991 |
+
#define HAVE_SIGACTION 1
|
| 992 |
+
|
| 993 |
+
/* Define to 1 if you have the `sigaltstack' function. */
|
| 994 |
+
#define HAVE_SIGALTSTACK 1
|
| 995 |
+
|
| 996 |
+
/* Define to 1 if you have the `sigfillset' function. */
|
| 997 |
+
#define HAVE_SIGFILLSET 1
|
| 998 |
+
|
| 999 |
+
/* Define to 1 if `si_band' is a member of `siginfo_t'. */
|
| 1000 |
+
#define HAVE_SIGINFO_T_SI_BAND 1
|
| 1001 |
+
|
| 1002 |
+
/* Define to 1 if you have the `siginterrupt' function. */
|
| 1003 |
+
#define HAVE_SIGINTERRUPT 1
|
| 1004 |
+
|
| 1005 |
+
/* Define to 1 if you have the <signal.h> header file. */
|
| 1006 |
+
#define HAVE_SIGNAL_H 1
|
| 1007 |
+
|
| 1008 |
+
/* Define to 1 if you have the `sigpending' function. */
|
| 1009 |
+
#define HAVE_SIGPENDING 1
|
| 1010 |
+
|
| 1011 |
+
/* Define to 1 if you have the `sigrelse' function. */
|
| 1012 |
+
#define HAVE_SIGRELSE 1
|
| 1013 |
+
|
| 1014 |
+
/* Define to 1 if you have the `sigtimedwait' function. */
|
| 1015 |
+
#define HAVE_SIGTIMEDWAIT 1
|
| 1016 |
+
|
| 1017 |
+
/* Define to 1 if you have the `sigwait' function. */
|
| 1018 |
+
#define HAVE_SIGWAIT 1
|
| 1019 |
+
|
| 1020 |
+
/* Define to 1 if you have the `sigwaitinfo' function. */
|
| 1021 |
+
#define HAVE_SIGWAITINFO 1
|
| 1022 |
+
|
| 1023 |
+
/* Define to 1 if you have the `snprintf' function. */
|
| 1024 |
+
#define HAVE_SNPRINTF 1
|
| 1025 |
+
|
| 1026 |
+
/* struct sockaddr_alg (linux/if_alg.h) */
|
| 1027 |
+
#define HAVE_SOCKADDR_ALG 1
|
| 1028 |
+
|
| 1029 |
+
/* Define if sockaddr has sa_len member */
|
| 1030 |
+
/* #undef HAVE_SOCKADDR_SA_LEN */
|
| 1031 |
+
|
| 1032 |
+
/* struct sockaddr_storage (sys/socket.h) */
|
| 1033 |
+
#define HAVE_SOCKADDR_STORAGE 1
|
| 1034 |
+
|
| 1035 |
+
/* Define if you have the 'socketpair' function. */
|
| 1036 |
+
#define HAVE_SOCKETPAIR 1
|
| 1037 |
+
|
| 1038 |
+
/* Define to 1 if you have the <spawn.h> header file. */
|
| 1039 |
+
#define HAVE_SPAWN_H 1
|
| 1040 |
+
|
| 1041 |
+
/* Define to 1 if you have the `splice' function. */
|
| 1042 |
+
#define HAVE_SPLICE 1
|
| 1043 |
+
|
| 1044 |
+
/* Define if your compiler provides ssize_t */
|
| 1045 |
+
#define HAVE_SSIZE_T 1
|
| 1046 |
+
|
| 1047 |
+
/* Define to 1 if you have the `statvfs' function. */
|
| 1048 |
+
#define HAVE_STATVFS 1
|
| 1049 |
+
|
| 1050 |
+
/* Define if you have struct stat.st_mtim.tv_nsec */
|
| 1051 |
+
#define HAVE_STAT_TV_NSEC 1
|
| 1052 |
+
|
| 1053 |
+
/* Define if you have struct stat.st_mtimensec */
|
| 1054 |
+
/* #undef HAVE_STAT_TV_NSEC2 */
|
| 1055 |
+
|
| 1056 |
+
/* Define if your compiler supports variable length function prototypes (e.g.
|
| 1057 |
+
void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
|
| 1058 |
+
#define HAVE_STDARG_PROTOTYPES 1
|
| 1059 |
+
|
| 1060 |
+
/* Define to 1 if you have the <stdint.h> header file. */
|
| 1061 |
+
#define HAVE_STDINT_H 1
|
| 1062 |
+
|
| 1063 |
+
/* Define to 1 if you have the <stdlib.h> header file. */
|
| 1064 |
+
#define HAVE_STDLIB_H 1
|
| 1065 |
+
|
| 1066 |
+
/* Has stdatomic.h with atomic_int and atomic_uintptr_t */
|
| 1067 |
+
#define HAVE_STD_ATOMIC 1
|
| 1068 |
+
|
| 1069 |
+
/* Define to 1 if you have the `strftime' function. */
|
| 1070 |
+
#define HAVE_STRFTIME 1
|
| 1071 |
+
|
| 1072 |
+
/* Define to 1 if you have the <strings.h> header file. */
|
| 1073 |
+
#define HAVE_STRINGS_H 1
|
| 1074 |
+
|
| 1075 |
+
/* Define to 1 if you have the <string.h> header file. */
|
| 1076 |
+
#define HAVE_STRING_H 1
|
| 1077 |
+
|
| 1078 |
+
/* Define to 1 if you have the `strlcpy' function. */
|
| 1079 |
+
/* #undef HAVE_STRLCPY */
|
| 1080 |
+
|
| 1081 |
+
/* Define to 1 if you have the <stropts.h> header file. */
|
| 1082 |
+
/* #undef HAVE_STROPTS_H */
|
| 1083 |
+
|
| 1084 |
+
/* Define to 1 if you have the `strsignal' function. */
|
| 1085 |
+
#define HAVE_STRSIGNAL 1
|
| 1086 |
+
|
| 1087 |
+
/* Define to 1 if `pw_gecos' is a member of `struct passwd'. */
|
| 1088 |
+
#define HAVE_STRUCT_PASSWD_PW_GECOS 1
|
| 1089 |
+
|
| 1090 |
+
/* Define to 1 if `pw_passwd' is a member of `struct passwd'. */
|
| 1091 |
+
#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
|
| 1092 |
+
|
| 1093 |
+
/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
|
| 1094 |
+
/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIME */
|
| 1095 |
+
|
| 1096 |
+
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
|
| 1097 |
+
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
|
| 1098 |
+
|
| 1099 |
+
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
|
| 1100 |
+
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
|
| 1101 |
+
|
| 1102 |
+
/* Define to 1 if `st_flags' is a member of `struct stat'. */
|
| 1103 |
+
/* #undef HAVE_STRUCT_STAT_ST_FLAGS */
|
| 1104 |
+
|
| 1105 |
+
/* Define to 1 if `st_gen' is a member of `struct stat'. */
|
| 1106 |
+
/* #undef HAVE_STRUCT_STAT_ST_GEN */
|
| 1107 |
+
|
| 1108 |
+
/* Define to 1 if `st_rdev' is a member of `struct stat'. */
|
| 1109 |
+
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
| 1110 |
+
|
| 1111 |
+
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
|
| 1112 |
+
#define HAVE_STRUCT_TM_TM_ZONE 1
|
| 1113 |
+
|
| 1114 |
+
/* Define if you have the 'symlink' function. */
|
| 1115 |
+
#define HAVE_SYMLINK 1
|
| 1116 |
+
|
| 1117 |
+
/* Define to 1 if you have the `symlinkat' function. */
|
| 1118 |
+
#define HAVE_SYMLINKAT 1
|
| 1119 |
+
|
| 1120 |
+
/* Define to 1 if you have the `sync' function. */
|
| 1121 |
+
#define HAVE_SYNC 1
|
| 1122 |
+
|
| 1123 |
+
/* Define to 1 if you have the `sysconf' function. */
|
| 1124 |
+
#define HAVE_SYSCONF 1
|
| 1125 |
+
|
| 1126 |
+
/* Define to 1 if you have the <sysexits.h> header file. */
|
| 1127 |
+
#define HAVE_SYSEXITS_H 1
|
| 1128 |
+
|
| 1129 |
+
/* Define to 1 if you have the <sys/audioio.h> header file. */
|
| 1130 |
+
/* #undef HAVE_SYS_AUDIOIO_H */
|
| 1131 |
+
|
| 1132 |
+
/* Define to 1 if you have the <sys/auxv.h> header file. */
|
| 1133 |
+
#define HAVE_SYS_AUXV_H 1
|
| 1134 |
+
|
| 1135 |
+
/* Define to 1 if you have the <sys/bsdtty.h> header file. */
|
| 1136 |
+
/* #undef HAVE_SYS_BSDTTY_H */
|
| 1137 |
+
|
| 1138 |
+
/* Define to 1 if you have the <sys/devpoll.h> header file. */
|
| 1139 |
+
/* #undef HAVE_SYS_DEVPOLL_H */
|
| 1140 |
+
|
| 1141 |
+
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
| 1142 |
+
*/
|
| 1143 |
+
/* #undef HAVE_SYS_DIR_H */
|
| 1144 |
+
|
| 1145 |
+
/* Define to 1 if you have the <sys/endian.h> header file. */
|
| 1146 |
+
/* #undef HAVE_SYS_ENDIAN_H */
|
| 1147 |
+
|
| 1148 |
+
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
| 1149 |
+
#define HAVE_SYS_EPOLL_H 1
|
| 1150 |
+
|
| 1151 |
+
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
| 1152 |
+
#define HAVE_SYS_EVENTFD_H 1
|
| 1153 |
+
|
| 1154 |
+
/* Define to 1 if you have the <sys/event.h> header file. */
|
| 1155 |
+
/* #undef HAVE_SYS_EVENT_H */
|
| 1156 |
+
|
| 1157 |
+
/* Define to 1 if you have the <sys/file.h> header file. */
|
| 1158 |
+
#define HAVE_SYS_FILE_H 1
|
| 1159 |
+
|
| 1160 |
+
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
| 1161 |
+
#define HAVE_SYS_IOCTL_H 1
|
| 1162 |
+
|
| 1163 |
+
/* Define to 1 if you have the <sys/kern_control.h> header file. */
|
| 1164 |
+
/* #undef HAVE_SYS_KERN_CONTROL_H */
|
| 1165 |
+
|
| 1166 |
+
/* Define to 1 if you have the <sys/loadavg.h> header file. */
|
| 1167 |
+
/* #undef HAVE_SYS_LOADAVG_H */
|
| 1168 |
+
|
| 1169 |
+
/* Define to 1 if you have the <sys/lock.h> header file. */
|
| 1170 |
+
/* #undef HAVE_SYS_LOCK_H */
|
| 1171 |
+
|
| 1172 |
+
/* Define to 1 if you have the <sys/memfd.h> header file. */
|
| 1173 |
+
/* #undef HAVE_SYS_MEMFD_H */
|
| 1174 |
+
|
| 1175 |
+
/* Define to 1 if you have the <sys/mkdev.h> header file. */
|
| 1176 |
+
/* #undef HAVE_SYS_MKDEV_H */
|
| 1177 |
+
|
| 1178 |
+
/* Define to 1 if you have the <sys/mman.h> header file. */
|
| 1179 |
+
#define HAVE_SYS_MMAN_H 1
|
| 1180 |
+
|
| 1181 |
+
/* Define to 1 if you have the <sys/modem.h> header file. */
|
| 1182 |
+
/* #undef HAVE_SYS_MODEM_H */
|
| 1183 |
+
|
| 1184 |
+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
| 1185 |
+
*/
|
| 1186 |
+
/* #undef HAVE_SYS_NDIR_H */
|
| 1187 |
+
|
| 1188 |
+
/* Define to 1 if you have the <sys/param.h> header file. */
|
| 1189 |
+
#define HAVE_SYS_PARAM_H 1
|
| 1190 |
+
|
| 1191 |
+
/* Define to 1 if you have the <sys/poll.h> header file. */
|
| 1192 |
+
#define HAVE_SYS_POLL_H 1
|
| 1193 |
+
|
| 1194 |
+
/* Define to 1 if you have the <sys/random.h> header file. */
|
| 1195 |
+
/* #undef HAVE_SYS_RANDOM_H */
|
| 1196 |
+
|
| 1197 |
+
/* Define to 1 if you have the <sys/resource.h> header file. */
|
| 1198 |
+
#define HAVE_SYS_RESOURCE_H 1
|
| 1199 |
+
|
| 1200 |
+
/* Define to 1 if you have the <sys/select.h> header file. */
|
| 1201 |
+
#define HAVE_SYS_SELECT_H 1
|
| 1202 |
+
|
| 1203 |
+
/* Define to 1 if you have the <sys/sendfile.h> header file. */
|
| 1204 |
+
#define HAVE_SYS_SENDFILE_H 1
|
| 1205 |
+
|
| 1206 |
+
/* Define to 1 if you have the <sys/socket.h> header file. */
|
| 1207 |
+
#define HAVE_SYS_SOCKET_H 1
|
| 1208 |
+
|
| 1209 |
+
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
| 1210 |
+
#define HAVE_SYS_STATVFS_H 1
|
| 1211 |
+
|
| 1212 |
+
/* Define to 1 if you have the <sys/stat.h> header file. */
|
| 1213 |
+
#define HAVE_SYS_STAT_H 1
|
| 1214 |
+
|
| 1215 |
+
/* Define to 1 if you have the <sys/syscall.h> header file. */
|
| 1216 |
+
#define HAVE_SYS_SYSCALL_H 1
|
| 1217 |
+
|
| 1218 |
+
/* Define to 1 if you have the <sys/sysmacros.h> header file. */
|
| 1219 |
+
#define HAVE_SYS_SYSMACROS_H 1
|
| 1220 |
+
|
| 1221 |
+
/* Define to 1 if you have the <sys/sys_domain.h> header file. */
|
| 1222 |
+
/* #undef HAVE_SYS_SYS_DOMAIN_H */
|
| 1223 |
+
|
| 1224 |
+
/* Define to 1 if you have the <sys/termio.h> header file. */
|
| 1225 |
+
/* #undef HAVE_SYS_TERMIO_H */
|
| 1226 |
+
|
| 1227 |
+
/* Define to 1 if you have the <sys/times.h> header file. */
|
| 1228 |
+
#define HAVE_SYS_TIMES_H 1
|
| 1229 |
+
|
| 1230 |
+
/* Define to 1 if you have the <sys/time.h> header file. */
|
| 1231 |
+
#define HAVE_SYS_TIME_H 1
|
| 1232 |
+
|
| 1233 |
+
/* Define to 1 if you have the <sys/types.h> header file. */
|
| 1234 |
+
#define HAVE_SYS_TYPES_H 1
|
| 1235 |
+
|
| 1236 |
+
/* Define to 1 if you have the <sys/uio.h> header file. */
|
| 1237 |
+
#define HAVE_SYS_UIO_H 1
|
| 1238 |
+
|
| 1239 |
+
/* Define to 1 if you have the <sys/un.h> header file. */
|
| 1240 |
+
#define HAVE_SYS_UN_H 1
|
| 1241 |
+
|
| 1242 |
+
/* Define to 1 if you have the <sys/utsname.h> header file. */
|
| 1243 |
+
#define HAVE_SYS_UTSNAME_H 1
|
| 1244 |
+
|
| 1245 |
+
/* Define to 1 if you have the <sys/wait.h> header file. */
|
| 1246 |
+
#define HAVE_SYS_WAIT_H 1
|
| 1247 |
+
|
| 1248 |
+
/* Define to 1 if you have the <sys/xattr.h> header file. */
|
| 1249 |
+
#define HAVE_SYS_XATTR_H 1
|
| 1250 |
+
|
| 1251 |
+
/* Define to 1 if you have the `tcgetpgrp' function. */
|
| 1252 |
+
#define HAVE_TCGETPGRP 1
|
| 1253 |
+
|
| 1254 |
+
/* Define to 1 if you have the `tcsetpgrp' function. */
|
| 1255 |
+
#define HAVE_TCSETPGRP 1
|
| 1256 |
+
|
| 1257 |
+
/* Define to 1 if you have the `tempnam' function. */
|
| 1258 |
+
#define HAVE_TEMPNAM 1
|
| 1259 |
+
|
| 1260 |
+
/* Define to 1 if you have the <termios.h> header file. */
|
| 1261 |
+
#define HAVE_TERMIOS_H 1
|
| 1262 |
+
|
| 1263 |
+
/* Define to 1 if you have the <term.h> header file. */
|
| 1264 |
+
#define HAVE_TERM_H 1
|
| 1265 |
+
|
| 1266 |
+
/* Define to 1 if you have the `tgamma' function. */
|
| 1267 |
+
#define HAVE_TGAMMA 1
|
| 1268 |
+
|
| 1269 |
+
/* Define to 1 if you have the `timegm' function. */
|
| 1270 |
+
#define HAVE_TIMEGM 1
|
| 1271 |
+
|
| 1272 |
+
/* Define to 1 if you have the `times' function. */
|
| 1273 |
+
#define HAVE_TIMES 1
|
| 1274 |
+
|
| 1275 |
+
/* Define to 1 if you have the `tmpfile' function. */
|
| 1276 |
+
#define HAVE_TMPFILE 1
|
| 1277 |
+
|
| 1278 |
+
/* Define to 1 if you have the `tmpnam' function. */
|
| 1279 |
+
#define HAVE_TMPNAM 1
|
| 1280 |
+
|
| 1281 |
+
/* Define to 1 if you have the `tmpnam_r' function. */
|
| 1282 |
+
#define HAVE_TMPNAM_R 1
|
| 1283 |
+
|
| 1284 |
+
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
|
| 1285 |
+
`HAVE_STRUCT_TM_TM_ZONE' instead. */
|
| 1286 |
+
#define HAVE_TM_ZONE 1
|
| 1287 |
+
|
| 1288 |
+
/* Define to 1 if you have the `truncate' function. */
|
| 1289 |
+
#define HAVE_TRUNCATE 1
|
| 1290 |
+
|
| 1291 |
+
/* Define to 1 if you don't have `tm_zone' but do have the external array
|
| 1292 |
+
`tzname'. */
|
| 1293 |
+
/* #undef HAVE_TZNAME */
|
| 1294 |
+
|
| 1295 |
+
/* Define this if you have tcl and TCL_UTF_MAX==6 */
|
| 1296 |
+
/* #undef HAVE_UCS4_TCL */
|
| 1297 |
+
|
| 1298 |
+
/* Define to 1 if you have the `uname' function. */
|
| 1299 |
+
#define HAVE_UNAME 1
|
| 1300 |
+
|
| 1301 |
+
/* Define to 1 if you have the <unistd.h> header file. */
|
| 1302 |
+
#define HAVE_UNISTD_H 1
|
| 1303 |
+
|
| 1304 |
+
/* Define to 1 if you have the `unlinkat' function. */
|
| 1305 |
+
#define HAVE_UNLINKAT 1
|
| 1306 |
+
|
| 1307 |
+
/* Define if you have a useable wchar_t type defined in wchar.h; useable means
|
| 1308 |
+
wchar_t must be an unsigned type with at least 16 bits. (see
|
| 1309 |
+
Include/unicodeobject.h). */
|
| 1310 |
+
/* #undef HAVE_USABLE_WCHAR_T */
|
| 1311 |
+
|
| 1312 |
+
/* Define to 1 if you have the <util.h> header file. */
|
| 1313 |
+
/* #undef HAVE_UTIL_H */
|
| 1314 |
+
|
| 1315 |
+
/* Define to 1 if you have the `utimensat' function. */
|
| 1316 |
+
#define HAVE_UTIMENSAT 1
|
| 1317 |
+
|
| 1318 |
+
/* Define to 1 if you have the `utimes' function. */
|
| 1319 |
+
#define HAVE_UTIMES 1
|
| 1320 |
+
|
| 1321 |
+
/* Define to 1 if you have the <utime.h> header file. */
|
| 1322 |
+
#define HAVE_UTIME_H 1
|
| 1323 |
+
|
| 1324 |
+
/* Define if uuid_create() exists. */
|
| 1325 |
+
/* #undef HAVE_UUID_CREATE */
|
| 1326 |
+
|
| 1327 |
+
/* Define if uuid_enc_be() exists. */
|
| 1328 |
+
/* #undef HAVE_UUID_ENC_BE */
|
| 1329 |
+
|
| 1330 |
+
/* Define if uuid_generate_time_safe() exists. */
|
| 1331 |
+
#define HAVE_UUID_GENERATE_TIME_SAFE 1
|
| 1332 |
+
|
| 1333 |
+
/* Define to 1 if you have the <uuid.h> header file. */
|
| 1334 |
+
#define HAVE_UUID_H 1
|
| 1335 |
+
|
| 1336 |
+
/* Define to 1 if you have the <uuid/uuid.h> header file. */
|
| 1337 |
+
#define HAVE_UUID_UUID_H 1
|
| 1338 |
+
|
| 1339 |
+
/* Define to 1 if you have the `vfork' function. */
|
| 1340 |
+
#define HAVE_VFORK 1
|
| 1341 |
+
|
| 1342 |
+
/* Define to 1 if you have the `wait3' function. */
|
| 1343 |
+
#define HAVE_WAIT3 1
|
| 1344 |
+
|
| 1345 |
+
/* Define to 1 if you have the `wait4' function. */
|
| 1346 |
+
#define HAVE_WAIT4 1
|
| 1347 |
+
|
| 1348 |
+
/* Define to 1 if you have the `waitid' function. */
|
| 1349 |
+
#define HAVE_WAITID 1
|
| 1350 |
+
|
| 1351 |
+
/* Define to 1 if you have the `waitpid' function. */
|
| 1352 |
+
#define HAVE_WAITPID 1
|
| 1353 |
+
|
| 1354 |
+
/* Define if the compiler provides a wchar.h header file. */
|
| 1355 |
+
#define HAVE_WCHAR_H 1
|
| 1356 |
+
|
| 1357 |
+
/* Define to 1 if you have the `wcscoll' function. */
|
| 1358 |
+
#define HAVE_WCSCOLL 1
|
| 1359 |
+
|
| 1360 |
+
/* Define to 1 if you have the `wcsftime' function. */
|
| 1361 |
+
#define HAVE_WCSFTIME 1
|
| 1362 |
+
|
| 1363 |
+
/* Define to 1 if you have the `wcsxfrm' function. */
|
| 1364 |
+
#define HAVE_WCSXFRM 1
|
| 1365 |
+
|
| 1366 |
+
/* Define to 1 if you have the `wmemcmp' function. */
|
| 1367 |
+
#define HAVE_WMEMCMP 1
|
| 1368 |
+
|
| 1369 |
+
/* Define if tzset() actually switches the local timezone in a meaningful way.
|
| 1370 |
+
*/
|
| 1371 |
+
#define HAVE_WORKING_TZSET 1
|
| 1372 |
+
|
| 1373 |
+
/* Define to 1 if you have the `writev' function. */
|
| 1374 |
+
#define HAVE_WRITEV 1
|
| 1375 |
+
|
| 1376 |
+
/* Define if the zlib library has inflateCopy */
|
| 1377 |
+
#define HAVE_ZLIB_COPY 1
|
| 1378 |
+
|
| 1379 |
+
/* Define to 1 if you have the `_getpty' function. */
|
| 1380 |
+
/* #undef HAVE__GETPTY */
|
| 1381 |
+
|
| 1382 |
+
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
|
| 1383 |
+
*/
|
| 1384 |
+
/* #undef MAJOR_IN_MKDEV */
|
| 1385 |
+
|
| 1386 |
+
/* Define to 1 if `major', `minor', and `makedev' are declared in
|
| 1387 |
+
<sysmacros.h>. */
|
| 1388 |
+
/* #undef MAJOR_IN_SYSMACROS */
|
| 1389 |
+
|
| 1390 |
+
/* Define if mvwdelch in curses.h is an expression. */
|
| 1391 |
+
#define MVWDELCH_IS_EXPRESSION 1
|
| 1392 |
+
|
| 1393 |
+
/* Define to the address where bug reports for this package should be sent. */
|
| 1394 |
+
/* #undef PACKAGE_BUGREPORT */
|
| 1395 |
+
|
| 1396 |
+
/* Define to the full name of this package. */
|
| 1397 |
+
/* #undef PACKAGE_NAME */
|
| 1398 |
+
|
| 1399 |
+
/* Define to the full name and version of this package. */
|
| 1400 |
+
/* #undef PACKAGE_STRING */
|
| 1401 |
+
|
| 1402 |
+
/* Define to the one symbol short name of this package. */
|
| 1403 |
+
/* #undef PACKAGE_TARNAME */
|
| 1404 |
+
|
| 1405 |
+
/* Define to the home page for this package. */
|
| 1406 |
+
/* #undef PACKAGE_URL */
|
| 1407 |
+
|
| 1408 |
+
/* Define to the version of this package. */
|
| 1409 |
+
/* #undef PACKAGE_VERSION */
|
| 1410 |
+
|
| 1411 |
+
/* Define if POSIX semaphores aren't enabled on your system */
|
| 1412 |
+
/* #undef POSIX_SEMAPHORES_NOT_ENABLED */
|
| 1413 |
+
|
| 1414 |
+
/* Define if pthread_key_t is compatible with int. */
|
| 1415 |
+
#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1
|
| 1416 |
+
|
| 1417 |
+
/* Defined if PTHREAD_SCOPE_SYSTEM supported. */
|
| 1418 |
+
#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
|
| 1419 |
+
|
| 1420 |
+
/* Define as the preferred size in bits of long digits */
|
| 1421 |
+
/* #undef PYLONG_BITS_IN_DIGIT */
|
| 1422 |
+
|
| 1423 |
+
/* enabled builtin hash modules */
|
| 1424 |
+
#define PY_BUILTIN_HASHLIB_HASHES "md5,sha1,sha256,sha512,sha3,blake2"
|
| 1425 |
+
|
| 1426 |
+
/* Define if you want to coerce the C locale to a UTF-8 based locale */
|
| 1427 |
+
#define PY_COERCE_C_LOCALE 1
|
| 1428 |
+
|
| 1429 |
+
/* Define to printf format modifier for Py_ssize_t */
|
| 1430 |
+
#define PY_FORMAT_SIZE_T "z"
|
| 1431 |
+
|
| 1432 |
+
/* Default cipher suites list for ssl module. 1: Python's preferred selection,
|
| 1433 |
+
2: leave OpenSSL defaults untouched, 0: custom string */
|
| 1434 |
+
#define PY_SSL_DEFAULT_CIPHERS 1
|
| 1435 |
+
|
| 1436 |
+
/* Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0 */
|
| 1437 |
+
/* #undef PY_SSL_DEFAULT_CIPHER_STRING */
|
| 1438 |
+
|
| 1439 |
+
/* Define if you want to build an interpreter with many run-time checks. */
|
| 1440 |
+
/* #undef Py_DEBUG */
|
| 1441 |
+
|
| 1442 |
+
/* Defined if Python is built as a shared library. */
|
| 1443 |
+
/* #undef Py_ENABLE_SHARED */
|
| 1444 |
+
|
| 1445 |
+
/* Define hash algorithm for str, bytes and memoryview. SipHash24: 1, FNV: 2,
|
| 1446 |
+
externally defined: 0 */
|
| 1447 |
+
/* #undef Py_HASH_ALGORITHM */
|
| 1448 |
+
|
| 1449 |
+
/* Define if you want to enable tracing references for debugging purpose */
|
| 1450 |
+
/* #undef Py_TRACE_REFS */
|
| 1451 |
+
|
| 1452 |
+
/* assume C89 semantics that RETSIGTYPE is always void */
|
| 1453 |
+
#define RETSIGTYPE void
|
| 1454 |
+
|
| 1455 |
+
/* Define if setpgrp() must be called as setpgrp(0, 0). */
|
| 1456 |
+
/* #undef SETPGRP_HAVE_ARG */
|
| 1457 |
+
|
| 1458 |
+
/* Define to 1 if you must link with -lrt for shm_open(). */
|
| 1459 |
+
#define SHM_NEEDS_LIBRT 1
|
| 1460 |
+
|
| 1461 |
+
/* Define if i>>j for signed int i does not extend the sign bit when i < 0 */
|
| 1462 |
+
/* #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS */
|
| 1463 |
+
|
| 1464 |
+
/* The size of `double', as computed by sizeof. */
|
| 1465 |
+
#define SIZEOF_DOUBLE 8
|
| 1466 |
+
|
| 1467 |
+
/* The size of `float', as computed by sizeof. */
|
| 1468 |
+
#define SIZEOF_FLOAT 4
|
| 1469 |
+
|
| 1470 |
+
/* The size of `fpos_t', as computed by sizeof. */
|
| 1471 |
+
#define SIZEOF_FPOS_T 16
|
| 1472 |
+
|
| 1473 |
+
/* The size of `int', as computed by sizeof. */
|
| 1474 |
+
#define SIZEOF_INT 4
|
| 1475 |
+
|
| 1476 |
+
/* The size of `long', as computed by sizeof. */
|
| 1477 |
+
#define SIZEOF_LONG 8
|
| 1478 |
+
|
| 1479 |
+
/* The size of `long double', as computed by sizeof. */
|
| 1480 |
+
#define SIZEOF_LONG_DOUBLE 16
|
| 1481 |
+
|
| 1482 |
+
/* The size of `long long', as computed by sizeof. */
|
| 1483 |
+
#define SIZEOF_LONG_LONG 8
|
| 1484 |
+
|
| 1485 |
+
/* The size of `off_t', as computed by sizeof. */
|
| 1486 |
+
#define SIZEOF_OFF_T 8
|
| 1487 |
+
|
| 1488 |
+
/* The size of `pid_t', as computed by sizeof. */
|
| 1489 |
+
#define SIZEOF_PID_T 4
|
| 1490 |
+
|
| 1491 |
+
/* The size of `pthread_key_t', as computed by sizeof. */
|
| 1492 |
+
#define SIZEOF_PTHREAD_KEY_T 4
|
| 1493 |
+
|
| 1494 |
+
/* The size of `pthread_t', as computed by sizeof. */
|
| 1495 |
+
#define SIZEOF_PTHREAD_T 8
|
| 1496 |
+
|
| 1497 |
+
/* The size of `short', as computed by sizeof. */
|
| 1498 |
+
#define SIZEOF_SHORT 2
|
| 1499 |
+
|
| 1500 |
+
/* The size of `size_t', as computed by sizeof. */
|
| 1501 |
+
#define SIZEOF_SIZE_T 8
|
| 1502 |
+
|
| 1503 |
+
/* The size of `time_t', as computed by sizeof. */
|
| 1504 |
+
#define SIZEOF_TIME_T 8
|
| 1505 |
+
|
| 1506 |
+
/* The size of `uintptr_t', as computed by sizeof. */
|
| 1507 |
+
#define SIZEOF_UINTPTR_T 8
|
| 1508 |
+
|
| 1509 |
+
/* The size of `void *', as computed by sizeof. */
|
| 1510 |
+
#define SIZEOF_VOID_P 8
|
| 1511 |
+
|
| 1512 |
+
/* The size of `wchar_t', as computed by sizeof. */
|
| 1513 |
+
#define SIZEOF_WCHAR_T 4
|
| 1514 |
+
|
| 1515 |
+
/* The size of `_Bool', as computed by sizeof. */
|
| 1516 |
+
#define SIZEOF__BOOL 1
|
| 1517 |
+
|
| 1518 |
+
/* Define to 1 if you have the ANSI C header files. */
|
| 1519 |
+
#define STDC_HEADERS 1
|
| 1520 |
+
|
| 1521 |
+
/* Define if you can safely include both <sys/select.h> and <sys/time.h>
|
| 1522 |
+
(which you can't on SCO ODT 3.0). */
|
| 1523 |
+
#define SYS_SELECT_WITH_SYS_TIME 1
|
| 1524 |
+
|
| 1525 |
+
/* Custom thread stack size depending on chosen sanitizer runtimes. */
|
| 1526 |
+
/* #undef THREAD_STACK_SIZE */
|
| 1527 |
+
|
| 1528 |
+
/* Library needed by timemodule.c: librt may be needed for clock_gettime() */
|
| 1529 |
+
/* #undef TIMEMODULE_LIB */
|
| 1530 |
+
|
| 1531 |
+
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
| 1532 |
+
#define TIME_WITH_SYS_TIME 1
|
| 1533 |
+
|
| 1534 |
+
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
| 1535 |
+
/* #undef TM_IN_SYS_TIME */
|
| 1536 |
+
|
| 1537 |
+
/* Define if you want to use computed gotos in ceval.c. */
|
| 1538 |
+
#define USE_COMPUTED_GOTOS 1
|
| 1539 |
+
|
| 1540 |
+
/* Enable extensions on AIX 3, Interix. */
|
| 1541 |
+
#ifndef _ALL_SOURCE
|
| 1542 |
+
# define _ALL_SOURCE 1
|
| 1543 |
+
#endif
|
| 1544 |
+
/* Enable GNU extensions on systems that have them. */
|
| 1545 |
+
#ifndef _GNU_SOURCE
|
| 1546 |
+
# define _GNU_SOURCE 1
|
| 1547 |
+
#endif
|
| 1548 |
+
/* Enable threading extensions on Solaris. */
|
| 1549 |
+
#ifndef _POSIX_PTHREAD_SEMANTICS
|
| 1550 |
+
# define _POSIX_PTHREAD_SEMANTICS 1
|
| 1551 |
+
#endif
|
| 1552 |
+
/* Enable extensions on HP NonStop. */
|
| 1553 |
+
#ifndef _TANDEM_SOURCE
|
| 1554 |
+
# define _TANDEM_SOURCE 1
|
| 1555 |
+
#endif
|
| 1556 |
+
/* Enable general extensions on Solaris. */
|
| 1557 |
+
#ifndef __EXTENSIONS__
|
| 1558 |
+
# define __EXTENSIONS__ 1
|
| 1559 |
+
#endif
|
| 1560 |
+
|
| 1561 |
+
|
| 1562 |
+
/* Define if WINDOW in curses.h offers a field _flags. */
|
| 1563 |
+
#define WINDOW_HAS_FLAGS 1
|
| 1564 |
+
|
| 1565 |
+
/* Define if you want build the _decimal module using a coroutine-local rather
|
| 1566 |
+
than a thread-local context */
|
| 1567 |
+
#define WITH_DECIMAL_CONTEXTVAR 1
|
| 1568 |
+
|
| 1569 |
+
/* Define if you want documentation strings in extension modules */
|
| 1570 |
+
#define WITH_DOC_STRINGS 1
|
| 1571 |
+
|
| 1572 |
+
/* Define if you want to compile in DTrace support */
|
| 1573 |
+
/* #undef WITH_DTRACE */
|
| 1574 |
+
|
| 1575 |
+
/* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
|
| 1576 |
+
linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
|
| 1577 |
+
Dyld is necessary to support frameworks. */
|
| 1578 |
+
/* #undef WITH_DYLD */
|
| 1579 |
+
|
| 1580 |
+
/* Define to build the readline module against Editline. */
|
| 1581 |
+
/* #undef WITH_EDITLINE */
|
| 1582 |
+
|
| 1583 |
+
/* Define to 1 if libintl is needed for locale functions. */
|
| 1584 |
+
/* #undef WITH_LIBINTL */
|
| 1585 |
+
|
| 1586 |
+
/* Define if you want to produce an OpenStep/Rhapsody framework (shared
|
| 1587 |
+
library plus accessory files). */
|
| 1588 |
+
/* #undef WITH_NEXT_FRAMEWORK */
|
| 1589 |
+
|
| 1590 |
+
/* Define if you want to compile in Python-specific mallocs */
|
| 1591 |
+
#define WITH_PYMALLOC 1
|
| 1592 |
+
|
| 1593 |
+
/* Define if you want pymalloc to be disabled when running under valgrind */
|
| 1594 |
+
/* #undef WITH_VALGRIND */
|
| 1595 |
+
|
| 1596 |
+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
| 1597 |
+
significant byte first (like Motorola and SPARC, unlike Intel). */
|
| 1598 |
+
#if defined AC_APPLE_UNIVERSAL_BUILD
|
| 1599 |
+
# if defined __BIG_ENDIAN__
|
| 1600 |
+
# define WORDS_BIGENDIAN 1
|
| 1601 |
+
# endif
|
| 1602 |
+
#else
|
| 1603 |
+
# ifndef WORDS_BIGENDIAN
|
| 1604 |
+
/* # undef WORDS_BIGENDIAN */
|
| 1605 |
+
# endif
|
| 1606 |
+
#endif
|
| 1607 |
+
|
| 1608 |
+
/* Define if arithmetic is subject to x87-style double rounding issue */
|
| 1609 |
+
/* #undef X87_DOUBLE_ROUNDING */
|
| 1610 |
+
|
| 1611 |
+
/* Define on OpenBSD to activate all library features */
|
| 1612 |
+
/* #undef _BSD_SOURCE */
|
| 1613 |
+
|
| 1614 |
+
/* Define on Darwin to activate all library features */
|
| 1615 |
+
#define _DARWIN_C_SOURCE 1
|
| 1616 |
+
|
| 1617 |
+
/* This must be set to 64 on some systems to enable large file support. */
|
| 1618 |
+
#define _FILE_OFFSET_BITS 64
|
| 1619 |
+
|
| 1620 |
+
/* Define on Linux to activate all library features */
|
| 1621 |
+
#define _GNU_SOURCE 1
|
| 1622 |
+
|
| 1623 |
+
/* Define to include mbstate_t for mbrtowc */
|
| 1624 |
+
/* #undef _INCLUDE__STDC_A1_SOURCE */
|
| 1625 |
+
|
| 1626 |
+
/* This must be defined on some systems to enable large file support. */
|
| 1627 |
+
#define _LARGEFILE_SOURCE 1
|
| 1628 |
+
|
| 1629 |
+
/* This must be defined on AIX systems to enable large file support. */
|
| 1630 |
+
/* #undef _LARGE_FILES */
|
| 1631 |
+
|
| 1632 |
+
/* Define to 1 if on MINIX. */
|
| 1633 |
+
/* #undef _MINIX */
|
| 1634 |
+
|
| 1635 |
+
/* Define on NetBSD to activate all library features */
|
| 1636 |
+
#define _NETBSD_SOURCE 1
|
| 1637 |
+
|
| 1638 |
+
/* Define to 2 if the system does not provide POSIX.1 features except with
|
| 1639 |
+
this defined. */
|
| 1640 |
+
/* #undef _POSIX_1_SOURCE */
|
| 1641 |
+
|
| 1642 |
+
/* Define to activate features from IEEE Stds 1003.1-2008 */
|
| 1643 |
+
#define _POSIX_C_SOURCE 200809L
|
| 1644 |
+
|
| 1645 |
+
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
| 1646 |
+
/* #undef _POSIX_SOURCE */
|
| 1647 |
+
|
| 1648 |
+
/* Define if you have POSIX threads, and your system does not define that. */
|
| 1649 |
+
/* #undef _POSIX_THREADS */
|
| 1650 |
+
|
| 1651 |
+
/* framework name */
|
| 1652 |
+
#define _PYTHONFRAMEWORK ""
|
| 1653 |
+
|
| 1654 |
+
/* Define to force use of thread-safe errno, h_errno, and other functions */
|
| 1655 |
+
/* #undef _REENTRANT */
|
| 1656 |
+
|
| 1657 |
+
/* Define to the level of X/Open that your system supports */
|
| 1658 |
+
#define _XOPEN_SOURCE 700
|
| 1659 |
+
|
| 1660 |
+
/* Define to activate Unix95-and-earlier features */
|
| 1661 |
+
#define _XOPEN_SOURCE_EXTENDED 1
|
| 1662 |
+
|
| 1663 |
+
/* Define on FreeBSD to activate all library features */
|
| 1664 |
+
#define __BSD_VISIBLE 1
|
| 1665 |
+
|
| 1666 |
+
/* Define to 'long' if <time.h> doesn't define. */
|
| 1667 |
+
/* #undef clock_t */
|
| 1668 |
+
|
| 1669 |
+
/* Define to empty if `const' does not conform to ANSI C. */
|
| 1670 |
+
/* #undef const */
|
| 1671 |
+
|
| 1672 |
+
/* Define to `int' if <sys/types.h> doesn't define. */
|
| 1673 |
+
/* #undef gid_t */
|
| 1674 |
+
|
| 1675 |
+
/* Define to `int' if <sys/types.h> does not define. */
|
| 1676 |
+
/* #undef mode_t */
|
| 1677 |
+
|
| 1678 |
+
/* Define to `long int' if <sys/types.h> does not define. */
|
| 1679 |
+
/* #undef off_t */
|
| 1680 |
+
|
| 1681 |
+
/* Define to `int' if <sys/types.h> does not define. */
|
| 1682 |
+
/* #undef pid_t */
|
| 1683 |
+
|
| 1684 |
+
/* Define to empty if the keyword does not work. */
|
| 1685 |
+
/* #undef signed */
|
| 1686 |
+
|
| 1687 |
+
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
| 1688 |
+
/* #undef size_t */
|
| 1689 |
+
|
| 1690 |
+
/* Define to `int' if <sys/socket.h> does not define. */
|
| 1691 |
+
/* #undef socklen_t */
|
| 1692 |
+
|
| 1693 |
+
/* Define to `int' if <sys/types.h> doesn't define. */
|
| 1694 |
+
/* #undef uid_t */
|
| 1695 |
+
|
| 1696 |
+
|
| 1697 |
+
/* Define the macros needed if on a UnixWare 7.x system. */
|
| 1698 |
+
#if defined(__USLC__) && defined(__SCO_VERSION__)
|
| 1699 |
+
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
|
| 1700 |
+
#endif
|
| 1701 |
+
|
| 1702 |
+
#endif /*Py_PYCONFIG_H*/
|
| 1703 |
+
|
evalkit_cambrian/include/python3.10/pydtrace.h
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Static DTrace probes interface */
|
| 2 |
+
|
| 3 |
+
#ifndef Py_DTRACE_H
|
| 4 |
+
#define Py_DTRACE_H
|
| 5 |
+
#ifdef __cplusplus
|
| 6 |
+
extern "C" {
|
| 7 |
+
#endif
|
| 8 |
+
|
| 9 |
+
#ifdef WITH_DTRACE
|
| 10 |
+
|
| 11 |
+
#include "pydtrace_probes.h"
|
| 12 |
+
|
| 13 |
+
/* pydtrace_probes.h, on systems with DTrace, is auto-generated to include
|
| 14 |
+
`PyDTrace_{PROBE}` and `PyDTrace_{PROBE}_ENABLED()` macros for every probe
|
| 15 |
+
defined in pydtrace_provider.d.
|
| 16 |
+
|
| 17 |
+
Calling these functions must be guarded by a `PyDTrace_{PROBE}_ENABLED()`
|
| 18 |
+
check to minimize performance impact when probing is off. For example:
|
| 19 |
+
|
| 20 |
+
if (PyDTrace_FUNCTION_ENTRY_ENABLED())
|
| 21 |
+
PyDTrace_FUNCTION_ENTRY(f);
|
| 22 |
+
*/
|
| 23 |
+
|
| 24 |
+
#else
|
| 25 |
+
|
| 26 |
+
/* Without DTrace, compile to nothing. */
|
| 27 |
+
|
| 28 |
+
static inline void PyDTrace_LINE(const char *arg0, const char *arg1, int arg2) {}
|
| 29 |
+
static inline void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2) {}
|
| 30 |
+
static inline void PyDTrace_FUNCTION_RETURN(const char *arg0, const char *arg1, int arg2) {}
|
| 31 |
+
static inline void PyDTrace_GC_START(int arg0) {}
|
| 32 |
+
static inline void PyDTrace_GC_DONE(Py_ssize_t arg0) {}
|
| 33 |
+
static inline void PyDTrace_INSTANCE_NEW_START(int arg0) {}
|
| 34 |
+
static inline void PyDTrace_INSTANCE_NEW_DONE(int arg0) {}
|
| 35 |
+
static inline void PyDTrace_INSTANCE_DELETE_START(int arg0) {}
|
| 36 |
+
static inline void PyDTrace_INSTANCE_DELETE_DONE(int arg0) {}
|
| 37 |
+
static inline void PyDTrace_IMPORT_FIND_LOAD_START(const char *arg0) {}
|
| 38 |
+
static inline void PyDTrace_IMPORT_FIND_LOAD_DONE(const char *arg0, int arg1) {}
|
| 39 |
+
static inline void PyDTrace_AUDIT(const char *arg0, void *arg1) {}
|
| 40 |
+
|
| 41 |
+
static inline int PyDTrace_LINE_ENABLED(void) { return 0; }
|
| 42 |
+
static inline int PyDTrace_FUNCTION_ENTRY_ENABLED(void) { return 0; }
|
| 43 |
+
static inline int PyDTrace_FUNCTION_RETURN_ENABLED(void) { return 0; }
|
| 44 |
+
static inline int PyDTrace_GC_START_ENABLED(void) { return 0; }
|
| 45 |
+
static inline int PyDTrace_GC_DONE_ENABLED(void) { return 0; }
|
| 46 |
+
static inline int PyDTrace_INSTANCE_NEW_START_ENABLED(void) { return 0; }
|
| 47 |
+
static inline int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return 0; }
|
| 48 |
+
static inline int PyDTrace_INSTANCE_DELETE_START_ENABLED(void) { return 0; }
|
| 49 |
+
static inline int PyDTrace_INSTANCE_DELETE_DONE_ENABLED(void) { return 0; }
|
| 50 |
+
static inline int PyDTrace_IMPORT_FIND_LOAD_START_ENABLED(void) { return 0; }
|
| 51 |
+
static inline int PyDTrace_IMPORT_FIND_LOAD_DONE_ENABLED(void) { return 0; }
|
| 52 |
+
static inline int PyDTrace_AUDIT_ENABLED(void) { return 0; }
|
| 53 |
+
|
| 54 |
+
#endif /* !WITH_DTRACE */
|
| 55 |
+
|
| 56 |
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|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_ERRORS_H
|
| 2 |
+
#define Py_ERRORS_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#include <stdarg.h> // va_list
|
| 8 |
+
|
| 9 |
+
/* Error handling definitions */
|
| 10 |
+
|
| 11 |
+
PyAPI_FUNC(void) PyErr_SetNone(PyObject *);
|
| 12 |
+
PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *);
|
| 13 |
+
PyAPI_FUNC(void) PyErr_SetString(
|
| 14 |
+
PyObject *exception,
|
| 15 |
+
const char *string /* decoded from utf-8 */
|
| 16 |
+
);
|
| 17 |
+
PyAPI_FUNC(PyObject *) PyErr_Occurred(void);
|
| 18 |
+
PyAPI_FUNC(void) PyErr_Clear(void);
|
| 19 |
+
PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
|
| 20 |
+
PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
|
| 21 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
| 22 |
+
PyAPI_FUNC(void) PyErr_GetExcInfo(PyObject **, PyObject **, PyObject **);
|
| 23 |
+
PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/* Defined in Python/pylifecycle.c
|
| 27 |
+
|
| 28 |
+
The Py_FatalError() function is replaced with a macro which logs
|
| 29 |
+
automatically the name of the current function, unless the Py_LIMITED_API
|
| 30 |
+
macro is defined. */
|
| 31 |
+
PyAPI_FUNC(void) _Py_NO_RETURN Py_FatalError(const char *message);
|
| 32 |
+
|
| 33 |
+
/* Error testing and normalization */
|
| 34 |
+
PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
|
| 35 |
+
PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *);
|
| 36 |
+
PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
|
| 37 |
+
|
| 38 |
+
/* Traceback manipulation (PEP 3134) */
|
| 39 |
+
PyAPI_FUNC(int) PyException_SetTraceback(PyObject *, PyObject *);
|
| 40 |
+
PyAPI_FUNC(PyObject *) PyException_GetTraceback(PyObject *);
|
| 41 |
+
|
| 42 |
+
/* Cause manipulation (PEP 3134) */
|
| 43 |
+
PyAPI_FUNC(PyObject *) PyException_GetCause(PyObject *);
|
| 44 |
+
PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *);
|
| 45 |
+
|
| 46 |
+
/* Context manipulation (PEP 3134) */
|
| 47 |
+
PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *);
|
| 48 |
+
PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *);
|
| 49 |
+
|
| 50 |
+
/* */
|
| 51 |
+
|
| 52 |
+
#define PyExceptionClass_Check(x) \
|
| 53 |
+
(PyType_Check((x)) && \
|
| 54 |
+
PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS))
|
| 55 |
+
|
| 56 |
+
#define PyExceptionInstance_Check(x) \
|
| 57 |
+
PyType_FastSubclass(Py_TYPE(x), Py_TPFLAGS_BASE_EXC_SUBCLASS)
|
| 58 |
+
|
| 59 |
+
PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *);
|
| 60 |
+
|
| 61 |
+
#define PyExceptionInstance_Class(x) ((PyObject*)Py_TYPE(x))
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
/* Predefined exceptions */
|
| 65 |
+
|
| 66 |
+
PyAPI_DATA(PyObject *) PyExc_BaseException;
|
| 67 |
+
PyAPI_DATA(PyObject *) PyExc_Exception;
|
| 68 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
| 69 |
+
PyAPI_DATA(PyObject *) PyExc_StopAsyncIteration;
|
| 70 |
+
#endif
|
| 71 |
+
PyAPI_DATA(PyObject *) PyExc_StopIteration;
|
| 72 |
+
PyAPI_DATA(PyObject *) PyExc_GeneratorExit;
|
| 73 |
+
PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
|
| 74 |
+
PyAPI_DATA(PyObject *) PyExc_LookupError;
|
| 75 |
+
|
| 76 |
+
PyAPI_DATA(PyObject *) PyExc_AssertionError;
|
| 77 |
+
PyAPI_DATA(PyObject *) PyExc_AttributeError;
|
| 78 |
+
PyAPI_DATA(PyObject *) PyExc_BufferError;
|
| 79 |
+
PyAPI_DATA(PyObject *) PyExc_EOFError;
|
| 80 |
+
PyAPI_DATA(PyObject *) PyExc_FloatingPointError;
|
| 81 |
+
PyAPI_DATA(PyObject *) PyExc_OSError;
|
| 82 |
+
PyAPI_DATA(PyObject *) PyExc_ImportError;
|
| 83 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
| 84 |
+
PyAPI_DATA(PyObject *) PyExc_ModuleNotFoundError;
|
| 85 |
+
#endif
|
| 86 |
+
PyAPI_DATA(PyObject *) PyExc_IndexError;
|
| 87 |
+
PyAPI_DATA(PyObject *) PyExc_KeyError;
|
| 88 |
+
PyAPI_DATA(PyObject *) PyExc_KeyboardInterrupt;
|
| 89 |
+
PyAPI_DATA(PyObject *) PyExc_MemoryError;
|
| 90 |
+
PyAPI_DATA(PyObject *) PyExc_NameError;
|
| 91 |
+
PyAPI_DATA(PyObject *) PyExc_OverflowError;
|
| 92 |
+
PyAPI_DATA(PyObject *) PyExc_RuntimeError;
|
| 93 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
| 94 |
+
PyAPI_DATA(PyObject *) PyExc_RecursionError;
|
| 95 |
+
#endif
|
| 96 |
+
PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
|
| 97 |
+
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
|
| 98 |
+
PyAPI_DATA(PyObject *) PyExc_IndentationError;
|
| 99 |
+
PyAPI_DATA(PyObject *) PyExc_TabError;
|
| 100 |
+
PyAPI_DATA(PyObject *) PyExc_ReferenceError;
|
| 101 |
+
PyAPI_DATA(PyObject *) PyExc_SystemError;
|
| 102 |
+
PyAPI_DATA(PyObject *) PyExc_SystemExit;
|
| 103 |
+
PyAPI_DATA(PyObject *) PyExc_TypeError;
|
| 104 |
+
PyAPI_DATA(PyObject *) PyExc_UnboundLocalError;
|
| 105 |
+
PyAPI_DATA(PyObject *) PyExc_UnicodeError;
|
| 106 |
+
PyAPI_DATA(PyObject *) PyExc_UnicodeEncodeError;
|
| 107 |
+
PyAPI_DATA(PyObject *) PyExc_UnicodeDecodeError;
|
| 108 |
+
PyAPI_DATA(PyObject *) PyExc_UnicodeTranslateError;
|
| 109 |
+
PyAPI_DATA(PyObject *) PyExc_ValueError;
|
| 110 |
+
PyAPI_DATA(PyObject *) PyExc_ZeroDivisionError;
|
| 111 |
+
|
| 112 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
| 113 |
+
PyAPI_DATA(PyObject *) PyExc_BlockingIOError;
|
| 114 |
+
PyAPI_DATA(PyObject *) PyExc_BrokenPipeError;
|
| 115 |
+
PyAPI_DATA(PyObject *) PyExc_ChildProcessError;
|
| 116 |
+
PyAPI_DATA(PyObject *) PyExc_ConnectionError;
|
| 117 |
+
PyAPI_DATA(PyObject *) PyExc_ConnectionAbortedError;
|
| 118 |
+
PyAPI_DATA(PyObject *) PyExc_ConnectionRefusedError;
|
| 119 |
+
PyAPI_DATA(PyObject *) PyExc_ConnectionResetError;
|
| 120 |
+
PyAPI_DATA(PyObject *) PyExc_FileExistsError;
|
| 121 |
+
PyAPI_DATA(PyObject *) PyExc_FileNotFoundError;
|
| 122 |
+
PyAPI_DATA(PyObject *) PyExc_InterruptedError;
|
| 123 |
+
PyAPI_DATA(PyObject *) PyExc_IsADirectoryError;
|
| 124 |
+
PyAPI_DATA(PyObject *) PyExc_NotADirectoryError;
|
| 125 |
+
PyAPI_DATA(PyObject *) PyExc_PermissionError;
|
| 126 |
+
PyAPI_DATA(PyObject *) PyExc_ProcessLookupError;
|
| 127 |
+
PyAPI_DATA(PyObject *) PyExc_TimeoutError;
|
| 128 |
+
#endif
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
/* Compatibility aliases */
|
| 132 |
+
PyAPI_DATA(PyObject *) PyExc_EnvironmentError;
|
| 133 |
+
PyAPI_DATA(PyObject *) PyExc_IOError;
|
| 134 |
+
#ifdef MS_WINDOWS
|
| 135 |
+
PyAPI_DATA(PyObject *) PyExc_WindowsError;
|
| 136 |
+
#endif
|
| 137 |
+
|
| 138 |
+
/* Predefined warning categories */
|
| 139 |
+
PyAPI_DATA(PyObject *) PyExc_Warning;
|
| 140 |
+
PyAPI_DATA(PyObject *) PyExc_UserWarning;
|
| 141 |
+
PyAPI_DATA(PyObject *) PyExc_DeprecationWarning;
|
| 142 |
+
PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning;
|
| 143 |
+
PyAPI_DATA(PyObject *) PyExc_SyntaxWarning;
|
| 144 |
+
PyAPI_DATA(PyObject *) PyExc_RuntimeWarning;
|
| 145 |
+
PyAPI_DATA(PyObject *) PyExc_FutureWarning;
|
| 146 |
+
PyAPI_DATA(PyObject *) PyExc_ImportWarning;
|
| 147 |
+
PyAPI_DATA(PyObject *) PyExc_UnicodeWarning;
|
| 148 |
+
PyAPI_DATA(PyObject *) PyExc_BytesWarning;
|
| 149 |
+
PyAPI_DATA(PyObject *) PyExc_EncodingWarning;
|
| 150 |
+
PyAPI_DATA(PyObject *) PyExc_ResourceWarning;
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
/* Convenience functions */
|
| 154 |
+
|
| 155 |
+
PyAPI_FUNC(int) PyErr_BadArgument(void);
|
| 156 |
+
PyAPI_FUNC(PyObject *) PyErr_NoMemory(void);
|
| 157 |
+
PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
|
| 158 |
+
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
|
| 159 |
+
PyObject *, PyObject *);
|
| 160 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
|
| 161 |
+
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObjects(
|
| 162 |
+
PyObject *, PyObject *, PyObject *);
|
| 163 |
+
#endif
|
| 164 |
+
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(
|
| 165 |
+
PyObject *exc,
|
| 166 |
+
const char *filename /* decoded from the filesystem encoding */
|
| 167 |
+
);
|
| 168 |
+
|
| 169 |
+
PyAPI_FUNC(PyObject *) PyErr_Format(
|
| 170 |
+
PyObject *exception,
|
| 171 |
+
const char *format, /* ASCII-encoded string */
|
| 172 |
+
...
|
| 173 |
+
);
|
| 174 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
| 175 |
+
PyAPI_FUNC(PyObject *) PyErr_FormatV(
|
| 176 |
+
PyObject *exception,
|
| 177 |
+
const char *format,
|
| 178 |
+
va_list vargs);
|
| 179 |
+
#endif
|
| 180 |
+
|
| 181 |
+
#ifdef MS_WINDOWS
|
| 182 |
+
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
|
| 183 |
+
int ierr,
|
| 184 |
+
const char *filename /* decoded from the filesystem encoding */
|
| 185 |
+
);
|
| 186 |
+
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
|
| 187 |
+
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
|
| 188 |
+
PyObject *,int, PyObject *);
|
| 189 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
|
| 190 |
+
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObjects(
|
| 191 |
+
PyObject *,int, PyObject *, PyObject *);
|
| 192 |
+
#endif
|
| 193 |
+
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
|
| 194 |
+
PyObject *exc,
|
| 195 |
+
int ierr,
|
| 196 |
+
const char *filename /* decoded from the filesystem encoding */
|
| 197 |
+
);
|
| 198 |
+
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
|
| 199 |
+
#endif /* MS_WINDOWS */
|
| 200 |
+
|
| 201 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
| 202 |
+
PyAPI_FUNC(PyObject *) PyErr_SetImportErrorSubclass(PyObject *, PyObject *,
|
| 203 |
+
PyObject *, PyObject *);
|
| 204 |
+
#endif
|
| 205 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
| 206 |
+
PyAPI_FUNC(PyObject *) PyErr_SetImportError(PyObject *, PyObject *,
|
| 207 |
+
PyObject *);
|
| 208 |
+
#endif
|
| 209 |
+
|
| 210 |
+
/* Export the old function so that the existing API remains available: */
|
| 211 |
+
PyAPI_FUNC(void) PyErr_BadInternalCall(void);
|
| 212 |
+
PyAPI_FUNC(void) _PyErr_BadInternalCall(const char *filename, int lineno);
|
| 213 |
+
/* Mask the old API with a call to the new API for code compiled under
|
| 214 |
+
Python 2.0: */
|
| 215 |
+
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
|
| 216 |
+
|
| 217 |
+
/* Function to create a new exception */
|
| 218 |
+
PyAPI_FUNC(PyObject *) PyErr_NewException(
|
| 219 |
+
const char *name, PyObject *base, PyObject *dict);
|
| 220 |
+
PyAPI_FUNC(PyObject *) PyErr_NewExceptionWithDoc(
|
| 221 |
+
const char *name, const char *doc, PyObject *base, PyObject *dict);
|
| 222 |
+
PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *);
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
/* In signalmodule.c */
|
| 226 |
+
PyAPI_FUNC(int) PyErr_CheckSignals(void);
|
| 227 |
+
PyAPI_FUNC(void) PyErr_SetInterrupt(void);
|
| 228 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
|
| 229 |
+
PyAPI_FUNC(int) PyErr_SetInterruptEx(int signum);
|
| 230 |
+
#endif
|
| 231 |
+
|
| 232 |
+
/* Support for adding program text to SyntaxErrors */
|
| 233 |
+
PyAPI_FUNC(void) PyErr_SyntaxLocation(
|
| 234 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 235 |
+
int lineno);
|
| 236 |
+
PyAPI_FUNC(void) PyErr_SyntaxLocationEx(
|
| 237 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 238 |
+
int lineno,
|
| 239 |
+
int col_offset);
|
| 240 |
+
PyAPI_FUNC(PyObject *) PyErr_ProgramText(
|
| 241 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 242 |
+
int lineno);
|
| 243 |
+
|
| 244 |
+
/* The following functions are used to create and modify unicode
|
| 245 |
+
exceptions from C */
|
| 246 |
+
|
| 247 |
+
/* create a UnicodeDecodeError object */
|
| 248 |
+
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create(
|
| 249 |
+
const char *encoding, /* UTF-8 encoded string */
|
| 250 |
+
const char *object,
|
| 251 |
+
Py_ssize_t length,
|
| 252 |
+
Py_ssize_t start,
|
| 253 |
+
Py_ssize_t end,
|
| 254 |
+
const char *reason /* UTF-8 encoded string */
|
| 255 |
+
);
|
| 256 |
+
|
| 257 |
+
/* get the encoding attribute */
|
| 258 |
+
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetEncoding(PyObject *);
|
| 259 |
+
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetEncoding(PyObject *);
|
| 260 |
+
|
| 261 |
+
/* get the object attribute */
|
| 262 |
+
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetObject(PyObject *);
|
| 263 |
+
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetObject(PyObject *);
|
| 264 |
+
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetObject(PyObject *);
|
| 265 |
+
|
| 266 |
+
/* get the value of the start attribute (the int * may not be NULL)
|
| 267 |
+
return 0 on success, -1 on failure */
|
| 268 |
+
PyAPI_FUNC(int) PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *);
|
| 269 |
+
PyAPI_FUNC(int) PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *);
|
| 270 |
+
PyAPI_FUNC(int) PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *);
|
| 271 |
+
|
| 272 |
+
/* assign a new value to the start attribute
|
| 273 |
+
return 0 on success, -1 on failure */
|
| 274 |
+
PyAPI_FUNC(int) PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t);
|
| 275 |
+
PyAPI_FUNC(int) PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t);
|
| 276 |
+
PyAPI_FUNC(int) PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t);
|
| 277 |
+
|
| 278 |
+
/* get the value of the end attribute (the int *may not be NULL)
|
| 279 |
+
return 0 on success, -1 on failure */
|
| 280 |
+
PyAPI_FUNC(int) PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *);
|
| 281 |
+
PyAPI_FUNC(int) PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *);
|
| 282 |
+
PyAPI_FUNC(int) PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *);
|
| 283 |
+
|
| 284 |
+
/* assign a new value to the end attribute
|
| 285 |
+
return 0 on success, -1 on failure */
|
| 286 |
+
PyAPI_FUNC(int) PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t);
|
| 287 |
+
PyAPI_FUNC(int) PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t);
|
| 288 |
+
PyAPI_FUNC(int) PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t);
|
| 289 |
+
|
| 290 |
+
/* get the value of the reason attribute */
|
| 291 |
+
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetReason(PyObject *);
|
| 292 |
+
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetReason(PyObject *);
|
| 293 |
+
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetReason(PyObject *);
|
| 294 |
+
|
| 295 |
+
/* assign a new value to the reason attribute
|
| 296 |
+
return 0 on success, -1 on failure */
|
| 297 |
+
PyAPI_FUNC(int) PyUnicodeEncodeError_SetReason(
|
| 298 |
+
PyObject *exc,
|
| 299 |
+
const char *reason /* UTF-8 encoded string */
|
| 300 |
+
);
|
| 301 |
+
PyAPI_FUNC(int) PyUnicodeDecodeError_SetReason(
|
| 302 |
+
PyObject *exc,
|
| 303 |
+
const char *reason /* UTF-8 encoded string */
|
| 304 |
+
);
|
| 305 |
+
PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
|
| 306 |
+
PyObject *exc,
|
| 307 |
+
const char *reason /* UTF-8 encoded string */
|
| 308 |
+
);
|
| 309 |
+
|
| 310 |
+
PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
|
| 311 |
+
Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
|
| 312 |
+
PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
|
| 313 |
+
Py_GCC_ATTRIBUTE((format(printf, 3, 0)));
|
| 314 |
+
|
| 315 |
+
#ifndef Py_LIMITED_API
|
| 316 |
+
# define Py_CPYTHON_ERRORS_H
|
| 317 |
+
# include "cpython/pyerrors.h"
|
| 318 |
+
# undef Py_CPYTHON_ERRORS_H
|
| 319 |
+
#endif
|
| 320 |
+
|
| 321 |
+
#ifdef __cplusplus
|
| 322 |
+
}
|
| 323 |
+
#endif
|
| 324 |
+
#endif /* !Py_ERRORS_H */
|
evalkit_cambrian/include/python3.10/pylifecycle.h
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* Interfaces to configure, query, create & destroy the Python runtime */
|
| 3 |
+
|
| 4 |
+
#ifndef Py_PYLIFECYCLE_H
|
| 5 |
+
#define Py_PYLIFECYCLE_H
|
| 6 |
+
#ifdef __cplusplus
|
| 7 |
+
extern "C" {
|
| 8 |
+
#endif
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
/* Initialization and finalization */
|
| 12 |
+
PyAPI_FUNC(void) Py_Initialize(void);
|
| 13 |
+
PyAPI_FUNC(void) Py_InitializeEx(int);
|
| 14 |
+
PyAPI_FUNC(void) Py_Finalize(void);
|
| 15 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
| 16 |
+
PyAPI_FUNC(int) Py_FinalizeEx(void);
|
| 17 |
+
#endif
|
| 18 |
+
PyAPI_FUNC(int) Py_IsInitialized(void);
|
| 19 |
+
|
| 20 |
+
/* Subinterpreter support */
|
| 21 |
+
PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
|
| 22 |
+
PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
|
| 26 |
+
* exit functions.
|
| 27 |
+
*/
|
| 28 |
+
PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
|
| 29 |
+
|
| 30 |
+
PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
|
| 31 |
+
|
| 32 |
+
/* Bootstrap __main__ (defined in Modules/main.c) */
|
| 33 |
+
PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
|
| 34 |
+
PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
|
| 35 |
+
|
| 36 |
+
/* In pathconfig.c */
|
| 37 |
+
PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
|
| 38 |
+
PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
|
| 39 |
+
|
| 40 |
+
PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
|
| 41 |
+
PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
|
| 42 |
+
|
| 43 |
+
PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
|
| 44 |
+
|
| 45 |
+
PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
|
| 46 |
+
PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
|
| 47 |
+
PyAPI_FUNC(wchar_t *) Py_GetPath(void);
|
| 48 |
+
PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
|
| 49 |
+
#ifdef MS_WINDOWS
|
| 50 |
+
int _Py_CheckPython3(void);
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
/* In their own files */
|
| 54 |
+
PyAPI_FUNC(const char *) Py_GetVersion(void);
|
| 55 |
+
PyAPI_FUNC(const char *) Py_GetPlatform(void);
|
| 56 |
+
PyAPI_FUNC(const char *) Py_GetCopyright(void);
|
| 57 |
+
PyAPI_FUNC(const char *) Py_GetCompiler(void);
|
| 58 |
+
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
|
| 59 |
+
|
| 60 |
+
/* Signals */
|
| 61 |
+
typedef void (*PyOS_sighandler_t)(int);
|
| 62 |
+
PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
|
| 63 |
+
PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
|
| 64 |
+
|
| 65 |
+
#ifndef Py_LIMITED_API
|
| 66 |
+
# define Py_CPYTHON_PYLIFECYCLE_H
|
| 67 |
+
# include "cpython/pylifecycle.h"
|
| 68 |
+
# undef Py_CPYTHON_PYLIFECYCLE_H
|
| 69 |
+
#endif
|
| 70 |
+
|
| 71 |
+
#ifdef __cplusplus
|
| 72 |
+
}
|
| 73 |
+
#endif
|
| 74 |
+
#endif /* !Py_PYLIFECYCLE_H */
|
evalkit_cambrian/include/python3.10/pymem.h
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* The PyMem_ family: low-level memory allocation interfaces.
|
| 2 |
+
See objimpl.h for the PyObject_ memory family.
|
| 3 |
+
*/
|
| 4 |
+
|
| 5 |
+
#ifndef Py_PYMEM_H
|
| 6 |
+
#define Py_PYMEM_H
|
| 7 |
+
|
| 8 |
+
#include "pyport.h"
|
| 9 |
+
|
| 10 |
+
#ifdef __cplusplus
|
| 11 |
+
extern "C" {
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
/* BEWARE:
|
| 15 |
+
|
| 16 |
+
Each interface exports both functions and macros. Extension modules should
|
| 17 |
+
use the functions, to ensure binary compatibility across Python versions.
|
| 18 |
+
Because the Python implementation is free to change internal details, and
|
| 19 |
+
the macros may (or may not) expose details for speed, if you do use the
|
| 20 |
+
macros you must recompile your extensions with each Python release.
|
| 21 |
+
|
| 22 |
+
Never mix calls to PyMem_ with calls to the platform malloc/realloc/
|
| 23 |
+
calloc/free. For example, on Windows different DLLs may end up using
|
| 24 |
+
different heaps, and if you use PyMem_Malloc you'll get the memory from the
|
| 25 |
+
heap used by the Python DLL; it could be a disaster if you free()'ed that
|
| 26 |
+
directly in your own extension. Using PyMem_Free instead ensures Python
|
| 27 |
+
can return the memory to the proper heap. As another example, in
|
| 28 |
+
a debug build (Py_DEBUG macro), Python wraps all calls to all PyMem_ and
|
| 29 |
+
PyObject_ memory functions in special debugging wrappers that add additional
|
| 30 |
+
debugging info to dynamic memory blocks. The system routines have no idea
|
| 31 |
+
what to do with that stuff, and the Python wrappers have no idea what to do
|
| 32 |
+
with raw blocks obtained directly by the system routines then.
|
| 33 |
+
|
| 34 |
+
The GIL must be held when using these APIs.
|
| 35 |
+
*/
|
| 36 |
+
|
| 37 |
+
/*
|
| 38 |
+
* Raw memory interface
|
| 39 |
+
* ====================
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
/* Functions
|
| 43 |
+
|
| 44 |
+
Functions supplying platform-independent semantics for malloc/realloc/
|
| 45 |
+
free. These functions make sure that allocating 0 bytes returns a distinct
|
| 46 |
+
non-NULL pointer (whenever possible -- if we're flat out of memory, NULL
|
| 47 |
+
may be returned), even if the platform malloc and realloc don't.
|
| 48 |
+
Returned pointers must be checked for NULL explicitly. No action is
|
| 49 |
+
performed on failure (no exception is set, no warning is printed, etc).
|
| 50 |
+
*/
|
| 51 |
+
|
| 52 |
+
PyAPI_FUNC(void *) PyMem_Malloc(size_t size);
|
| 53 |
+
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
|
| 54 |
+
PyAPI_FUNC(void *) PyMem_Realloc(void *ptr, size_t new_size);
|
| 55 |
+
PyAPI_FUNC(void) PyMem_Free(void *ptr);
|
| 56 |
+
|
| 57 |
+
/*
|
| 58 |
+
* Type-oriented memory interface
|
| 59 |
+
* ==============================
|
| 60 |
+
*
|
| 61 |
+
* Allocate memory for n objects of the given type. Returns a new pointer
|
| 62 |
+
* or NULL if the request was too large or memory allocation failed. Use
|
| 63 |
+
* these macros rather than doing the multiplication yourself so that proper
|
| 64 |
+
* overflow checking is always done.
|
| 65 |
+
*/
|
| 66 |
+
|
| 67 |
+
#define PyMem_New(type, n) \
|
| 68 |
+
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
|
| 69 |
+
( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
|
| 70 |
+
|
| 71 |
+
/*
|
| 72 |
+
* The value of (p) is always clobbered by this macro regardless of success.
|
| 73 |
+
* The caller MUST check if (p) is NULL afterwards and deal with the memory
|
| 74 |
+
* error if so. This means the original value of (p) MUST be saved for the
|
| 75 |
+
* caller's memory error handler to not lose track of it.
|
| 76 |
+
*/
|
| 77 |
+
#define PyMem_Resize(p, type, n) \
|
| 78 |
+
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
|
| 79 |
+
(type *) PyMem_Realloc((p), (n) * sizeof(type)) )
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
// Deprecated aliases only kept for backward compatibility.
|
| 83 |
+
// PyMem_Del and PyMem_DEL are defined with no parameter to be able to use
|
| 84 |
+
// them as function pointers (ex: dealloc = PyMem_Del).
|
| 85 |
+
#define PyMem_MALLOC(n) PyMem_Malloc(n)
|
| 86 |
+
#define PyMem_NEW(type, n) PyMem_New(type, n)
|
| 87 |
+
#define PyMem_REALLOC(p, n) PyMem_Realloc(p, n)
|
| 88 |
+
#define PyMem_RESIZE(p, type, n) PyMem_Resize(p, type, n)
|
| 89 |
+
#define PyMem_FREE(p) PyMem_Free(p)
|
| 90 |
+
#define PyMem_Del PyMem_Free
|
| 91 |
+
#define PyMem_DEL PyMem_Free
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
#ifndef Py_LIMITED_API
|
| 95 |
+
# define Py_CPYTHON_PYMEM_H
|
| 96 |
+
# include "cpython/pymem.h"
|
| 97 |
+
# undef Py_CPYTHON_PYMEM_H
|
| 98 |
+
#endif
|
| 99 |
+
|
| 100 |
+
#ifdef __cplusplus
|
| 101 |
+
}
|
| 102 |
+
#endif
|
| 103 |
+
|
| 104 |
+
#endif /* !Py_PYMEM_H */
|
evalkit_cambrian/include/python3.10/pystrhex.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_STRHEX_H
|
| 2 |
+
#define Py_STRHEX_H
|
| 3 |
+
|
| 4 |
+
#ifdef __cplusplus
|
| 5 |
+
extern "C" {
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
#ifndef Py_LIMITED_API
|
| 9 |
+
/* Returns a str() containing the hex representation of argbuf. */
|
| 10 |
+
PyAPI_FUNC(PyObject*) _Py_strhex(const char* argbuf, const Py_ssize_t arglen);
|
| 11 |
+
/* Returns a bytes() containing the ASCII hex representation of argbuf. */
|
| 12 |
+
PyAPI_FUNC(PyObject*) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen);
|
| 13 |
+
/* These variants include support for a separator between every N bytes: */
|
| 14 |
+
PyAPI_FUNC(PyObject*) _Py_strhex_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group);
|
| 15 |
+
PyAPI_FUNC(PyObject*) _Py_strhex_bytes_with_sep(const char* argbuf, const Py_ssize_t arglen, const PyObject* sep, const int bytes_per_group);
|
| 16 |
+
#endif /* !Py_LIMITED_API */
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
}
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
#endif /* !Py_STRHEX_H */
|
evalkit_cambrian/include/python3.10/tupleobject.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Tuple object interface */
|
| 2 |
+
|
| 3 |
+
#ifndef Py_TUPLEOBJECT_H
|
| 4 |
+
#define Py_TUPLEOBJECT_H
|
| 5 |
+
#ifdef __cplusplus
|
| 6 |
+
extern "C" {
|
| 7 |
+
#endif
|
| 8 |
+
|
| 9 |
+
/*
|
| 10 |
+
Another generally useful object type is a tuple of object pointers.
|
| 11 |
+
For Python, this is an immutable type. C code can change the tuple items
|
| 12 |
+
(but not their number), and even use tuples as general-purpose arrays of
|
| 13 |
+
object references, but in general only brand new tuples should be mutated,
|
| 14 |
+
not ones that might already have been exposed to Python code.
|
| 15 |
+
|
| 16 |
+
*** WARNING *** PyTuple_SetItem does not increment the new item's reference
|
| 17 |
+
count, but does decrement the reference count of the item it replaces,
|
| 18 |
+
if not nil. It does *decrement* the reference count if it is *not*
|
| 19 |
+
inserted in the tuple. Similarly, PyTuple_GetItem does not increment the
|
| 20 |
+
returned item's reference count.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
PyAPI_DATA(PyTypeObject) PyTuple_Type;
|
| 24 |
+
PyAPI_DATA(PyTypeObject) PyTupleIter_Type;
|
| 25 |
+
|
| 26 |
+
#define PyTuple_Check(op) \
|
| 27 |
+
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TUPLE_SUBCLASS)
|
| 28 |
+
#define PyTuple_CheckExact(op) Py_IS_TYPE(op, &PyTuple_Type)
|
| 29 |
+
|
| 30 |
+
PyAPI_FUNC(PyObject *) PyTuple_New(Py_ssize_t size);
|
| 31 |
+
PyAPI_FUNC(Py_ssize_t) PyTuple_Size(PyObject *);
|
| 32 |
+
PyAPI_FUNC(PyObject *) PyTuple_GetItem(PyObject *, Py_ssize_t);
|
| 33 |
+
PyAPI_FUNC(int) PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *);
|
| 34 |
+
PyAPI_FUNC(PyObject *) PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
|
| 35 |
+
PyAPI_FUNC(PyObject *) PyTuple_Pack(Py_ssize_t, ...);
|
| 36 |
+
|
| 37 |
+
#ifndef Py_LIMITED_API
|
| 38 |
+
# define Py_CPYTHON_TUPLEOBJECT_H
|
| 39 |
+
# include "cpython/tupleobject.h"
|
| 40 |
+
# undef Py_CPYTHON_TUPLEOBJECT_H
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
}
|
| 45 |
+
#endif
|
| 46 |
+
#endif /* !Py_TUPLEOBJECT_H */
|
evalkit_cambrian/include/python3.10/typeslots.h
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Do not renumber the file; these numbers are part of the stable ABI. */
|
| 2 |
+
#if defined(Py_LIMITED_API)
|
| 3 |
+
/* Disabled, see #10181 */
|
| 4 |
+
#undef Py_bf_getbuffer
|
| 5 |
+
#undef Py_bf_releasebuffer
|
| 6 |
+
#else
|
| 7 |
+
#define Py_bf_getbuffer 1
|
| 8 |
+
#define Py_bf_releasebuffer 2
|
| 9 |
+
#endif
|
| 10 |
+
#define Py_mp_ass_subscript 3
|
| 11 |
+
#define Py_mp_length 4
|
| 12 |
+
#define Py_mp_subscript 5
|
| 13 |
+
#define Py_nb_absolute 6
|
| 14 |
+
#define Py_nb_add 7
|
| 15 |
+
#define Py_nb_and 8
|
| 16 |
+
#define Py_nb_bool 9
|
| 17 |
+
#define Py_nb_divmod 10
|
| 18 |
+
#define Py_nb_float 11
|
| 19 |
+
#define Py_nb_floor_divide 12
|
| 20 |
+
#define Py_nb_index 13
|
| 21 |
+
#define Py_nb_inplace_add 14
|
| 22 |
+
#define Py_nb_inplace_and 15
|
| 23 |
+
#define Py_nb_inplace_floor_divide 16
|
| 24 |
+
#define Py_nb_inplace_lshift 17
|
| 25 |
+
#define Py_nb_inplace_multiply 18
|
| 26 |
+
#define Py_nb_inplace_or 19
|
| 27 |
+
#define Py_nb_inplace_power 20
|
| 28 |
+
#define Py_nb_inplace_remainder 21
|
| 29 |
+
#define Py_nb_inplace_rshift 22
|
| 30 |
+
#define Py_nb_inplace_subtract 23
|
| 31 |
+
#define Py_nb_inplace_true_divide 24
|
| 32 |
+
#define Py_nb_inplace_xor 25
|
| 33 |
+
#define Py_nb_int 26
|
| 34 |
+
#define Py_nb_invert 27
|
| 35 |
+
#define Py_nb_lshift 28
|
| 36 |
+
#define Py_nb_multiply 29
|
| 37 |
+
#define Py_nb_negative 30
|
| 38 |
+
#define Py_nb_or 31
|
| 39 |
+
#define Py_nb_positive 32
|
| 40 |
+
#define Py_nb_power 33
|
| 41 |
+
#define Py_nb_remainder 34
|
| 42 |
+
#define Py_nb_rshift 35
|
| 43 |
+
#define Py_nb_subtract 36
|
| 44 |
+
#define Py_nb_true_divide 37
|
| 45 |
+
#define Py_nb_xor 38
|
| 46 |
+
#define Py_sq_ass_item 39
|
| 47 |
+
#define Py_sq_concat 40
|
| 48 |
+
#define Py_sq_contains 41
|
| 49 |
+
#define Py_sq_inplace_concat 42
|
| 50 |
+
#define Py_sq_inplace_repeat 43
|
| 51 |
+
#define Py_sq_item 44
|
| 52 |
+
#define Py_sq_length 45
|
| 53 |
+
#define Py_sq_repeat 46
|
| 54 |
+
#define Py_tp_alloc 47
|
| 55 |
+
#define Py_tp_base 48
|
| 56 |
+
#define Py_tp_bases 49
|
| 57 |
+
#define Py_tp_call 50
|
| 58 |
+
#define Py_tp_clear 51
|
| 59 |
+
#define Py_tp_dealloc 52
|
| 60 |
+
#define Py_tp_del 53
|
| 61 |
+
#define Py_tp_descr_get 54
|
| 62 |
+
#define Py_tp_descr_set 55
|
| 63 |
+
#define Py_tp_doc 56
|
| 64 |
+
#define Py_tp_getattr 57
|
| 65 |
+
#define Py_tp_getattro 58
|
| 66 |
+
#define Py_tp_hash 59
|
| 67 |
+
#define Py_tp_init 60
|
| 68 |
+
#define Py_tp_is_gc 61
|
| 69 |
+
#define Py_tp_iter 62
|
| 70 |
+
#define Py_tp_iternext 63
|
| 71 |
+
#define Py_tp_methods 64
|
| 72 |
+
#define Py_tp_new 65
|
| 73 |
+
#define Py_tp_repr 66
|
| 74 |
+
#define Py_tp_richcompare 67
|
| 75 |
+
#define Py_tp_setattr 68
|
| 76 |
+
#define Py_tp_setattro 69
|
| 77 |
+
#define Py_tp_str 70
|
| 78 |
+
#define Py_tp_traverse 71
|
| 79 |
+
#define Py_tp_members 72
|
| 80 |
+
#define Py_tp_getset 73
|
| 81 |
+
#define Py_tp_free 74
|
| 82 |
+
#define Py_nb_matrix_multiply 75
|
| 83 |
+
#define Py_nb_inplace_matrix_multiply 76
|
| 84 |
+
#define Py_am_await 77
|
| 85 |
+
#define Py_am_aiter 78
|
| 86 |
+
#define Py_am_anext 79
|
| 87 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
| 88 |
+
/* New in 3.5 */
|
| 89 |
+
#define Py_tp_finalize 80
|
| 90 |
+
#endif
|
| 91 |
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
|
| 92 |
+
/* New in 3.10 */
|
| 93 |
+
#define Py_am_send 81
|
| 94 |
+
#endif
|
evalkit_cambrian/include/tclIntDecls.h
ADDED
|
@@ -0,0 +1,1434 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tclIntDecls.h --
|
| 3 |
+
*
|
| 4 |
+
* This file contains the declarations for all unsupported
|
| 5 |
+
* functions that are exported by the Tcl library. These
|
| 6 |
+
* interfaces are not guaranteed to remain the same between
|
| 7 |
+
* versions. Use at your own risk.
|
| 8 |
+
*
|
| 9 |
+
* Copyright (c) 1998-1999 by Scriptics Corporation.
|
| 10 |
+
*
|
| 11 |
+
* See the file "license.terms" for information on usage and redistribution
|
| 12 |
+
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
#ifndef _TCLINTDECLS
|
| 16 |
+
#define _TCLINTDECLS
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
#undef TCL_STORAGE_CLASS
|
| 20 |
+
#ifdef BUILD_tcl
|
| 21 |
+
# define TCL_STORAGE_CLASS DLLEXPORT
|
| 22 |
+
#else
|
| 23 |
+
# ifdef USE_TCL_STUBS
|
| 24 |
+
# define TCL_STORAGE_CLASS
|
| 25 |
+
# else
|
| 26 |
+
# define TCL_STORAGE_CLASS DLLIMPORT
|
| 27 |
+
# endif
|
| 28 |
+
#endif
|
| 29 |
+
|
| 30 |
+
/* [Bug #803489] Tcl_FindNamespace problem in the Stubs table */
|
| 31 |
+
#undef Tcl_CreateNamespace
|
| 32 |
+
#undef Tcl_DeleteNamespace
|
| 33 |
+
#undef Tcl_AppendExportList
|
| 34 |
+
#undef Tcl_Export
|
| 35 |
+
#undef Tcl_Import
|
| 36 |
+
#undef Tcl_ForgetImport
|
| 37 |
+
#undef Tcl_GetCurrentNamespace
|
| 38 |
+
#undef Tcl_GetGlobalNamespace
|
| 39 |
+
#undef Tcl_FindNamespace
|
| 40 |
+
#undef Tcl_FindCommand
|
| 41 |
+
#undef Tcl_GetCommandFromObj
|
| 42 |
+
#undef Tcl_GetCommandFullName
|
| 43 |
+
#undef Tcl_SetStartupScript
|
| 44 |
+
#undef Tcl_GetStartupScript
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* WARNING: This file is automatically generated by the tools/genStubs.tcl
|
| 48 |
+
* script. Any modifications to the function declarations below should be made
|
| 49 |
+
* in the generic/tclInt.decls script.
|
| 50 |
+
*/
|
| 51 |
+
|
| 52 |
+
/* !BEGIN!: Do not edit below this line. */
|
| 53 |
+
|
| 54 |
+
#ifdef __cplusplus
|
| 55 |
+
extern "C" {
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
/*
|
| 59 |
+
* Exported function declarations:
|
| 60 |
+
*/
|
| 61 |
+
|
| 62 |
+
/* Slot 0 is reserved */
|
| 63 |
+
/* Slot 1 is reserved */
|
| 64 |
+
/* Slot 2 is reserved */
|
| 65 |
+
/* 3 */
|
| 66 |
+
EXTERN void TclAllocateFreeObjects(void);
|
| 67 |
+
/* Slot 4 is reserved */
|
| 68 |
+
/* 5 */
|
| 69 |
+
EXTERN int TclCleanupChildren(Tcl_Interp *interp, int numPids,
|
| 70 |
+
Tcl_Pid *pidPtr, Tcl_Channel errorChan);
|
| 71 |
+
/* 6 */
|
| 72 |
+
EXTERN void TclCleanupCommand(Command *cmdPtr);
|
| 73 |
+
/* 7 */
|
| 74 |
+
EXTERN int TclCopyAndCollapse(int count, const char *src,
|
| 75 |
+
char *dst);
|
| 76 |
+
/* 8 */
|
| 77 |
+
EXTERN int TclCopyChannelOld(Tcl_Interp *interp,
|
| 78 |
+
Tcl_Channel inChan, Tcl_Channel outChan,
|
| 79 |
+
int toRead, Tcl_Obj *cmdPtr);
|
| 80 |
+
/* 9 */
|
| 81 |
+
EXTERN int TclCreatePipeline(Tcl_Interp *interp, int argc,
|
| 82 |
+
const char **argv, Tcl_Pid **pidArrayPtr,
|
| 83 |
+
TclFile *inPipePtr, TclFile *outPipePtr,
|
| 84 |
+
TclFile *errFilePtr);
|
| 85 |
+
/* 10 */
|
| 86 |
+
EXTERN int TclCreateProc(Tcl_Interp *interp, Namespace *nsPtr,
|
| 87 |
+
const char *procName, Tcl_Obj *argsPtr,
|
| 88 |
+
Tcl_Obj *bodyPtr, Proc **procPtrPtr);
|
| 89 |
+
/* 11 */
|
| 90 |
+
EXTERN void TclDeleteCompiledLocalVars(Interp *iPtr,
|
| 91 |
+
CallFrame *framePtr);
|
| 92 |
+
/* 12 */
|
| 93 |
+
EXTERN void TclDeleteVars(Interp *iPtr,
|
| 94 |
+
TclVarHashTable *tablePtr);
|
| 95 |
+
/* Slot 13 is reserved */
|
| 96 |
+
/* 14 */
|
| 97 |
+
EXTERN int TclDumpMemoryInfo(ClientData clientData, int flags);
|
| 98 |
+
/* Slot 15 is reserved */
|
| 99 |
+
/* 16 */
|
| 100 |
+
EXTERN void TclExprFloatError(Tcl_Interp *interp, double value);
|
| 101 |
+
/* Slot 17 is reserved */
|
| 102 |
+
/* Slot 18 is reserved */
|
| 103 |
+
/* Slot 19 is reserved */
|
| 104 |
+
/* Slot 20 is reserved */
|
| 105 |
+
/* Slot 21 is reserved */
|
| 106 |
+
/* 22 */
|
| 107 |
+
EXTERN int TclFindElement(Tcl_Interp *interp,
|
| 108 |
+
const char *listStr, int listLength,
|
| 109 |
+
const char **elementPtr,
|
| 110 |
+
const char **nextPtr, int *sizePtr,
|
| 111 |
+
int *bracePtr);
|
| 112 |
+
/* 23 */
|
| 113 |
+
EXTERN Proc * TclFindProc(Interp *iPtr, const char *procName);
|
| 114 |
+
/* 24 */
|
| 115 |
+
EXTERN int TclFormatInt(char *buffer, long n);
|
| 116 |
+
/* 25 */
|
| 117 |
+
EXTERN void TclFreePackageInfo(Interp *iPtr);
|
| 118 |
+
/* Slot 26 is reserved */
|
| 119 |
+
/* Slot 27 is reserved */
|
| 120 |
+
/* 28 */
|
| 121 |
+
EXTERN Tcl_Channel TclpGetDefaultStdChannel(int type);
|
| 122 |
+
/* Slot 29 is reserved */
|
| 123 |
+
/* Slot 30 is reserved */
|
| 124 |
+
/* 31 */
|
| 125 |
+
EXTERN const char * TclGetExtension(const char *name);
|
| 126 |
+
/* 32 */
|
| 127 |
+
EXTERN int TclGetFrame(Tcl_Interp *interp, const char *str,
|
| 128 |
+
CallFrame **framePtrPtr);
|
| 129 |
+
/* Slot 33 is reserved */
|
| 130 |
+
/* 34 */
|
| 131 |
+
EXTERN int TclGetIntForIndex(Tcl_Interp *interp,
|
| 132 |
+
Tcl_Obj *objPtr, int endValue, int *indexPtr);
|
| 133 |
+
/* Slot 35 is reserved */
|
| 134 |
+
/* Slot 36 is reserved */
|
| 135 |
+
/* 37 */
|
| 136 |
+
EXTERN int TclGetLoadedPackages(Tcl_Interp *interp,
|
| 137 |
+
const char *targetName);
|
| 138 |
+
/* 38 */
|
| 139 |
+
EXTERN int TclGetNamespaceForQualName(Tcl_Interp *interp,
|
| 140 |
+
const char *qualName, Namespace *cxtNsPtr,
|
| 141 |
+
int flags, Namespace **nsPtrPtr,
|
| 142 |
+
Namespace **altNsPtrPtr,
|
| 143 |
+
Namespace **actualCxtPtrPtr,
|
| 144 |
+
const char **simpleNamePtr);
|
| 145 |
+
/* 39 */
|
| 146 |
+
EXTERN Tcl_ObjCmdProc * TclGetObjInterpProc(void);
|
| 147 |
+
/* 40 */
|
| 148 |
+
EXTERN int TclGetOpenMode(Tcl_Interp *interp, const char *str,
|
| 149 |
+
int *seekFlagPtr);
|
| 150 |
+
/* 41 */
|
| 151 |
+
EXTERN Tcl_Command TclGetOriginalCommand(Tcl_Command command);
|
| 152 |
+
/* 42 */
|
| 153 |
+
EXTERN CONST86 char * TclpGetUserHome(const char *name,
|
| 154 |
+
Tcl_DString *bufferPtr);
|
| 155 |
+
/* Slot 43 is reserved */
|
| 156 |
+
/* 44 */
|
| 157 |
+
EXTERN int TclGuessPackageName(const char *fileName,
|
| 158 |
+
Tcl_DString *bufPtr);
|
| 159 |
+
/* 45 */
|
| 160 |
+
EXTERN int TclHideUnsafeCommands(Tcl_Interp *interp);
|
| 161 |
+
/* 46 */
|
| 162 |
+
EXTERN int TclInExit(void);
|
| 163 |
+
/* Slot 47 is reserved */
|
| 164 |
+
/* Slot 48 is reserved */
|
| 165 |
+
/* Slot 49 is reserved */
|
| 166 |
+
/* 50 */
|
| 167 |
+
EXTERN void TclInitCompiledLocals(Tcl_Interp *interp,
|
| 168 |
+
CallFrame *framePtr, Namespace *nsPtr);
|
| 169 |
+
/* 51 */
|
| 170 |
+
EXTERN int TclInterpInit(Tcl_Interp *interp);
|
| 171 |
+
/* Slot 52 is reserved */
|
| 172 |
+
/* 53 */
|
| 173 |
+
EXTERN int TclInvokeObjectCommand(ClientData clientData,
|
| 174 |
+
Tcl_Interp *interp, int argc,
|
| 175 |
+
CONST84 char **argv);
|
| 176 |
+
/* 54 */
|
| 177 |
+
EXTERN int TclInvokeStringCommand(ClientData clientData,
|
| 178 |
+
Tcl_Interp *interp, int objc,
|
| 179 |
+
Tcl_Obj *const objv[]);
|
| 180 |
+
/* 55 */
|
| 181 |
+
EXTERN Proc * TclIsProc(Command *cmdPtr);
|
| 182 |
+
/* Slot 56 is reserved */
|
| 183 |
+
/* Slot 57 is reserved */
|
| 184 |
+
/* 58 */
|
| 185 |
+
EXTERN Var * TclLookupVar(Tcl_Interp *interp, const char *part1,
|
| 186 |
+
const char *part2, int flags,
|
| 187 |
+
const char *msg, int createPart1,
|
| 188 |
+
int createPart2, Var **arrayPtrPtr);
|
| 189 |
+
/* Slot 59 is reserved */
|
| 190 |
+
/* 60 */
|
| 191 |
+
EXTERN int TclNeedSpace(const char *start, const char *end);
|
| 192 |
+
/* 61 */
|
| 193 |
+
EXTERN Tcl_Obj * TclNewProcBodyObj(Proc *procPtr);
|
| 194 |
+
/* 62 */
|
| 195 |
+
EXTERN int TclObjCommandComplete(Tcl_Obj *cmdPtr);
|
| 196 |
+
/* 63 */
|
| 197 |
+
EXTERN int TclObjInterpProc(ClientData clientData,
|
| 198 |
+
Tcl_Interp *interp, int objc,
|
| 199 |
+
Tcl_Obj *const objv[]);
|
| 200 |
+
/* 64 */
|
| 201 |
+
EXTERN int TclObjInvoke(Tcl_Interp *interp, int objc,
|
| 202 |
+
Tcl_Obj *const objv[], int flags);
|
| 203 |
+
/* Slot 65 is reserved */
|
| 204 |
+
/* Slot 66 is reserved */
|
| 205 |
+
/* Slot 67 is reserved */
|
| 206 |
+
/* Slot 68 is reserved */
|
| 207 |
+
/* 69 */
|
| 208 |
+
EXTERN char * TclpAlloc(unsigned int size);
|
| 209 |
+
/* Slot 70 is reserved */
|
| 210 |
+
/* Slot 71 is reserved */
|
| 211 |
+
/* Slot 72 is reserved */
|
| 212 |
+
/* Slot 73 is reserved */
|
| 213 |
+
/* 74 */
|
| 214 |
+
EXTERN void TclpFree(char *ptr);
|
| 215 |
+
/* 75 */
|
| 216 |
+
EXTERN unsigned long TclpGetClicks(void);
|
| 217 |
+
/* 76 */
|
| 218 |
+
EXTERN unsigned long TclpGetSeconds(void);
|
| 219 |
+
/* 77 */
|
| 220 |
+
EXTERN void TclpGetTime(Tcl_Time *time);
|
| 221 |
+
/* Slot 78 is reserved */
|
| 222 |
+
/* Slot 79 is reserved */
|
| 223 |
+
/* Slot 80 is reserved */
|
| 224 |
+
/* 81 */
|
| 225 |
+
EXTERN char * TclpRealloc(char *ptr, unsigned int size);
|
| 226 |
+
/* Slot 82 is reserved */
|
| 227 |
+
/* Slot 83 is reserved */
|
| 228 |
+
/* Slot 84 is reserved */
|
| 229 |
+
/* Slot 85 is reserved */
|
| 230 |
+
/* Slot 86 is reserved */
|
| 231 |
+
/* Slot 87 is reserved */
|
| 232 |
+
/* 88 */
|
| 233 |
+
EXTERN char * TclPrecTraceProc(ClientData clientData,
|
| 234 |
+
Tcl_Interp *interp, const char *name1,
|
| 235 |
+
const char *name2, int flags);
|
| 236 |
+
/* 89 */
|
| 237 |
+
EXTERN int TclPreventAliasLoop(Tcl_Interp *interp,
|
| 238 |
+
Tcl_Interp *cmdInterp, Tcl_Command cmd);
|
| 239 |
+
/* Slot 90 is reserved */
|
| 240 |
+
/* 91 */
|
| 241 |
+
EXTERN void TclProcCleanupProc(Proc *procPtr);
|
| 242 |
+
/* 92 */
|
| 243 |
+
EXTERN int TclProcCompileProc(Tcl_Interp *interp, Proc *procPtr,
|
| 244 |
+
Tcl_Obj *bodyPtr, Namespace *nsPtr,
|
| 245 |
+
const char *description,
|
| 246 |
+
const char *procName);
|
| 247 |
+
/* 93 */
|
| 248 |
+
EXTERN void TclProcDeleteProc(ClientData clientData);
|
| 249 |
+
/* Slot 94 is reserved */
|
| 250 |
+
/* Slot 95 is reserved */
|
| 251 |
+
/* 96 */
|
| 252 |
+
EXTERN int TclRenameCommand(Tcl_Interp *interp,
|
| 253 |
+
const char *oldName, const char *newName);
|
| 254 |
+
/* 97 */
|
| 255 |
+
EXTERN void TclResetShadowedCmdRefs(Tcl_Interp *interp,
|
| 256 |
+
Command *newCmdPtr);
|
| 257 |
+
/* 98 */
|
| 258 |
+
EXTERN int TclServiceIdle(void);
|
| 259 |
+
/* Slot 99 is reserved */
|
| 260 |
+
/* Slot 100 is reserved */
|
| 261 |
+
/* 101 */
|
| 262 |
+
EXTERN CONST86 char * TclSetPreInitScript(const char *string);
|
| 263 |
+
/* 102 */
|
| 264 |
+
EXTERN void TclSetupEnv(Tcl_Interp *interp);
|
| 265 |
+
/* 103 */
|
| 266 |
+
EXTERN int TclSockGetPort(Tcl_Interp *interp, const char *str,
|
| 267 |
+
const char *proto, int *portPtr);
|
| 268 |
+
/* 104 */
|
| 269 |
+
EXTERN int TclSockMinimumBuffersOld(int sock, int size);
|
| 270 |
+
/* Slot 105 is reserved */
|
| 271 |
+
/* Slot 106 is reserved */
|
| 272 |
+
/* Slot 107 is reserved */
|
| 273 |
+
/* 108 */
|
| 274 |
+
EXTERN void TclTeardownNamespace(Namespace *nsPtr);
|
| 275 |
+
/* 109 */
|
| 276 |
+
EXTERN int TclUpdateReturnInfo(Interp *iPtr);
|
| 277 |
+
/* 110 */
|
| 278 |
+
EXTERN int TclSockMinimumBuffers(void *sock, int size);
|
| 279 |
+
/* 111 */
|
| 280 |
+
EXTERN void Tcl_AddInterpResolvers(Tcl_Interp *interp,
|
| 281 |
+
const char *name,
|
| 282 |
+
Tcl_ResolveCmdProc *cmdProc,
|
| 283 |
+
Tcl_ResolveVarProc *varProc,
|
| 284 |
+
Tcl_ResolveCompiledVarProc *compiledVarProc);
|
| 285 |
+
/* 112 */
|
| 286 |
+
EXTERN int Tcl_AppendExportList(Tcl_Interp *interp,
|
| 287 |
+
Tcl_Namespace *nsPtr, Tcl_Obj *objPtr);
|
| 288 |
+
/* 113 */
|
| 289 |
+
EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp,
|
| 290 |
+
const char *name, ClientData clientData,
|
| 291 |
+
Tcl_NamespaceDeleteProc *deleteProc);
|
| 292 |
+
/* 114 */
|
| 293 |
+
EXTERN void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr);
|
| 294 |
+
/* 115 */
|
| 295 |
+
EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
|
| 296 |
+
const char *pattern, int resetListFirst);
|
| 297 |
+
/* 116 */
|
| 298 |
+
EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name,
|
| 299 |
+
Tcl_Namespace *contextNsPtr, int flags);
|
| 300 |
+
/* 117 */
|
| 301 |
+
EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp,
|
| 302 |
+
const char *name,
|
| 303 |
+
Tcl_Namespace *contextNsPtr, int flags);
|
| 304 |
+
/* 118 */
|
| 305 |
+
EXTERN int Tcl_GetInterpResolvers(Tcl_Interp *interp,
|
| 306 |
+
const char *name, Tcl_ResolverInfo *resInfo);
|
| 307 |
+
/* 119 */
|
| 308 |
+
EXTERN int Tcl_GetNamespaceResolvers(
|
| 309 |
+
Tcl_Namespace *namespacePtr,
|
| 310 |
+
Tcl_ResolverInfo *resInfo);
|
| 311 |
+
/* 120 */
|
| 312 |
+
EXTERN Tcl_Var Tcl_FindNamespaceVar(Tcl_Interp *interp,
|
| 313 |
+
const char *name,
|
| 314 |
+
Tcl_Namespace *contextNsPtr, int flags);
|
| 315 |
+
/* 121 */
|
| 316 |
+
EXTERN int Tcl_ForgetImport(Tcl_Interp *interp,
|
| 317 |
+
Tcl_Namespace *nsPtr, const char *pattern);
|
| 318 |
+
/* 122 */
|
| 319 |
+
EXTERN Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp,
|
| 320 |
+
Tcl_Obj *objPtr);
|
| 321 |
+
/* 123 */
|
| 322 |
+
EXTERN void Tcl_GetCommandFullName(Tcl_Interp *interp,
|
| 323 |
+
Tcl_Command command, Tcl_Obj *objPtr);
|
| 324 |
+
/* 124 */
|
| 325 |
+
EXTERN Tcl_Namespace * Tcl_GetCurrentNamespace(Tcl_Interp *interp);
|
| 326 |
+
/* 125 */
|
| 327 |
+
EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace(Tcl_Interp *interp);
|
| 328 |
+
/* 126 */
|
| 329 |
+
EXTERN void Tcl_GetVariableFullName(Tcl_Interp *interp,
|
| 330 |
+
Tcl_Var variable, Tcl_Obj *objPtr);
|
| 331 |
+
/* 127 */
|
| 332 |
+
EXTERN int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
|
| 333 |
+
const char *pattern, int allowOverwrite);
|
| 334 |
+
/* 128 */
|
| 335 |
+
EXTERN void Tcl_PopCallFrame(Tcl_Interp *interp);
|
| 336 |
+
/* 129 */
|
| 337 |
+
EXTERN int Tcl_PushCallFrame(Tcl_Interp *interp,
|
| 338 |
+
Tcl_CallFrame *framePtr,
|
| 339 |
+
Tcl_Namespace *nsPtr, int isProcCallFrame);
|
| 340 |
+
/* 130 */
|
| 341 |
+
EXTERN int Tcl_RemoveInterpResolvers(Tcl_Interp *interp,
|
| 342 |
+
const char *name);
|
| 343 |
+
/* 131 */
|
| 344 |
+
EXTERN void Tcl_SetNamespaceResolvers(
|
| 345 |
+
Tcl_Namespace *namespacePtr,
|
| 346 |
+
Tcl_ResolveCmdProc *cmdProc,
|
| 347 |
+
Tcl_ResolveVarProc *varProc,
|
| 348 |
+
Tcl_ResolveCompiledVarProc *compiledVarProc);
|
| 349 |
+
/* 132 */
|
| 350 |
+
EXTERN int TclpHasSockets(Tcl_Interp *interp);
|
| 351 |
+
/* 133 */
|
| 352 |
+
EXTERN struct tm * TclpGetDate(const time_t *time, int useGMT);
|
| 353 |
+
/* Slot 134 is reserved */
|
| 354 |
+
/* Slot 135 is reserved */
|
| 355 |
+
/* Slot 136 is reserved */
|
| 356 |
+
/* Slot 137 is reserved */
|
| 357 |
+
/* 138 */
|
| 358 |
+
EXTERN CONST84_RETURN char * TclGetEnv(const char *name,
|
| 359 |
+
Tcl_DString *valuePtr);
|
| 360 |
+
/* Slot 139 is reserved */
|
| 361 |
+
/* Slot 140 is reserved */
|
| 362 |
+
/* 141 */
|
| 363 |
+
EXTERN CONST84_RETURN char * TclpGetCwd(Tcl_Interp *interp,
|
| 364 |
+
Tcl_DString *cwdPtr);
|
| 365 |
+
/* 142 */
|
| 366 |
+
EXTERN int TclSetByteCodeFromAny(Tcl_Interp *interp,
|
| 367 |
+
Tcl_Obj *objPtr, CompileHookProc *hookProc,
|
| 368 |
+
ClientData clientData);
|
| 369 |
+
/* 143 */
|
| 370 |
+
EXTERN int TclAddLiteralObj(struct CompileEnv *envPtr,
|
| 371 |
+
Tcl_Obj *objPtr, LiteralEntry **litPtrPtr);
|
| 372 |
+
/* 144 */
|
| 373 |
+
EXTERN void TclHideLiteral(Tcl_Interp *interp,
|
| 374 |
+
struct CompileEnv *envPtr, int index);
|
| 375 |
+
/* 145 */
|
| 376 |
+
EXTERN const struct AuxDataType * TclGetAuxDataType(const char *typeName);
|
| 377 |
+
/* 146 */
|
| 378 |
+
EXTERN TclHandle TclHandleCreate(void *ptr);
|
| 379 |
+
/* 147 */
|
| 380 |
+
EXTERN void TclHandleFree(TclHandle handle);
|
| 381 |
+
/* 148 */
|
| 382 |
+
EXTERN TclHandle TclHandlePreserve(TclHandle handle);
|
| 383 |
+
/* 149 */
|
| 384 |
+
EXTERN void TclHandleRelease(TclHandle handle);
|
| 385 |
+
/* 150 */
|
| 386 |
+
EXTERN int TclRegAbout(Tcl_Interp *interp, Tcl_RegExp re);
|
| 387 |
+
/* 151 */
|
| 388 |
+
EXTERN void TclRegExpRangeUniChar(Tcl_RegExp re, int index,
|
| 389 |
+
int *startPtr, int *endPtr);
|
| 390 |
+
/* 152 */
|
| 391 |
+
EXTERN void TclSetLibraryPath(Tcl_Obj *pathPtr);
|
| 392 |
+
/* 153 */
|
| 393 |
+
EXTERN Tcl_Obj * TclGetLibraryPath(void);
|
| 394 |
+
/* Slot 154 is reserved */
|
| 395 |
+
/* Slot 155 is reserved */
|
| 396 |
+
/* 156 */
|
| 397 |
+
EXTERN void TclRegError(Tcl_Interp *interp, const char *msg,
|
| 398 |
+
int status);
|
| 399 |
+
/* 157 */
|
| 400 |
+
EXTERN Var * TclVarTraceExists(Tcl_Interp *interp,
|
| 401 |
+
const char *varName);
|
| 402 |
+
/* 158 */
|
| 403 |
+
EXTERN void TclSetStartupScriptFileName(const char *filename);
|
| 404 |
+
/* 159 */
|
| 405 |
+
EXTERN const char * TclGetStartupScriptFileName(void);
|
| 406 |
+
/* Slot 160 is reserved */
|
| 407 |
+
/* 161 */
|
| 408 |
+
EXTERN int TclChannelTransform(Tcl_Interp *interp,
|
| 409 |
+
Tcl_Channel chan, Tcl_Obj *cmdObjPtr);
|
| 410 |
+
/* 162 */
|
| 411 |
+
EXTERN void TclChannelEventScriptInvoker(ClientData clientData,
|
| 412 |
+
int flags);
|
| 413 |
+
/* 163 */
|
| 414 |
+
EXTERN const void * TclGetInstructionTable(void);
|
| 415 |
+
/* 164 */
|
| 416 |
+
EXTERN void TclExpandCodeArray(void *envPtr);
|
| 417 |
+
/* 165 */
|
| 418 |
+
EXTERN void TclpSetInitialEncodings(void);
|
| 419 |
+
/* 166 */
|
| 420 |
+
EXTERN int TclListObjSetElement(Tcl_Interp *interp,
|
| 421 |
+
Tcl_Obj *listPtr, int index,
|
| 422 |
+
Tcl_Obj *valuePtr);
|
| 423 |
+
/* 167 */
|
| 424 |
+
EXTERN void TclSetStartupScriptPath(Tcl_Obj *pathPtr);
|
| 425 |
+
/* 168 */
|
| 426 |
+
EXTERN Tcl_Obj * TclGetStartupScriptPath(void);
|
| 427 |
+
/* 169 */
|
| 428 |
+
EXTERN int TclpUtfNcmp2(const char *s1, const char *s2,
|
| 429 |
+
unsigned long n);
|
| 430 |
+
/* 170 */
|
| 431 |
+
EXTERN int TclCheckInterpTraces(Tcl_Interp *interp,
|
| 432 |
+
const char *command, int numChars,
|
| 433 |
+
Command *cmdPtr, int result, int traceFlags,
|
| 434 |
+
int objc, Tcl_Obj *const objv[]);
|
| 435 |
+
/* 171 */
|
| 436 |
+
EXTERN int TclCheckExecutionTraces(Tcl_Interp *interp,
|
| 437 |
+
const char *command, int numChars,
|
| 438 |
+
Command *cmdPtr, int result, int traceFlags,
|
| 439 |
+
int objc, Tcl_Obj *const objv[]);
|
| 440 |
+
/* 172 */
|
| 441 |
+
EXTERN int TclInThreadExit(void);
|
| 442 |
+
/* 173 */
|
| 443 |
+
EXTERN int TclUniCharMatch(const Tcl_UniChar *string,
|
| 444 |
+
int strLen, const Tcl_UniChar *pattern,
|
| 445 |
+
int ptnLen, int flags);
|
| 446 |
+
/* Slot 174 is reserved */
|
| 447 |
+
/* 175 */
|
| 448 |
+
EXTERN int TclCallVarTraces(Interp *iPtr, Var *arrayPtr,
|
| 449 |
+
Var *varPtr, const char *part1,
|
| 450 |
+
const char *part2, int flags,
|
| 451 |
+
int leaveErrMsg);
|
| 452 |
+
/* 176 */
|
| 453 |
+
EXTERN void TclCleanupVar(Var *varPtr, Var *arrayPtr);
|
| 454 |
+
/* 177 */
|
| 455 |
+
EXTERN void TclVarErrMsg(Tcl_Interp *interp, const char *part1,
|
| 456 |
+
const char *part2, const char *operation,
|
| 457 |
+
const char *reason);
|
| 458 |
+
/* 178 */
|
| 459 |
+
EXTERN void Tcl_SetStartupScript(Tcl_Obj *pathPtr,
|
| 460 |
+
const char *encodingName);
|
| 461 |
+
/* 179 */
|
| 462 |
+
EXTERN Tcl_Obj * Tcl_GetStartupScript(const char **encodingNamePtr);
|
| 463 |
+
/* Slot 180 is reserved */
|
| 464 |
+
/* Slot 181 is reserved */
|
| 465 |
+
/* 182 */
|
| 466 |
+
EXTERN struct tm * TclpLocaltime(const time_t *clock);
|
| 467 |
+
/* 183 */
|
| 468 |
+
EXTERN struct tm * TclpGmtime(const time_t *clock);
|
| 469 |
+
/* Slot 184 is reserved */
|
| 470 |
+
/* Slot 185 is reserved */
|
| 471 |
+
/* Slot 186 is reserved */
|
| 472 |
+
/* Slot 187 is reserved */
|
| 473 |
+
/* Slot 188 is reserved */
|
| 474 |
+
/* Slot 189 is reserved */
|
| 475 |
+
/* Slot 190 is reserved */
|
| 476 |
+
/* Slot 191 is reserved */
|
| 477 |
+
/* Slot 192 is reserved */
|
| 478 |
+
/* Slot 193 is reserved */
|
| 479 |
+
/* Slot 194 is reserved */
|
| 480 |
+
/* Slot 195 is reserved */
|
| 481 |
+
/* Slot 196 is reserved */
|
| 482 |
+
/* Slot 197 is reserved */
|
| 483 |
+
/* 198 */
|
| 484 |
+
EXTERN int TclObjGetFrame(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
| 485 |
+
CallFrame **framePtrPtr);
|
| 486 |
+
/* Slot 199 is reserved */
|
| 487 |
+
/* 200 */
|
| 488 |
+
EXTERN int TclpObjRemoveDirectory(Tcl_Obj *pathPtr,
|
| 489 |
+
int recursive, Tcl_Obj **errorPtr);
|
| 490 |
+
/* 201 */
|
| 491 |
+
EXTERN int TclpObjCopyDirectory(Tcl_Obj *srcPathPtr,
|
| 492 |
+
Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr);
|
| 493 |
+
/* 202 */
|
| 494 |
+
EXTERN int TclpObjCreateDirectory(Tcl_Obj *pathPtr);
|
| 495 |
+
/* 203 */
|
| 496 |
+
EXTERN int TclpObjDeleteFile(Tcl_Obj *pathPtr);
|
| 497 |
+
/* 204 */
|
| 498 |
+
EXTERN int TclpObjCopyFile(Tcl_Obj *srcPathPtr,
|
| 499 |
+
Tcl_Obj *destPathPtr);
|
| 500 |
+
/* 205 */
|
| 501 |
+
EXTERN int TclpObjRenameFile(Tcl_Obj *srcPathPtr,
|
| 502 |
+
Tcl_Obj *destPathPtr);
|
| 503 |
+
/* 206 */
|
| 504 |
+
EXTERN int TclpObjStat(Tcl_Obj *pathPtr, Tcl_StatBuf *buf);
|
| 505 |
+
/* 207 */
|
| 506 |
+
EXTERN int TclpObjAccess(Tcl_Obj *pathPtr, int mode);
|
| 507 |
+
/* 208 */
|
| 508 |
+
EXTERN Tcl_Channel TclpOpenFileChannel(Tcl_Interp *interp,
|
| 509 |
+
Tcl_Obj *pathPtr, int mode, int permissions);
|
| 510 |
+
/* Slot 209 is reserved */
|
| 511 |
+
/* Slot 210 is reserved */
|
| 512 |
+
/* Slot 211 is reserved */
|
| 513 |
+
/* 212 */
|
| 514 |
+
EXTERN void TclpFindExecutable(const char *argv0);
|
| 515 |
+
/* 213 */
|
| 516 |
+
EXTERN Tcl_Obj * TclGetObjNameOfExecutable(void);
|
| 517 |
+
/* 214 */
|
| 518 |
+
EXTERN void TclSetObjNameOfExecutable(Tcl_Obj *name,
|
| 519 |
+
Tcl_Encoding encoding);
|
| 520 |
+
/* 215 */
|
| 521 |
+
EXTERN void * TclStackAlloc(Tcl_Interp *interp, int numBytes);
|
| 522 |
+
/* 216 */
|
| 523 |
+
EXTERN void TclStackFree(Tcl_Interp *interp, void *freePtr);
|
| 524 |
+
/* 217 */
|
| 525 |
+
EXTERN int TclPushStackFrame(Tcl_Interp *interp,
|
| 526 |
+
Tcl_CallFrame **framePtrPtr,
|
| 527 |
+
Tcl_Namespace *namespacePtr,
|
| 528 |
+
int isProcCallFrame);
|
| 529 |
+
/* 218 */
|
| 530 |
+
EXTERN void TclPopStackFrame(Tcl_Interp *interp);
|
| 531 |
+
/* Slot 219 is reserved */
|
| 532 |
+
/* Slot 220 is reserved */
|
| 533 |
+
/* Slot 221 is reserved */
|
| 534 |
+
/* Slot 222 is reserved */
|
| 535 |
+
/* 223 */
|
| 536 |
+
EXTERN void * TclGetCStackPtr(void);
|
| 537 |
+
/* 224 */
|
| 538 |
+
EXTERN TclPlatformType * TclGetPlatform(void);
|
| 539 |
+
/* 225 */
|
| 540 |
+
EXTERN Tcl_Obj * TclTraceDictPath(Tcl_Interp *interp,
|
| 541 |
+
Tcl_Obj *rootPtr, int keyc,
|
| 542 |
+
Tcl_Obj *const keyv[], int flags);
|
| 543 |
+
/* 226 */
|
| 544 |
+
EXTERN int TclObjBeingDeleted(Tcl_Obj *objPtr);
|
| 545 |
+
/* 227 */
|
| 546 |
+
EXTERN void TclSetNsPath(Namespace *nsPtr, int pathLength,
|
| 547 |
+
Tcl_Namespace *pathAry[]);
|
| 548 |
+
/* Slot 228 is reserved */
|
| 549 |
+
/* 229 */
|
| 550 |
+
EXTERN int TclPtrMakeUpvar(Tcl_Interp *interp, Var *otherP1Ptr,
|
| 551 |
+
const char *myName, int myFlags, int index);
|
| 552 |
+
/* 230 */
|
| 553 |
+
EXTERN Var * TclObjLookupVar(Tcl_Interp *interp,
|
| 554 |
+
Tcl_Obj *part1Ptr, const char *part2,
|
| 555 |
+
int flags, const char *msg, int createPart1,
|
| 556 |
+
int createPart2, Var **arrayPtrPtr);
|
| 557 |
+
/* 231 */
|
| 558 |
+
EXTERN int TclGetNamespaceFromObj(Tcl_Interp *interp,
|
| 559 |
+
Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr);
|
| 560 |
+
/* 232 */
|
| 561 |
+
EXTERN int TclEvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
| 562 |
+
int flags, const CmdFrame *invoker, int word);
|
| 563 |
+
/* 233 */
|
| 564 |
+
EXTERN void TclGetSrcInfoForPc(CmdFrame *contextPtr);
|
| 565 |
+
/* 234 */
|
| 566 |
+
EXTERN Var * TclVarHashCreateVar(TclVarHashTable *tablePtr,
|
| 567 |
+
const char *key, int *newPtr);
|
| 568 |
+
/* 235 */
|
| 569 |
+
EXTERN void TclInitVarHashTable(TclVarHashTable *tablePtr,
|
| 570 |
+
Namespace *nsPtr);
|
| 571 |
+
/* 236 */
|
| 572 |
+
EXTERN void TclBackgroundException(Tcl_Interp *interp, int code);
|
| 573 |
+
/* 237 */
|
| 574 |
+
EXTERN int TclResetCancellation(Tcl_Interp *interp, int force);
|
| 575 |
+
/* 238 */
|
| 576 |
+
EXTERN int TclNRInterpProc(ClientData clientData,
|
| 577 |
+
Tcl_Interp *interp, int objc,
|
| 578 |
+
Tcl_Obj *const objv[]);
|
| 579 |
+
/* 239 */
|
| 580 |
+
EXTERN int TclNRInterpProcCore(Tcl_Interp *interp,
|
| 581 |
+
Tcl_Obj *procNameObj, int skip,
|
| 582 |
+
ProcErrorProc *errorProc);
|
| 583 |
+
/* 240 */
|
| 584 |
+
EXTERN int TclNRRunCallbacks(Tcl_Interp *interp, int result,
|
| 585 |
+
struct NRE_callback *rootPtr);
|
| 586 |
+
/* 241 */
|
| 587 |
+
EXTERN int TclNREvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
| 588 |
+
int flags, const CmdFrame *invoker, int word);
|
| 589 |
+
/* 242 */
|
| 590 |
+
EXTERN int TclNREvalObjv(Tcl_Interp *interp, int objc,
|
| 591 |
+
Tcl_Obj *const objv[], int flags,
|
| 592 |
+
Command *cmdPtr);
|
| 593 |
+
/* 243 */
|
| 594 |
+
EXTERN void TclDbDumpActiveObjects(FILE *outFile);
|
| 595 |
+
/* 244 */
|
| 596 |
+
EXTERN Tcl_HashTable * TclGetNamespaceChildTable(Tcl_Namespace *nsPtr);
|
| 597 |
+
/* 245 */
|
| 598 |
+
EXTERN Tcl_HashTable * TclGetNamespaceCommandTable(Tcl_Namespace *nsPtr);
|
| 599 |
+
/* 246 */
|
| 600 |
+
EXTERN int TclInitRewriteEnsemble(Tcl_Interp *interp,
|
| 601 |
+
int numRemoved, int numInserted,
|
| 602 |
+
Tcl_Obj *const *objv);
|
| 603 |
+
/* 247 */
|
| 604 |
+
EXTERN void TclResetRewriteEnsemble(Tcl_Interp *interp,
|
| 605 |
+
int isRootEnsemble);
|
| 606 |
+
/* 248 */
|
| 607 |
+
EXTERN int TclCopyChannel(Tcl_Interp *interp,
|
| 608 |
+
Tcl_Channel inChan, Tcl_Channel outChan,
|
| 609 |
+
Tcl_WideInt toRead, Tcl_Obj *cmdPtr);
|
| 610 |
+
/* 249 */
|
| 611 |
+
EXTERN char * TclDoubleDigits(double dv, int ndigits, int flags,
|
| 612 |
+
int *decpt, int *signum, char **endPtr);
|
| 613 |
+
/* 250 */
|
| 614 |
+
EXTERN void TclSetSlaveCancelFlags(Tcl_Interp *interp, int flags,
|
| 615 |
+
int force);
|
| 616 |
+
/* 251 */
|
| 617 |
+
EXTERN int TclRegisterLiteral(void *envPtr, char *bytes,
|
| 618 |
+
int length, int flags);
|
| 619 |
+
/* 252 */
|
| 620 |
+
EXTERN Tcl_Obj * TclPtrGetVar(Tcl_Interp *interp, Tcl_Var varPtr,
|
| 621 |
+
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
|
| 622 |
+
Tcl_Obj *part2Ptr, int flags);
|
| 623 |
+
/* 253 */
|
| 624 |
+
EXTERN Tcl_Obj * TclPtrSetVar(Tcl_Interp *interp, Tcl_Var varPtr,
|
| 625 |
+
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
|
| 626 |
+
Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr,
|
| 627 |
+
int flags);
|
| 628 |
+
/* 254 */
|
| 629 |
+
EXTERN Tcl_Obj * TclPtrIncrObjVar(Tcl_Interp *interp, Tcl_Var varPtr,
|
| 630 |
+
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
|
| 631 |
+
Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr,
|
| 632 |
+
int flags);
|
| 633 |
+
/* 255 */
|
| 634 |
+
EXTERN int TclPtrObjMakeUpvar(Tcl_Interp *interp,
|
| 635 |
+
Tcl_Var otherPtr, Tcl_Obj *myNamePtr,
|
| 636 |
+
int myFlags);
|
| 637 |
+
/* 256 */
|
| 638 |
+
EXTERN int TclPtrUnsetVar(Tcl_Interp *interp, Tcl_Var varPtr,
|
| 639 |
+
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
|
| 640 |
+
Tcl_Obj *part2Ptr, int flags);
|
| 641 |
+
/* 257 */
|
| 642 |
+
EXTERN void TclStaticPackage(Tcl_Interp *interp,
|
| 643 |
+
const char *prefix,
|
| 644 |
+
Tcl_PackageInitProc *initProc,
|
| 645 |
+
Tcl_PackageInitProc *safeInitProc);
|
| 646 |
+
/* Slot 258 is reserved */
|
| 647 |
+
/* Slot 259 is reserved */
|
| 648 |
+
/* Slot 260 is reserved */
|
| 649 |
+
/* 261 */
|
| 650 |
+
EXTERN void TclUnusedStubEntry(void);
|
| 651 |
+
|
| 652 |
+
typedef struct TclIntStubs {
|
| 653 |
+
int magic;
|
| 654 |
+
void *hooks;
|
| 655 |
+
|
| 656 |
+
void (*reserved0)(void);
|
| 657 |
+
void (*reserved1)(void);
|
| 658 |
+
void (*reserved2)(void);
|
| 659 |
+
void (*tclAllocateFreeObjects) (void); /* 3 */
|
| 660 |
+
void (*reserved4)(void);
|
| 661 |
+
int (*tclCleanupChildren) (Tcl_Interp *interp, int numPids, Tcl_Pid *pidPtr, Tcl_Channel errorChan); /* 5 */
|
| 662 |
+
void (*tclCleanupCommand) (Command *cmdPtr); /* 6 */
|
| 663 |
+
int (*tclCopyAndCollapse) (int count, const char *src, char *dst); /* 7 */
|
| 664 |
+
int (*tclCopyChannelOld) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj *cmdPtr); /* 8 */
|
| 665 |
+
int (*tclCreatePipeline) (Tcl_Interp *interp, int argc, const char **argv, Tcl_Pid **pidArrayPtr, TclFile *inPipePtr, TclFile *outPipePtr, TclFile *errFilePtr); /* 9 */
|
| 666 |
+
int (*tclCreateProc) (Tcl_Interp *interp, Namespace *nsPtr, const char *procName, Tcl_Obj *argsPtr, Tcl_Obj *bodyPtr, Proc **procPtrPtr); /* 10 */
|
| 667 |
+
void (*tclDeleteCompiledLocalVars) (Interp *iPtr, CallFrame *framePtr); /* 11 */
|
| 668 |
+
void (*tclDeleteVars) (Interp *iPtr, TclVarHashTable *tablePtr); /* 12 */
|
| 669 |
+
void (*reserved13)(void);
|
| 670 |
+
int (*tclDumpMemoryInfo) (ClientData clientData, int flags); /* 14 */
|
| 671 |
+
void (*reserved15)(void);
|
| 672 |
+
void (*tclExprFloatError) (Tcl_Interp *interp, double value); /* 16 */
|
| 673 |
+
void (*reserved17)(void);
|
| 674 |
+
void (*reserved18)(void);
|
| 675 |
+
void (*reserved19)(void);
|
| 676 |
+
void (*reserved20)(void);
|
| 677 |
+
void (*reserved21)(void);
|
| 678 |
+
int (*tclFindElement) (Tcl_Interp *interp, const char *listStr, int listLength, const char **elementPtr, const char **nextPtr, int *sizePtr, int *bracePtr); /* 22 */
|
| 679 |
+
Proc * (*tclFindProc) (Interp *iPtr, const char *procName); /* 23 */
|
| 680 |
+
int (*tclFormatInt) (char *buffer, long n); /* 24 */
|
| 681 |
+
void (*tclFreePackageInfo) (Interp *iPtr); /* 25 */
|
| 682 |
+
void (*reserved26)(void);
|
| 683 |
+
void (*reserved27)(void);
|
| 684 |
+
Tcl_Channel (*tclpGetDefaultStdChannel) (int type); /* 28 */
|
| 685 |
+
void (*reserved29)(void);
|
| 686 |
+
void (*reserved30)(void);
|
| 687 |
+
const char * (*tclGetExtension) (const char *name); /* 31 */
|
| 688 |
+
int (*tclGetFrame) (Tcl_Interp *interp, const char *str, CallFrame **framePtrPtr); /* 32 */
|
| 689 |
+
void (*reserved33)(void);
|
| 690 |
+
int (*tclGetIntForIndex) (Tcl_Interp *interp, Tcl_Obj *objPtr, int endValue, int *indexPtr); /* 34 */
|
| 691 |
+
void (*reserved35)(void);
|
| 692 |
+
void (*reserved36)(void);
|
| 693 |
+
int (*tclGetLoadedPackages) (Tcl_Interp *interp, const char *targetName); /* 37 */
|
| 694 |
+
int (*tclGetNamespaceForQualName) (Tcl_Interp *interp, const char *qualName, Namespace *cxtNsPtr, int flags, Namespace **nsPtrPtr, Namespace **altNsPtrPtr, Namespace **actualCxtPtrPtr, const char **simpleNamePtr); /* 38 */
|
| 695 |
+
Tcl_ObjCmdProc * (*tclGetObjInterpProc) (void); /* 39 */
|
| 696 |
+
int (*tclGetOpenMode) (Tcl_Interp *interp, const char *str, int *seekFlagPtr); /* 40 */
|
| 697 |
+
Tcl_Command (*tclGetOriginalCommand) (Tcl_Command command); /* 41 */
|
| 698 |
+
CONST86 char * (*tclpGetUserHome) (const char *name, Tcl_DString *bufferPtr); /* 42 */
|
| 699 |
+
void (*reserved43)(void);
|
| 700 |
+
int (*tclGuessPackageName) (const char *fileName, Tcl_DString *bufPtr); /* 44 */
|
| 701 |
+
int (*tclHideUnsafeCommands) (Tcl_Interp *interp); /* 45 */
|
| 702 |
+
int (*tclInExit) (void); /* 46 */
|
| 703 |
+
void (*reserved47)(void);
|
| 704 |
+
void (*reserved48)(void);
|
| 705 |
+
void (*reserved49)(void);
|
| 706 |
+
void (*tclInitCompiledLocals) (Tcl_Interp *interp, CallFrame *framePtr, Namespace *nsPtr); /* 50 */
|
| 707 |
+
int (*tclInterpInit) (Tcl_Interp *interp); /* 51 */
|
| 708 |
+
void (*reserved52)(void);
|
| 709 |
+
int (*tclInvokeObjectCommand) (ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char **argv); /* 53 */
|
| 710 |
+
int (*tclInvokeStringCommand) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 54 */
|
| 711 |
+
Proc * (*tclIsProc) (Command *cmdPtr); /* 55 */
|
| 712 |
+
void (*reserved56)(void);
|
| 713 |
+
void (*reserved57)(void);
|
| 714 |
+
Var * (*tclLookupVar) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, const char *msg, int createPart1, int createPart2, Var **arrayPtrPtr); /* 58 */
|
| 715 |
+
void (*reserved59)(void);
|
| 716 |
+
int (*tclNeedSpace) (const char *start, const char *end); /* 60 */
|
| 717 |
+
Tcl_Obj * (*tclNewProcBodyObj) (Proc *procPtr); /* 61 */
|
| 718 |
+
int (*tclObjCommandComplete) (Tcl_Obj *cmdPtr); /* 62 */
|
| 719 |
+
int (*tclObjInterpProc) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 63 */
|
| 720 |
+
int (*tclObjInvoke) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 64 */
|
| 721 |
+
void (*reserved65)(void);
|
| 722 |
+
void (*reserved66)(void);
|
| 723 |
+
void (*reserved67)(void);
|
| 724 |
+
void (*reserved68)(void);
|
| 725 |
+
char * (*tclpAlloc) (unsigned int size); /* 69 */
|
| 726 |
+
void (*reserved70)(void);
|
| 727 |
+
void (*reserved71)(void);
|
| 728 |
+
void (*reserved72)(void);
|
| 729 |
+
void (*reserved73)(void);
|
| 730 |
+
void (*tclpFree) (char *ptr); /* 74 */
|
| 731 |
+
unsigned long (*tclpGetClicks) (void); /* 75 */
|
| 732 |
+
unsigned long (*tclpGetSeconds) (void); /* 76 */
|
| 733 |
+
void (*tclpGetTime) (Tcl_Time *time); /* 77 */
|
| 734 |
+
void (*reserved78)(void);
|
| 735 |
+
void (*reserved79)(void);
|
| 736 |
+
void (*reserved80)(void);
|
| 737 |
+
char * (*tclpRealloc) (char *ptr, unsigned int size); /* 81 */
|
| 738 |
+
void (*reserved82)(void);
|
| 739 |
+
void (*reserved83)(void);
|
| 740 |
+
void (*reserved84)(void);
|
| 741 |
+
void (*reserved85)(void);
|
| 742 |
+
void (*reserved86)(void);
|
| 743 |
+
void (*reserved87)(void);
|
| 744 |
+
char * (*tclPrecTraceProc) (ClientData clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); /* 88 */
|
| 745 |
+
int (*tclPreventAliasLoop) (Tcl_Interp *interp, Tcl_Interp *cmdInterp, Tcl_Command cmd); /* 89 */
|
| 746 |
+
void (*reserved90)(void);
|
| 747 |
+
void (*tclProcCleanupProc) (Proc *procPtr); /* 91 */
|
| 748 |
+
int (*tclProcCompileProc) (Tcl_Interp *interp, Proc *procPtr, Tcl_Obj *bodyPtr, Namespace *nsPtr, const char *description, const char *procName); /* 92 */
|
| 749 |
+
void (*tclProcDeleteProc) (ClientData clientData); /* 93 */
|
| 750 |
+
void (*reserved94)(void);
|
| 751 |
+
void (*reserved95)(void);
|
| 752 |
+
int (*tclRenameCommand) (Tcl_Interp *interp, const char *oldName, const char *newName); /* 96 */
|
| 753 |
+
void (*tclResetShadowedCmdRefs) (Tcl_Interp *interp, Command *newCmdPtr); /* 97 */
|
| 754 |
+
int (*tclServiceIdle) (void); /* 98 */
|
| 755 |
+
void (*reserved99)(void);
|
| 756 |
+
void (*reserved100)(void);
|
| 757 |
+
CONST86 char * (*tclSetPreInitScript) (const char *string); /* 101 */
|
| 758 |
+
void (*tclSetupEnv) (Tcl_Interp *interp); /* 102 */
|
| 759 |
+
int (*tclSockGetPort) (Tcl_Interp *interp, const char *str, const char *proto, int *portPtr); /* 103 */
|
| 760 |
+
int (*tclSockMinimumBuffersOld) (int sock, int size); /* 104 */
|
| 761 |
+
void (*reserved105)(void);
|
| 762 |
+
void (*reserved106)(void);
|
| 763 |
+
void (*reserved107)(void);
|
| 764 |
+
void (*tclTeardownNamespace) (Namespace *nsPtr); /* 108 */
|
| 765 |
+
int (*tclUpdateReturnInfo) (Interp *iPtr); /* 109 */
|
| 766 |
+
int (*tclSockMinimumBuffers) (void *sock, int size); /* 110 */
|
| 767 |
+
void (*tcl_AddInterpResolvers) (Tcl_Interp *interp, const char *name, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc); /* 111 */
|
| 768 |
+
int (*tcl_AppendExportList) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, Tcl_Obj *objPtr); /* 112 */
|
| 769 |
+
Tcl_Namespace * (*tcl_CreateNamespace) (Tcl_Interp *interp, const char *name, ClientData clientData, Tcl_NamespaceDeleteProc *deleteProc); /* 113 */
|
| 770 |
+
void (*tcl_DeleteNamespace) (Tcl_Namespace *nsPtr); /* 114 */
|
| 771 |
+
int (*tcl_Export) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int resetListFirst); /* 115 */
|
| 772 |
+
Tcl_Command (*tcl_FindCommand) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 116 */
|
| 773 |
+
Tcl_Namespace * (*tcl_FindNamespace) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 117 */
|
| 774 |
+
int (*tcl_GetInterpResolvers) (Tcl_Interp *interp, const char *name, Tcl_ResolverInfo *resInfo); /* 118 */
|
| 775 |
+
int (*tcl_GetNamespaceResolvers) (Tcl_Namespace *namespacePtr, Tcl_ResolverInfo *resInfo); /* 119 */
|
| 776 |
+
Tcl_Var (*tcl_FindNamespaceVar) (Tcl_Interp *interp, const char *name, Tcl_Namespace *contextNsPtr, int flags); /* 120 */
|
| 777 |
+
int (*tcl_ForgetImport) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern); /* 121 */
|
| 778 |
+
Tcl_Command (*tcl_GetCommandFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 122 */
|
| 779 |
+
void (*tcl_GetCommandFullName) (Tcl_Interp *interp, Tcl_Command command, Tcl_Obj *objPtr); /* 123 */
|
| 780 |
+
Tcl_Namespace * (*tcl_GetCurrentNamespace) (Tcl_Interp *interp); /* 124 */
|
| 781 |
+
Tcl_Namespace * (*tcl_GetGlobalNamespace) (Tcl_Interp *interp); /* 125 */
|
| 782 |
+
void (*tcl_GetVariableFullName) (Tcl_Interp *interp, Tcl_Var variable, Tcl_Obj *objPtr); /* 126 */
|
| 783 |
+
int (*tcl_Import) (Tcl_Interp *interp, Tcl_Namespace *nsPtr, const char *pattern, int allowOverwrite); /* 127 */
|
| 784 |
+
void (*tcl_PopCallFrame) (Tcl_Interp *interp); /* 128 */
|
| 785 |
+
int (*tcl_PushCallFrame) (Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame); /* 129 */
|
| 786 |
+
int (*tcl_RemoveInterpResolvers) (Tcl_Interp *interp, const char *name); /* 130 */
|
| 787 |
+
void (*tcl_SetNamespaceResolvers) (Tcl_Namespace *namespacePtr, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc); /* 131 */
|
| 788 |
+
int (*tclpHasSockets) (Tcl_Interp *interp); /* 132 */
|
| 789 |
+
struct tm * (*tclpGetDate) (const time_t *time, int useGMT); /* 133 */
|
| 790 |
+
void (*reserved134)(void);
|
| 791 |
+
void (*reserved135)(void);
|
| 792 |
+
void (*reserved136)(void);
|
| 793 |
+
void (*reserved137)(void);
|
| 794 |
+
CONST84_RETURN char * (*tclGetEnv) (const char *name, Tcl_DString *valuePtr); /* 138 */
|
| 795 |
+
void (*reserved139)(void);
|
| 796 |
+
void (*reserved140)(void);
|
| 797 |
+
CONST84_RETURN char * (*tclpGetCwd) (Tcl_Interp *interp, Tcl_DString *cwdPtr); /* 141 */
|
| 798 |
+
int (*tclSetByteCodeFromAny) (Tcl_Interp *interp, Tcl_Obj *objPtr, CompileHookProc *hookProc, ClientData clientData); /* 142 */
|
| 799 |
+
int (*tclAddLiteralObj) (struct CompileEnv *envPtr, Tcl_Obj *objPtr, LiteralEntry **litPtrPtr); /* 143 */
|
| 800 |
+
void (*tclHideLiteral) (Tcl_Interp *interp, struct CompileEnv *envPtr, int index); /* 144 */
|
| 801 |
+
const struct AuxDataType * (*tclGetAuxDataType) (const char *typeName); /* 145 */
|
| 802 |
+
TclHandle (*tclHandleCreate) (void *ptr); /* 146 */
|
| 803 |
+
void (*tclHandleFree) (TclHandle handle); /* 147 */
|
| 804 |
+
TclHandle (*tclHandlePreserve) (TclHandle handle); /* 148 */
|
| 805 |
+
void (*tclHandleRelease) (TclHandle handle); /* 149 */
|
| 806 |
+
int (*tclRegAbout) (Tcl_Interp *interp, Tcl_RegExp re); /* 150 */
|
| 807 |
+
void (*tclRegExpRangeUniChar) (Tcl_RegExp re, int index, int *startPtr, int *endPtr); /* 151 */
|
| 808 |
+
void (*tclSetLibraryPath) (Tcl_Obj *pathPtr); /* 152 */
|
| 809 |
+
Tcl_Obj * (*tclGetLibraryPath) (void); /* 153 */
|
| 810 |
+
void (*reserved154)(void);
|
| 811 |
+
void (*reserved155)(void);
|
| 812 |
+
void (*tclRegError) (Tcl_Interp *interp, const char *msg, int status); /* 156 */
|
| 813 |
+
Var * (*tclVarTraceExists) (Tcl_Interp *interp, const char *varName); /* 157 */
|
| 814 |
+
void (*tclSetStartupScriptFileName) (const char *filename); /* 158 */
|
| 815 |
+
const char * (*tclGetStartupScriptFileName) (void); /* 159 */
|
| 816 |
+
void (*reserved160)(void);
|
| 817 |
+
int (*tclChannelTransform) (Tcl_Interp *interp, Tcl_Channel chan, Tcl_Obj *cmdObjPtr); /* 161 */
|
| 818 |
+
void (*tclChannelEventScriptInvoker) (ClientData clientData, int flags); /* 162 */
|
| 819 |
+
const void * (*tclGetInstructionTable) (void); /* 163 */
|
| 820 |
+
void (*tclExpandCodeArray) (void *envPtr); /* 164 */
|
| 821 |
+
void (*tclpSetInitialEncodings) (void); /* 165 */
|
| 822 |
+
int (*tclListObjSetElement) (Tcl_Interp *interp, Tcl_Obj *listPtr, int index, Tcl_Obj *valuePtr); /* 166 */
|
| 823 |
+
void (*tclSetStartupScriptPath) (Tcl_Obj *pathPtr); /* 167 */
|
| 824 |
+
Tcl_Obj * (*tclGetStartupScriptPath) (void); /* 168 */
|
| 825 |
+
int (*tclpUtfNcmp2) (const char *s1, const char *s2, unsigned long n); /* 169 */
|
| 826 |
+
int (*tclCheckInterpTraces) (Tcl_Interp *interp, const char *command, int numChars, Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 170 */
|
| 827 |
+
int (*tclCheckExecutionTraces) (Tcl_Interp *interp, const char *command, int numChars, Command *cmdPtr, int result, int traceFlags, int objc, Tcl_Obj *const objv[]); /* 171 */
|
| 828 |
+
int (*tclInThreadExit) (void); /* 172 */
|
| 829 |
+
int (*tclUniCharMatch) (const Tcl_UniChar *string, int strLen, const Tcl_UniChar *pattern, int ptnLen, int flags); /* 173 */
|
| 830 |
+
void (*reserved174)(void);
|
| 831 |
+
int (*tclCallVarTraces) (Interp *iPtr, Var *arrayPtr, Var *varPtr, const char *part1, const char *part2, int flags, int leaveErrMsg); /* 175 */
|
| 832 |
+
void (*tclCleanupVar) (Var *varPtr, Var *arrayPtr); /* 176 */
|
| 833 |
+
void (*tclVarErrMsg) (Tcl_Interp *interp, const char *part1, const char *part2, const char *operation, const char *reason); /* 177 */
|
| 834 |
+
void (*tcl_SetStartupScript) (Tcl_Obj *pathPtr, const char *encodingName); /* 178 */
|
| 835 |
+
Tcl_Obj * (*tcl_GetStartupScript) (const char **encodingNamePtr); /* 179 */
|
| 836 |
+
void (*reserved180)(void);
|
| 837 |
+
void (*reserved181)(void);
|
| 838 |
+
struct tm * (*tclpLocaltime) (const time_t *clock); /* 182 */
|
| 839 |
+
struct tm * (*tclpGmtime) (const time_t *clock); /* 183 */
|
| 840 |
+
void (*reserved184)(void);
|
| 841 |
+
void (*reserved185)(void);
|
| 842 |
+
void (*reserved186)(void);
|
| 843 |
+
void (*reserved187)(void);
|
| 844 |
+
void (*reserved188)(void);
|
| 845 |
+
void (*reserved189)(void);
|
| 846 |
+
void (*reserved190)(void);
|
| 847 |
+
void (*reserved191)(void);
|
| 848 |
+
void (*reserved192)(void);
|
| 849 |
+
void (*reserved193)(void);
|
| 850 |
+
void (*reserved194)(void);
|
| 851 |
+
void (*reserved195)(void);
|
| 852 |
+
void (*reserved196)(void);
|
| 853 |
+
void (*reserved197)(void);
|
| 854 |
+
int (*tclObjGetFrame) (Tcl_Interp *interp, Tcl_Obj *objPtr, CallFrame **framePtrPtr); /* 198 */
|
| 855 |
+
void (*reserved199)(void);
|
| 856 |
+
int (*tclpObjRemoveDirectory) (Tcl_Obj *pathPtr, int recursive, Tcl_Obj **errorPtr); /* 200 */
|
| 857 |
+
int (*tclpObjCopyDirectory) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr, Tcl_Obj **errorPtr); /* 201 */
|
| 858 |
+
int (*tclpObjCreateDirectory) (Tcl_Obj *pathPtr); /* 202 */
|
| 859 |
+
int (*tclpObjDeleteFile) (Tcl_Obj *pathPtr); /* 203 */
|
| 860 |
+
int (*tclpObjCopyFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 204 */
|
| 861 |
+
int (*tclpObjRenameFile) (Tcl_Obj *srcPathPtr, Tcl_Obj *destPathPtr); /* 205 */
|
| 862 |
+
int (*tclpObjStat) (Tcl_Obj *pathPtr, Tcl_StatBuf *buf); /* 206 */
|
| 863 |
+
int (*tclpObjAccess) (Tcl_Obj *pathPtr, int mode); /* 207 */
|
| 864 |
+
Tcl_Channel (*tclpOpenFileChannel) (Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions); /* 208 */
|
| 865 |
+
void (*reserved209)(void);
|
| 866 |
+
void (*reserved210)(void);
|
| 867 |
+
void (*reserved211)(void);
|
| 868 |
+
void (*tclpFindExecutable) (const char *argv0); /* 212 */
|
| 869 |
+
Tcl_Obj * (*tclGetObjNameOfExecutable) (void); /* 213 */
|
| 870 |
+
void (*tclSetObjNameOfExecutable) (Tcl_Obj *name, Tcl_Encoding encoding); /* 214 */
|
| 871 |
+
void * (*tclStackAlloc) (Tcl_Interp *interp, int numBytes); /* 215 */
|
| 872 |
+
void (*tclStackFree) (Tcl_Interp *interp, void *freePtr); /* 216 */
|
| 873 |
+
int (*tclPushStackFrame) (Tcl_Interp *interp, Tcl_CallFrame **framePtrPtr, Tcl_Namespace *namespacePtr, int isProcCallFrame); /* 217 */
|
| 874 |
+
void (*tclPopStackFrame) (Tcl_Interp *interp); /* 218 */
|
| 875 |
+
void (*reserved219)(void);
|
| 876 |
+
void (*reserved220)(void);
|
| 877 |
+
void (*reserved221)(void);
|
| 878 |
+
void (*reserved222)(void);
|
| 879 |
+
void * (*tclGetCStackPtr) (void); /* 223 */
|
| 880 |
+
TclPlatformType * (*tclGetPlatform) (void); /* 224 */
|
| 881 |
+
Tcl_Obj * (*tclTraceDictPath) (Tcl_Interp *interp, Tcl_Obj *rootPtr, int keyc, Tcl_Obj *const keyv[], int flags); /* 225 */
|
| 882 |
+
int (*tclObjBeingDeleted) (Tcl_Obj *objPtr); /* 226 */
|
| 883 |
+
void (*tclSetNsPath) (Namespace *nsPtr, int pathLength, Tcl_Namespace *pathAry[]); /* 227 */
|
| 884 |
+
void (*reserved228)(void);
|
| 885 |
+
int (*tclPtrMakeUpvar) (Tcl_Interp *interp, Var *otherP1Ptr, const char *myName, int myFlags, int index); /* 229 */
|
| 886 |
+
Var * (*tclObjLookupVar) (Tcl_Interp *interp, Tcl_Obj *part1Ptr, const char *part2, int flags, const char *msg, int createPart1, int createPart2, Var **arrayPtrPtr); /* 230 */
|
| 887 |
+
int (*tclGetNamespaceFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr); /* 231 */
|
| 888 |
+
int (*tclEvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, const CmdFrame *invoker, int word); /* 232 */
|
| 889 |
+
void (*tclGetSrcInfoForPc) (CmdFrame *contextPtr); /* 233 */
|
| 890 |
+
Var * (*tclVarHashCreateVar) (TclVarHashTable *tablePtr, const char *key, int *newPtr); /* 234 */
|
| 891 |
+
void (*tclInitVarHashTable) (TclVarHashTable *tablePtr, Namespace *nsPtr); /* 235 */
|
| 892 |
+
void (*tclBackgroundException) (Tcl_Interp *interp, int code); /* 236 */
|
| 893 |
+
int (*tclResetCancellation) (Tcl_Interp *interp, int force); /* 237 */
|
| 894 |
+
int (*tclNRInterpProc) (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* 238 */
|
| 895 |
+
int (*tclNRInterpProcCore) (Tcl_Interp *interp, Tcl_Obj *procNameObj, int skip, ProcErrorProc *errorProc); /* 239 */
|
| 896 |
+
int (*tclNRRunCallbacks) (Tcl_Interp *interp, int result, struct NRE_callback *rootPtr); /* 240 */
|
| 897 |
+
int (*tclNREvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags, const CmdFrame *invoker, int word); /* 241 */
|
| 898 |
+
int (*tclNREvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags, Command *cmdPtr); /* 242 */
|
| 899 |
+
void (*tclDbDumpActiveObjects) (FILE *outFile); /* 243 */
|
| 900 |
+
Tcl_HashTable * (*tclGetNamespaceChildTable) (Tcl_Namespace *nsPtr); /* 244 */
|
| 901 |
+
Tcl_HashTable * (*tclGetNamespaceCommandTable) (Tcl_Namespace *nsPtr); /* 245 */
|
| 902 |
+
int (*tclInitRewriteEnsemble) (Tcl_Interp *interp, int numRemoved, int numInserted, Tcl_Obj *const *objv); /* 246 */
|
| 903 |
+
void (*tclResetRewriteEnsemble) (Tcl_Interp *interp, int isRootEnsemble); /* 247 */
|
| 904 |
+
int (*tclCopyChannel) (Tcl_Interp *interp, Tcl_Channel inChan, Tcl_Channel outChan, Tcl_WideInt toRead, Tcl_Obj *cmdPtr); /* 248 */
|
| 905 |
+
char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */
|
| 906 |
+
void (*tclSetSlaveCancelFlags) (Tcl_Interp *interp, int flags, int force); /* 250 */
|
| 907 |
+
int (*tclRegisterLiteral) (void *envPtr, char *bytes, int length, int flags); /* 251 */
|
| 908 |
+
Tcl_Obj * (*tclPtrGetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags); /* 252 */
|
| 909 |
+
Tcl_Obj * (*tclPtrSetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags); /* 253 */
|
| 910 |
+
Tcl_Obj * (*tclPtrIncrObjVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, int flags); /* 254 */
|
| 911 |
+
int (*tclPtrObjMakeUpvar) (Tcl_Interp *interp, Tcl_Var otherPtr, Tcl_Obj *myNamePtr, int myFlags); /* 255 */
|
| 912 |
+
int (*tclPtrUnsetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags); /* 256 */
|
| 913 |
+
void (*tclStaticPackage) (Tcl_Interp *interp, const char *prefix, Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc); /* 257 */
|
| 914 |
+
void (*reserved258)(void);
|
| 915 |
+
void (*reserved259)(void);
|
| 916 |
+
void (*reserved260)(void);
|
| 917 |
+
void (*tclUnusedStubEntry) (void); /* 261 */
|
| 918 |
+
} TclIntStubs;
|
| 919 |
+
|
| 920 |
+
extern const TclIntStubs *tclIntStubsPtr;
|
| 921 |
+
|
| 922 |
+
#ifdef __cplusplus
|
| 923 |
+
}
|
| 924 |
+
#endif
|
| 925 |
+
|
| 926 |
+
#if defined(USE_TCL_STUBS)
|
| 927 |
+
|
| 928 |
+
/*
|
| 929 |
+
* Inline function declarations:
|
| 930 |
+
*/
|
| 931 |
+
|
| 932 |
+
/* Slot 0 is reserved */
|
| 933 |
+
/* Slot 1 is reserved */
|
| 934 |
+
/* Slot 2 is reserved */
|
| 935 |
+
#define TclAllocateFreeObjects \
|
| 936 |
+
(tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */
|
| 937 |
+
/* Slot 4 is reserved */
|
| 938 |
+
#define TclCleanupChildren \
|
| 939 |
+
(tclIntStubsPtr->tclCleanupChildren) /* 5 */
|
| 940 |
+
#define TclCleanupCommand \
|
| 941 |
+
(tclIntStubsPtr->tclCleanupCommand) /* 6 */
|
| 942 |
+
#define TclCopyAndCollapse \
|
| 943 |
+
(tclIntStubsPtr->tclCopyAndCollapse) /* 7 */
|
| 944 |
+
#define TclCopyChannelOld \
|
| 945 |
+
(tclIntStubsPtr->tclCopyChannelOld) /* 8 */
|
| 946 |
+
#define TclCreatePipeline \
|
| 947 |
+
(tclIntStubsPtr->tclCreatePipeline) /* 9 */
|
| 948 |
+
#define TclCreateProc \
|
| 949 |
+
(tclIntStubsPtr->tclCreateProc) /* 10 */
|
| 950 |
+
#define TclDeleteCompiledLocalVars \
|
| 951 |
+
(tclIntStubsPtr->tclDeleteCompiledLocalVars) /* 11 */
|
| 952 |
+
#define TclDeleteVars \
|
| 953 |
+
(tclIntStubsPtr->tclDeleteVars) /* 12 */
|
| 954 |
+
/* Slot 13 is reserved */
|
| 955 |
+
#define TclDumpMemoryInfo \
|
| 956 |
+
(tclIntStubsPtr->tclDumpMemoryInfo) /* 14 */
|
| 957 |
+
/* Slot 15 is reserved */
|
| 958 |
+
#define TclExprFloatError \
|
| 959 |
+
(tclIntStubsPtr->tclExprFloatError) /* 16 */
|
| 960 |
+
/* Slot 17 is reserved */
|
| 961 |
+
/* Slot 18 is reserved */
|
| 962 |
+
/* Slot 19 is reserved */
|
| 963 |
+
/* Slot 20 is reserved */
|
| 964 |
+
/* Slot 21 is reserved */
|
| 965 |
+
#define TclFindElement \
|
| 966 |
+
(tclIntStubsPtr->tclFindElement) /* 22 */
|
| 967 |
+
#define TclFindProc \
|
| 968 |
+
(tclIntStubsPtr->tclFindProc) /* 23 */
|
| 969 |
+
#define TclFormatInt \
|
| 970 |
+
(tclIntStubsPtr->tclFormatInt) /* 24 */
|
| 971 |
+
#define TclFreePackageInfo \
|
| 972 |
+
(tclIntStubsPtr->tclFreePackageInfo) /* 25 */
|
| 973 |
+
/* Slot 26 is reserved */
|
| 974 |
+
/* Slot 27 is reserved */
|
| 975 |
+
#define TclpGetDefaultStdChannel \
|
| 976 |
+
(tclIntStubsPtr->tclpGetDefaultStdChannel) /* 28 */
|
| 977 |
+
/* Slot 29 is reserved */
|
| 978 |
+
/* Slot 30 is reserved */
|
| 979 |
+
#define TclGetExtension \
|
| 980 |
+
(tclIntStubsPtr->tclGetExtension) /* 31 */
|
| 981 |
+
#define TclGetFrame \
|
| 982 |
+
(tclIntStubsPtr->tclGetFrame) /* 32 */
|
| 983 |
+
/* Slot 33 is reserved */
|
| 984 |
+
#define TclGetIntForIndex \
|
| 985 |
+
(tclIntStubsPtr->tclGetIntForIndex) /* 34 */
|
| 986 |
+
/* Slot 35 is reserved */
|
| 987 |
+
/* Slot 36 is reserved */
|
| 988 |
+
#define TclGetLoadedPackages \
|
| 989 |
+
(tclIntStubsPtr->tclGetLoadedPackages) /* 37 */
|
| 990 |
+
#define TclGetNamespaceForQualName \
|
| 991 |
+
(tclIntStubsPtr->tclGetNamespaceForQualName) /* 38 */
|
| 992 |
+
#define TclGetObjInterpProc \
|
| 993 |
+
(tclIntStubsPtr->tclGetObjInterpProc) /* 39 */
|
| 994 |
+
#define TclGetOpenMode \
|
| 995 |
+
(tclIntStubsPtr->tclGetOpenMode) /* 40 */
|
| 996 |
+
#define TclGetOriginalCommand \
|
| 997 |
+
(tclIntStubsPtr->tclGetOriginalCommand) /* 41 */
|
| 998 |
+
#define TclpGetUserHome \
|
| 999 |
+
(tclIntStubsPtr->tclpGetUserHome) /* 42 */
|
| 1000 |
+
/* Slot 43 is reserved */
|
| 1001 |
+
#define TclGuessPackageName \
|
| 1002 |
+
(tclIntStubsPtr->tclGuessPackageName) /* 44 */
|
| 1003 |
+
#define TclHideUnsafeCommands \
|
| 1004 |
+
(tclIntStubsPtr->tclHideUnsafeCommands) /* 45 */
|
| 1005 |
+
#define TclInExit \
|
| 1006 |
+
(tclIntStubsPtr->tclInExit) /* 46 */
|
| 1007 |
+
/* Slot 47 is reserved */
|
| 1008 |
+
/* Slot 48 is reserved */
|
| 1009 |
+
/* Slot 49 is reserved */
|
| 1010 |
+
#define TclInitCompiledLocals \
|
| 1011 |
+
(tclIntStubsPtr->tclInitCompiledLocals) /* 50 */
|
| 1012 |
+
#define TclInterpInit \
|
| 1013 |
+
(tclIntStubsPtr->tclInterpInit) /* 51 */
|
| 1014 |
+
/* Slot 52 is reserved */
|
| 1015 |
+
#define TclInvokeObjectCommand \
|
| 1016 |
+
(tclIntStubsPtr->tclInvokeObjectCommand) /* 53 */
|
| 1017 |
+
#define TclInvokeStringCommand \
|
| 1018 |
+
(tclIntStubsPtr->tclInvokeStringCommand) /* 54 */
|
| 1019 |
+
#define TclIsProc \
|
| 1020 |
+
(tclIntStubsPtr->tclIsProc) /* 55 */
|
| 1021 |
+
/* Slot 56 is reserved */
|
| 1022 |
+
/* Slot 57 is reserved */
|
| 1023 |
+
#define TclLookupVar \
|
| 1024 |
+
(tclIntStubsPtr->tclLookupVar) /* 58 */
|
| 1025 |
+
/* Slot 59 is reserved */
|
| 1026 |
+
#define TclNeedSpace \
|
| 1027 |
+
(tclIntStubsPtr->tclNeedSpace) /* 60 */
|
| 1028 |
+
#define TclNewProcBodyObj \
|
| 1029 |
+
(tclIntStubsPtr->tclNewProcBodyObj) /* 61 */
|
| 1030 |
+
#define TclObjCommandComplete \
|
| 1031 |
+
(tclIntStubsPtr->tclObjCommandComplete) /* 62 */
|
| 1032 |
+
#define TclObjInterpProc \
|
| 1033 |
+
(tclIntStubsPtr->tclObjInterpProc) /* 63 */
|
| 1034 |
+
#define TclObjInvoke \
|
| 1035 |
+
(tclIntStubsPtr->tclObjInvoke) /* 64 */
|
| 1036 |
+
/* Slot 65 is reserved */
|
| 1037 |
+
/* Slot 66 is reserved */
|
| 1038 |
+
/* Slot 67 is reserved */
|
| 1039 |
+
/* Slot 68 is reserved */
|
| 1040 |
+
#define TclpAlloc \
|
| 1041 |
+
(tclIntStubsPtr->tclpAlloc) /* 69 */
|
| 1042 |
+
/* Slot 70 is reserved */
|
| 1043 |
+
/* Slot 71 is reserved */
|
| 1044 |
+
/* Slot 72 is reserved */
|
| 1045 |
+
/* Slot 73 is reserved */
|
| 1046 |
+
#define TclpFree \
|
| 1047 |
+
(tclIntStubsPtr->tclpFree) /* 74 */
|
| 1048 |
+
#define TclpGetClicks \
|
| 1049 |
+
(tclIntStubsPtr->tclpGetClicks) /* 75 */
|
| 1050 |
+
#define TclpGetSeconds \
|
| 1051 |
+
(tclIntStubsPtr->tclpGetSeconds) /* 76 */
|
| 1052 |
+
#define TclpGetTime \
|
| 1053 |
+
(tclIntStubsPtr->tclpGetTime) /* 77 */
|
| 1054 |
+
/* Slot 78 is reserved */
|
| 1055 |
+
/* Slot 79 is reserved */
|
| 1056 |
+
/* Slot 80 is reserved */
|
| 1057 |
+
#define TclpRealloc \
|
| 1058 |
+
(tclIntStubsPtr->tclpRealloc) /* 81 */
|
| 1059 |
+
/* Slot 82 is reserved */
|
| 1060 |
+
/* Slot 83 is reserved */
|
| 1061 |
+
/* Slot 84 is reserved */
|
| 1062 |
+
/* Slot 85 is reserved */
|
| 1063 |
+
/* Slot 86 is reserved */
|
| 1064 |
+
/* Slot 87 is reserved */
|
| 1065 |
+
#define TclPrecTraceProc \
|
| 1066 |
+
(tclIntStubsPtr->tclPrecTraceProc) /* 88 */
|
| 1067 |
+
#define TclPreventAliasLoop \
|
| 1068 |
+
(tclIntStubsPtr->tclPreventAliasLoop) /* 89 */
|
| 1069 |
+
/* Slot 90 is reserved */
|
| 1070 |
+
#define TclProcCleanupProc \
|
| 1071 |
+
(tclIntStubsPtr->tclProcCleanupProc) /* 91 */
|
| 1072 |
+
#define TclProcCompileProc \
|
| 1073 |
+
(tclIntStubsPtr->tclProcCompileProc) /* 92 */
|
| 1074 |
+
#define TclProcDeleteProc \
|
| 1075 |
+
(tclIntStubsPtr->tclProcDeleteProc) /* 93 */
|
| 1076 |
+
/* Slot 94 is reserved */
|
| 1077 |
+
/* Slot 95 is reserved */
|
| 1078 |
+
#define TclRenameCommand \
|
| 1079 |
+
(tclIntStubsPtr->tclRenameCommand) /* 96 */
|
| 1080 |
+
#define TclResetShadowedCmdRefs \
|
| 1081 |
+
(tclIntStubsPtr->tclResetShadowedCmdRefs) /* 97 */
|
| 1082 |
+
#define TclServiceIdle \
|
| 1083 |
+
(tclIntStubsPtr->tclServiceIdle) /* 98 */
|
| 1084 |
+
/* Slot 99 is reserved */
|
| 1085 |
+
/* Slot 100 is reserved */
|
| 1086 |
+
#define TclSetPreInitScript \
|
| 1087 |
+
(tclIntStubsPtr->tclSetPreInitScript) /* 101 */
|
| 1088 |
+
#define TclSetupEnv \
|
| 1089 |
+
(tclIntStubsPtr->tclSetupEnv) /* 102 */
|
| 1090 |
+
#define TclSockGetPort \
|
| 1091 |
+
(tclIntStubsPtr->tclSockGetPort) /* 103 */
|
| 1092 |
+
#define TclSockMinimumBuffersOld \
|
| 1093 |
+
(tclIntStubsPtr->tclSockMinimumBuffersOld) /* 104 */
|
| 1094 |
+
/* Slot 105 is reserved */
|
| 1095 |
+
/* Slot 106 is reserved */
|
| 1096 |
+
/* Slot 107 is reserved */
|
| 1097 |
+
#define TclTeardownNamespace \
|
| 1098 |
+
(tclIntStubsPtr->tclTeardownNamespace) /* 108 */
|
| 1099 |
+
#define TclUpdateReturnInfo \
|
| 1100 |
+
(tclIntStubsPtr->tclUpdateReturnInfo) /* 109 */
|
| 1101 |
+
#define TclSockMinimumBuffers \
|
| 1102 |
+
(tclIntStubsPtr->tclSockMinimumBuffers) /* 110 */
|
| 1103 |
+
#define Tcl_AddInterpResolvers \
|
| 1104 |
+
(tclIntStubsPtr->tcl_AddInterpResolvers) /* 111 */
|
| 1105 |
+
#define Tcl_AppendExportList \
|
| 1106 |
+
(tclIntStubsPtr->tcl_AppendExportList) /* 112 */
|
| 1107 |
+
#define Tcl_CreateNamespace \
|
| 1108 |
+
(tclIntStubsPtr->tcl_CreateNamespace) /* 113 */
|
| 1109 |
+
#define Tcl_DeleteNamespace \
|
| 1110 |
+
(tclIntStubsPtr->tcl_DeleteNamespace) /* 114 */
|
| 1111 |
+
#define Tcl_Export \
|
| 1112 |
+
(tclIntStubsPtr->tcl_Export) /* 115 */
|
| 1113 |
+
#define Tcl_FindCommand \
|
| 1114 |
+
(tclIntStubsPtr->tcl_FindCommand) /* 116 */
|
| 1115 |
+
#define Tcl_FindNamespace \
|
| 1116 |
+
(tclIntStubsPtr->tcl_FindNamespace) /* 117 */
|
| 1117 |
+
#define Tcl_GetInterpResolvers \
|
| 1118 |
+
(tclIntStubsPtr->tcl_GetInterpResolvers) /* 118 */
|
| 1119 |
+
#define Tcl_GetNamespaceResolvers \
|
| 1120 |
+
(tclIntStubsPtr->tcl_GetNamespaceResolvers) /* 119 */
|
| 1121 |
+
#define Tcl_FindNamespaceVar \
|
| 1122 |
+
(tclIntStubsPtr->tcl_FindNamespaceVar) /* 120 */
|
| 1123 |
+
#define Tcl_ForgetImport \
|
| 1124 |
+
(tclIntStubsPtr->tcl_ForgetImport) /* 121 */
|
| 1125 |
+
#define Tcl_GetCommandFromObj \
|
| 1126 |
+
(tclIntStubsPtr->tcl_GetCommandFromObj) /* 122 */
|
| 1127 |
+
#define Tcl_GetCommandFullName \
|
| 1128 |
+
(tclIntStubsPtr->tcl_GetCommandFullName) /* 123 */
|
| 1129 |
+
#define Tcl_GetCurrentNamespace \
|
| 1130 |
+
(tclIntStubsPtr->tcl_GetCurrentNamespace) /* 124 */
|
| 1131 |
+
#define Tcl_GetGlobalNamespace \
|
| 1132 |
+
(tclIntStubsPtr->tcl_GetGlobalNamespace) /* 125 */
|
| 1133 |
+
#define Tcl_GetVariableFullName \
|
| 1134 |
+
(tclIntStubsPtr->tcl_GetVariableFullName) /* 126 */
|
| 1135 |
+
#define Tcl_Import \
|
| 1136 |
+
(tclIntStubsPtr->tcl_Import) /* 127 */
|
| 1137 |
+
#define Tcl_PopCallFrame \
|
| 1138 |
+
(tclIntStubsPtr->tcl_PopCallFrame) /* 128 */
|
| 1139 |
+
#define Tcl_PushCallFrame \
|
| 1140 |
+
(tclIntStubsPtr->tcl_PushCallFrame) /* 129 */
|
| 1141 |
+
#define Tcl_RemoveInterpResolvers \
|
| 1142 |
+
(tclIntStubsPtr->tcl_RemoveInterpResolvers) /* 130 */
|
| 1143 |
+
#define Tcl_SetNamespaceResolvers \
|
| 1144 |
+
(tclIntStubsPtr->tcl_SetNamespaceResolvers) /* 131 */
|
| 1145 |
+
#define TclpHasSockets \
|
| 1146 |
+
(tclIntStubsPtr->tclpHasSockets) /* 132 */
|
| 1147 |
+
#define TclpGetDate \
|
| 1148 |
+
(tclIntStubsPtr->tclpGetDate) /* 133 */
|
| 1149 |
+
/* Slot 134 is reserved */
|
| 1150 |
+
/* Slot 135 is reserved */
|
| 1151 |
+
/* Slot 136 is reserved */
|
| 1152 |
+
/* Slot 137 is reserved */
|
| 1153 |
+
#define TclGetEnv \
|
| 1154 |
+
(tclIntStubsPtr->tclGetEnv) /* 138 */
|
| 1155 |
+
/* Slot 139 is reserved */
|
| 1156 |
+
/* Slot 140 is reserved */
|
| 1157 |
+
#define TclpGetCwd \
|
| 1158 |
+
(tclIntStubsPtr->tclpGetCwd) /* 141 */
|
| 1159 |
+
#define TclSetByteCodeFromAny \
|
| 1160 |
+
(tclIntStubsPtr->tclSetByteCodeFromAny) /* 142 */
|
| 1161 |
+
#define TclAddLiteralObj \
|
| 1162 |
+
(tclIntStubsPtr->tclAddLiteralObj) /* 143 */
|
| 1163 |
+
#define TclHideLiteral \
|
| 1164 |
+
(tclIntStubsPtr->tclHideLiteral) /* 144 */
|
| 1165 |
+
#define TclGetAuxDataType \
|
| 1166 |
+
(tclIntStubsPtr->tclGetAuxDataType) /* 145 */
|
| 1167 |
+
#define TclHandleCreate \
|
| 1168 |
+
(tclIntStubsPtr->tclHandleCreate) /* 146 */
|
| 1169 |
+
#define TclHandleFree \
|
| 1170 |
+
(tclIntStubsPtr->tclHandleFree) /* 147 */
|
| 1171 |
+
#define TclHandlePreserve \
|
| 1172 |
+
(tclIntStubsPtr->tclHandlePreserve) /* 148 */
|
| 1173 |
+
#define TclHandleRelease \
|
| 1174 |
+
(tclIntStubsPtr->tclHandleRelease) /* 149 */
|
| 1175 |
+
#define TclRegAbout \
|
| 1176 |
+
(tclIntStubsPtr->tclRegAbout) /* 150 */
|
| 1177 |
+
#define TclRegExpRangeUniChar \
|
| 1178 |
+
(tclIntStubsPtr->tclRegExpRangeUniChar) /* 151 */
|
| 1179 |
+
#define TclSetLibraryPath \
|
| 1180 |
+
(tclIntStubsPtr->tclSetLibraryPath) /* 152 */
|
| 1181 |
+
#define TclGetLibraryPath \
|
| 1182 |
+
(tclIntStubsPtr->tclGetLibraryPath) /* 153 */
|
| 1183 |
+
/* Slot 154 is reserved */
|
| 1184 |
+
/* Slot 155 is reserved */
|
| 1185 |
+
#define TclRegError \
|
| 1186 |
+
(tclIntStubsPtr->tclRegError) /* 156 */
|
| 1187 |
+
#define TclVarTraceExists \
|
| 1188 |
+
(tclIntStubsPtr->tclVarTraceExists) /* 157 */
|
| 1189 |
+
#define TclSetStartupScriptFileName \
|
| 1190 |
+
(tclIntStubsPtr->tclSetStartupScriptFileName) /* 158 */
|
| 1191 |
+
#define TclGetStartupScriptFileName \
|
| 1192 |
+
(tclIntStubsPtr->tclGetStartupScriptFileName) /* 159 */
|
| 1193 |
+
/* Slot 160 is reserved */
|
| 1194 |
+
#define TclChannelTransform \
|
| 1195 |
+
(tclIntStubsPtr->tclChannelTransform) /* 161 */
|
| 1196 |
+
#define TclChannelEventScriptInvoker \
|
| 1197 |
+
(tclIntStubsPtr->tclChannelEventScriptInvoker) /* 162 */
|
| 1198 |
+
#define TclGetInstructionTable \
|
| 1199 |
+
(tclIntStubsPtr->tclGetInstructionTable) /* 163 */
|
| 1200 |
+
#define TclExpandCodeArray \
|
| 1201 |
+
(tclIntStubsPtr->tclExpandCodeArray) /* 164 */
|
| 1202 |
+
#define TclpSetInitialEncodings \
|
| 1203 |
+
(tclIntStubsPtr->tclpSetInitialEncodings) /* 165 */
|
| 1204 |
+
#define TclListObjSetElement \
|
| 1205 |
+
(tclIntStubsPtr->tclListObjSetElement) /* 166 */
|
| 1206 |
+
#define TclSetStartupScriptPath \
|
| 1207 |
+
(tclIntStubsPtr->tclSetStartupScriptPath) /* 167 */
|
| 1208 |
+
#define TclGetStartupScriptPath \
|
| 1209 |
+
(tclIntStubsPtr->tclGetStartupScriptPath) /* 168 */
|
| 1210 |
+
#define TclpUtfNcmp2 \
|
| 1211 |
+
(tclIntStubsPtr->tclpUtfNcmp2) /* 169 */
|
| 1212 |
+
#define TclCheckInterpTraces \
|
| 1213 |
+
(tclIntStubsPtr->tclCheckInterpTraces) /* 170 */
|
| 1214 |
+
#define TclCheckExecutionTraces \
|
| 1215 |
+
(tclIntStubsPtr->tclCheckExecutionTraces) /* 171 */
|
| 1216 |
+
#define TclInThreadExit \
|
| 1217 |
+
(tclIntStubsPtr->tclInThreadExit) /* 172 */
|
| 1218 |
+
#define TclUniCharMatch \
|
| 1219 |
+
(tclIntStubsPtr->tclUniCharMatch) /* 173 */
|
| 1220 |
+
/* Slot 174 is reserved */
|
| 1221 |
+
#define TclCallVarTraces \
|
| 1222 |
+
(tclIntStubsPtr->tclCallVarTraces) /* 175 */
|
| 1223 |
+
#define TclCleanupVar \
|
| 1224 |
+
(tclIntStubsPtr->tclCleanupVar) /* 176 */
|
| 1225 |
+
#define TclVarErrMsg \
|
| 1226 |
+
(tclIntStubsPtr->tclVarErrMsg) /* 177 */
|
| 1227 |
+
#define Tcl_SetStartupScript \
|
| 1228 |
+
(tclIntStubsPtr->tcl_SetStartupScript) /* 178 */
|
| 1229 |
+
#define Tcl_GetStartupScript \
|
| 1230 |
+
(tclIntStubsPtr->tcl_GetStartupScript) /* 179 */
|
| 1231 |
+
/* Slot 180 is reserved */
|
| 1232 |
+
/* Slot 181 is reserved */
|
| 1233 |
+
#define TclpLocaltime \
|
| 1234 |
+
(tclIntStubsPtr->tclpLocaltime) /* 182 */
|
| 1235 |
+
#define TclpGmtime \
|
| 1236 |
+
(tclIntStubsPtr->tclpGmtime) /* 183 */
|
| 1237 |
+
/* Slot 184 is reserved */
|
| 1238 |
+
/* Slot 185 is reserved */
|
| 1239 |
+
/* Slot 186 is reserved */
|
| 1240 |
+
/* Slot 187 is reserved */
|
| 1241 |
+
/* Slot 188 is reserved */
|
| 1242 |
+
/* Slot 189 is reserved */
|
| 1243 |
+
/* Slot 190 is reserved */
|
| 1244 |
+
/* Slot 191 is reserved */
|
| 1245 |
+
/* Slot 192 is reserved */
|
| 1246 |
+
/* Slot 193 is reserved */
|
| 1247 |
+
/* Slot 194 is reserved */
|
| 1248 |
+
/* Slot 195 is reserved */
|
| 1249 |
+
/* Slot 196 is reserved */
|
| 1250 |
+
/* Slot 197 is reserved */
|
| 1251 |
+
#define TclObjGetFrame \
|
| 1252 |
+
(tclIntStubsPtr->tclObjGetFrame) /* 198 */
|
| 1253 |
+
/* Slot 199 is reserved */
|
| 1254 |
+
#define TclpObjRemoveDirectory \
|
| 1255 |
+
(tclIntStubsPtr->tclpObjRemoveDirectory) /* 200 */
|
| 1256 |
+
#define TclpObjCopyDirectory \
|
| 1257 |
+
(tclIntStubsPtr->tclpObjCopyDirectory) /* 201 */
|
| 1258 |
+
#define TclpObjCreateDirectory \
|
| 1259 |
+
(tclIntStubsPtr->tclpObjCreateDirectory) /* 202 */
|
| 1260 |
+
#define TclpObjDeleteFile \
|
| 1261 |
+
(tclIntStubsPtr->tclpObjDeleteFile) /* 203 */
|
| 1262 |
+
#define TclpObjCopyFile \
|
| 1263 |
+
(tclIntStubsPtr->tclpObjCopyFile) /* 204 */
|
| 1264 |
+
#define TclpObjRenameFile \
|
| 1265 |
+
(tclIntStubsPtr->tclpObjRenameFile) /* 205 */
|
| 1266 |
+
#define TclpObjStat \
|
| 1267 |
+
(tclIntStubsPtr->tclpObjStat) /* 206 */
|
| 1268 |
+
#define TclpObjAccess \
|
| 1269 |
+
(tclIntStubsPtr->tclpObjAccess) /* 207 */
|
| 1270 |
+
#define TclpOpenFileChannel \
|
| 1271 |
+
(tclIntStubsPtr->tclpOpenFileChannel) /* 208 */
|
| 1272 |
+
/* Slot 209 is reserved */
|
| 1273 |
+
/* Slot 210 is reserved */
|
| 1274 |
+
/* Slot 211 is reserved */
|
| 1275 |
+
#define TclpFindExecutable \
|
| 1276 |
+
(tclIntStubsPtr->tclpFindExecutable) /* 212 */
|
| 1277 |
+
#define TclGetObjNameOfExecutable \
|
| 1278 |
+
(tclIntStubsPtr->tclGetObjNameOfExecutable) /* 213 */
|
| 1279 |
+
#define TclSetObjNameOfExecutable \
|
| 1280 |
+
(tclIntStubsPtr->tclSetObjNameOfExecutable) /* 214 */
|
| 1281 |
+
#define TclStackAlloc \
|
| 1282 |
+
(tclIntStubsPtr->tclStackAlloc) /* 215 */
|
| 1283 |
+
#define TclStackFree \
|
| 1284 |
+
(tclIntStubsPtr->tclStackFree) /* 216 */
|
| 1285 |
+
#define TclPushStackFrame \
|
| 1286 |
+
(tclIntStubsPtr->tclPushStackFrame) /* 217 */
|
| 1287 |
+
#define TclPopStackFrame \
|
| 1288 |
+
(tclIntStubsPtr->tclPopStackFrame) /* 218 */
|
| 1289 |
+
/* Slot 219 is reserved */
|
| 1290 |
+
/* Slot 220 is reserved */
|
| 1291 |
+
/* Slot 221 is reserved */
|
| 1292 |
+
/* Slot 222 is reserved */
|
| 1293 |
+
#define TclGetCStackPtr \
|
| 1294 |
+
(tclIntStubsPtr->tclGetCStackPtr) /* 223 */
|
| 1295 |
+
#define TclGetPlatform \
|
| 1296 |
+
(tclIntStubsPtr->tclGetPlatform) /* 224 */
|
| 1297 |
+
#define TclTraceDictPath \
|
| 1298 |
+
(tclIntStubsPtr->tclTraceDictPath) /* 225 */
|
| 1299 |
+
#define TclObjBeingDeleted \
|
| 1300 |
+
(tclIntStubsPtr->tclObjBeingDeleted) /* 226 */
|
| 1301 |
+
#define TclSetNsPath \
|
| 1302 |
+
(tclIntStubsPtr->tclSetNsPath) /* 227 */
|
| 1303 |
+
/* Slot 228 is reserved */
|
| 1304 |
+
#define TclPtrMakeUpvar \
|
| 1305 |
+
(tclIntStubsPtr->tclPtrMakeUpvar) /* 229 */
|
| 1306 |
+
#define TclObjLookupVar \
|
| 1307 |
+
(tclIntStubsPtr->tclObjLookupVar) /* 230 */
|
| 1308 |
+
#define TclGetNamespaceFromObj \
|
| 1309 |
+
(tclIntStubsPtr->tclGetNamespaceFromObj) /* 231 */
|
| 1310 |
+
#define TclEvalObjEx \
|
| 1311 |
+
(tclIntStubsPtr->tclEvalObjEx) /* 232 */
|
| 1312 |
+
#define TclGetSrcInfoForPc \
|
| 1313 |
+
(tclIntStubsPtr->tclGetSrcInfoForPc) /* 233 */
|
| 1314 |
+
#define TclVarHashCreateVar \
|
| 1315 |
+
(tclIntStubsPtr->tclVarHashCreateVar) /* 234 */
|
| 1316 |
+
#define TclInitVarHashTable \
|
| 1317 |
+
(tclIntStubsPtr->tclInitVarHashTable) /* 235 */
|
| 1318 |
+
#define TclBackgroundException \
|
| 1319 |
+
(tclIntStubsPtr->tclBackgroundException) /* 236 */
|
| 1320 |
+
#define TclResetCancellation \
|
| 1321 |
+
(tclIntStubsPtr->tclResetCancellation) /* 237 */
|
| 1322 |
+
#define TclNRInterpProc \
|
| 1323 |
+
(tclIntStubsPtr->tclNRInterpProc) /* 238 */
|
| 1324 |
+
#define TclNRInterpProcCore \
|
| 1325 |
+
(tclIntStubsPtr->tclNRInterpProcCore) /* 239 */
|
| 1326 |
+
#define TclNRRunCallbacks \
|
| 1327 |
+
(tclIntStubsPtr->tclNRRunCallbacks) /* 240 */
|
| 1328 |
+
#define TclNREvalObjEx \
|
| 1329 |
+
(tclIntStubsPtr->tclNREvalObjEx) /* 241 */
|
| 1330 |
+
#define TclNREvalObjv \
|
| 1331 |
+
(tclIntStubsPtr->tclNREvalObjv) /* 242 */
|
| 1332 |
+
#define TclDbDumpActiveObjects \
|
| 1333 |
+
(tclIntStubsPtr->tclDbDumpActiveObjects) /* 243 */
|
| 1334 |
+
#define TclGetNamespaceChildTable \
|
| 1335 |
+
(tclIntStubsPtr->tclGetNamespaceChildTable) /* 244 */
|
| 1336 |
+
#define TclGetNamespaceCommandTable \
|
| 1337 |
+
(tclIntStubsPtr->tclGetNamespaceCommandTable) /* 245 */
|
| 1338 |
+
#define TclInitRewriteEnsemble \
|
| 1339 |
+
(tclIntStubsPtr->tclInitRewriteEnsemble) /* 246 */
|
| 1340 |
+
#define TclResetRewriteEnsemble \
|
| 1341 |
+
(tclIntStubsPtr->tclResetRewriteEnsemble) /* 247 */
|
| 1342 |
+
#define TclCopyChannel \
|
| 1343 |
+
(tclIntStubsPtr->tclCopyChannel) /* 248 */
|
| 1344 |
+
#define TclDoubleDigits \
|
| 1345 |
+
(tclIntStubsPtr->tclDoubleDigits) /* 249 */
|
| 1346 |
+
#define TclSetSlaveCancelFlags \
|
| 1347 |
+
(tclIntStubsPtr->tclSetSlaveCancelFlags) /* 250 */
|
| 1348 |
+
#define TclRegisterLiteral \
|
| 1349 |
+
(tclIntStubsPtr->tclRegisterLiteral) /* 251 */
|
| 1350 |
+
#define TclPtrGetVar \
|
| 1351 |
+
(tclIntStubsPtr->tclPtrGetVar) /* 252 */
|
| 1352 |
+
#define TclPtrSetVar \
|
| 1353 |
+
(tclIntStubsPtr->tclPtrSetVar) /* 253 */
|
| 1354 |
+
#define TclPtrIncrObjVar \
|
| 1355 |
+
(tclIntStubsPtr->tclPtrIncrObjVar) /* 254 */
|
| 1356 |
+
#define TclPtrObjMakeUpvar \
|
| 1357 |
+
(tclIntStubsPtr->tclPtrObjMakeUpvar) /* 255 */
|
| 1358 |
+
#define TclPtrUnsetVar \
|
| 1359 |
+
(tclIntStubsPtr->tclPtrUnsetVar) /* 256 */
|
| 1360 |
+
#define TclStaticPackage \
|
| 1361 |
+
(tclIntStubsPtr->tclStaticPackage) /* 257 */
|
| 1362 |
+
/* Slot 258 is reserved */
|
| 1363 |
+
/* Slot 259 is reserved */
|
| 1364 |
+
/* Slot 260 is reserved */
|
| 1365 |
+
#define TclUnusedStubEntry \
|
| 1366 |
+
(tclIntStubsPtr->tclUnusedStubEntry) /* 261 */
|
| 1367 |
+
|
| 1368 |
+
#endif /* defined(USE_TCL_STUBS) */
|
| 1369 |
+
|
| 1370 |
+
/* !END!: Do not edit above this line. */
|
| 1371 |
+
|
| 1372 |
+
#undef TCL_STORAGE_CLASS
|
| 1373 |
+
#define TCL_STORAGE_CLASS DLLIMPORT
|
| 1374 |
+
|
| 1375 |
+
#undef TclGetStartupScriptFileName
|
| 1376 |
+
#undef TclSetStartupScriptFileName
|
| 1377 |
+
#undef TclGetStartupScriptPath
|
| 1378 |
+
#undef TclSetStartupScriptPath
|
| 1379 |
+
#undef TclBackgroundException
|
| 1380 |
+
#undef TclUnusedStubEntry
|
| 1381 |
+
#undef TclObjInterpProc
|
| 1382 |
+
#define TclObjInterpProc TclGetObjInterpProc()
|
| 1383 |
+
|
| 1384 |
+
#if defined(USE_TCL_STUBS) && defined(TCL_NO_DEPRECATED)
|
| 1385 |
+
# undef Tcl_SetStartupScript
|
| 1386 |
+
# define Tcl_SetStartupScript \
|
| 1387 |
+
(tclStubsPtr->tcl_SetStartupScript) /* 622 */
|
| 1388 |
+
# undef Tcl_GetStartupScript
|
| 1389 |
+
# define Tcl_GetStartupScript \
|
| 1390 |
+
(tclStubsPtr->tcl_GetStartupScript) /* 623 */
|
| 1391 |
+
# undef Tcl_CreateNamespace
|
| 1392 |
+
# define Tcl_CreateNamespace \
|
| 1393 |
+
(tclStubsPtr->tcl_CreateNamespace) /* 506 */
|
| 1394 |
+
# undef Tcl_DeleteNamespace
|
| 1395 |
+
# define Tcl_DeleteNamespace \
|
| 1396 |
+
(tclStubsPtr->tcl_DeleteNamespace) /* 507 */
|
| 1397 |
+
# undef Tcl_AppendExportList
|
| 1398 |
+
# define Tcl_AppendExportList \
|
| 1399 |
+
(tclStubsPtr->tcl_AppendExportList) /* 508 */
|
| 1400 |
+
# undef Tcl_Export
|
| 1401 |
+
# define Tcl_Export \
|
| 1402 |
+
(tclStubsPtr->tcl_Export) /* 509 */
|
| 1403 |
+
# undef Tcl_Import
|
| 1404 |
+
# define Tcl_Import \
|
| 1405 |
+
(tclStubsPtr->tcl_Import) /* 510 */
|
| 1406 |
+
# undef Tcl_ForgetImport
|
| 1407 |
+
# define Tcl_ForgetImport \
|
| 1408 |
+
(tclStubsPtr->tcl_ForgetImport) /* 511 */
|
| 1409 |
+
# undef Tcl_GetCurrentNamespace
|
| 1410 |
+
# define Tcl_GetCurrentNamespace \
|
| 1411 |
+
(tclStubsPtr->tcl_GetCurrentNamespace) /* 512 */
|
| 1412 |
+
# undef Tcl_GetGlobalNamespace
|
| 1413 |
+
# define Tcl_GetGlobalNamespace \
|
| 1414 |
+
(tclStubsPtr->tcl_GetGlobalNamespace) /* 513 */
|
| 1415 |
+
# undef Tcl_FindNamespace
|
| 1416 |
+
# define Tcl_FindNamespace \
|
| 1417 |
+
(tclStubsPtr->tcl_FindNamespace) /* 514 */
|
| 1418 |
+
# undef Tcl_FindCommand
|
| 1419 |
+
# define Tcl_FindCommand \
|
| 1420 |
+
(tclStubsPtr->tcl_FindCommand) /* 515 */
|
| 1421 |
+
# undef Tcl_GetCommandFromObj
|
| 1422 |
+
# define Tcl_GetCommandFromObj \
|
| 1423 |
+
(tclStubsPtr->tcl_GetCommandFromObj) /* 516 */
|
| 1424 |
+
# undef Tcl_GetCommandFullName
|
| 1425 |
+
# define Tcl_GetCommandFullName \
|
| 1426 |
+
(tclStubsPtr->tcl_GetCommandFullName) /* 517 */
|
| 1427 |
+
#endif
|
| 1428 |
+
|
| 1429 |
+
#undef TclCopyChannelOld
|
| 1430 |
+
#undef TclSockMinimumBuffersOld
|
| 1431 |
+
|
| 1432 |
+
#define TclSetChildCancelFlags TclSetSlaveCancelFlags
|
| 1433 |
+
|
| 1434 |
+
#endif /* _TCLINTDECLS */
|
evalkit_cambrian/include/tclOOInt.h
ADDED
|
@@ -0,0 +1,607 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
| 2 |
+
* tclOOInt.h --
|
| 3 |
+
*
|
| 4 |
+
* This file contains the structure definitions and some of the function
|
| 5 |
+
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
|
| 6 |
+
*
|
| 7 |
+
* Copyright (c) 2006-2012 by Donal K. Fellows
|
| 8 |
+
*
|
| 9 |
+
* See the file "license.terms" for information on usage and redistribution of
|
| 10 |
+
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#ifndef TCL_OO_INTERNAL_H
|
| 14 |
+
#define TCL_OO_INTERNAL_H 1
|
| 15 |
+
|
| 16 |
+
#include "tclInt.h"
|
| 17 |
+
#include "tclOO.h"
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* Hack to make things work with Objective C. Note that ObjC isn't really
|
| 21 |
+
* supported, but we don't want to to be actively hostile to it. [Bug 2163447]
|
| 22 |
+
*/
|
| 23 |
+
|
| 24 |
+
#ifdef __OBJC__
|
| 25 |
+
#define Class TclOOClass
|
| 26 |
+
#define Object TclOOObject
|
| 27 |
+
#endif /* __OBJC__ */
|
| 28 |
+
|
| 29 |
+
/*
|
| 30 |
+
* Forward declarations.
|
| 31 |
+
*/
|
| 32 |
+
|
| 33 |
+
struct CallChain;
|
| 34 |
+
struct Class;
|
| 35 |
+
struct Foundation;
|
| 36 |
+
struct Object;
|
| 37 |
+
|
| 38 |
+
/*
|
| 39 |
+
* The data that needs to be stored per method. This record is used to collect
|
| 40 |
+
* information about all sorts of methods, including forwards, constructors
|
| 41 |
+
* and destructors.
|
| 42 |
+
*/
|
| 43 |
+
|
| 44 |
+
typedef struct Method {
|
| 45 |
+
const Tcl_MethodType *typePtr;
|
| 46 |
+
/* The type of method. If NULL, this is a
|
| 47 |
+
* special flag record which is just used for
|
| 48 |
+
* the setting of the flags field. */
|
| 49 |
+
int refCount;
|
| 50 |
+
void *clientData; /* Type-specific data. */
|
| 51 |
+
Tcl_Obj *namePtr; /* Name of the method. */
|
| 52 |
+
struct Object *declaringObjectPtr;
|
| 53 |
+
/* The object that declares this method, or
|
| 54 |
+
* NULL if it was declared by a class. */
|
| 55 |
+
struct Class *declaringClassPtr;
|
| 56 |
+
/* The class that declares this method, or
|
| 57 |
+
* NULL if it was declared directly on an
|
| 58 |
+
* object. */
|
| 59 |
+
int flags; /* Assorted flags. Includes whether this
|
| 60 |
+
* method is public/exported or not. */
|
| 61 |
+
} Method;
|
| 62 |
+
|
| 63 |
+
/*
|
| 64 |
+
* Pre- and post-call callbacks, to allow procedure-like methods to be fine
|
| 65 |
+
* tuned in their behaviour.
|
| 66 |
+
*/
|
| 67 |
+
|
| 68 |
+
typedef int (TclOO_PreCallProc)(void *clientData, Tcl_Interp *interp,
|
| 69 |
+
Tcl_ObjectContext context, Tcl_CallFrame *framePtr, int *isFinished);
|
| 70 |
+
typedef int (TclOO_PostCallProc)(void *clientData, Tcl_Interp *interp,
|
| 71 |
+
Tcl_ObjectContext context, Tcl_Namespace *namespacePtr, int result);
|
| 72 |
+
typedef void (TclOO_PmCDDeleteProc)(void *clientData);
|
| 73 |
+
typedef void *(TclOO_PmCDCloneProc)(void *clientData);
|
| 74 |
+
|
| 75 |
+
/*
|
| 76 |
+
* Procedure-like methods have the following extra information.
|
| 77 |
+
*/
|
| 78 |
+
|
| 79 |
+
typedef struct ProcedureMethod {
|
| 80 |
+
int version; /* Version of this structure. Currently must
|
| 81 |
+
* be 0. */
|
| 82 |
+
Proc *procPtr; /* Core of the implementation of the method;
|
| 83 |
+
* includes the argument definition and the
|
| 84 |
+
* body bytecodes. */
|
| 85 |
+
int flags; /* Flags to control features. */
|
| 86 |
+
int refCount;
|
| 87 |
+
void *clientData;
|
| 88 |
+
TclOO_PmCDDeleteProc *deleteClientdataProc;
|
| 89 |
+
TclOO_PmCDCloneProc *cloneClientdataProc;
|
| 90 |
+
ProcErrorProc *errProc; /* Replacement error handler. */
|
| 91 |
+
TclOO_PreCallProc *preCallProc;
|
| 92 |
+
/* Callback to allow for additional setup
|
| 93 |
+
* before the method executes. */
|
| 94 |
+
TclOO_PostCallProc *postCallProc;
|
| 95 |
+
/* Callback to allow for additional cleanup
|
| 96 |
+
* after the method executes. */
|
| 97 |
+
GetFrameInfoValueProc *gfivProc;
|
| 98 |
+
/* Callback to allow for fine tuning of how
|
| 99 |
+
* the method reports itself. */
|
| 100 |
+
} ProcedureMethod;
|
| 101 |
+
|
| 102 |
+
#define TCLOO_PROCEDURE_METHOD_VERSION 0
|
| 103 |
+
|
| 104 |
+
/*
|
| 105 |
+
* Flags for use in a ProcedureMethod.
|
| 106 |
+
*
|
| 107 |
+
* When the USE_DECLARER_NS flag is set, the method will use the namespace of
|
| 108 |
+
* the object or class that declared it (or the clone of it, if it was from
|
| 109 |
+
* such that the implementation of the method came to the particular use)
|
| 110 |
+
* instead of the namespace of the object on which the method was invoked.
|
| 111 |
+
* This flag must be distinct from all others that are associated with
|
| 112 |
+
* methods.
|
| 113 |
+
*/
|
| 114 |
+
|
| 115 |
+
#define USE_DECLARER_NS 0x80
|
| 116 |
+
|
| 117 |
+
/*
|
| 118 |
+
* Forwarded methods have the following extra information.
|
| 119 |
+
*/
|
| 120 |
+
|
| 121 |
+
typedef struct ForwardMethod {
|
| 122 |
+
Tcl_Obj *prefixObj; /* The list of values to use to replace the
|
| 123 |
+
* object and method name with. Will be a
|
| 124 |
+
* non-empty list. */
|
| 125 |
+
} ForwardMethod;
|
| 126 |
+
|
| 127 |
+
/*
|
| 128 |
+
* Helper definitions that declare a "list" array. The two varieties are
|
| 129 |
+
* either optimized for simplicity (in the case that the whole array is
|
| 130 |
+
* typically assigned at once) or efficiency (in the case that the array is
|
| 131 |
+
* expected to be expanded over time). These lists are designed to be iterated
|
| 132 |
+
* over with the help of the FOREACH macro (see later in this file).
|
| 133 |
+
*
|
| 134 |
+
* The "num" field always counts the number of listType_t elements used in the
|
| 135 |
+
* "list" field. When a "size" field exists, it describes how many elements
|
| 136 |
+
* are present in the list; when absent, exactly "num" elements are present.
|
| 137 |
+
*/
|
| 138 |
+
|
| 139 |
+
#define LIST_STATIC(listType_t) \
|
| 140 |
+
struct { int num; listType_t *list; }
|
| 141 |
+
#define LIST_DYNAMIC(listType_t) \
|
| 142 |
+
struct { int num, size; listType_t *list; }
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* Now, the definition of what an object actually is.
|
| 146 |
+
*/
|
| 147 |
+
|
| 148 |
+
typedef struct Object {
|
| 149 |
+
struct Foundation *fPtr; /* The basis for the object system. Putting
|
| 150 |
+
* this here allows the avoidance of quite a
|
| 151 |
+
* lot of hash lookups on the critical path
|
| 152 |
+
* for object invocation and creation. */
|
| 153 |
+
Tcl_Namespace *namespacePtr;/* This object's namespace. */
|
| 154 |
+
Tcl_Command command; /* Reference to this object's public
|
| 155 |
+
* command. */
|
| 156 |
+
Tcl_Command myCommand; /* Reference to this object's internal
|
| 157 |
+
* command. */
|
| 158 |
+
struct Class *selfCls; /* This object's class. */
|
| 159 |
+
Tcl_HashTable *methodsPtr; /* Object-local Tcl_Obj (method name) to
|
| 160 |
+
* Method* mapping. */
|
| 161 |
+
LIST_STATIC(struct Class *) mixins;
|
| 162 |
+
/* Classes mixed into this object. */
|
| 163 |
+
LIST_STATIC(Tcl_Obj *) filters;
|
| 164 |
+
/* List of filter names. */
|
| 165 |
+
struct Class *classPtr; /* This is non-NULL for all classes, and NULL
|
| 166 |
+
* for everything else. It points to the class
|
| 167 |
+
* structure. */
|
| 168 |
+
int refCount; /* Number of strong references to this object.
|
| 169 |
+
* Note that there may be many more weak
|
| 170 |
+
* references; this mechanism exists to
|
| 171 |
+
* avoid Tcl_Preserve. */
|
| 172 |
+
int flags;
|
| 173 |
+
int creationEpoch; /* Unique value to make comparisons of objects
|
| 174 |
+
* easier. */
|
| 175 |
+
int epoch; /* Per-object epoch, incremented when the way
|
| 176 |
+
* an object should resolve call chains is
|
| 177 |
+
* changed. */
|
| 178 |
+
Tcl_HashTable *metadataPtr; /* Mapping from pointers to metadata type to
|
| 179 |
+
* the ClientData values that are the values
|
| 180 |
+
* of each piece of attached metadata. This
|
| 181 |
+
* field starts out as NULL and is only
|
| 182 |
+
* allocated if metadata is attached. */
|
| 183 |
+
Tcl_Obj *cachedNameObj; /* Cache of the name of the object. */
|
| 184 |
+
Tcl_HashTable *chainCache; /* Place to keep unused contexts. This table
|
| 185 |
+
* is indexed by method name as Tcl_Obj. */
|
| 186 |
+
Tcl_ObjectMapMethodNameProc *mapMethodNameProc;
|
| 187 |
+
/* Function to allow remapping of method
|
| 188 |
+
* names. For itcl-ng. */
|
| 189 |
+
LIST_STATIC(Tcl_Obj *) variables;
|
| 190 |
+
} Object;
|
| 191 |
+
|
| 192 |
+
#define OBJECT_DESTRUCTING 1 /* Indicates that an object is being or has
|
| 193 |
+
* been destroyed */
|
| 194 |
+
#define DESTRUCTOR_CALLED 2 /* Indicates that evaluation of destructor script for the
|
| 195 |
+
object has began */
|
| 196 |
+
#define OO_UNUSED_4 4 /* No longer used. */
|
| 197 |
+
#define ROOT_OBJECT 0x1000 /* Flag to say that this object is the root of
|
| 198 |
+
* the class hierarchy and should be treated
|
| 199 |
+
* specially during teardown. */
|
| 200 |
+
#define FILTER_HANDLING 0x2000 /* Flag set when the object is processing a
|
| 201 |
+
* filter; when set, filters are *not*
|
| 202 |
+
* processed on the object, preventing nasty
|
| 203 |
+
* recursive filtering problems. */
|
| 204 |
+
#define USE_CLASS_CACHE 0x4000 /* Flag set to say that the object is a pure
|
| 205 |
+
* instance of the class, and has had nothing
|
| 206 |
+
* added that changes the dispatch chain (i.e.
|
| 207 |
+
* no methods, mixins, or filters. */
|
| 208 |
+
#define ROOT_CLASS 0x8000 /* Flag to say that this object is the root
|
| 209 |
+
* class of classes, and should be treated
|
| 210 |
+
* specially during teardown (and in a few
|
| 211 |
+
* other spots). */
|
| 212 |
+
#define FORCE_UNKNOWN 0x10000 /* States that we are *really* looking up the
|
| 213 |
+
* unknown method handler at that point. */
|
| 214 |
+
#define DONT_DELETE 0x20000 /* Inhibit deletion of this object. */
|
| 215 |
+
|
| 216 |
+
/*
|
| 217 |
+
* And the definition of a class. Note that every class also has an associated
|
| 218 |
+
* object, through which it is manipulated.
|
| 219 |
+
*/
|
| 220 |
+
|
| 221 |
+
typedef struct Class {
|
| 222 |
+
Object *thisPtr; /* Reference to the object associated with
|
| 223 |
+
* this class. */
|
| 224 |
+
int flags; /* Assorted flags. */
|
| 225 |
+
LIST_STATIC(struct Class *) superclasses;
|
| 226 |
+
/* List of superclasses, used for generation
|
| 227 |
+
* of method call chains. */
|
| 228 |
+
LIST_DYNAMIC(struct Class *) subclasses;
|
| 229 |
+
/* List of subclasses, used to ensure deletion
|
| 230 |
+
* of dependent entities happens properly when
|
| 231 |
+
* the class itself is deleted. */
|
| 232 |
+
LIST_DYNAMIC(Object *) instances;
|
| 233 |
+
/* List of instances, used to ensure deletion
|
| 234 |
+
* of dependent entities happens properly when
|
| 235 |
+
* the class itself is deleted. */
|
| 236 |
+
LIST_STATIC(Tcl_Obj *) filters;
|
| 237 |
+
/* List of filter names, used for generation
|
| 238 |
+
* of method call chains. */
|
| 239 |
+
LIST_STATIC(struct Class *) mixins;
|
| 240 |
+
/* List of mixin classes, used for generation
|
| 241 |
+
* of method call chains. */
|
| 242 |
+
LIST_DYNAMIC(struct Class *) mixinSubs;
|
| 243 |
+
/* List of classes that this class is mixed
|
| 244 |
+
* into, used to ensure deletion of dependent
|
| 245 |
+
* entities happens properly when the class
|
| 246 |
+
* itself is deleted. */
|
| 247 |
+
Tcl_HashTable classMethods; /* Hash table of all methods. Hash maps from
|
| 248 |
+
* the (Tcl_Obj*) method name to the (Method*)
|
| 249 |
+
* method record. */
|
| 250 |
+
Method *constructorPtr; /* Method record of the class constructor (if
|
| 251 |
+
* any). */
|
| 252 |
+
Method *destructorPtr; /* Method record of the class destructor (if
|
| 253 |
+
* any). */
|
| 254 |
+
Tcl_HashTable *metadataPtr; /* Mapping from pointers to metadata type to
|
| 255 |
+
* the ClientData values that are the values
|
| 256 |
+
* of each piece of attached metadata. This
|
| 257 |
+
* field starts out as NULL and is only
|
| 258 |
+
* allocated if metadata is attached. */
|
| 259 |
+
struct CallChain *constructorChainPtr;
|
| 260 |
+
struct CallChain *destructorChainPtr;
|
| 261 |
+
Tcl_HashTable *classChainCache;
|
| 262 |
+
/* Places where call chains are stored. For
|
| 263 |
+
* constructors, the class chain is always
|
| 264 |
+
* used. For destructors and ordinary methods,
|
| 265 |
+
* the class chain is only used when the
|
| 266 |
+
* object doesn't override with its own mixins
|
| 267 |
+
* (and filters and method implementations for
|
| 268 |
+
* when getting method chains). */
|
| 269 |
+
LIST_STATIC(Tcl_Obj *) variables;
|
| 270 |
+
} Class;
|
| 271 |
+
|
| 272 |
+
/*
|
| 273 |
+
* The foundation of the object system within an interpreter contains
|
| 274 |
+
* references to the key classes and namespaces, together with a few other
|
| 275 |
+
* useful bits and pieces. Probably ought to eventually go in the Interp
|
| 276 |
+
* structure itself.
|
| 277 |
+
*/
|
| 278 |
+
|
| 279 |
+
typedef struct ThreadLocalData {
|
| 280 |
+
int nsCount; /* Epoch counter is used for keeping
|
| 281 |
+
* the values used in Tcl_Obj internal
|
| 282 |
+
* representations sane. Must be thread-local
|
| 283 |
+
* because Tcl_Objs can cross interpreter
|
| 284 |
+
* boundaries within a thread (objects don't
|
| 285 |
+
* generally cross threads). */
|
| 286 |
+
} ThreadLocalData;
|
| 287 |
+
|
| 288 |
+
typedef struct Foundation {
|
| 289 |
+
Tcl_Interp *interp;
|
| 290 |
+
Class *objectCls; /* The root of the object system. */
|
| 291 |
+
Class *classCls; /* The class of all classes. */
|
| 292 |
+
Tcl_Namespace *ooNs; /* ::oo namespace. */
|
| 293 |
+
Tcl_Namespace *defineNs; /* Namespace containing special commands for
|
| 294 |
+
* manipulating objects and classes. The
|
| 295 |
+
* "oo::define" command acts as a special kind
|
| 296 |
+
* of ensemble for this namespace. */
|
| 297 |
+
Tcl_Namespace *objdefNs; /* Namespace containing special commands for
|
| 298 |
+
* manipulating objects and classes. The
|
| 299 |
+
* "oo::objdefine" command acts as a special
|
| 300 |
+
* kind of ensemble for this namespace. */
|
| 301 |
+
Tcl_Namespace *helpersNs; /* Namespace containing the commands that are
|
| 302 |
+
* only valid when executing inside a
|
| 303 |
+
* procedural method. */
|
| 304 |
+
int epoch; /* Used to invalidate method chains when the
|
| 305 |
+
* class structure changes. */
|
| 306 |
+
ThreadLocalData *tsdPtr; /* Counter so we can allocate a unique
|
| 307 |
+
* namespace to each object. */
|
| 308 |
+
Tcl_Obj *unknownMethodNameObj;
|
| 309 |
+
/* Shared object containing the name of the
|
| 310 |
+
* unknown method handler method. */
|
| 311 |
+
Tcl_Obj *constructorName; /* Shared object containing the "name" of a
|
| 312 |
+
* constructor. */
|
| 313 |
+
Tcl_Obj *destructorName; /* Shared object containing the "name" of a
|
| 314 |
+
* destructor. */
|
| 315 |
+
Tcl_Obj *clonedName; /* Shared object containing the name of a
|
| 316 |
+
* "<cloned>" pseudo-constructor. */
|
| 317 |
+
Tcl_Obj *defineName; /* Fully qualified name of oo::define. */
|
| 318 |
+
} Foundation;
|
| 319 |
+
|
| 320 |
+
/*
|
| 321 |
+
* A call context structure is built when a method is called. It contains the
|
| 322 |
+
* chain of method implementations that are to be invoked by a particular
|
| 323 |
+
* call, and the process of calling walks the chain, with the [next] command
|
| 324 |
+
* proceeding to the next entry in the chain.
|
| 325 |
+
*/
|
| 326 |
+
|
| 327 |
+
#define CALL_CHAIN_STATIC_SIZE 4
|
| 328 |
+
|
| 329 |
+
struct MInvoke {
|
| 330 |
+
Method *mPtr; /* Reference to the method implementation
|
| 331 |
+
* record. */
|
| 332 |
+
int isFilter; /* Whether this is a filter invocation. */
|
| 333 |
+
Class *filterDeclarer; /* What class decided to add the filter; if
|
| 334 |
+
* NULL, it was added by the object. */
|
| 335 |
+
};
|
| 336 |
+
|
| 337 |
+
typedef struct CallChain {
|
| 338 |
+
int objectCreationEpoch; /* The object's creation epoch. Note that the
|
| 339 |
+
* object reference is not stored in the call
|
| 340 |
+
* chain; it is in the call context. */
|
| 341 |
+
int objectEpoch; /* Local (object structure) epoch counter
|
| 342 |
+
* snapshot. */
|
| 343 |
+
int epoch; /* Global (class structure) epoch counter
|
| 344 |
+
* snapshot. */
|
| 345 |
+
int flags; /* Assorted flags, see below. */
|
| 346 |
+
int refCount; /* Reference count. */
|
| 347 |
+
int numChain; /* Size of the call chain. */
|
| 348 |
+
struct MInvoke *chain; /* Array of call chain entries. May point to
|
| 349 |
+
* staticChain if the number of entries is
|
| 350 |
+
* small. */
|
| 351 |
+
struct MInvoke staticChain[CALL_CHAIN_STATIC_SIZE];
|
| 352 |
+
} CallChain;
|
| 353 |
+
|
| 354 |
+
typedef struct CallContext {
|
| 355 |
+
Object *oPtr; /* The object associated with this call. */
|
| 356 |
+
int index; /* Index into the call chain of the currently
|
| 357 |
+
* executing method implementation. */
|
| 358 |
+
int skip; /* Current number of arguments to skip; can
|
| 359 |
+
* vary depending on whether it is a direct
|
| 360 |
+
* method call or a continuation via the
|
| 361 |
+
* [next] command. */
|
| 362 |
+
CallChain *callPtr; /* The actual call chain. */
|
| 363 |
+
} CallContext;
|
| 364 |
+
|
| 365 |
+
/*
|
| 366 |
+
* Bits for the 'flags' field of the call chain.
|
| 367 |
+
*/
|
| 368 |
+
|
| 369 |
+
#define PUBLIC_METHOD 0x01 /* This is a public (exported) method. */
|
| 370 |
+
#define PRIVATE_METHOD 0x02 /* This is a private (class's direct instances
|
| 371 |
+
* only) method. Supports itcl. */
|
| 372 |
+
#define OO_UNKNOWN_METHOD 0x04 /* This is an unknown method. */
|
| 373 |
+
#define CONSTRUCTOR 0x08 /* This is a constructor. */
|
| 374 |
+
#define DESTRUCTOR 0x10 /* This is a destructor. */
|
| 375 |
+
|
| 376 |
+
/*
|
| 377 |
+
* Structure containing definition information about basic class methods.
|
| 378 |
+
*/
|
| 379 |
+
|
| 380 |
+
typedef struct {
|
| 381 |
+
const char *name; /* Name of the method in question. */
|
| 382 |
+
int isPublic; /* Whether the method is public by default. */
|
| 383 |
+
Tcl_MethodType definition; /* How to call the method. */
|
| 384 |
+
} DeclaredClassMethod;
|
| 385 |
+
|
| 386 |
+
/*
|
| 387 |
+
*----------------------------------------------------------------
|
| 388 |
+
* Commands relating to OO support.
|
| 389 |
+
*----------------------------------------------------------------
|
| 390 |
+
*/
|
| 391 |
+
|
| 392 |
+
MODULE_SCOPE int TclOOInit(Tcl_Interp *interp);
|
| 393 |
+
MODULE_SCOPE int TclOODefineObjCmd(void *clientData,
|
| 394 |
+
Tcl_Interp *interp, int objc,
|
| 395 |
+
Tcl_Obj *const *objv);
|
| 396 |
+
MODULE_SCOPE int TclOOObjDefObjCmd(void *clientData,
|
| 397 |
+
Tcl_Interp *interp, int objc,
|
| 398 |
+
Tcl_Obj *const *objv);
|
| 399 |
+
MODULE_SCOPE int TclOODefineConstructorObjCmd(void *clientData,
|
| 400 |
+
Tcl_Interp *interp, int objc,
|
| 401 |
+
Tcl_Obj *const *objv);
|
| 402 |
+
MODULE_SCOPE int TclOODefineDeleteMethodObjCmd(void *clientData,
|
| 403 |
+
Tcl_Interp *interp, int objc,
|
| 404 |
+
Tcl_Obj *const *objv);
|
| 405 |
+
MODULE_SCOPE int TclOODefineDestructorObjCmd(void *clientData,
|
| 406 |
+
Tcl_Interp *interp, int objc,
|
| 407 |
+
Tcl_Obj *const *objv);
|
| 408 |
+
MODULE_SCOPE int TclOODefineExportObjCmd(void *clientData,
|
| 409 |
+
Tcl_Interp *interp, int objc,
|
| 410 |
+
Tcl_Obj *const *objv);
|
| 411 |
+
MODULE_SCOPE int TclOODefineForwardObjCmd(void *clientData,
|
| 412 |
+
Tcl_Interp *interp, int objc,
|
| 413 |
+
Tcl_Obj *const *objv);
|
| 414 |
+
MODULE_SCOPE int TclOODefineMethodObjCmd(void *clientData,
|
| 415 |
+
Tcl_Interp *interp, int objc,
|
| 416 |
+
Tcl_Obj *const *objv);
|
| 417 |
+
MODULE_SCOPE int TclOODefineRenameMethodObjCmd(void *clientData,
|
| 418 |
+
Tcl_Interp *interp, int objc,
|
| 419 |
+
Tcl_Obj *const *objv);
|
| 420 |
+
MODULE_SCOPE int TclOODefineUnexportObjCmd(void *clientData,
|
| 421 |
+
Tcl_Interp *interp, int objc,
|
| 422 |
+
Tcl_Obj *const *objv);
|
| 423 |
+
MODULE_SCOPE int TclOODefineClassObjCmd(void *clientData,
|
| 424 |
+
Tcl_Interp *interp, int objc,
|
| 425 |
+
Tcl_Obj *const *objv);
|
| 426 |
+
MODULE_SCOPE int TclOODefineSelfObjCmd(void *clientData,
|
| 427 |
+
Tcl_Interp *interp, int objc,
|
| 428 |
+
Tcl_Obj *const *objv);
|
| 429 |
+
MODULE_SCOPE int TclOOUnknownDefinition(void *clientData,
|
| 430 |
+
Tcl_Interp *interp, int objc,
|
| 431 |
+
Tcl_Obj *const *objv);
|
| 432 |
+
MODULE_SCOPE int TclOOCopyObjectCmd(void *clientData,
|
| 433 |
+
Tcl_Interp *interp, int objc,
|
| 434 |
+
Tcl_Obj *const *objv);
|
| 435 |
+
MODULE_SCOPE int TclOONextObjCmd(void *clientData,
|
| 436 |
+
Tcl_Interp *interp, int objc,
|
| 437 |
+
Tcl_Obj *const *objv);
|
| 438 |
+
MODULE_SCOPE int TclOONextToObjCmd(void *clientData,
|
| 439 |
+
Tcl_Interp *interp, int objc,
|
| 440 |
+
Tcl_Obj *const *objv);
|
| 441 |
+
MODULE_SCOPE int TclOOSelfObjCmd(void *clientData,
|
| 442 |
+
Tcl_Interp *interp, int objc,
|
| 443 |
+
Tcl_Obj *const *objv);
|
| 444 |
+
|
| 445 |
+
/*
|
| 446 |
+
* Method implementations (in tclOOBasic.c).
|
| 447 |
+
*/
|
| 448 |
+
|
| 449 |
+
MODULE_SCOPE int TclOO_Class_Constructor(void *clientData,
|
| 450 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 451 |
+
int objc, Tcl_Obj *const *objv);
|
| 452 |
+
MODULE_SCOPE int TclOO_Class_Create(void *clientData,
|
| 453 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 454 |
+
int objc, Tcl_Obj *const *objv);
|
| 455 |
+
MODULE_SCOPE int TclOO_Class_CreateNs(void *clientData,
|
| 456 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 457 |
+
int objc, Tcl_Obj *const *objv);
|
| 458 |
+
MODULE_SCOPE int TclOO_Class_New(void *clientData,
|
| 459 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 460 |
+
int objc, Tcl_Obj *const *objv);
|
| 461 |
+
MODULE_SCOPE int TclOO_Object_Destroy(void *clientData,
|
| 462 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 463 |
+
int objc, Tcl_Obj *const *objv);
|
| 464 |
+
MODULE_SCOPE int TclOO_Object_Eval(void *clientData,
|
| 465 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 466 |
+
int objc, Tcl_Obj *const *objv);
|
| 467 |
+
MODULE_SCOPE int TclOO_Object_LinkVar(void *clientData,
|
| 468 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 469 |
+
int objc, Tcl_Obj *const *objv);
|
| 470 |
+
MODULE_SCOPE int TclOO_Object_Unknown(void *clientData,
|
| 471 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 472 |
+
int objc, Tcl_Obj *const *objv);
|
| 473 |
+
MODULE_SCOPE int TclOO_Object_VarName(void *clientData,
|
| 474 |
+
Tcl_Interp *interp, Tcl_ObjectContext context,
|
| 475 |
+
int objc, Tcl_Obj *const *objv);
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* Private definitions, some of which perhaps ought to be exposed properly or
|
| 479 |
+
* maybe just put in the internal stubs table.
|
| 480 |
+
*/
|
| 481 |
+
|
| 482 |
+
MODULE_SCOPE void TclOOAddToInstances(Object *oPtr, Class *clsPtr);
|
| 483 |
+
MODULE_SCOPE void TclOOAddToMixinSubs(Class *subPtr, Class *mixinPtr);
|
| 484 |
+
MODULE_SCOPE void TclOOAddToSubclasses(Class *subPtr, Class *superPtr);
|
| 485 |
+
MODULE_SCOPE Class * TclOOAllocClass(Tcl_Interp *interp,
|
| 486 |
+
Object *useThisObj);
|
| 487 |
+
MODULE_SCOPE int TclNRNewObjectInstance(Tcl_Interp *interp,
|
| 488 |
+
Tcl_Class cls, const char *nameStr,
|
| 489 |
+
const char *nsNameStr, int objc,
|
| 490 |
+
Tcl_Obj *const *objv, int skip,
|
| 491 |
+
Tcl_Object *objectPtr);
|
| 492 |
+
MODULE_SCOPE Object * TclNewObjectInstanceCommon(Tcl_Interp *interp,
|
| 493 |
+
Class *classPtr,
|
| 494 |
+
const char *nameStr,
|
| 495 |
+
const char *nsNameStr);
|
| 496 |
+
MODULE_SCOPE int TclOODecrRefCount(Object *oPtr);
|
| 497 |
+
MODULE_SCOPE int TclOOObjectDestroyed(Object *oPtr);
|
| 498 |
+
MODULE_SCOPE int TclOODefineSlots(Foundation *fPtr);
|
| 499 |
+
MODULE_SCOPE void TclOODeleteChain(CallChain *callPtr);
|
| 500 |
+
MODULE_SCOPE void TclOODeleteChainCache(Tcl_HashTable *tablePtr);
|
| 501 |
+
MODULE_SCOPE void TclOODeleteContext(CallContext *contextPtr);
|
| 502 |
+
MODULE_SCOPE void TclOODeleteDescendants(Tcl_Interp *interp,
|
| 503 |
+
Object *oPtr);
|
| 504 |
+
MODULE_SCOPE void TclOODelMethodRef(Method *method);
|
| 505 |
+
MODULE_SCOPE CallContext *TclOOGetCallContext(Object *oPtr,
|
| 506 |
+
Tcl_Obj *methodNameObj, int flags,
|
| 507 |
+
Tcl_Obj *cacheInThisObj);
|
| 508 |
+
MODULE_SCOPE CallChain *TclOOGetStereotypeCallChain(Class *clsPtr,
|
| 509 |
+
Tcl_Obj *methodNameObj, int flags);
|
| 510 |
+
MODULE_SCOPE Foundation *TclOOGetFoundation(Tcl_Interp *interp);
|
| 511 |
+
MODULE_SCOPE Tcl_Obj * TclOOGetFwdFromMethod(Method *mPtr);
|
| 512 |
+
MODULE_SCOPE Proc * TclOOGetProcFromMethod(Method *mPtr);
|
| 513 |
+
MODULE_SCOPE Tcl_Obj * TclOOGetMethodBody(Method *mPtr);
|
| 514 |
+
MODULE_SCOPE int TclOOGetSortedClassMethodList(Class *clsPtr,
|
| 515 |
+
int flags, const char ***stringsPtr);
|
| 516 |
+
MODULE_SCOPE int TclOOGetSortedMethodList(Object *oPtr, int flags,
|
| 517 |
+
const char ***stringsPtr);
|
| 518 |
+
MODULE_SCOPE int TclOOInit(Tcl_Interp *interp);
|
| 519 |
+
MODULE_SCOPE void TclOOInitInfo(Tcl_Interp *interp);
|
| 520 |
+
MODULE_SCOPE int TclOOInvokeContext(void *clientData,
|
| 521 |
+
Tcl_Interp *interp, int objc,
|
| 522 |
+
Tcl_Obj *const objv[]);
|
| 523 |
+
MODULE_SCOPE int TclNRObjectContextInvokeNext(Tcl_Interp *interp,
|
| 524 |
+
Tcl_ObjectContext context, int objc,
|
| 525 |
+
Tcl_Obj *const *objv, int skip);
|
| 526 |
+
MODULE_SCOPE void TclOONewBasicMethod(Tcl_Interp *interp, Class *clsPtr,
|
| 527 |
+
const DeclaredClassMethod *dcm);
|
| 528 |
+
MODULE_SCOPE Tcl_Obj * TclOOObjectName(Tcl_Interp *interp, Object *oPtr);
|
| 529 |
+
MODULE_SCOPE void TclOOReleaseClassContents(Tcl_Interp *interp,
|
| 530 |
+
Object *oPtr);
|
| 531 |
+
MODULE_SCOPE int TclOORemoveFromInstances(Object *oPtr, Class *clsPtr);
|
| 532 |
+
MODULE_SCOPE int TclOORemoveFromMixins(Class *mixinPtr, Object *oPtr);
|
| 533 |
+
MODULE_SCOPE int TclOORemoveFromMixinSubs(Class *subPtr,
|
| 534 |
+
Class *mixinPtr);
|
| 535 |
+
MODULE_SCOPE int TclOORemoveFromSubclasses(Class *subPtr,
|
| 536 |
+
Class *superPtr);
|
| 537 |
+
MODULE_SCOPE Tcl_Obj * TclOORenderCallChain(Tcl_Interp *interp,
|
| 538 |
+
CallChain *callPtr);
|
| 539 |
+
MODULE_SCOPE void TclOOStashContext(Tcl_Obj *objPtr,
|
| 540 |
+
CallContext *contextPtr);
|
| 541 |
+
MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr);
|
| 542 |
+
|
| 543 |
+
/*
|
| 544 |
+
* Include all the private API, generated from tclOO.decls.
|
| 545 |
+
*/
|
| 546 |
+
|
| 547 |
+
#include "tclOOIntDecls.h"
|
| 548 |
+
|
| 549 |
+
/*
|
| 550 |
+
* Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release.
|
| 551 |
+
*/
|
| 552 |
+
|
| 553 |
+
#define AddRef(ptr) ((ptr)->refCount++)
|
| 554 |
+
|
| 555 |
+
/*
|
| 556 |
+
* A convenience macro for iterating through the lists used in the internal
|
| 557 |
+
* memory management of objects.
|
| 558 |
+
* REQUIRES DECLARATION: int i;
|
| 559 |
+
*/
|
| 560 |
+
|
| 561 |
+
#define FOREACH(var,ary) \
|
| 562 |
+
for(i=0 ; i<(ary).num; i++) if ((ary).list[i] == NULL) { \
|
| 563 |
+
continue; \
|
| 564 |
+
} else if ((var) = (ary).list[i], 1)
|
| 565 |
+
|
| 566 |
+
/*
|
| 567 |
+
* Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
|
| 568 |
+
* sets up the declarations needed for the main macro, FOREACH_HASH, which
|
| 569 |
+
* does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
|
| 570 |
+
* only iterates over values.
|
| 571 |
+
*/
|
| 572 |
+
|
| 573 |
+
#define FOREACH_HASH_DECLS \
|
| 574 |
+
Tcl_HashEntry *hPtr;Tcl_HashSearch search
|
| 575 |
+
#define FOREACH_HASH(key,val,tablePtr) \
|
| 576 |
+
for(hPtr=Tcl_FirstHashEntry((tablePtr),&search); hPtr!=NULL ? \
|
| 577 |
+
((key)=(void *)Tcl_GetHashKey((tablePtr),hPtr),\
|
| 578 |
+
(val)=Tcl_GetHashValue(hPtr),1):0; hPtr=Tcl_NextHashEntry(&search))
|
| 579 |
+
#define FOREACH_HASH_VALUE(val,tablePtr) \
|
| 580 |
+
for(hPtr=Tcl_FirstHashEntry((tablePtr),&search); hPtr!=NULL ? \
|
| 581 |
+
((val)=Tcl_GetHashValue(hPtr),1):0;hPtr=Tcl_NextHashEntry(&search))
|
| 582 |
+
|
| 583 |
+
/*
|
| 584 |
+
* Convenience macro for duplicating a list. Needs no external declaration,
|
| 585 |
+
* but all arguments are used multiple times and so must have no side effects.
|
| 586 |
+
*/
|
| 587 |
+
|
| 588 |
+
#undef DUPLICATE /* prevent possible conflict with definition in WINAPI nb30.h */
|
| 589 |
+
#define DUPLICATE(target,source,type) \
|
| 590 |
+
do { \
|
| 591 |
+
size_t len = sizeof(type) * ((target).num=(source).num);\
|
| 592 |
+
if (len != 0) { \
|
| 593 |
+
memcpy(((target).list=(type*)ckalloc(len)), (source).list, len); \
|
| 594 |
+
} else { \
|
| 595 |
+
(target).list = NULL; \
|
| 596 |
+
} \
|
| 597 |
+
} while(0)
|
| 598 |
+
|
| 599 |
+
#endif /* TCL_OO_INTERNAL_H */
|
| 600 |
+
|
| 601 |
+
/*
|
| 602 |
+
* Local Variables:
|
| 603 |
+
* mode: c
|
| 604 |
+
* c-basic-offset: 4
|
| 605 |
+
* fill-column: 78
|
| 606 |
+
* End:
|
| 607 |
+
*/
|
evalkit_cambrian/include/tclUnixPort.h
ADDED
|
@@ -0,0 +1,732 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tclUnixPort.h --
|
| 3 |
+
*
|
| 4 |
+
* This header file handles porting issues that occur because of
|
| 5 |
+
* differences between systems. It reads in UNIX-related header files and
|
| 6 |
+
* sets up UNIX-related macros for Tcl's UNIX core. It should be the only
|
| 7 |
+
* file that contains #ifdefs to handle different flavors of UNIX. This
|
| 8 |
+
* file sets up the union of all UNIX-related things needed by any of the
|
| 9 |
+
* Tcl core files. This file depends on configuration #defines such as
|
| 10 |
+
* NO_DIRENT_H that are set up by the "configure" script.
|
| 11 |
+
*
|
| 12 |
+
* Much of the material in this file was originally contributed by Karl
|
| 13 |
+
* Lehenbauer, Mark Diekhans and Peter da Silva.
|
| 14 |
+
*
|
| 15 |
+
* Copyright (c) 1991-1994 The Regents of the University of California.
|
| 16 |
+
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
|
| 17 |
+
*
|
| 18 |
+
* See the file "license.terms" for information on usage and redistribution of
|
| 19 |
+
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
#ifndef _TCLUNIXPORT
|
| 23 |
+
#define _TCLUNIXPORT
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
*---------------------------------------------------------------------------
|
| 27 |
+
* The following sets of #includes and #ifdefs are required to get Tcl to
|
| 28 |
+
* compile under the various flavors of unix.
|
| 29 |
+
*---------------------------------------------------------------------------
|
| 30 |
+
*/
|
| 31 |
+
|
| 32 |
+
#include <errno.h>
|
| 33 |
+
#include <fcntl.h>
|
| 34 |
+
#ifdef HAVE_NET_ERRNO_H
|
| 35 |
+
# include <net/errno.h>
|
| 36 |
+
#endif
|
| 37 |
+
#include <pwd.h>
|
| 38 |
+
#include <signal.h>
|
| 39 |
+
#ifdef HAVE_SYS_PARAM_H
|
| 40 |
+
# include <sys/param.h>
|
| 41 |
+
#endif
|
| 42 |
+
#include <sys/types.h>
|
| 43 |
+
#ifdef USE_DIRENT2_H
|
| 44 |
+
# include "../compat/dirent2.h"
|
| 45 |
+
#else
|
| 46 |
+
#ifdef NO_DIRENT_H
|
| 47 |
+
# include "../compat/dirent.h"
|
| 48 |
+
#else
|
| 49 |
+
# include <dirent.h>
|
| 50 |
+
#endif
|
| 51 |
+
#endif
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
*---------------------------------------------------------------------------
|
| 55 |
+
* Parameterize for 64-bit filesystem support.
|
| 56 |
+
*---------------------------------------------------------------------------
|
| 57 |
+
*/
|
| 58 |
+
|
| 59 |
+
#ifdef HAVE_STRUCT_DIRENT64
|
| 60 |
+
typedef struct dirent64 Tcl_DirEntry;
|
| 61 |
+
# define TclOSreaddir readdir64
|
| 62 |
+
#else
|
| 63 |
+
typedef struct dirent Tcl_DirEntry;
|
| 64 |
+
# define TclOSreaddir readdir
|
| 65 |
+
#endif
|
| 66 |
+
#ifdef HAVE_DIR64
|
| 67 |
+
typedef DIR64 TclDIR;
|
| 68 |
+
# define TclOSopendir opendir64
|
| 69 |
+
# define TclOSrewinddir rewinddir64
|
| 70 |
+
# define TclOSclosedir closedir64
|
| 71 |
+
#else
|
| 72 |
+
typedef DIR TclDIR;
|
| 73 |
+
# define TclOSopendir opendir
|
| 74 |
+
# define TclOSrewinddir rewinddir
|
| 75 |
+
# define TclOSclosedir closedir
|
| 76 |
+
#endif
|
| 77 |
+
|
| 78 |
+
#ifdef HAVE_TYPE_OFF64_T
|
| 79 |
+
typedef off64_t Tcl_SeekOffset;
|
| 80 |
+
# define TclOSseek lseek64
|
| 81 |
+
# define TclOSopen open64
|
| 82 |
+
#else
|
| 83 |
+
typedef off_t Tcl_SeekOffset;
|
| 84 |
+
# define TclOSseek lseek
|
| 85 |
+
# define TclOSopen open
|
| 86 |
+
#endif
|
| 87 |
+
|
| 88 |
+
#ifdef __CYGWIN__
|
| 89 |
+
#ifdef __cplusplus
|
| 90 |
+
extern "C" {
|
| 91 |
+
#endif
|
| 92 |
+
/* Make some symbols available without including <windows.h> */
|
| 93 |
+
# define DWORD unsigned int
|
| 94 |
+
# define CP_UTF8 65001
|
| 95 |
+
# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
|
| 96 |
+
# define HANDLE void *
|
| 97 |
+
# define HINSTANCE void *
|
| 98 |
+
# define SOCKET unsigned int
|
| 99 |
+
# define WSAEWOULDBLOCK 10035
|
| 100 |
+
typedef unsigned short WCHAR;
|
| 101 |
+
#ifdef __clang__
|
| 102 |
+
#pragma clang diagnostic push
|
| 103 |
+
#pragma clang diagnostic ignored "-Wignored-attributes"
|
| 104 |
+
#endif
|
| 105 |
+
__declspec(dllimport) extern __stdcall int GetModuleHandleExW(unsigned int, const void *, void *);
|
| 106 |
+
__declspec(dllimport) extern __stdcall int GetModuleFileNameW(void *, const void *, int);
|
| 107 |
+
__declspec(dllimport) extern __stdcall int WideCharToMultiByte(int, int, const void *, int,
|
| 108 |
+
char *, int, const char *, void *);
|
| 109 |
+
__declspec(dllimport) extern __stdcall int MultiByteToWideChar(int, int, const char *, int,
|
| 110 |
+
WCHAR *, int);
|
| 111 |
+
__declspec(dllimport) extern __stdcall void OutputDebugStringW(const WCHAR *);
|
| 112 |
+
__declspec(dllimport) extern __stdcall int IsDebuggerPresent(void);
|
| 113 |
+
__declspec(dllimport) extern __stdcall int GetLastError(void);
|
| 114 |
+
__declspec(dllimport) extern __stdcall int GetFileAttributesW(const WCHAR *);
|
| 115 |
+
__declspec(dllimport) extern __stdcall int SetFileAttributesW(const WCHAR *, int);
|
| 116 |
+
__declspec(dllimport) extern int cygwin_conv_path(int, const void *, void *, int);
|
| 117 |
+
#ifdef __clang__
|
| 118 |
+
#pragma clang diagnostic pop
|
| 119 |
+
#endif
|
| 120 |
+
# define timezone _timezone
|
| 121 |
+
extern int TclOSstat(const char *name, void *statBuf);
|
| 122 |
+
extern int TclOSlstat(const char *name, void *statBuf);
|
| 123 |
+
#ifdef __cplusplus
|
| 124 |
+
}
|
| 125 |
+
#endif
|
| 126 |
+
#elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__)
|
| 127 |
+
# define TclOSstat(name, buf) stat64(name, (struct stat64 *)buf)
|
| 128 |
+
# define TclOSlstat(name,buf) lstat64(name, (struct stat64 *)buf)
|
| 129 |
+
#else
|
| 130 |
+
# define TclOSstat(name, buf) stat(name, (struct stat *)buf)
|
| 131 |
+
# define TclOSlstat(name, buf) lstat(name, (struct stat *)buf)
|
| 132 |
+
#endif
|
| 133 |
+
|
| 134 |
+
/*
|
| 135 |
+
*---------------------------------------------------------------------------
|
| 136 |
+
* Miscellaneous includes that might be missing.
|
| 137 |
+
*---------------------------------------------------------------------------
|
| 138 |
+
*/
|
| 139 |
+
|
| 140 |
+
#include <sys/file.h>
|
| 141 |
+
#ifdef HAVE_SYS_SELECT_H
|
| 142 |
+
# include <sys/select.h>
|
| 143 |
+
#endif
|
| 144 |
+
#include <sys/stat.h>
|
| 145 |
+
#ifdef TIME_WITH_SYS_TIME
|
| 146 |
+
# include <sys/time.h>
|
| 147 |
+
# include <time.h>
|
| 148 |
+
#else
|
| 149 |
+
#ifdef HAVE_SYS_TIME_H
|
| 150 |
+
# include <sys/time.h>
|
| 151 |
+
#else
|
| 152 |
+
# include <time.h>
|
| 153 |
+
#endif
|
| 154 |
+
#endif
|
| 155 |
+
#ifndef NO_SYS_WAIT_H
|
| 156 |
+
# include <sys/wait.h>
|
| 157 |
+
#endif
|
| 158 |
+
#ifdef HAVE_INTTYPES_H
|
| 159 |
+
# include <inttypes.h>
|
| 160 |
+
#endif
|
| 161 |
+
#include <limits.h>
|
| 162 |
+
#ifdef HAVE_STDINT_H
|
| 163 |
+
# include <stdint.h>
|
| 164 |
+
#endif
|
| 165 |
+
#ifdef HAVE_UNISTD_H
|
| 166 |
+
# include <unistd.h>
|
| 167 |
+
#else
|
| 168 |
+
# include "../compat/unistd.h"
|
| 169 |
+
#endif
|
| 170 |
+
|
| 171 |
+
extern int TclUnixSetBlockingMode(int fd, int mode);
|
| 172 |
+
|
| 173 |
+
#include <utime.h>
|
| 174 |
+
|
| 175 |
+
/*
|
| 176 |
+
*---------------------------------------------------------------------------
|
| 177 |
+
* Socket support stuff: This likely needs more work to parameterize for each
|
| 178 |
+
* system.
|
| 179 |
+
*---------------------------------------------------------------------------
|
| 180 |
+
*/
|
| 181 |
+
|
| 182 |
+
#include <sys/socket.h> /* struct sockaddr, SOCK_STREAM, ... */
|
| 183 |
+
#ifndef NO_UNAME
|
| 184 |
+
# include <sys/utsname.h> /* uname system call. */
|
| 185 |
+
#endif
|
| 186 |
+
#include <netinet/in.h> /* struct in_addr, struct sockaddr_in */
|
| 187 |
+
#include <arpa/inet.h> /* inet_ntoa() */
|
| 188 |
+
#include <netdb.h> /* getaddrinfo() */
|
| 189 |
+
#ifdef NEED_FAKE_RFC2553
|
| 190 |
+
# include "../compat/fake-rfc2553.h"
|
| 191 |
+
#endif
|
| 192 |
+
|
| 193 |
+
/*
|
| 194 |
+
*---------------------------------------------------------------------------
|
| 195 |
+
* Some platforms (e.g. SunOS) don't define FLT_MAX and FLT_MIN, so we look
|
| 196 |
+
* for an alternative definition. If no other alternative is available we use
|
| 197 |
+
* a reasonable guess.
|
| 198 |
+
*---------------------------------------------------------------------------
|
| 199 |
+
*/
|
| 200 |
+
|
| 201 |
+
#ifndef NO_FLOAT_H
|
| 202 |
+
# include <float.h>
|
| 203 |
+
#else
|
| 204 |
+
#ifndef NO_VALUES_H
|
| 205 |
+
# include <values.h>
|
| 206 |
+
#endif
|
| 207 |
+
#endif
|
| 208 |
+
|
| 209 |
+
#ifndef FLT_MAX
|
| 210 |
+
# ifdef MAXFLOAT
|
| 211 |
+
# define FLT_MAX MAXFLOAT
|
| 212 |
+
# else
|
| 213 |
+
# define FLT_MAX 3.402823466E+38F
|
| 214 |
+
# endif
|
| 215 |
+
#endif
|
| 216 |
+
#ifndef FLT_MIN
|
| 217 |
+
# ifdef MINFLOAT
|
| 218 |
+
# define FLT_MIN MINFLOAT
|
| 219 |
+
# else
|
| 220 |
+
# define FLT_MIN 1.175494351E-38F
|
| 221 |
+
# endif
|
| 222 |
+
#endif
|
| 223 |
+
|
| 224 |
+
/*
|
| 225 |
+
*---------------------------------------------------------------------------
|
| 226 |
+
* NeXT doesn't define O_NONBLOCK, so #define it here if necessary.
|
| 227 |
+
*---------------------------------------------------------------------------
|
| 228 |
+
*/
|
| 229 |
+
|
| 230 |
+
#ifndef O_NONBLOCK
|
| 231 |
+
# define O_NONBLOCK 0x80
|
| 232 |
+
#endif
|
| 233 |
+
|
| 234 |
+
/*
|
| 235 |
+
*---------------------------------------------------------------------------
|
| 236 |
+
* The type of the status returned by wait varies from UNIX system to UNIX
|
| 237 |
+
* system. The macro below defines it:
|
| 238 |
+
*---------------------------------------------------------------------------
|
| 239 |
+
*/
|
| 240 |
+
|
| 241 |
+
#ifdef _AIX
|
| 242 |
+
# define WAIT_STATUS_TYPE pid_t
|
| 243 |
+
#else
|
| 244 |
+
#ifndef NO_UNION_WAIT
|
| 245 |
+
# define WAIT_STATUS_TYPE union wait
|
| 246 |
+
#else
|
| 247 |
+
# define WAIT_STATUS_TYPE int
|
| 248 |
+
#endif
|
| 249 |
+
#endif
|
| 250 |
+
|
| 251 |
+
/*
|
| 252 |
+
*---------------------------------------------------------------------------
|
| 253 |
+
* Supply definitions for macros to query wait status, if not already defined
|
| 254 |
+
* in header files above.
|
| 255 |
+
*---------------------------------------------------------------------------
|
| 256 |
+
*/
|
| 257 |
+
|
| 258 |
+
#ifndef WIFEXITED
|
| 259 |
+
# define WIFEXITED(stat) (((*((int *) &(stat))) & 0xFF) == 0)
|
| 260 |
+
#endif
|
| 261 |
+
|
| 262 |
+
#ifndef WEXITSTATUS
|
| 263 |
+
# define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xFF)
|
| 264 |
+
#endif
|
| 265 |
+
|
| 266 |
+
#ifndef WIFSIGNALED
|
| 267 |
+
# define WIFSIGNALED(stat) \
|
| 268 |
+
(((*((int *) &(stat)))) && ((*((int *) &(stat))) \
|
| 269 |
+
== ((*((int *) &(stat))) & 0x00FF)))
|
| 270 |
+
#endif
|
| 271 |
+
|
| 272 |
+
#ifndef WTERMSIG
|
| 273 |
+
# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7F)
|
| 274 |
+
#endif
|
| 275 |
+
|
| 276 |
+
#ifndef WIFSTOPPED
|
| 277 |
+
# define WIFSTOPPED(stat) (((*((int *) &(stat))) & 0xFF) == 0177)
|
| 278 |
+
#endif
|
| 279 |
+
|
| 280 |
+
#ifndef WSTOPSIG
|
| 281 |
+
# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xFF)
|
| 282 |
+
#endif
|
| 283 |
+
|
| 284 |
+
/*
|
| 285 |
+
*---------------------------------------------------------------------------
|
| 286 |
+
* Define constants for waitpid() system call if they aren't defined by a
|
| 287 |
+
* system header file.
|
| 288 |
+
*---------------------------------------------------------------------------
|
| 289 |
+
*/
|
| 290 |
+
|
| 291 |
+
#ifndef WNOHANG
|
| 292 |
+
# define WNOHANG 1
|
| 293 |
+
#endif
|
| 294 |
+
#ifndef WUNTRACED
|
| 295 |
+
# define WUNTRACED 2
|
| 296 |
+
#endif
|
| 297 |
+
|
| 298 |
+
/*
|
| 299 |
+
*---------------------------------------------------------------------------
|
| 300 |
+
* Supply macros for seek offsets, if they're not already provided by an
|
| 301 |
+
* include file.
|
| 302 |
+
*---------------------------------------------------------------------------
|
| 303 |
+
*/
|
| 304 |
+
|
| 305 |
+
#ifndef SEEK_SET
|
| 306 |
+
# define SEEK_SET 0
|
| 307 |
+
#endif
|
| 308 |
+
#ifndef SEEK_CUR
|
| 309 |
+
# define SEEK_CUR 1
|
| 310 |
+
#endif
|
| 311 |
+
#ifndef SEEK_END
|
| 312 |
+
# define SEEK_END 2
|
| 313 |
+
#endif
|
| 314 |
+
|
| 315 |
+
/*
|
| 316 |
+
*---------------------------------------------------------------------------
|
| 317 |
+
* The stuff below is needed by the "time" command. If this system has no
|
| 318 |
+
* gettimeofday call, then must use times() instead.
|
| 319 |
+
*---------------------------------------------------------------------------
|
| 320 |
+
*/
|
| 321 |
+
|
| 322 |
+
#ifdef NO_GETTOD
|
| 323 |
+
# include <sys/times.h>
|
| 324 |
+
#else
|
| 325 |
+
# ifdef HAVE_BSDGETTIMEOFDAY
|
| 326 |
+
# define gettimeofday BSDgettimeofday
|
| 327 |
+
# endif
|
| 328 |
+
#endif
|
| 329 |
+
|
| 330 |
+
#ifdef GETTOD_NOT_DECLARED
|
| 331 |
+
extern int gettimeofday(struct timeval *tp,
|
| 332 |
+
struct timezone *tzp);
|
| 333 |
+
#endif
|
| 334 |
+
|
| 335 |
+
/*
|
| 336 |
+
*---------------------------------------------------------------------------
|
| 337 |
+
* Define access mode constants if they aren't already defined.
|
| 338 |
+
*---------------------------------------------------------------------------
|
| 339 |
+
*/
|
| 340 |
+
|
| 341 |
+
#ifndef F_OK
|
| 342 |
+
# define F_OK 00
|
| 343 |
+
#endif
|
| 344 |
+
#ifndef X_OK
|
| 345 |
+
# define X_OK 01
|
| 346 |
+
#endif
|
| 347 |
+
#ifndef W_OK
|
| 348 |
+
# define W_OK 02
|
| 349 |
+
#endif
|
| 350 |
+
#ifndef R_OK
|
| 351 |
+
# define R_OK 04
|
| 352 |
+
#endif
|
| 353 |
+
|
| 354 |
+
/*
|
| 355 |
+
*---------------------------------------------------------------------------
|
| 356 |
+
* Define FD_CLOEEXEC (the close-on-exec flag bit) if it isn't already
|
| 357 |
+
* defined.
|
| 358 |
+
*---------------------------------------------------------------------------
|
| 359 |
+
*/
|
| 360 |
+
|
| 361 |
+
#ifndef FD_CLOEXEC
|
| 362 |
+
# define FD_CLOEXEC 1
|
| 363 |
+
#endif
|
| 364 |
+
|
| 365 |
+
/*
|
| 366 |
+
*---------------------------------------------------------------------------
|
| 367 |
+
* On systems without symbolic links (i.e. S_IFLNK isn't defined) define
|
| 368 |
+
* "lstat" to use "stat" instead.
|
| 369 |
+
*---------------------------------------------------------------------------
|
| 370 |
+
*/
|
| 371 |
+
|
| 372 |
+
#ifndef S_IFLNK
|
| 373 |
+
# undef TclOSlstat
|
| 374 |
+
# define lstat stat
|
| 375 |
+
# define lstat64 stat64
|
| 376 |
+
# define TclOSlstat TclOSstat
|
| 377 |
+
#endif
|
| 378 |
+
|
| 379 |
+
/*
|
| 380 |
+
*---------------------------------------------------------------------------
|
| 381 |
+
* Define macros to query file type bits, if they're not already defined.
|
| 382 |
+
*---------------------------------------------------------------------------
|
| 383 |
+
*/
|
| 384 |
+
|
| 385 |
+
#ifndef S_ISREG
|
| 386 |
+
# ifdef S_IFREG
|
| 387 |
+
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
| 388 |
+
# else
|
| 389 |
+
# define S_ISREG(m) 0
|
| 390 |
+
# endif
|
| 391 |
+
#endif /* !S_ISREG */
|
| 392 |
+
#ifndef S_ISDIR
|
| 393 |
+
# ifdef S_IFDIR
|
| 394 |
+
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
| 395 |
+
# else
|
| 396 |
+
# define S_ISDIR(m) 0
|
| 397 |
+
# endif
|
| 398 |
+
#endif /* !S_ISDIR */
|
| 399 |
+
#ifndef S_ISCHR
|
| 400 |
+
# ifdef S_IFCHR
|
| 401 |
+
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
| 402 |
+
# else
|
| 403 |
+
# define S_ISCHR(m) 0
|
| 404 |
+
# endif
|
| 405 |
+
#endif /* !S_ISCHR */
|
| 406 |
+
|
| 407 |
+
#ifndef S_ISBLK
|
| 408 |
+
# ifdef S_IFBLK
|
| 409 |
+
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
| 410 |
+
# else
|
| 411 |
+
# define S_ISBLK(m) 0
|
| 412 |
+
# endif
|
| 413 |
+
#endif /* !S_ISBLK */
|
| 414 |
+
|
| 415 |
+
#ifndef S_ISFIFO
|
| 416 |
+
# ifdef S_IFIFO
|
| 417 |
+
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
| 418 |
+
# else
|
| 419 |
+
# define S_ISFIFO(m) 0
|
| 420 |
+
# endif
|
| 421 |
+
#endif /* !S_ISFIFO */
|
| 422 |
+
|
| 423 |
+
#ifndef S_ISLNK
|
| 424 |
+
# ifdef S_IFLNK
|
| 425 |
+
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
| 426 |
+
# else
|
| 427 |
+
# define S_ISLNK(m) 0
|
| 428 |
+
# endif
|
| 429 |
+
#endif /* !S_ISLNK */
|
| 430 |
+
|
| 431 |
+
#ifndef S_ISSOCK
|
| 432 |
+
# ifdef S_IFSOCK
|
| 433 |
+
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
|
| 434 |
+
# else
|
| 435 |
+
# define S_ISSOCK(m) 0
|
| 436 |
+
# endif
|
| 437 |
+
#endif /* !S_ISSOCK */
|
| 438 |
+
|
| 439 |
+
/*
|
| 440 |
+
*---------------------------------------------------------------------------
|
| 441 |
+
* Make sure that MAXPATHLEN and MAXNAMLEN are defined.
|
| 442 |
+
*---------------------------------------------------------------------------
|
| 443 |
+
*/
|
| 444 |
+
|
| 445 |
+
#ifndef MAXPATHLEN
|
| 446 |
+
# ifdef PATH_MAX
|
| 447 |
+
# define MAXPATHLEN PATH_MAX
|
| 448 |
+
# else
|
| 449 |
+
# define MAXPATHLEN 2048
|
| 450 |
+
# endif
|
| 451 |
+
#endif
|
| 452 |
+
|
| 453 |
+
#ifndef MAXNAMLEN
|
| 454 |
+
# ifdef NAME_MAX
|
| 455 |
+
# define MAXNAMLEN NAME_MAX
|
| 456 |
+
# else
|
| 457 |
+
# define MAXNAMLEN 255
|
| 458 |
+
# endif
|
| 459 |
+
#endif
|
| 460 |
+
|
| 461 |
+
/*
|
| 462 |
+
*---------------------------------------------------------------------------
|
| 463 |
+
* The following macro defines the type of the mask arguments to select:
|
| 464 |
+
*---------------------------------------------------------------------------
|
| 465 |
+
*/
|
| 466 |
+
|
| 467 |
+
#ifndef NO_FD_SET
|
| 468 |
+
# define SELECT_MASK fd_set
|
| 469 |
+
#else /* NO_FD_SET */
|
| 470 |
+
# ifndef _AIX
|
| 471 |
+
typedef long fd_mask;
|
| 472 |
+
# endif /* !AIX */
|
| 473 |
+
# if defined(_IBMR2)
|
| 474 |
+
# define SELECT_MASK void
|
| 475 |
+
# else /* !defined(_IBMR2) */
|
| 476 |
+
# define SELECT_MASK int
|
| 477 |
+
# endif /* defined(_IBMR2) */
|
| 478 |
+
#endif /* !NO_FD_SET */
|
| 479 |
+
|
| 480 |
+
/*
|
| 481 |
+
*---------------------------------------------------------------------------
|
| 482 |
+
* Define "NBBY" (number of bits per byte) if it's not already defined.
|
| 483 |
+
*---------------------------------------------------------------------------
|
| 484 |
+
*/
|
| 485 |
+
|
| 486 |
+
#ifndef NBBY
|
| 487 |
+
# define NBBY 8
|
| 488 |
+
#endif
|
| 489 |
+
|
| 490 |
+
/*
|
| 491 |
+
*---------------------------------------------------------------------------
|
| 492 |
+
* The following macro defines the number of fd_masks in an fd_set:
|
| 493 |
+
*---------------------------------------------------------------------------
|
| 494 |
+
*/
|
| 495 |
+
|
| 496 |
+
#ifndef FD_SETSIZE
|
| 497 |
+
# ifdef OPEN_MAX
|
| 498 |
+
# define FD_SETSIZE OPEN_MAX
|
| 499 |
+
# else
|
| 500 |
+
# define FD_SETSIZE 256
|
| 501 |
+
# endif
|
| 502 |
+
#endif /* FD_SETSIZE */
|
| 503 |
+
|
| 504 |
+
#ifndef howmany
|
| 505 |
+
# define howmany(x, y) (((x)+((y)-1))/(y))
|
| 506 |
+
#endif /* !defined(howmany) */
|
| 507 |
+
|
| 508 |
+
#ifndef NFDBITS
|
| 509 |
+
# define NFDBITS NBBY*sizeof(fd_mask)
|
| 510 |
+
#endif /* NFDBITS */
|
| 511 |
+
|
| 512 |
+
#define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
|
| 513 |
+
|
| 514 |
+
/*
|
| 515 |
+
*---------------------------------------------------------------------------
|
| 516 |
+
* Not all systems declare the errno variable in errno.h, so this file does it
|
| 517 |
+
* explicitly. The list of system error messages also isn't generally declared
|
| 518 |
+
* in a header file anywhere.
|
| 519 |
+
*---------------------------------------------------------------------------
|
| 520 |
+
*/
|
| 521 |
+
|
| 522 |
+
#ifdef NO_ERRNO
|
| 523 |
+
extern int errno;
|
| 524 |
+
#endif /* NO_ERRNO */
|
| 525 |
+
|
| 526 |
+
/*
|
| 527 |
+
*---------------------------------------------------------------------------
|
| 528 |
+
* Not all systems declare all the errors that Tcl uses! Provide some
|
| 529 |
+
* work-arounds...
|
| 530 |
+
*---------------------------------------------------------------------------
|
| 531 |
+
*/
|
| 532 |
+
|
| 533 |
+
#ifndef EOVERFLOW
|
| 534 |
+
# ifdef EFBIG
|
| 535 |
+
# define EOVERFLOW EFBIG
|
| 536 |
+
# else /* !EFBIG */
|
| 537 |
+
# define EOVERFLOW EINVAL
|
| 538 |
+
# endif /* EFBIG */
|
| 539 |
+
#endif /* EOVERFLOW */
|
| 540 |
+
|
| 541 |
+
/*
|
| 542 |
+
*---------------------------------------------------------------------------
|
| 543 |
+
* Variables provided by the C library:
|
| 544 |
+
*---------------------------------------------------------------------------
|
| 545 |
+
*/
|
| 546 |
+
|
| 547 |
+
#if defined(__APPLE__) && defined(__DYNAMIC__)
|
| 548 |
+
# include <crt_externs.h>
|
| 549 |
+
# define environ (*_NSGetEnviron())
|
| 550 |
+
# define USE_PUTENV 1
|
| 551 |
+
#else
|
| 552 |
+
# if defined(_sgi) || defined(__sgi)
|
| 553 |
+
# define environ _environ
|
| 554 |
+
# endif
|
| 555 |
+
extern char ** environ;
|
| 556 |
+
#endif
|
| 557 |
+
|
| 558 |
+
/*
|
| 559 |
+
*---------------------------------------------------------------------------
|
| 560 |
+
* Darwin specifc configure overrides.
|
| 561 |
+
*---------------------------------------------------------------------------
|
| 562 |
+
*/
|
| 563 |
+
|
| 564 |
+
#ifdef __APPLE__
|
| 565 |
+
|
| 566 |
+
/*
|
| 567 |
+
*---------------------------------------------------------------------------
|
| 568 |
+
* Support for fat compiles: configure runs only once for multiple architectures
|
| 569 |
+
*---------------------------------------------------------------------------
|
| 570 |
+
*/
|
| 571 |
+
|
| 572 |
+
# if defined(__LP64__) && defined (NO_COREFOUNDATION_64)
|
| 573 |
+
# undef HAVE_COREFOUNDATION
|
| 574 |
+
# endif /* __LP64__ && NO_COREFOUNDATION_64 */
|
| 575 |
+
# include <sys/cdefs.h>
|
| 576 |
+
# ifdef __DARWIN_UNIX03
|
| 577 |
+
# if __DARWIN_UNIX03
|
| 578 |
+
# undef HAVE_PUTENV_THAT_COPIES
|
| 579 |
+
# else
|
| 580 |
+
# define HAVE_PUTENV_THAT_COPIES 1
|
| 581 |
+
# endif
|
| 582 |
+
# endif /* __DARWIN_UNIX03 */
|
| 583 |
+
|
| 584 |
+
/*
|
| 585 |
+
*---------------------------------------------------------------------------
|
| 586 |
+
* Include AvailabilityMacros.h here (when available) to ensure any symbolic
|
| 587 |
+
* MAC_OS_X_VERSION_* constants passed on the command line are translated.
|
| 588 |
+
*---------------------------------------------------------------------------
|
| 589 |
+
*/
|
| 590 |
+
|
| 591 |
+
# ifdef HAVE_AVAILABILITYMACROS_H
|
| 592 |
+
# include <AvailabilityMacros.h>
|
| 593 |
+
# endif
|
| 594 |
+
|
| 595 |
+
/*
|
| 596 |
+
*---------------------------------------------------------------------------
|
| 597 |
+
* Support for weak import.
|
| 598 |
+
*---------------------------------------------------------------------------
|
| 599 |
+
*/
|
| 600 |
+
|
| 601 |
+
# ifdef HAVE_WEAK_IMPORT
|
| 602 |
+
# if !defined(HAVE_AVAILABILITYMACROS_H) || !defined(MAC_OS_X_VERSION_MIN_REQUIRED)
|
| 603 |
+
# undef HAVE_WEAK_IMPORT
|
| 604 |
+
# else
|
| 605 |
+
# ifndef WEAK_IMPORT_ATTRIBUTE
|
| 606 |
+
# define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import))
|
| 607 |
+
# endif
|
| 608 |
+
# endif
|
| 609 |
+
# endif /* HAVE_WEAK_IMPORT */
|
| 610 |
+
|
| 611 |
+
/*
|
| 612 |
+
*---------------------------------------------------------------------------
|
| 613 |
+
* Support for MAC_OS_X_VERSION_MAX_ALLOWED define from AvailabilityMacros.h:
|
| 614 |
+
* only use API available in the indicated OS version or earlier.
|
| 615 |
+
*---------------------------------------------------------------------------
|
| 616 |
+
*/
|
| 617 |
+
|
| 618 |
+
# ifdef MAC_OS_X_VERSION_MAX_ALLOWED
|
| 619 |
+
# if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 && defined(__LP64__)
|
| 620 |
+
# undef HAVE_COREFOUNDATION
|
| 621 |
+
# endif
|
| 622 |
+
# if MAC_OS_X_VERSION_MAX_ALLOWED < 1040
|
| 623 |
+
# undef HAVE_OSSPINLOCKLOCK
|
| 624 |
+
# undef HAVE_PTHREAD_ATFORK
|
| 625 |
+
# undef HAVE_COPYFILE
|
| 626 |
+
# endif
|
| 627 |
+
# if MAC_OS_X_VERSION_MAX_ALLOWED < 1030
|
| 628 |
+
# ifdef TCL_THREADS
|
| 629 |
+
/* prior to 10.3, realpath is not threadsafe, c.f. bug 711232 */
|
| 630 |
+
# define NO_REALPATH 1
|
| 631 |
+
# endif
|
| 632 |
+
# undef HAVE_LANGINFO
|
| 633 |
+
# endif
|
| 634 |
+
# endif /* MAC_OS_X_VERSION_MAX_ALLOWED */
|
| 635 |
+
# if defined(HAVE_COREFOUNDATION) && defined(__LP64__) && \
|
| 636 |
+
defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
| 637 |
+
# warning "Weak import of 64-bit CoreFoundation is not supported, will not run on Mac OS X < 10.5."
|
| 638 |
+
# endif
|
| 639 |
+
/*
|
| 640 |
+
* For now, test exec-17.1 fails (I/O setup after closing stdout) with
|
| 641 |
+
* posix_spawnp(), but the classic implementation (based on fork()+execvp())
|
| 642 |
+
* works well under macOS.
|
| 643 |
+
*/
|
| 644 |
+
# undef HAVE_POSIX_SPAWNP
|
| 645 |
+
# undef HAVE_VFORK
|
| 646 |
+
#endif /* __APPLE__ */
|
| 647 |
+
|
| 648 |
+
/*
|
| 649 |
+
*---------------------------------------------------------------------------
|
| 650 |
+
* The following macros and declarations represent the interface between
|
| 651 |
+
* generic and unix-specific parts of Tcl. Some of the macros may override
|
| 652 |
+
* functions declared in tclInt.h.
|
| 653 |
+
*---------------------------------------------------------------------------
|
| 654 |
+
*/
|
| 655 |
+
|
| 656 |
+
/*
|
| 657 |
+
* The default platform eol translation on Unix is TCL_TRANSLATE_LF.
|
| 658 |
+
*/
|
| 659 |
+
|
| 660 |
+
#ifdef DJGPP
|
| 661 |
+
#define TCL_PLATFORM_TRANSLATION TCL_TRANSLATE_CRLF
|
| 662 |
+
typedef int socklen_t;
|
| 663 |
+
#else
|
| 664 |
+
#define TCL_PLATFORM_TRANSLATION TCL_TRANSLATE_LF
|
| 665 |
+
#endif
|
| 666 |
+
|
| 667 |
+
/*
|
| 668 |
+
*---------------------------------------------------------------------------
|
| 669 |
+
* The following macros have trivial definitions, allowing generic code to
|
| 670 |
+
* address platform-specific issues.
|
| 671 |
+
*---------------------------------------------------------------------------
|
| 672 |
+
*/
|
| 673 |
+
|
| 674 |
+
#define TclpReleaseFile(file) /* Nothing. */
|
| 675 |
+
|
| 676 |
+
/*
|
| 677 |
+
*---------------------------------------------------------------------------
|
| 678 |
+
* The following defines wrap the system memory allocation routines.
|
| 679 |
+
*---------------------------------------------------------------------------
|
| 680 |
+
*/
|
| 681 |
+
|
| 682 |
+
#define TclpSysAlloc(size, isBin) malloc((size_t)(size))
|
| 683 |
+
#define TclpSysFree(ptr) free((char *)(ptr))
|
| 684 |
+
#define TclpSysRealloc(ptr, size) realloc((char *)(ptr), (size_t)(size))
|
| 685 |
+
|
| 686 |
+
/*
|
| 687 |
+
*---------------------------------------------------------------------------
|
| 688 |
+
* The following macros and declaration wrap the C runtime library functions.
|
| 689 |
+
*---------------------------------------------------------------------------
|
| 690 |
+
*/
|
| 691 |
+
|
| 692 |
+
#define TclpExit exit
|
| 693 |
+
|
| 694 |
+
#ifdef TCL_THREADS
|
| 695 |
+
# include <pthread.h>
|
| 696 |
+
#endif /* TCL_THREADS */
|
| 697 |
+
|
| 698 |
+
/* FIXME - Hyper-enormous platform assumption! */
|
| 699 |
+
#ifndef AF_INET6
|
| 700 |
+
# define AF_INET6 10
|
| 701 |
+
#endif
|
| 702 |
+
|
| 703 |
+
/*
|
| 704 |
+
*---------------------------------------------------------------------------
|
| 705 |
+
* Set of MT-safe implementations of some known-to-be-MT-unsafe library calls.
|
| 706 |
+
* Instead of returning pointers to the static storage, those return pointers
|
| 707 |
+
* to the TSD data.
|
| 708 |
+
*---------------------------------------------------------------------------
|
| 709 |
+
*/
|
| 710 |
+
|
| 711 |
+
#include <pwd.h>
|
| 712 |
+
#include <grp.h>
|
| 713 |
+
|
| 714 |
+
extern struct passwd * TclpGetPwNam(const char *name);
|
| 715 |
+
extern struct group * TclpGetGrNam(const char *name);
|
| 716 |
+
extern struct passwd * TclpGetPwUid(uid_t uid);
|
| 717 |
+
extern struct group * TclpGetGrGid(gid_t gid);
|
| 718 |
+
extern struct hostent * TclpGetHostByName(const char *name);
|
| 719 |
+
extern struct hostent * TclpGetHostByAddr(const char *addr,
|
| 720 |
+
int length, int type);
|
| 721 |
+
extern void *TclpMakeTcpClientChannelMode(
|
| 722 |
+
void *tcpSocket, int mode);
|
| 723 |
+
|
| 724 |
+
#endif /* _TCLUNIXPORT */
|
| 725 |
+
|
| 726 |
+
/*
|
| 727 |
+
* Local Variables:
|
| 728 |
+
* mode: c
|
| 729 |
+
* c-basic-offset: 4
|
| 730 |
+
* fill-column: 78
|
| 731 |
+
* End:
|
| 732 |
+
*/
|
evalkit_cambrian/include/tkBusy.h
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tkBusy.h --
|
| 3 |
+
*
|
| 4 |
+
* This file defines the type of the structure describing a busy window.
|
| 5 |
+
*
|
| 6 |
+
* Copyright 1993-1998 Lucent Technologies, Inc.
|
| 7 |
+
*
|
| 8 |
+
* The "busy" command was created by George Howlett. Adapted for
|
| 9 |
+
* integration into Tk by Jos Decoster and Donal K. Fellows.
|
| 10 |
+
*
|
| 11 |
+
* See the file "license.terms" for information on usage and redistribution of
|
| 12 |
+
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
typedef struct Busy {
|
| 16 |
+
Display *display; /* Display of busy window */
|
| 17 |
+
Tcl_Interp *interp; /* Interpreter where "busy" command was
|
| 18 |
+
* created. It's used to key the searches in
|
| 19 |
+
* the window hierarchy. See the "windows"
|
| 20 |
+
* command. */
|
| 21 |
+
Tk_Window tkBusy; /* Busy window: Transparent window used to
|
| 22 |
+
* block delivery of events to windows
|
| 23 |
+
* underneath it. */
|
| 24 |
+
Tk_Window tkParent; /* Parent window of the busy window. It may be
|
| 25 |
+
* the reference window (if the reference is a
|
| 26 |
+
* toplevel) or a mutual ancestor of the
|
| 27 |
+
* reference window */
|
| 28 |
+
Tk_Window tkRef; /* Reference window of the busy window. It is
|
| 29 |
+
* used to manage the size and position of the
|
| 30 |
+
* busy window. */
|
| 31 |
+
int x, y; /* Position of the reference window */
|
| 32 |
+
int width, height; /* Size of the reference window. Retained to
|
| 33 |
+
* know if the reference window has been
|
| 34 |
+
* reconfigured to a new size. */
|
| 35 |
+
int menuBar; /* Menu bar flag. */
|
| 36 |
+
Tk_Cursor cursor; /* Cursor for the busy window. */
|
| 37 |
+
Tcl_HashEntry *hashPtr; /* Used the delete the busy window entry out
|
| 38 |
+
* of the global hash table. */
|
| 39 |
+
Tcl_HashTable *tablePtr;
|
| 40 |
+
Tk_OptionTable optionTable;
|
| 41 |
+
} Busy;
|
evalkit_cambrian/include/tkMacOSX.h
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tkMacOSX.h --
|
| 3 |
+
*
|
| 4 |
+
* Declarations of Macintosh specific exported variables and procedures.
|
| 5 |
+
*
|
| 6 |
+
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
|
| 7 |
+
* Copyright 2001-2009, Apple Inc.
|
| 8 |
+
* Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
|
| 9 |
+
*
|
| 10 |
+
* See the file "license.terms" for information on usage and redistribution
|
| 11 |
+
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef _TKMAC
|
| 15 |
+
#define _TKMAC
|
| 16 |
+
|
| 17 |
+
#ifndef _TK
|
| 18 |
+
#include "tk.h"
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* Structures and function types for handling Netscape-type in process
|
| 23 |
+
* embedding where Tk does not control the top-level
|
| 24 |
+
*/
|
| 25 |
+
|
| 26 |
+
typedef int (Tk_MacOSXEmbedRegisterWinProc) (long winID, Tk_Window window);
|
| 27 |
+
typedef void* (Tk_MacOSXEmbedGetGrafPortProc) (Tk_Window window);
|
| 28 |
+
typedef int (Tk_MacOSXEmbedMakeContainerExistProc) (Tk_Window window);
|
| 29 |
+
typedef void (Tk_MacOSXEmbedGetClipProc) (Tk_Window window, void *rgn);
|
| 30 |
+
typedef void (Tk_MacOSXEmbedGetOffsetInParentProc) (Tk_Window window, void *ulCorner);
|
| 31 |
+
|
| 32 |
+
#include "tkPlatDecls.h"
|
| 33 |
+
|
| 34 |
+
#endif /* _TKMAC */
|
evalkit_cambrian/include/tkUnixPort.h
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* tkUnixPort.h --
|
| 3 |
+
*
|
| 4 |
+
* This file is included by all of the Tk C files. It contains
|
| 5 |
+
* information that may be configuration-dependent, such as
|
| 6 |
+
* #includes for system include files and a few other things.
|
| 7 |
+
*
|
| 8 |
+
* Copyright (c) 1991-1993 The Regents of the University of California.
|
| 9 |
+
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
| 10 |
+
*
|
| 11 |
+
* See the file "license.terms" for information on usage and redistribution
|
| 12 |
+
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
#ifndef _UNIXPORT
|
| 16 |
+
#define _UNIXPORT
|
| 17 |
+
|
| 18 |
+
#define __UNIX__ 1
|
| 19 |
+
|
| 20 |
+
#include <stdio.h>
|
| 21 |
+
#include <pwd.h>
|
| 22 |
+
#include <assert.h>
|
| 23 |
+
#include <errno.h>
|
| 24 |
+
#include <fcntl.h>
|
| 25 |
+
#include <ctype.h>
|
| 26 |
+
#include <math.h>
|
| 27 |
+
#include <string.h>
|
| 28 |
+
#include <limits.h>
|
| 29 |
+
#ifdef NO_STDLIB_H
|
| 30 |
+
# include "../compat/stdlib.h"
|
| 31 |
+
#else
|
| 32 |
+
# include <stdlib.h>
|
| 33 |
+
#endif
|
| 34 |
+
#include <sys/types.h>
|
| 35 |
+
#include <sys/file.h>
|
| 36 |
+
#ifdef HAVE_SYS_SELECT_H
|
| 37 |
+
# include <sys/select.h>
|
| 38 |
+
#endif
|
| 39 |
+
#include <sys/stat.h>
|
| 40 |
+
#ifndef _TCL
|
| 41 |
+
# include <tcl.h>
|
| 42 |
+
#endif
|
| 43 |
+
#ifdef TIME_WITH_SYS_TIME
|
| 44 |
+
# include <sys/time.h>
|
| 45 |
+
# include <time.h>
|
| 46 |
+
#else
|
| 47 |
+
# ifdef HAVE_SYS_TIME_H
|
| 48 |
+
# include <sys/time.h>
|
| 49 |
+
# else
|
| 50 |
+
# include <time.h>
|
| 51 |
+
# endif
|
| 52 |
+
#endif
|
| 53 |
+
#ifdef HAVE_INTTYPES_H
|
| 54 |
+
# include <inttypes.h>
|
| 55 |
+
#endif
|
| 56 |
+
#ifndef NO_UNISTD_H
|
| 57 |
+
# include <unistd.h>
|
| 58 |
+
#else
|
| 59 |
+
# include "../compat/unistd.h"
|
| 60 |
+
#endif
|
| 61 |
+
#if defined(__GNUC__) && !defined(__cplusplus)
|
| 62 |
+
# pragma GCC diagnostic ignored "-Wc++-compat"
|
| 63 |
+
#endif
|
| 64 |
+
#include <X11/Xlib.h>
|
| 65 |
+
#include <X11/cursorfont.h>
|
| 66 |
+
#include <X11/keysym.h>
|
| 67 |
+
#include <X11/Xatom.h>
|
| 68 |
+
#include <X11/Xproto.h>
|
| 69 |
+
#include <X11/Xresource.h>
|
| 70 |
+
#include <X11/Xutil.h>
|
| 71 |
+
|
| 72 |
+
/*
|
| 73 |
+
* The following macro defines the type of the mask arguments to
|
| 74 |
+
* select:
|
| 75 |
+
*/
|
| 76 |
+
|
| 77 |
+
#ifndef NO_FD_SET
|
| 78 |
+
# define SELECT_MASK fd_set
|
| 79 |
+
#else
|
| 80 |
+
# ifndef _AIX
|
| 81 |
+
typedef long fd_mask;
|
| 82 |
+
# endif
|
| 83 |
+
# if defined(_IBMR2)
|
| 84 |
+
# define SELECT_MASK void
|
| 85 |
+
# else
|
| 86 |
+
# define SELECT_MASK int
|
| 87 |
+
# endif
|
| 88 |
+
#endif
|
| 89 |
+
|
| 90 |
+
/*
|
| 91 |
+
* The following macro defines the number of fd_masks in an fd_set:
|
| 92 |
+
*/
|
| 93 |
+
|
| 94 |
+
#ifndef FD_SETSIZE
|
| 95 |
+
# ifdef OPEN_MAX
|
| 96 |
+
# define FD_SETSIZE OPEN_MAX
|
| 97 |
+
# else
|
| 98 |
+
# define FD_SETSIZE 256
|
| 99 |
+
# endif
|
| 100 |
+
#endif
|
| 101 |
+
#if !defined(howmany)
|
| 102 |
+
# define howmany(x, y) (((x)+((y)-1))/(y))
|
| 103 |
+
#endif
|
| 104 |
+
#ifndef NFDBITS
|
| 105 |
+
# define NFDBITS NBBY*sizeof(fd_mask)
|
| 106 |
+
#endif
|
| 107 |
+
#define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* Define "NBBY" (number of bits per byte) if it's not already defined.
|
| 111 |
+
*/
|
| 112 |
+
|
| 113 |
+
#ifndef NBBY
|
| 114 |
+
# define NBBY 8
|
| 115 |
+
#endif
|
| 116 |
+
|
| 117 |
+
#ifdef __CYGWIN__
|
| 118 |
+
# include "tkIntXlibDecls.h"
|
| 119 |
+
# define UINT unsigned int
|
| 120 |
+
# define HWND void *
|
| 121 |
+
# define HDC void *
|
| 122 |
+
# define HINSTANCE void *
|
| 123 |
+
# define COLORREF void *
|
| 124 |
+
# define HMENU void *
|
| 125 |
+
# define TkWinDCState void
|
| 126 |
+
# define HPALETTE void *
|
| 127 |
+
# define WNDPROC void *
|
| 128 |
+
# define WPARAM void *
|
| 129 |
+
# define LPARAM void *
|
| 130 |
+
# define LRESULT void *
|
| 131 |
+
|
| 132 |
+
#else /* !__CYGWIN__ */
|
| 133 |
+
/*
|
| 134 |
+
* The TkPutImage macro strips off the color table information, which isn't
|
| 135 |
+
* needed for X.
|
| 136 |
+
*/
|
| 137 |
+
|
| 138 |
+
# define TkPutImage(colors, ncolors, display, pixels, gc, image, srcx, srcy, destx, desty, width, height) \
|
| 139 |
+
XPutImage(display, pixels, gc, image, srcx, srcy, destx, \
|
| 140 |
+
desty, width, height);
|
| 141 |
+
|
| 142 |
+
#endif /* !__CYGWIN__ */
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* Supply macros for seek offsets, if they're not already provided by
|
| 146 |
+
* an include file.
|
| 147 |
+
*/
|
| 148 |
+
|
| 149 |
+
#ifndef SEEK_SET
|
| 150 |
+
# define SEEK_SET 0
|
| 151 |
+
#endif
|
| 152 |
+
|
| 153 |
+
#ifndef SEEK_CUR
|
| 154 |
+
# define SEEK_CUR 1
|
| 155 |
+
#endif
|
| 156 |
+
|
| 157 |
+
#ifndef SEEK_END
|
| 158 |
+
# define SEEK_END 2
|
| 159 |
+
#endif
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* Declarations for various library procedures that may not be declared
|
| 163 |
+
* in any other header file.
|
| 164 |
+
*/
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
/*
|
| 168 |
+
* These functions do nothing under Unix, so we just eliminate calls to them.
|
| 169 |
+
*/
|
| 170 |
+
|
| 171 |
+
#define TkpButtonSetDefaults() {}
|
| 172 |
+
#define TkpDestroyButton(butPtr) {}
|
| 173 |
+
#define TkSelUpdateClipboard(a,b) {}
|
| 174 |
+
#ifndef __CYGWIN__
|
| 175 |
+
#define TkSetPixmapColormap(p,c) {}
|
| 176 |
+
#endif
|
| 177 |
+
|
| 178 |
+
/*
|
| 179 |
+
* These calls implement native bitmaps which are not supported under
|
| 180 |
+
* UNIX. The macros eliminate the calls.
|
| 181 |
+
*/
|
| 182 |
+
|
| 183 |
+
#define TkpDefineNativeBitmaps()
|
| 184 |
+
#define TkpCreateNativeBitmap(display, source) None
|
| 185 |
+
#define TkpGetNativeAppBitmap(display, name, w, h) None
|
| 186 |
+
|
| 187 |
+
/*
|
| 188 |
+
* This macro stores a representation of the window handle in a string.
|
| 189 |
+
* This should perhaps use the real size of an XID.
|
| 190 |
+
*/
|
| 191 |
+
|
| 192 |
+
#ifndef __CYGWIN__
|
| 193 |
+
#define TkpPrintWindowId(buf,w) \
|
| 194 |
+
snprintf((buf), TCL_INTEGER_SPACE, "0x%08lx", (unsigned long) (w))
|
| 195 |
+
#endif
|
| 196 |
+
|
| 197 |
+
#endif /* _UNIXPORT */
|
evalkit_cambrian/lib/python3.10/site-packages/scipy/sparse/csgraph/_flow.cpython-310-x86_64-linux-gnu.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70c4ace45253414e81052736c442dc374b1a77957faa64b63e137e212614d75f
|
| 3 |
+
size 354320
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/CommonTokenStream.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
#/
|
| 6 |
+
|
| 7 |
+
#
|
| 8 |
+
# This class extends {@link BufferedTokenStream} with functionality to filter
|
| 9 |
+
# token streams to tokens on a particular channel (tokens where
|
| 10 |
+
# {@link Token#getChannel} returns a particular value).
|
| 11 |
+
#
|
| 12 |
+
# <p>
|
| 13 |
+
# This token stream provides access to all tokens by index or when calling
|
| 14 |
+
# methods like {@link #getText}. The channel filtering is only used for code
|
| 15 |
+
# accessing tokens via the lookahead methods {@link #LA}, {@link #LT}, and
|
| 16 |
+
# {@link #LB}.</p>
|
| 17 |
+
#
|
| 18 |
+
# <p>
|
| 19 |
+
# By default, tokens are placed on the default channel
|
| 20 |
+
# ({@link Token#DEFAULT_CHANNEL}), but may be reassigned by using the
|
| 21 |
+
# {@code ->channel(HIDDEN)} lexer command, or by using an embedded action to
|
| 22 |
+
# call {@link Lexer#setChannel}.
|
| 23 |
+
# </p>
|
| 24 |
+
#
|
| 25 |
+
# <p>
|
| 26 |
+
# Note: lexer rules which use the {@code ->skip} lexer command or call
|
| 27 |
+
# {@link Lexer#skip} do not produce tokens at all, so input text matched by
|
| 28 |
+
# such a rule will not be available as part of the token stream, regardless of
|
| 29 |
+
# channel.</p>
|
| 30 |
+
#/
|
| 31 |
+
|
| 32 |
+
from antlr4.BufferedTokenStream import BufferedTokenStream
|
| 33 |
+
from antlr4.Lexer import Lexer
|
| 34 |
+
from antlr4.Token import Token
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
class CommonTokenStream(BufferedTokenStream):
|
| 38 |
+
__slots__ = 'channel'
|
| 39 |
+
|
| 40 |
+
def __init__(self, lexer:Lexer, channel:int=Token.DEFAULT_CHANNEL):
|
| 41 |
+
super().__init__(lexer)
|
| 42 |
+
self.channel = channel
|
| 43 |
+
|
| 44 |
+
def adjustSeekIndex(self, i:int):
|
| 45 |
+
return self.nextTokenOnChannel(i, self.channel)
|
| 46 |
+
|
| 47 |
+
def LB(self, k:int):
|
| 48 |
+
if k==0 or (self.index-k)<0:
|
| 49 |
+
return None
|
| 50 |
+
i = self.index
|
| 51 |
+
n = 1
|
| 52 |
+
# find k good tokens looking backwards
|
| 53 |
+
while n <= k:
|
| 54 |
+
# skip off-channel tokens
|
| 55 |
+
i = self.previousTokenOnChannel(i - 1, self.channel)
|
| 56 |
+
n += 1
|
| 57 |
+
if i < 0:
|
| 58 |
+
return None
|
| 59 |
+
return self.tokens[i]
|
| 60 |
+
|
| 61 |
+
def LT(self, k:int):
|
| 62 |
+
self.lazyInit()
|
| 63 |
+
if k == 0:
|
| 64 |
+
return None
|
| 65 |
+
if k < 0:
|
| 66 |
+
return self.LB(-k)
|
| 67 |
+
i = self.index
|
| 68 |
+
n = 1 # we know tokens[pos] is a good one
|
| 69 |
+
# find k good tokens
|
| 70 |
+
while n < k:
|
| 71 |
+
# skip off-channel tokens, but make sure to not look past EOF
|
| 72 |
+
if self.sync(i + 1):
|
| 73 |
+
i = self.nextTokenOnChannel(i + 1, self.channel)
|
| 74 |
+
n += 1
|
| 75 |
+
return self.tokens[i]
|
| 76 |
+
|
| 77 |
+
# Count EOF just once.#/
|
| 78 |
+
def getNumberOfOnChannelTokens(self):
|
| 79 |
+
n = 0
|
| 80 |
+
self.fill()
|
| 81 |
+
for i in range(0, len(self.tokens)):
|
| 82 |
+
t = self.tokens[i]
|
| 83 |
+
if t.channel==self.channel:
|
| 84 |
+
n += 1
|
| 85 |
+
if t.type==Token.EOF:
|
| 86 |
+
break
|
| 87 |
+
return n
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/InputStream.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
#
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
#
|
| 9 |
+
# Vacuum all input from a string and then treat it like a buffer.
|
| 10 |
+
#
|
| 11 |
+
from antlr4.Token import Token
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class InputStream (object):
|
| 15 |
+
__slots__ = ('name', 'strdata', '_index', 'data', '_size')
|
| 16 |
+
|
| 17 |
+
def __init__(self, data: str):
|
| 18 |
+
self.name = "<empty>"
|
| 19 |
+
self.strdata = data
|
| 20 |
+
self._loadString()
|
| 21 |
+
|
| 22 |
+
def _loadString(self):
|
| 23 |
+
self._index = 0
|
| 24 |
+
self.data = [ord(c) for c in self.strdata]
|
| 25 |
+
self._size = len(self.data)
|
| 26 |
+
|
| 27 |
+
@property
|
| 28 |
+
def index(self):
|
| 29 |
+
return self._index
|
| 30 |
+
|
| 31 |
+
@property
|
| 32 |
+
def size(self):
|
| 33 |
+
return self._size
|
| 34 |
+
|
| 35 |
+
# Reset the stream so that it's in the same state it was
|
| 36 |
+
# when the object was created *except* the data array is not
|
| 37 |
+
# touched.
|
| 38 |
+
#
|
| 39 |
+
def reset(self):
|
| 40 |
+
self._index = 0
|
| 41 |
+
|
| 42 |
+
def consume(self):
|
| 43 |
+
if self._index >= self._size:
|
| 44 |
+
assert self.LA(1) == Token.EOF
|
| 45 |
+
raise Exception("cannot consume EOF")
|
| 46 |
+
self._index += 1
|
| 47 |
+
|
| 48 |
+
def LA(self, offset: int):
|
| 49 |
+
if offset==0:
|
| 50 |
+
return 0 # undefined
|
| 51 |
+
if offset<0:
|
| 52 |
+
offset += 1 # e.g., translate LA(-1) to use offset=0
|
| 53 |
+
pos = self._index + offset - 1
|
| 54 |
+
if pos < 0 or pos >= self._size: # invalid
|
| 55 |
+
return Token.EOF
|
| 56 |
+
return self.data[pos]
|
| 57 |
+
|
| 58 |
+
def LT(self, offset: int):
|
| 59 |
+
return self.LA(offset)
|
| 60 |
+
|
| 61 |
+
# mark/release do nothing; we have entire buffer
|
| 62 |
+
def mark(self):
|
| 63 |
+
return -1
|
| 64 |
+
|
| 65 |
+
def release(self, marker: int):
|
| 66 |
+
pass
|
| 67 |
+
|
| 68 |
+
# consume() ahead until p==_index; can't just set p=_index as we must
|
| 69 |
+
# update line and column. If we seek backwards, just set p
|
| 70 |
+
#
|
| 71 |
+
def seek(self, _index: int):
|
| 72 |
+
if _index<=self._index:
|
| 73 |
+
self._index = _index # just jump; don't update stream state (line, ...)
|
| 74 |
+
return
|
| 75 |
+
# seek forward
|
| 76 |
+
self._index = min(_index, self._size)
|
| 77 |
+
|
| 78 |
+
def getText(self, start :int, stop: int):
|
| 79 |
+
if stop >= self._size:
|
| 80 |
+
stop = self._size-1
|
| 81 |
+
if start >= self._size:
|
| 82 |
+
return ""
|
| 83 |
+
else:
|
| 84 |
+
return self.strdata[start:stop+1]
|
| 85 |
+
|
| 86 |
+
def __str__(self):
|
| 87 |
+
return self.strdata
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/IntervalSet.py
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
#
|
| 6 |
+
|
| 7 |
+
from io import StringIO
|
| 8 |
+
from antlr4.Token import Token
|
| 9 |
+
|
| 10 |
+
# need forward declarations
|
| 11 |
+
IntervalSet = None
|
| 12 |
+
|
| 13 |
+
class IntervalSet(object):
|
| 14 |
+
__slots__ = ('intervals', 'readonly')
|
| 15 |
+
|
| 16 |
+
def __init__(self):
|
| 17 |
+
self.intervals = None
|
| 18 |
+
self.readonly = False
|
| 19 |
+
|
| 20 |
+
def __iter__(self):
|
| 21 |
+
if self.intervals is not None:
|
| 22 |
+
for i in self.intervals:
|
| 23 |
+
for c in i:
|
| 24 |
+
yield c
|
| 25 |
+
|
| 26 |
+
def __getitem__(self, item):
|
| 27 |
+
i = 0
|
| 28 |
+
for k in self:
|
| 29 |
+
if i==item:
|
| 30 |
+
return k
|
| 31 |
+
else:
|
| 32 |
+
i += 1
|
| 33 |
+
return Token.INVALID_TYPE
|
| 34 |
+
|
| 35 |
+
def addOne(self, v:int):
|
| 36 |
+
self.addRange(range(v, v+1))
|
| 37 |
+
|
| 38 |
+
def addRange(self, v:range):
|
| 39 |
+
if self.intervals is None:
|
| 40 |
+
self.intervals = list()
|
| 41 |
+
self.intervals.append(v)
|
| 42 |
+
else:
|
| 43 |
+
# find insert pos
|
| 44 |
+
k = 0
|
| 45 |
+
for i in self.intervals:
|
| 46 |
+
# distinct range -> insert
|
| 47 |
+
if v.stop<i.start:
|
| 48 |
+
self.intervals.insert(k, v)
|
| 49 |
+
return
|
| 50 |
+
# contiguous range -> adjust
|
| 51 |
+
elif v.stop==i.start:
|
| 52 |
+
self.intervals[k] = range(v.start, i.stop)
|
| 53 |
+
return
|
| 54 |
+
# overlapping range -> adjust and reduce
|
| 55 |
+
elif v.start<=i.stop:
|
| 56 |
+
self.intervals[k] = range(min(i.start,v.start), max(i.stop,v.stop))
|
| 57 |
+
self.reduce(k)
|
| 58 |
+
return
|
| 59 |
+
k += 1
|
| 60 |
+
# greater than any existing
|
| 61 |
+
self.intervals.append(v)
|
| 62 |
+
|
| 63 |
+
def addSet(self, other:IntervalSet):
|
| 64 |
+
if other.intervals is not None:
|
| 65 |
+
for i in other.intervals:
|
| 66 |
+
self.addRange(i)
|
| 67 |
+
return self
|
| 68 |
+
|
| 69 |
+
def reduce(self, k:int):
|
| 70 |
+
# only need to reduce if k is not the last
|
| 71 |
+
if k<len(self.intervals)-1:
|
| 72 |
+
l = self.intervals[k]
|
| 73 |
+
r = self.intervals[k+1]
|
| 74 |
+
# if r contained in l
|
| 75 |
+
if l.stop >= r.stop:
|
| 76 |
+
self.intervals.pop(k+1)
|
| 77 |
+
self.reduce(k)
|
| 78 |
+
elif l.stop >= r.start:
|
| 79 |
+
self.intervals[k] = range(l.start, r.stop)
|
| 80 |
+
self.intervals.pop(k+1)
|
| 81 |
+
|
| 82 |
+
def complement(self, start, stop):
|
| 83 |
+
result = IntervalSet()
|
| 84 |
+
result.addRange(range(start,stop+1))
|
| 85 |
+
for i in self.intervals:
|
| 86 |
+
result.removeRange(i)
|
| 87 |
+
return result
|
| 88 |
+
|
| 89 |
+
def __contains__(self, item):
|
| 90 |
+
if self.intervals is None:
|
| 91 |
+
return False
|
| 92 |
+
else:
|
| 93 |
+
return any(item in i for i in self.intervals)
|
| 94 |
+
|
| 95 |
+
def __len__(self):
|
| 96 |
+
return sum(len(i) for i in self.intervals)
|
| 97 |
+
|
| 98 |
+
def removeRange(self, v):
|
| 99 |
+
if v.start==v.stop-1:
|
| 100 |
+
self.removeOne(v.start)
|
| 101 |
+
elif self.intervals is not None:
|
| 102 |
+
k = 0
|
| 103 |
+
for i in self.intervals:
|
| 104 |
+
# intervals are ordered
|
| 105 |
+
if v.stop<=i.start:
|
| 106 |
+
return
|
| 107 |
+
# check for including range, split it
|
| 108 |
+
elif v.start>i.start and v.stop<i.stop:
|
| 109 |
+
self.intervals[k] = range(i.start, v.start)
|
| 110 |
+
x = range(v.stop, i.stop)
|
| 111 |
+
self.intervals.insert(k, x)
|
| 112 |
+
return
|
| 113 |
+
# check for included range, remove it
|
| 114 |
+
elif v.start<=i.start and v.stop>=i.stop:
|
| 115 |
+
self.intervals.pop(k)
|
| 116 |
+
k -= 1 # need another pass
|
| 117 |
+
# check for lower boundary
|
| 118 |
+
elif v.start<i.stop:
|
| 119 |
+
self.intervals[k] = range(i.start, v.start)
|
| 120 |
+
# check for upper boundary
|
| 121 |
+
elif v.stop<i.stop:
|
| 122 |
+
self.intervals[k] = range(v.stop, i.stop)
|
| 123 |
+
k += 1
|
| 124 |
+
|
| 125 |
+
def removeOne(self, v):
|
| 126 |
+
if self.intervals is not None:
|
| 127 |
+
k = 0
|
| 128 |
+
for i in self.intervals:
|
| 129 |
+
# intervals is ordered
|
| 130 |
+
if v<i.start:
|
| 131 |
+
return
|
| 132 |
+
# check for single value range
|
| 133 |
+
elif v==i.start and v==i.stop-1:
|
| 134 |
+
self.intervals.pop(k)
|
| 135 |
+
return
|
| 136 |
+
# check for lower boundary
|
| 137 |
+
elif v==i.start:
|
| 138 |
+
self.intervals[k] = range(i.start+1, i.stop)
|
| 139 |
+
return
|
| 140 |
+
# check for upper boundary
|
| 141 |
+
elif v==i.stop-1:
|
| 142 |
+
self.intervals[k] = range(i.start, i.stop-1)
|
| 143 |
+
return
|
| 144 |
+
# split existing range
|
| 145 |
+
elif v<i.stop-1:
|
| 146 |
+
x = range(i.start, v)
|
| 147 |
+
self.intervals[k] = range(v + 1, i.stop)
|
| 148 |
+
self.intervals.insert(k, x)
|
| 149 |
+
return
|
| 150 |
+
k += 1
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
def toString(self, literalNames:list, symbolicNames:list):
|
| 154 |
+
if self.intervals is None:
|
| 155 |
+
return "{}"
|
| 156 |
+
with StringIO() as buf:
|
| 157 |
+
if len(self)>1:
|
| 158 |
+
buf.write("{")
|
| 159 |
+
first = True
|
| 160 |
+
for i in self.intervals:
|
| 161 |
+
for j in i:
|
| 162 |
+
if not first:
|
| 163 |
+
buf.write(", ")
|
| 164 |
+
buf.write(self.elementName(literalNames, symbolicNames, j))
|
| 165 |
+
first = False
|
| 166 |
+
if len(self)>1:
|
| 167 |
+
buf.write("}")
|
| 168 |
+
return buf.getvalue()
|
| 169 |
+
|
| 170 |
+
def elementName(self, literalNames:list, symbolicNames:list, a:int):
|
| 171 |
+
if a==Token.EOF:
|
| 172 |
+
return "<EOF>"
|
| 173 |
+
elif a==Token.EPSILON:
|
| 174 |
+
return "<EPSILON>"
|
| 175 |
+
else:
|
| 176 |
+
if a<len(literalNames) and literalNames[a] != "<INVALID>":
|
| 177 |
+
return literalNames[a]
|
| 178 |
+
if a<len(symbolicNames):
|
| 179 |
+
return symbolicNames[a]
|
| 180 |
+
return "<UNKNOWN>"
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/ListTokenSource.py
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
#
|
| 6 |
+
|
| 7 |
+
#
|
| 8 |
+
# Provides an implementation of {@link TokenSource} as a wrapper around a list
|
| 9 |
+
# of {@link Token} objects.
|
| 10 |
+
#
|
| 11 |
+
# <p>If the final token in the list is an {@link Token#EOF} token, it will be used
|
| 12 |
+
# as the EOF token for every call to {@link #nextToken} after the end of the
|
| 13 |
+
# list is reached. Otherwise, an EOF token will be created.</p>
|
| 14 |
+
#
|
| 15 |
+
from antlr4.CommonTokenFactory import CommonTokenFactory
|
| 16 |
+
from antlr4.Lexer import TokenSource
|
| 17 |
+
from antlr4.Token import Token
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
class ListTokenSource(TokenSource):
|
| 21 |
+
__slots__ = ('tokens', 'sourceName', 'pos', 'eofToken', '_factory')
|
| 22 |
+
|
| 23 |
+
# Constructs a new {@link ListTokenSource} instance from the specified
|
| 24 |
+
# collection of {@link Token} objects and source name.
|
| 25 |
+
#
|
| 26 |
+
# @param tokens The collection of {@link Token} objects to provide as a
|
| 27 |
+
# {@link TokenSource}.
|
| 28 |
+
# @param sourceName The name of the {@link TokenSource}. If this value is
|
| 29 |
+
# {@code null}, {@link #getSourceName} will attempt to infer the name from
|
| 30 |
+
# the next {@link Token} (or the previous token if the end of the input has
|
| 31 |
+
# been reached).
|
| 32 |
+
#
|
| 33 |
+
# @exception NullPointerException if {@code tokens} is {@code null}
|
| 34 |
+
#
|
| 35 |
+
def __init__(self, tokens:list, sourceName:str=None):
|
| 36 |
+
if tokens is None:
|
| 37 |
+
raise ReferenceError("tokens cannot be null")
|
| 38 |
+
self.tokens = tokens
|
| 39 |
+
self.sourceName = sourceName
|
| 40 |
+
# The index into {@link #tokens} of token to return by the next call to
|
| 41 |
+
# {@link #nextToken}. The end of the input is indicated by this value
|
| 42 |
+
# being greater than or equal to the number of items in {@link #tokens}.
|
| 43 |
+
self.pos = 0
|
| 44 |
+
# This field caches the EOF token for the token source.
|
| 45 |
+
self.eofToken = None
|
| 46 |
+
# This is the backing field for {@link #getTokenFactory} and
|
| 47 |
+
self._factory = CommonTokenFactory.DEFAULT
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
#
|
| 51 |
+
# {@inheritDoc}
|
| 52 |
+
#
|
| 53 |
+
@property
|
| 54 |
+
def column(self):
|
| 55 |
+
if self.pos < len(self.tokens):
|
| 56 |
+
return self.tokens[self.pos].column
|
| 57 |
+
elif self.eofToken is not None:
|
| 58 |
+
return self.eofToken.column
|
| 59 |
+
elif len(self.tokens) > 0:
|
| 60 |
+
# have to calculate the result from the line/column of the previous
|
| 61 |
+
# token, along with the text of the token.
|
| 62 |
+
lastToken = self.tokens[len(self.tokens) - 1]
|
| 63 |
+
tokenText = lastToken.text
|
| 64 |
+
if tokenText is not None:
|
| 65 |
+
lastNewLine = tokenText.rfind('\n')
|
| 66 |
+
if lastNewLine >= 0:
|
| 67 |
+
return len(tokenText) - lastNewLine - 1
|
| 68 |
+
return lastToken.column + lastToken.stop - lastToken.start + 1
|
| 69 |
+
|
| 70 |
+
# only reach this if tokens is empty, meaning EOF occurs at the first
|
| 71 |
+
# position in the input
|
| 72 |
+
return 0
|
| 73 |
+
|
| 74 |
+
#
|
| 75 |
+
# {@inheritDoc}
|
| 76 |
+
#
|
| 77 |
+
def nextToken(self):
|
| 78 |
+
if self.pos >= len(self.tokens):
|
| 79 |
+
if self.eofToken is None:
|
| 80 |
+
start = -1
|
| 81 |
+
if len(self.tokens) > 0:
|
| 82 |
+
previousStop = self.tokens[len(self.tokens) - 1].stop
|
| 83 |
+
if previousStop != -1:
|
| 84 |
+
start = previousStop + 1
|
| 85 |
+
stop = max(-1, start - 1)
|
| 86 |
+
self.eofToken = self._factory.create((self, self.getInputStream()),
|
| 87 |
+
Token.EOF, "EOF", Token.DEFAULT_CHANNEL, start, stop, self.line, self.column)
|
| 88 |
+
return self.eofToken
|
| 89 |
+
t = self.tokens[self.pos]
|
| 90 |
+
if self.pos == len(self.tokens) - 1 and t.type == Token.EOF:
|
| 91 |
+
self.eofToken = t
|
| 92 |
+
self.pos += 1
|
| 93 |
+
return t
|
| 94 |
+
|
| 95 |
+
#
|
| 96 |
+
# {@inheritDoc}
|
| 97 |
+
#
|
| 98 |
+
@property
|
| 99 |
+
def line(self):
|
| 100 |
+
if self.pos < len(self.tokens):
|
| 101 |
+
return self.tokens[self.pos].line
|
| 102 |
+
elif self.eofToken is not None:
|
| 103 |
+
return self.eofToken.line
|
| 104 |
+
elif len(self.tokens) > 0:
|
| 105 |
+
# have to calculate the result from the line/column of the previous
|
| 106 |
+
# token, along with the text of the token.
|
| 107 |
+
lastToken = self.tokens[len(self.tokens) - 1]
|
| 108 |
+
line = lastToken.line
|
| 109 |
+
tokenText = lastToken.text
|
| 110 |
+
if tokenText is not None:
|
| 111 |
+
line += tokenText.count('\n')
|
| 112 |
+
|
| 113 |
+
# if no text is available, assume the token did not contain any newline characters.
|
| 114 |
+
return line
|
| 115 |
+
|
| 116 |
+
# only reach this if tokens is empty, meaning EOF occurs at the first
|
| 117 |
+
# position in the input
|
| 118 |
+
return 1
|
| 119 |
+
|
| 120 |
+
#
|
| 121 |
+
# {@inheritDoc}
|
| 122 |
+
#
|
| 123 |
+
def getInputStream(self):
|
| 124 |
+
if self.pos < len(self.tokens):
|
| 125 |
+
return self.tokens[self.pos].getInputStream()
|
| 126 |
+
elif self.eofToken is not None:
|
| 127 |
+
return self.eofToken.getInputStream()
|
| 128 |
+
elif len(self.tokens) > 0:
|
| 129 |
+
return self.tokens[len(self.tokens) - 1].getInputStream()
|
| 130 |
+
else:
|
| 131 |
+
# no input stream information is available
|
| 132 |
+
return None
|
| 133 |
+
|
| 134 |
+
#
|
| 135 |
+
# {@inheritDoc}
|
| 136 |
+
#
|
| 137 |
+
def getSourceName(self):
|
| 138 |
+
if self.sourceName is not None:
|
| 139 |
+
return self.sourceName
|
| 140 |
+
inputStream = self.getInputStream()
|
| 141 |
+
if inputStream is not None:
|
| 142 |
+
return inputStream.getSourceName()
|
| 143 |
+
else:
|
| 144 |
+
return "List"
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/Parser.py
ADDED
|
@@ -0,0 +1,580 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
import sys
|
| 6 |
+
if sys.version_info[1] > 5:
|
| 7 |
+
from typing import TextIO
|
| 8 |
+
else:
|
| 9 |
+
from typing.io import TextIO
|
| 10 |
+
from antlr4.BufferedTokenStream import TokenStream
|
| 11 |
+
from antlr4.CommonTokenFactory import TokenFactory
|
| 12 |
+
from antlr4.error.ErrorStrategy import DefaultErrorStrategy
|
| 13 |
+
from antlr4.InputStream import InputStream
|
| 14 |
+
from antlr4.Recognizer import Recognizer
|
| 15 |
+
from antlr4.RuleContext import RuleContext
|
| 16 |
+
from antlr4.ParserRuleContext import ParserRuleContext
|
| 17 |
+
from antlr4.Token import Token
|
| 18 |
+
from antlr4.Lexer import Lexer
|
| 19 |
+
from antlr4.atn.ATNDeserializer import ATNDeserializer
|
| 20 |
+
from antlr4.atn.ATNDeserializationOptions import ATNDeserializationOptions
|
| 21 |
+
from antlr4.error.Errors import UnsupportedOperationException, RecognitionException
|
| 22 |
+
from antlr4.tree.ParseTreePatternMatcher import ParseTreePatternMatcher
|
| 23 |
+
from antlr4.tree.Tree import ParseTreeListener, TerminalNode, ErrorNode
|
| 24 |
+
|
| 25 |
+
class TraceListener(ParseTreeListener):
|
| 26 |
+
__slots__ = '_parser'
|
| 27 |
+
|
| 28 |
+
def __init__(self, parser):
|
| 29 |
+
self._parser = parser
|
| 30 |
+
|
| 31 |
+
def enterEveryRule(self, ctx):
|
| 32 |
+
print("enter " + self._parser.ruleNames[ctx.getRuleIndex()] + ", LT(1)=" + self._parser._input.LT(1).text, file=self._parser._output)
|
| 33 |
+
|
| 34 |
+
def visitTerminal(self, node):
|
| 35 |
+
|
| 36 |
+
print("consume " + str(node.symbol) + " rule " + self._parser.ruleNames[self._parser._ctx.getRuleIndex()], file=self._parser._output)
|
| 37 |
+
|
| 38 |
+
def visitErrorNode(self, node):
|
| 39 |
+
pass
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def exitEveryRule(self, ctx):
|
| 43 |
+
print("exit " + self._parser.ruleNames[ctx.getRuleIndex()] + ", LT(1)=" + self._parser._input.LT(1).text, file=self._parser._output)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# self is all the parsing support code essentially; most of it is error recovery stuff.#
|
| 47 |
+
class Parser (Recognizer):
|
| 48 |
+
__slots__ = (
|
| 49 |
+
'_input', '_output', '_errHandler', '_precedenceStack', '_ctx',
|
| 50 |
+
'buildParseTrees', '_tracer', '_parseListeners', '_syntaxErrors'
|
| 51 |
+
|
| 52 |
+
)
|
| 53 |
+
# self field maps from the serialized ATN string to the deserialized {@link ATN} with
|
| 54 |
+
# bypass alternatives.
|
| 55 |
+
#
|
| 56 |
+
# @see ATNDeserializationOptions#isGenerateRuleBypassTransitions()
|
| 57 |
+
#
|
| 58 |
+
bypassAltsAtnCache = dict()
|
| 59 |
+
|
| 60 |
+
def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
|
| 61 |
+
super().__init__()
|
| 62 |
+
# The input stream.
|
| 63 |
+
self._input = None
|
| 64 |
+
self._output = output
|
| 65 |
+
# The error handling strategy for the parser. The default value is a new
|
| 66 |
+
# instance of {@link DefaultErrorStrategy}.
|
| 67 |
+
self._errHandler = DefaultErrorStrategy()
|
| 68 |
+
self._precedenceStack = list()
|
| 69 |
+
self._precedenceStack.append(0)
|
| 70 |
+
# The {@link ParserRuleContext} object for the currently executing rule.
|
| 71 |
+
# self is always non-null during the parsing process.
|
| 72 |
+
self._ctx = None
|
| 73 |
+
# Specifies whether or not the parser should construct a parse tree during
|
| 74 |
+
# the parsing process. The default value is {@code true}.
|
| 75 |
+
self.buildParseTrees = True
|
| 76 |
+
# When {@link #setTrace}{@code (true)} is called, a reference to the
|
| 77 |
+
# {@link TraceListener} is stored here so it can be easily removed in a
|
| 78 |
+
# later call to {@link #setTrace}{@code (false)}. The listener itself is
|
| 79 |
+
# implemented as a parser listener so self field is not directly used by
|
| 80 |
+
# other parser methods.
|
| 81 |
+
self._tracer = None
|
| 82 |
+
# The list of {@link ParseTreeListener} listeners registered to receive
|
| 83 |
+
# events during the parse.
|
| 84 |
+
self._parseListeners = None
|
| 85 |
+
# The number of syntax errors reported during parsing. self value is
|
| 86 |
+
# incremented each time {@link #notifyErrorListeners} is called.
|
| 87 |
+
self._syntaxErrors = 0
|
| 88 |
+
self.setInputStream(input)
|
| 89 |
+
|
| 90 |
+
# reset the parser's state#
|
| 91 |
+
def reset(self):
|
| 92 |
+
if self._input is not None:
|
| 93 |
+
self._input.seek(0)
|
| 94 |
+
self._errHandler.reset(self)
|
| 95 |
+
self._ctx = None
|
| 96 |
+
self._syntaxErrors = 0
|
| 97 |
+
self.setTrace(False)
|
| 98 |
+
self._precedenceStack = list()
|
| 99 |
+
self._precedenceStack.append(0)
|
| 100 |
+
if self._interp is not None:
|
| 101 |
+
self._interp.reset()
|
| 102 |
+
|
| 103 |
+
# Match current input symbol against {@code ttype}. If the symbol type
|
| 104 |
+
# matches, {@link ANTLRErrorStrategy#reportMatch} and {@link #consume} are
|
| 105 |
+
# called to complete the match process.
|
| 106 |
+
#
|
| 107 |
+
# <p>If the symbol type does not match,
|
| 108 |
+
# {@link ANTLRErrorStrategy#recoverInline} is called on the current error
|
| 109 |
+
# strategy to attempt recovery. If {@link #getBuildParseTree} is
|
| 110 |
+
# {@code true} and the token index of the symbol returned by
|
| 111 |
+
# {@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to
|
| 112 |
+
# the parse tree by calling {@link ParserRuleContext#addErrorNode}.</p>
|
| 113 |
+
#
|
| 114 |
+
# @param ttype the token type to match
|
| 115 |
+
# @return the matched symbol
|
| 116 |
+
# @throws RecognitionException if the current input symbol did not match
|
| 117 |
+
# {@code ttype} and the error strategy could not recover from the
|
| 118 |
+
# mismatched symbol
|
| 119 |
+
|
| 120 |
+
def match(self, ttype:int):
|
| 121 |
+
t = self.getCurrentToken()
|
| 122 |
+
if t.type==ttype:
|
| 123 |
+
self._errHandler.reportMatch(self)
|
| 124 |
+
self.consume()
|
| 125 |
+
else:
|
| 126 |
+
t = self._errHandler.recoverInline(self)
|
| 127 |
+
if self.buildParseTrees and t.tokenIndex==-1:
|
| 128 |
+
# we must have conjured up a new token during single token insertion
|
| 129 |
+
# if it's not the current symbol
|
| 130 |
+
self._ctx.addErrorNode(t)
|
| 131 |
+
return t
|
| 132 |
+
|
| 133 |
+
# Match current input symbol as a wildcard. If the symbol type matches
|
| 134 |
+
# (i.e. has a value greater than 0), {@link ANTLRErrorStrategy#reportMatch}
|
| 135 |
+
# and {@link #consume} are called to complete the match process.
|
| 136 |
+
#
|
| 137 |
+
# <p>If the symbol type does not match,
|
| 138 |
+
# {@link ANTLRErrorStrategy#recoverInline} is called on the current error
|
| 139 |
+
# strategy to attempt recovery. If {@link #getBuildParseTree} is
|
| 140 |
+
# {@code true} and the token index of the symbol returned by
|
| 141 |
+
# {@link ANTLRErrorStrategy#recoverInline} is -1, the symbol is added to
|
| 142 |
+
# the parse tree by calling {@link ParserRuleContext#addErrorNode}.</p>
|
| 143 |
+
#
|
| 144 |
+
# @return the matched symbol
|
| 145 |
+
# @throws RecognitionException if the current input symbol did not match
|
| 146 |
+
# a wildcard and the error strategy could not recover from the mismatched
|
| 147 |
+
# symbol
|
| 148 |
+
|
| 149 |
+
def matchWildcard(self):
|
| 150 |
+
t = self.getCurrentToken()
|
| 151 |
+
if t.type > 0:
|
| 152 |
+
self._errHandler.reportMatch(self)
|
| 153 |
+
self.consume()
|
| 154 |
+
else:
|
| 155 |
+
t = self._errHandler.recoverInline(self)
|
| 156 |
+
if self.buildParseTrees and t.tokenIndex == -1:
|
| 157 |
+
# we must have conjured up a new token during single token insertion
|
| 158 |
+
# if it's not the current symbol
|
| 159 |
+
self._ctx.addErrorNode(t)
|
| 160 |
+
|
| 161 |
+
return t
|
| 162 |
+
|
| 163 |
+
def getParseListeners(self):
|
| 164 |
+
return list() if self._parseListeners is None else self._parseListeners
|
| 165 |
+
|
| 166 |
+
# Registers {@code listener} to receive events during the parsing process.
|
| 167 |
+
#
|
| 168 |
+
# <p>To support output-preserving grammar transformations (including but not
|
| 169 |
+
# limited to left-recursion removal, automated left-factoring, and
|
| 170 |
+
# optimized code generation), calls to listener methods during the parse
|
| 171 |
+
# may differ substantially from calls made by
|
| 172 |
+
# {@link ParseTreeWalker#DEFAULT} used after the parse is complete. In
|
| 173 |
+
# particular, rule entry and exit events may occur in a different order
|
| 174 |
+
# during the parse than after the parser. In addition, calls to certain
|
| 175 |
+
# rule entry methods may be omitted.</p>
|
| 176 |
+
#
|
| 177 |
+
# <p>With the following specific exceptions, calls to listener events are
|
| 178 |
+
# <em>deterministic</em>, i.e. for identical input the calls to listener
|
| 179 |
+
# methods will be the same.</p>
|
| 180 |
+
#
|
| 181 |
+
# <ul>
|
| 182 |
+
# <li>Alterations to the grammar used to generate code may change the
|
| 183 |
+
# behavior of the listener calls.</li>
|
| 184 |
+
# <li>Alterations to the command line options passed to ANTLR 4 when
|
| 185 |
+
# generating the parser may change the behavior of the listener calls.</li>
|
| 186 |
+
# <li>Changing the version of the ANTLR Tool used to generate the parser
|
| 187 |
+
# may change the behavior of the listener calls.</li>
|
| 188 |
+
# </ul>
|
| 189 |
+
#
|
| 190 |
+
# @param listener the listener to add
|
| 191 |
+
#
|
| 192 |
+
# @throws NullPointerException if {@code} listener is {@code null}
|
| 193 |
+
#
|
| 194 |
+
def addParseListener(self, listener:ParseTreeListener):
|
| 195 |
+
if listener is None:
|
| 196 |
+
raise ReferenceError("listener")
|
| 197 |
+
if self._parseListeners is None:
|
| 198 |
+
self._parseListeners = []
|
| 199 |
+
self._parseListeners.append(listener)
|
| 200 |
+
|
| 201 |
+
#
|
| 202 |
+
# Remove {@code listener} from the list of parse listeners.
|
| 203 |
+
#
|
| 204 |
+
# <p>If {@code listener} is {@code null} or has not been added as a parse
|
| 205 |
+
# listener, self method does nothing.</p>
|
| 206 |
+
# @param listener the listener to remove
|
| 207 |
+
#
|
| 208 |
+
def removeParseListener(self, listener:ParseTreeListener):
|
| 209 |
+
if self._parseListeners is not None:
|
| 210 |
+
self._parseListeners.remove(listener)
|
| 211 |
+
if len(self._parseListeners)==0:
|
| 212 |
+
self._parseListeners = None
|
| 213 |
+
|
| 214 |
+
# Remove all parse listeners.
|
| 215 |
+
def removeParseListeners(self):
|
| 216 |
+
self._parseListeners = None
|
| 217 |
+
|
| 218 |
+
# Notify any parse listeners of an enter rule event.
|
| 219 |
+
def triggerEnterRuleEvent(self):
|
| 220 |
+
if self._parseListeners is not None:
|
| 221 |
+
for listener in self._parseListeners:
|
| 222 |
+
listener.enterEveryRule(self._ctx)
|
| 223 |
+
self._ctx.enterRule(listener)
|
| 224 |
+
|
| 225 |
+
#
|
| 226 |
+
# Notify any parse listeners of an exit rule event.
|
| 227 |
+
#
|
| 228 |
+
# @see #addParseListener
|
| 229 |
+
#
|
| 230 |
+
def triggerExitRuleEvent(self):
|
| 231 |
+
if self._parseListeners is not None:
|
| 232 |
+
# reverse order walk of listeners
|
| 233 |
+
for listener in reversed(self._parseListeners):
|
| 234 |
+
self._ctx.exitRule(listener)
|
| 235 |
+
listener.exitEveryRule(self._ctx)
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
# Gets the number of syntax errors reported during parsing. This value is
|
| 239 |
+
# incremented each time {@link #notifyErrorListeners} is called.
|
| 240 |
+
#
|
| 241 |
+
# @see #notifyErrorListeners
|
| 242 |
+
#
|
| 243 |
+
def getNumberOfSyntaxErrors(self):
|
| 244 |
+
return self._syntaxErrors
|
| 245 |
+
|
| 246 |
+
def getTokenFactory(self):
|
| 247 |
+
return self._input.tokenSource._factory
|
| 248 |
+
|
| 249 |
+
# Tell our token source and error strategy about a new way to create tokens.#
|
| 250 |
+
def setTokenFactory(self, factory:TokenFactory):
|
| 251 |
+
self._input.tokenSource._factory = factory
|
| 252 |
+
|
| 253 |
+
# The ATN with bypass alternatives is expensive to create so we create it
|
| 254 |
+
# lazily.
|
| 255 |
+
#
|
| 256 |
+
# @throws UnsupportedOperationException if the current parser does not
|
| 257 |
+
# implement the {@link #getSerializedATN()} method.
|
| 258 |
+
#
|
| 259 |
+
def getATNWithBypassAlts(self):
|
| 260 |
+
serializedAtn = self.getSerializedATN()
|
| 261 |
+
if serializedAtn is None:
|
| 262 |
+
raise UnsupportedOperationException("The current parser does not support an ATN with bypass alternatives.")
|
| 263 |
+
result = self.bypassAltsAtnCache.get(serializedAtn, None)
|
| 264 |
+
if result is None:
|
| 265 |
+
deserializationOptions = ATNDeserializationOptions()
|
| 266 |
+
deserializationOptions.generateRuleBypassTransitions = True
|
| 267 |
+
result = ATNDeserializer(deserializationOptions).deserialize(serializedAtn)
|
| 268 |
+
self.bypassAltsAtnCache[serializedAtn] = result
|
| 269 |
+
return result
|
| 270 |
+
|
| 271 |
+
# The preferred method of getting a tree pattern. For example, here's a
|
| 272 |
+
# sample use:
|
| 273 |
+
#
|
| 274 |
+
# <pre>
|
| 275 |
+
# ParseTree t = parser.expr();
|
| 276 |
+
# ParseTreePattern p = parser.compileParseTreePattern("<ID>+0", MyParser.RULE_expr);
|
| 277 |
+
# ParseTreeMatch m = p.match(t);
|
| 278 |
+
# String id = m.get("ID");
|
| 279 |
+
# </pre>
|
| 280 |
+
#
|
| 281 |
+
def compileParseTreePattern(self, pattern:str, patternRuleIndex:int, lexer:Lexer = None):
|
| 282 |
+
if lexer is None:
|
| 283 |
+
if self.getTokenStream() is not None:
|
| 284 |
+
tokenSource = self.getTokenStream().tokenSource
|
| 285 |
+
if isinstance( tokenSource, Lexer ):
|
| 286 |
+
lexer = tokenSource
|
| 287 |
+
if lexer is None:
|
| 288 |
+
raise UnsupportedOperationException("Parser can't discover a lexer to use")
|
| 289 |
+
|
| 290 |
+
m = ParseTreePatternMatcher(lexer, self)
|
| 291 |
+
return m.compile(pattern, patternRuleIndex)
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
def getInputStream(self):
|
| 295 |
+
return self.getTokenStream()
|
| 296 |
+
|
| 297 |
+
def setInputStream(self, input:InputStream):
|
| 298 |
+
self.setTokenStream(input)
|
| 299 |
+
|
| 300 |
+
def getTokenStream(self):
|
| 301 |
+
return self._input
|
| 302 |
+
|
| 303 |
+
# Set the token stream and reset the parser.#
|
| 304 |
+
def setTokenStream(self, input:TokenStream):
|
| 305 |
+
self._input = None
|
| 306 |
+
self.reset()
|
| 307 |
+
self._input = input
|
| 308 |
+
|
| 309 |
+
# Match needs to return the current input symbol, which gets put
|
| 310 |
+
# into the label for the associated token ref; e.g., x=ID.
|
| 311 |
+
#
|
| 312 |
+
def getCurrentToken(self):
|
| 313 |
+
return self._input.LT(1)
|
| 314 |
+
|
| 315 |
+
def notifyErrorListeners(self, msg:str, offendingToken:Token = None, e:RecognitionException = None):
|
| 316 |
+
if offendingToken is None:
|
| 317 |
+
offendingToken = self.getCurrentToken()
|
| 318 |
+
self._syntaxErrors += 1
|
| 319 |
+
line = offendingToken.line
|
| 320 |
+
column = offendingToken.column
|
| 321 |
+
listener = self.getErrorListenerDispatch()
|
| 322 |
+
listener.syntaxError(self, offendingToken, line, column, msg, e)
|
| 323 |
+
|
| 324 |
+
#
|
| 325 |
+
# Consume and return the {@linkplain #getCurrentToken current symbol}.
|
| 326 |
+
#
|
| 327 |
+
# <p>E.g., given the following input with {@code A} being the current
|
| 328 |
+
# lookahead symbol, self function moves the cursor to {@code B} and returns
|
| 329 |
+
# {@code A}.</p>
|
| 330 |
+
#
|
| 331 |
+
# <pre>
|
| 332 |
+
# A B
|
| 333 |
+
# ^
|
| 334 |
+
# </pre>
|
| 335 |
+
#
|
| 336 |
+
# If the parser is not in error recovery mode, the consumed symbol is added
|
| 337 |
+
# to the parse tree using {@link ParserRuleContext#addChild(Token)}, and
|
| 338 |
+
# {@link ParseTreeListener#visitTerminal} is called on any parse listeners.
|
| 339 |
+
# If the parser <em>is</em> in error recovery mode, the consumed symbol is
|
| 340 |
+
# added to the parse tree using
|
| 341 |
+
# {@link ParserRuleContext#addErrorNode(Token)}, and
|
| 342 |
+
# {@link ParseTreeListener#visitErrorNode} is called on any parse
|
| 343 |
+
# listeners.
|
| 344 |
+
#
|
| 345 |
+
def consume(self):
|
| 346 |
+
o = self.getCurrentToken()
|
| 347 |
+
if o.type != Token.EOF:
|
| 348 |
+
self.getInputStream().consume()
|
| 349 |
+
hasListener = self._parseListeners is not None and len(self._parseListeners)>0
|
| 350 |
+
if self.buildParseTrees or hasListener:
|
| 351 |
+
if self._errHandler.inErrorRecoveryMode(self):
|
| 352 |
+
node = self._ctx.addErrorNode(o)
|
| 353 |
+
else:
|
| 354 |
+
node = self._ctx.addTokenNode(o)
|
| 355 |
+
if hasListener:
|
| 356 |
+
for listener in self._parseListeners:
|
| 357 |
+
if isinstance(node, ErrorNode):
|
| 358 |
+
listener.visitErrorNode(node)
|
| 359 |
+
elif isinstance(node, TerminalNode):
|
| 360 |
+
listener.visitTerminal(node)
|
| 361 |
+
return o
|
| 362 |
+
|
| 363 |
+
def addContextToParseTree(self):
|
| 364 |
+
# add current context to parent if we have a parent
|
| 365 |
+
if self._ctx.parentCtx is not None:
|
| 366 |
+
self._ctx.parentCtx.addChild(self._ctx)
|
| 367 |
+
|
| 368 |
+
# Always called by generated parsers upon entry to a rule. Access field
|
| 369 |
+
# {@link #_ctx} get the current context.
|
| 370 |
+
#
|
| 371 |
+
def enterRule(self, localctx:ParserRuleContext , state:int , ruleIndex:int):
|
| 372 |
+
self.state = state
|
| 373 |
+
self._ctx = localctx
|
| 374 |
+
self._ctx.start = self._input.LT(1)
|
| 375 |
+
if self.buildParseTrees:
|
| 376 |
+
self.addContextToParseTree()
|
| 377 |
+
if self._parseListeners is not None:
|
| 378 |
+
self.triggerEnterRuleEvent()
|
| 379 |
+
|
| 380 |
+
def exitRule(self):
|
| 381 |
+
self._ctx.stop = self._input.LT(-1)
|
| 382 |
+
# trigger event on _ctx, before it reverts to parent
|
| 383 |
+
if self._parseListeners is not None:
|
| 384 |
+
self.triggerExitRuleEvent()
|
| 385 |
+
self.state = self._ctx.invokingState
|
| 386 |
+
self._ctx = self._ctx.parentCtx
|
| 387 |
+
|
| 388 |
+
def enterOuterAlt(self, localctx:ParserRuleContext, altNum:int):
|
| 389 |
+
localctx.setAltNumber(altNum)
|
| 390 |
+
# if we have new localctx, make sure we replace existing ctx
|
| 391 |
+
# that is previous child of parse tree
|
| 392 |
+
if self.buildParseTrees and self._ctx != localctx:
|
| 393 |
+
if self._ctx.parentCtx is not None:
|
| 394 |
+
self._ctx.parentCtx.removeLastChild()
|
| 395 |
+
self._ctx.parentCtx.addChild(localctx)
|
| 396 |
+
self._ctx = localctx
|
| 397 |
+
|
| 398 |
+
# Get the precedence level for the top-most precedence rule.
|
| 399 |
+
#
|
| 400 |
+
# @return The precedence level for the top-most precedence rule, or -1 if
|
| 401 |
+
# the parser context is not nested within a precedence rule.
|
| 402 |
+
#
|
| 403 |
+
def getPrecedence(self):
|
| 404 |
+
if len(self._precedenceStack)==0:
|
| 405 |
+
return -1
|
| 406 |
+
else:
|
| 407 |
+
return self._precedenceStack[-1]
|
| 408 |
+
|
| 409 |
+
def enterRecursionRule(self, localctx:ParserRuleContext, state:int, ruleIndex:int, precedence:int):
|
| 410 |
+
self.state = state
|
| 411 |
+
self._precedenceStack.append(precedence)
|
| 412 |
+
self._ctx = localctx
|
| 413 |
+
self._ctx.start = self._input.LT(1)
|
| 414 |
+
if self._parseListeners is not None:
|
| 415 |
+
self.triggerEnterRuleEvent() # simulates rule entry for left-recursive rules
|
| 416 |
+
|
| 417 |
+
#
|
| 418 |
+
# Like {@link #enterRule} but for recursive rules.
|
| 419 |
+
#
|
| 420 |
+
def pushNewRecursionContext(self, localctx:ParserRuleContext, state:int, ruleIndex:int):
|
| 421 |
+
previous = self._ctx
|
| 422 |
+
previous.parentCtx = localctx
|
| 423 |
+
previous.invokingState = state
|
| 424 |
+
previous.stop = self._input.LT(-1)
|
| 425 |
+
|
| 426 |
+
self._ctx = localctx
|
| 427 |
+
self._ctx.start = previous.start
|
| 428 |
+
if self.buildParseTrees:
|
| 429 |
+
self._ctx.addChild(previous)
|
| 430 |
+
|
| 431 |
+
if self._parseListeners is not None:
|
| 432 |
+
self.triggerEnterRuleEvent() # simulates rule entry for left-recursive rules
|
| 433 |
+
|
| 434 |
+
def unrollRecursionContexts(self, parentCtx:ParserRuleContext):
|
| 435 |
+
self._precedenceStack.pop()
|
| 436 |
+
self._ctx.stop = self._input.LT(-1)
|
| 437 |
+
retCtx = self._ctx # save current ctx (return value)
|
| 438 |
+
# unroll so _ctx is as it was before call to recursive method
|
| 439 |
+
if self._parseListeners is not None:
|
| 440 |
+
while self._ctx is not parentCtx:
|
| 441 |
+
self.triggerExitRuleEvent()
|
| 442 |
+
self._ctx = self._ctx.parentCtx
|
| 443 |
+
else:
|
| 444 |
+
self._ctx = parentCtx
|
| 445 |
+
|
| 446 |
+
# hook into tree
|
| 447 |
+
retCtx.parentCtx = parentCtx
|
| 448 |
+
|
| 449 |
+
if self.buildParseTrees and parentCtx is not None:
|
| 450 |
+
# add return ctx into invoking rule's tree
|
| 451 |
+
parentCtx.addChild(retCtx)
|
| 452 |
+
|
| 453 |
+
def getInvokingContext(self, ruleIndex:int):
|
| 454 |
+
ctx = self._ctx
|
| 455 |
+
while ctx is not None:
|
| 456 |
+
if ctx.getRuleIndex() == ruleIndex:
|
| 457 |
+
return ctx
|
| 458 |
+
ctx = ctx.parentCtx
|
| 459 |
+
return None
|
| 460 |
+
|
| 461 |
+
|
| 462 |
+
def precpred(self, localctx:RuleContext , precedence:int):
|
| 463 |
+
return precedence >= self._precedenceStack[-1]
|
| 464 |
+
|
| 465 |
+
def inContext(self, context:str):
|
| 466 |
+
# TODO: useful in parser?
|
| 467 |
+
return False
|
| 468 |
+
|
| 469 |
+
#
|
| 470 |
+
# Checks whether or not {@code symbol} can follow the current state in the
|
| 471 |
+
# ATN. The behavior of self method is equivalent to the following, but is
|
| 472 |
+
# implemented such that the complete context-sensitive follow set does not
|
| 473 |
+
# need to be explicitly constructed.
|
| 474 |
+
#
|
| 475 |
+
# <pre>
|
| 476 |
+
# return getExpectedTokens().contains(symbol);
|
| 477 |
+
# </pre>
|
| 478 |
+
#
|
| 479 |
+
# @param symbol the symbol type to check
|
| 480 |
+
# @return {@code true} if {@code symbol} can follow the current state in
|
| 481 |
+
# the ATN, otherwise {@code false}.
|
| 482 |
+
#
|
| 483 |
+
def isExpectedToken(self, symbol:int):
|
| 484 |
+
atn = self._interp.atn
|
| 485 |
+
ctx = self._ctx
|
| 486 |
+
s = atn.states[self.state]
|
| 487 |
+
following = atn.nextTokens(s)
|
| 488 |
+
if symbol in following:
|
| 489 |
+
return True
|
| 490 |
+
if not Token.EPSILON in following:
|
| 491 |
+
return False
|
| 492 |
+
|
| 493 |
+
while ctx is not None and ctx.invokingState>=0 and Token.EPSILON in following:
|
| 494 |
+
invokingState = atn.states[ctx.invokingState]
|
| 495 |
+
rt = invokingState.transitions[0]
|
| 496 |
+
following = atn.nextTokens(rt.followState)
|
| 497 |
+
if symbol in following:
|
| 498 |
+
return True
|
| 499 |
+
ctx = ctx.parentCtx
|
| 500 |
+
|
| 501 |
+
if Token.EPSILON in following and symbol == Token.EOF:
|
| 502 |
+
return True
|
| 503 |
+
else:
|
| 504 |
+
return False
|
| 505 |
+
|
| 506 |
+
# Computes the set of input symbols which could follow the current parser
|
| 507 |
+
# state and context, as given by {@link #getState} and {@link #getContext},
|
| 508 |
+
# respectively.
|
| 509 |
+
#
|
| 510 |
+
# @see ATN#getExpectedTokens(int, RuleContext)
|
| 511 |
+
#
|
| 512 |
+
def getExpectedTokens(self):
|
| 513 |
+
return self._interp.atn.getExpectedTokens(self.state, self._ctx)
|
| 514 |
+
|
| 515 |
+
def getExpectedTokensWithinCurrentRule(self):
|
| 516 |
+
atn = self._interp.atn
|
| 517 |
+
s = atn.states[self.state]
|
| 518 |
+
return atn.nextTokens(s)
|
| 519 |
+
|
| 520 |
+
# Get a rule's index (i.e., {@code RULE_ruleName} field) or -1 if not found.#
|
| 521 |
+
def getRuleIndex(self, ruleName:str):
|
| 522 |
+
ruleIndex = self.getRuleIndexMap().get(ruleName, None)
|
| 523 |
+
if ruleIndex is not None:
|
| 524 |
+
return ruleIndex
|
| 525 |
+
else:
|
| 526 |
+
return -1
|
| 527 |
+
|
| 528 |
+
# Return List<String> of the rule names in your parser instance
|
| 529 |
+
# leading up to a call to the current rule. You could override if
|
| 530 |
+
# you want more details such as the file/line info of where
|
| 531 |
+
# in the ATN a rule is invoked.
|
| 532 |
+
#
|
| 533 |
+
# this is very useful for error messages.
|
| 534 |
+
#
|
| 535 |
+
def getRuleInvocationStack(self, p:RuleContext=None):
|
| 536 |
+
if p is None:
|
| 537 |
+
p = self._ctx
|
| 538 |
+
stack = list()
|
| 539 |
+
while p is not None:
|
| 540 |
+
# compute what follows who invoked us
|
| 541 |
+
ruleIndex = p.getRuleIndex()
|
| 542 |
+
if ruleIndex<0:
|
| 543 |
+
stack.append("n/a")
|
| 544 |
+
else:
|
| 545 |
+
stack.append(self.ruleNames[ruleIndex])
|
| 546 |
+
p = p.parentCtx
|
| 547 |
+
return stack
|
| 548 |
+
|
| 549 |
+
# For debugging and other purposes.#
|
| 550 |
+
def getDFAStrings(self):
|
| 551 |
+
return [ str(dfa) for dfa in self._interp.decisionToDFA]
|
| 552 |
+
|
| 553 |
+
# For debugging and other purposes.#
|
| 554 |
+
def dumpDFA(self):
|
| 555 |
+
seenOne = False
|
| 556 |
+
for i in range(0, len(self._interp.decisionToDFA)):
|
| 557 |
+
dfa = self._interp.decisionToDFA[i]
|
| 558 |
+
if len(dfa.states)>0:
|
| 559 |
+
if seenOne:
|
| 560 |
+
print(file=self._output)
|
| 561 |
+
print("Decision " + str(dfa.decision) + ":", file=self._output)
|
| 562 |
+
print(dfa.toString(self.literalNames, self.symbolicNames), end='', file=self._output)
|
| 563 |
+
seenOne = True
|
| 564 |
+
|
| 565 |
+
|
| 566 |
+
def getSourceName(self):
|
| 567 |
+
return self._input.sourceName
|
| 568 |
+
|
| 569 |
+
# During a parse is sometimes useful to listen in on the rule entry and exit
|
| 570 |
+
# events as well as token matches. self is for quick and dirty debugging.
|
| 571 |
+
#
|
| 572 |
+
def setTrace(self, trace:bool):
|
| 573 |
+
if not trace:
|
| 574 |
+
self.removeParseListener(self._tracer)
|
| 575 |
+
self._tracer = None
|
| 576 |
+
else:
|
| 577 |
+
if self._tracer is not None:
|
| 578 |
+
self.removeParseListener(self._tracer)
|
| 579 |
+
self._tracer = TraceListener(self)
|
| 580 |
+
self.addParseListener(self._tracer)
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/ParserInterpreter.py
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
#
|
| 6 |
+
|
| 7 |
+
# A parser simulator that mimics what ANTLR's generated
|
| 8 |
+
# parser code does. A ParserATNSimulator is used to make
|
| 9 |
+
# predictions via adaptivePredict but this class moves a pointer through the
|
| 10 |
+
# ATN to simulate parsing. ParserATNSimulator just
|
| 11 |
+
# makes us efficient rather than having to backtrack, for example.
|
| 12 |
+
#
|
| 13 |
+
# This properly creates parse trees even for left recursive rules.
|
| 14 |
+
#
|
| 15 |
+
# We rely on the left recursive rule invocation and special predicate
|
| 16 |
+
# transitions to make left recursive rules work.
|
| 17 |
+
#
|
| 18 |
+
# See TestParserInterpreter for examples.
|
| 19 |
+
#
|
| 20 |
+
from antlr4.dfa.DFA import DFA
|
| 21 |
+
from antlr4.BufferedTokenStream import TokenStream
|
| 22 |
+
from antlr4.Lexer import Lexer
|
| 23 |
+
from antlr4.Parser import Parser
|
| 24 |
+
from antlr4.ParserRuleContext import InterpreterRuleContext, ParserRuleContext
|
| 25 |
+
from antlr4.Token import Token
|
| 26 |
+
from antlr4.atn.ATN import ATN
|
| 27 |
+
from antlr4.atn.ATNState import StarLoopEntryState, ATNState, LoopEndState
|
| 28 |
+
from antlr4.atn.ParserATNSimulator import ParserATNSimulator
|
| 29 |
+
from antlr4.PredictionContext import PredictionContextCache
|
| 30 |
+
from antlr4.atn.Transition import Transition
|
| 31 |
+
from antlr4.error.Errors import RecognitionException, UnsupportedOperationException, FailedPredicateException
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
class ParserInterpreter(Parser):
|
| 35 |
+
__slots__ = (
|
| 36 |
+
'grammarFileName', 'atn', 'tokenNames', 'ruleNames', 'decisionToDFA',
|
| 37 |
+
'sharedContextCache', '_parentContextStack',
|
| 38 |
+
'pushRecursionContextStates'
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
def __init__(self, grammarFileName:str, tokenNames:list, ruleNames:list, atn:ATN, input:TokenStream):
|
| 42 |
+
super().__init__(input)
|
| 43 |
+
self.grammarFileName = grammarFileName
|
| 44 |
+
self.atn = atn
|
| 45 |
+
self.tokenNames = tokenNames
|
| 46 |
+
self.ruleNames = ruleNames
|
| 47 |
+
self.decisionToDFA = [ DFA(state) for state in atn.decisionToState ]
|
| 48 |
+
self.sharedContextCache = PredictionContextCache()
|
| 49 |
+
self._parentContextStack = list()
|
| 50 |
+
# identify the ATN states where pushNewRecursionContext must be called
|
| 51 |
+
self.pushRecursionContextStates = set()
|
| 52 |
+
for state in atn.states:
|
| 53 |
+
if not isinstance(state, StarLoopEntryState):
|
| 54 |
+
continue
|
| 55 |
+
if state.isPrecedenceDecision:
|
| 56 |
+
self.pushRecursionContextStates.add(state.stateNumber)
|
| 57 |
+
# get atn simulator that knows how to do predictions
|
| 58 |
+
self._interp = ParserATNSimulator(self, atn, self.decisionToDFA, self.sharedContextCache)
|
| 59 |
+
|
| 60 |
+
# Begin parsing at startRuleIndex#
|
| 61 |
+
def parse(self, startRuleIndex:int):
|
| 62 |
+
startRuleStartState = self.atn.ruleToStartState[startRuleIndex]
|
| 63 |
+
rootContext = InterpreterRuleContext(None, ATNState.INVALID_STATE_NUMBER, startRuleIndex)
|
| 64 |
+
if startRuleStartState.isPrecedenceRule:
|
| 65 |
+
self.enterRecursionRule(rootContext, startRuleStartState.stateNumber, startRuleIndex, 0)
|
| 66 |
+
else:
|
| 67 |
+
self.enterRule(rootContext, startRuleStartState.stateNumber, startRuleIndex)
|
| 68 |
+
while True:
|
| 69 |
+
p = self.getATNState()
|
| 70 |
+
if p.stateType==ATNState.RULE_STOP :
|
| 71 |
+
# pop; return from rule
|
| 72 |
+
if len(self._ctx)==0:
|
| 73 |
+
if startRuleStartState.isPrecedenceRule:
|
| 74 |
+
result = self._ctx
|
| 75 |
+
parentContext = self._parentContextStack.pop()
|
| 76 |
+
self.unrollRecursionContexts(parentContext.a)
|
| 77 |
+
return result
|
| 78 |
+
else:
|
| 79 |
+
self.exitRule()
|
| 80 |
+
return rootContext
|
| 81 |
+
self.visitRuleStopState(p)
|
| 82 |
+
|
| 83 |
+
else:
|
| 84 |
+
try:
|
| 85 |
+
self.visitState(p)
|
| 86 |
+
except RecognitionException as e:
|
| 87 |
+
self.state = self.atn.ruleToStopState[p.ruleIndex].stateNumber
|
| 88 |
+
self._ctx.exception = e
|
| 89 |
+
self._errHandler.reportError(self, e)
|
| 90 |
+
self._errHandler.recover(self, e)
|
| 91 |
+
|
| 92 |
+
def enterRecursionRule(self, localctx:ParserRuleContext, state:int, ruleIndex:int, precedence:int):
|
| 93 |
+
self._parentContextStack.append((self._ctx, localctx.invokingState))
|
| 94 |
+
super().enterRecursionRule(localctx, state, ruleIndex, precedence)
|
| 95 |
+
|
| 96 |
+
def getATNState(self):
|
| 97 |
+
return self.atn.states[self.state]
|
| 98 |
+
|
| 99 |
+
def visitState(self, p:ATNState):
|
| 100 |
+
edge = 0
|
| 101 |
+
if len(p.transitions) > 1:
|
| 102 |
+
self._errHandler.sync(self)
|
| 103 |
+
edge = self._interp.adaptivePredict(self._input, p.decision, self._ctx)
|
| 104 |
+
else:
|
| 105 |
+
edge = 1
|
| 106 |
+
|
| 107 |
+
transition = p.transitions[edge - 1]
|
| 108 |
+
tt = transition.serializationType
|
| 109 |
+
if tt==Transition.EPSILON:
|
| 110 |
+
|
| 111 |
+
if self.pushRecursionContextStates[p.stateNumber] and not isinstance(transition.target, LoopEndState):
|
| 112 |
+
t = self._parentContextStack[-1]
|
| 113 |
+
ctx = InterpreterRuleContext(t[0], t[1], self._ctx.ruleIndex)
|
| 114 |
+
self.pushNewRecursionContext(ctx, self.atn.ruleToStartState[p.ruleIndex].stateNumber, self._ctx.ruleIndex)
|
| 115 |
+
|
| 116 |
+
elif tt==Transition.ATOM:
|
| 117 |
+
|
| 118 |
+
self.match(transition.label)
|
| 119 |
+
|
| 120 |
+
elif tt in [ Transition.RANGE, Transition.SET, Transition.NOT_SET]:
|
| 121 |
+
|
| 122 |
+
if not transition.matches(self._input.LA(1), Token.MIN_USER_TOKEN_TYPE, Lexer.MAX_CHAR_VALUE):
|
| 123 |
+
self._errHandler.recoverInline(self)
|
| 124 |
+
self.matchWildcard()
|
| 125 |
+
|
| 126 |
+
elif tt==Transition.WILDCARD:
|
| 127 |
+
|
| 128 |
+
self.matchWildcard()
|
| 129 |
+
|
| 130 |
+
elif tt==Transition.RULE:
|
| 131 |
+
|
| 132 |
+
ruleStartState = transition.target
|
| 133 |
+
ruleIndex = ruleStartState.ruleIndex
|
| 134 |
+
ctx = InterpreterRuleContext(self._ctx, p.stateNumber, ruleIndex)
|
| 135 |
+
if ruleStartState.isPrecedenceRule:
|
| 136 |
+
self.enterRecursionRule(ctx, ruleStartState.stateNumber, ruleIndex, transition.precedence)
|
| 137 |
+
else:
|
| 138 |
+
self.enterRule(ctx, transition.target.stateNumber, ruleIndex)
|
| 139 |
+
|
| 140 |
+
elif tt==Transition.PREDICATE:
|
| 141 |
+
|
| 142 |
+
if not self.sempred(self._ctx, transition.ruleIndex, transition.predIndex):
|
| 143 |
+
raise FailedPredicateException(self)
|
| 144 |
+
|
| 145 |
+
elif tt==Transition.ACTION:
|
| 146 |
+
|
| 147 |
+
self.action(self._ctx, transition.ruleIndex, transition.actionIndex)
|
| 148 |
+
|
| 149 |
+
elif tt==Transition.PRECEDENCE:
|
| 150 |
+
|
| 151 |
+
if not self.precpred(self._ctx, transition.precedence):
|
| 152 |
+
msg = "precpred(_ctx, " + str(transition.precedence) + ")"
|
| 153 |
+
raise FailedPredicateException(self, msg)
|
| 154 |
+
|
| 155 |
+
else:
|
| 156 |
+
raise UnsupportedOperationException("Unrecognized ATN transition type.")
|
| 157 |
+
|
| 158 |
+
self.state = transition.target.stateNumber
|
| 159 |
+
|
| 160 |
+
def visitRuleStopState(self, p:ATNState):
|
| 161 |
+
ruleStartState = self.atn.ruleToStartState[p.ruleIndex]
|
| 162 |
+
if ruleStartState.isPrecedenceRule:
|
| 163 |
+
parentContext = self._parentContextStack.pop()
|
| 164 |
+
self.unrollRecursionContexts(parentContext.a)
|
| 165 |
+
self.state = parentContext[1]
|
| 166 |
+
else:
|
| 167 |
+
self.exitRule()
|
| 168 |
+
|
| 169 |
+
ruleTransition = self.atn.states[self.state].transitions[0]
|
| 170 |
+
self.state = ruleTransition.followState.stateNumber
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/ParserRuleContext.py
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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of this file is governed by the BSD 3-clause license that
|
| 3 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 4 |
+
|
| 5 |
+
#* A rule invocation record for parsing.
|
| 6 |
+
#
|
| 7 |
+
# Contains all of the information about the current rule not stored in the
|
| 8 |
+
# RuleContext. It handles parse tree children list, Any ATN state
|
| 9 |
+
# tracing, and the default values available for rule indications:
|
| 10 |
+
# start, stop, rule index, current alt number, current
|
| 11 |
+
# ATN state.
|
| 12 |
+
#
|
| 13 |
+
# Subclasses made for each rule and grammar track the parameters,
|
| 14 |
+
# return values, locals, and labels specific to that rule. These
|
| 15 |
+
# are the objects that are returned from rules.
|
| 16 |
+
#
|
| 17 |
+
# Note text is not an actual field of a rule return value; it is computed
|
| 18 |
+
# from start and stop using the input stream's toString() method. I
|
| 19 |
+
# could add a ctor to this so that we can pass in and store the input
|
| 20 |
+
# stream, but I'm not sure we want to do that. It would seem to be undefined
|
| 21 |
+
# to get the .text property anyway if the rule matches tokens from multiple
|
| 22 |
+
# input streams.
|
| 23 |
+
#
|
| 24 |
+
# I do not use getters for fields of objects that are used simply to
|
| 25 |
+
# group values such as this aggregate. The getters/setters are there to
|
| 26 |
+
# satisfy the superclass interface.
|
| 27 |
+
|
| 28 |
+
from antlr4.RuleContext import RuleContext
|
| 29 |
+
from antlr4.Token import Token
|
| 30 |
+
from antlr4.tree.Tree import ParseTreeListener, ParseTree, TerminalNodeImpl, ErrorNodeImpl, TerminalNode, \
|
| 31 |
+
INVALID_INTERVAL
|
| 32 |
+
|
| 33 |
+
# need forward declaration
|
| 34 |
+
ParserRuleContext = None
|
| 35 |
+
|
| 36 |
+
class ParserRuleContext(RuleContext):
|
| 37 |
+
__slots__ = ('children', 'start', 'stop', 'exception')
|
| 38 |
+
def __init__(self, parent:ParserRuleContext = None, invokingStateNumber:int = None ):
|
| 39 |
+
super().__init__(parent, invokingStateNumber)
|
| 40 |
+
#* If we are debugging or building a parse tree for a visitor,
|
| 41 |
+
# we need to track all of the tokens and rule invocations associated
|
| 42 |
+
# with this rule's context. This is empty for parsing w/o tree constr.
|
| 43 |
+
# operation because we don't the need to track the details about
|
| 44 |
+
# how we parse this rule.
|
| 45 |
+
#/
|
| 46 |
+
self.children = None
|
| 47 |
+
self.start = None
|
| 48 |
+
self.stop = None
|
| 49 |
+
# The exception that forced this rule to return. If the rule successfully
|
| 50 |
+
# completed, this is {@code null}.
|
| 51 |
+
self.exception = None
|
| 52 |
+
|
| 53 |
+
#* COPY a ctx (I'm deliberately not using copy constructor)#/
|
| 54 |
+
#
|
| 55 |
+
# This is used in the generated parser code to flip a generic XContext
|
| 56 |
+
# node for rule X to a YContext for alt label Y. In that sense, it is
|
| 57 |
+
# not really a generic copy function.
|
| 58 |
+
#
|
| 59 |
+
# If we do an error sync() at start of a rule, we might add error nodes
|
| 60 |
+
# to the generic XContext so this function must copy those nodes to
|
| 61 |
+
# the YContext as well else they are lost!
|
| 62 |
+
#/
|
| 63 |
+
def copyFrom(self, ctx:ParserRuleContext):
|
| 64 |
+
# from RuleContext
|
| 65 |
+
self.parentCtx = ctx.parentCtx
|
| 66 |
+
self.invokingState = ctx.invokingState
|
| 67 |
+
self.children = None
|
| 68 |
+
self.start = ctx.start
|
| 69 |
+
self.stop = ctx.stop
|
| 70 |
+
|
| 71 |
+
# copy any error nodes to alt label node
|
| 72 |
+
if ctx.children is not None:
|
| 73 |
+
self.children = []
|
| 74 |
+
# reset parent pointer for any error nodes
|
| 75 |
+
for child in ctx.children:
|
| 76 |
+
if isinstance(child, ErrorNodeImpl):
|
| 77 |
+
self.children.append(child)
|
| 78 |
+
child.parentCtx = self
|
| 79 |
+
|
| 80 |
+
# Double dispatch methods for listeners
|
| 81 |
+
def enterRule(self, listener:ParseTreeListener):
|
| 82 |
+
pass
|
| 83 |
+
|
| 84 |
+
def exitRule(self, listener:ParseTreeListener):
|
| 85 |
+
pass
|
| 86 |
+
|
| 87 |
+
#* Does not set parent link; other add methods do that#/
|
| 88 |
+
def addChild(self, child:ParseTree):
|
| 89 |
+
if self.children is None:
|
| 90 |
+
self.children = []
|
| 91 |
+
self.children.append(child)
|
| 92 |
+
return child
|
| 93 |
+
|
| 94 |
+
#* Used by enterOuterAlt to toss out a RuleContext previously added as
|
| 95 |
+
# we entered a rule. If we have # label, we will need to remove
|
| 96 |
+
# generic ruleContext object.
|
| 97 |
+
#/
|
| 98 |
+
def removeLastChild(self):
|
| 99 |
+
if self.children is not None:
|
| 100 |
+
del self.children[len(self.children)-1]
|
| 101 |
+
|
| 102 |
+
def addTokenNode(self, token:Token):
|
| 103 |
+
node = TerminalNodeImpl(token)
|
| 104 |
+
self.addChild(node)
|
| 105 |
+
node.parentCtx = self
|
| 106 |
+
return node
|
| 107 |
+
|
| 108 |
+
def addErrorNode(self, badToken:Token):
|
| 109 |
+
node = ErrorNodeImpl(badToken)
|
| 110 |
+
self.addChild(node)
|
| 111 |
+
node.parentCtx = self
|
| 112 |
+
return node
|
| 113 |
+
|
| 114 |
+
def getChild(self, i:int, ttype:type = None):
|
| 115 |
+
if ttype is None:
|
| 116 |
+
return self.children[i] if len(self.children)>i else None
|
| 117 |
+
else:
|
| 118 |
+
for child in self.getChildren():
|
| 119 |
+
if not isinstance(child, ttype):
|
| 120 |
+
continue
|
| 121 |
+
if i==0:
|
| 122 |
+
return child
|
| 123 |
+
i -= 1
|
| 124 |
+
return None
|
| 125 |
+
|
| 126 |
+
def getChildren(self, predicate = None):
|
| 127 |
+
if self.children is not None:
|
| 128 |
+
for child in self.children:
|
| 129 |
+
if predicate is not None and not predicate(child):
|
| 130 |
+
continue
|
| 131 |
+
yield child
|
| 132 |
+
|
| 133 |
+
def getToken(self, ttype:int, i:int):
|
| 134 |
+
for child in self.getChildren():
|
| 135 |
+
if not isinstance(child, TerminalNode):
|
| 136 |
+
continue
|
| 137 |
+
if child.symbol.type != ttype:
|
| 138 |
+
continue
|
| 139 |
+
if i==0:
|
| 140 |
+
return child
|
| 141 |
+
i -= 1
|
| 142 |
+
return None
|
| 143 |
+
|
| 144 |
+
def getTokens(self, ttype:int ):
|
| 145 |
+
if self.getChildren() is None:
|
| 146 |
+
return []
|
| 147 |
+
tokens = []
|
| 148 |
+
for child in self.getChildren():
|
| 149 |
+
if not isinstance(child, TerminalNode):
|
| 150 |
+
continue
|
| 151 |
+
if child.symbol.type != ttype:
|
| 152 |
+
continue
|
| 153 |
+
tokens.append(child)
|
| 154 |
+
return tokens
|
| 155 |
+
|
| 156 |
+
def getTypedRuleContext(self, ctxType:type, i:int):
|
| 157 |
+
return self.getChild(i, ctxType)
|
| 158 |
+
|
| 159 |
+
def getTypedRuleContexts(self, ctxType:type):
|
| 160 |
+
children = self.getChildren()
|
| 161 |
+
if children is None:
|
| 162 |
+
return []
|
| 163 |
+
contexts = []
|
| 164 |
+
for child in children:
|
| 165 |
+
if not isinstance(child, ctxType):
|
| 166 |
+
continue
|
| 167 |
+
contexts.append(child)
|
| 168 |
+
return contexts
|
| 169 |
+
|
| 170 |
+
def getChildCount(self):
|
| 171 |
+
return len(self.children) if self.children else 0
|
| 172 |
+
|
| 173 |
+
def getSourceInterval(self):
|
| 174 |
+
if self.start is None or self.stop is None:
|
| 175 |
+
return INVALID_INTERVAL
|
| 176 |
+
else:
|
| 177 |
+
return (self.start.tokenIndex, self.stop.tokenIndex)
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
RuleContext.EMPTY = ParserRuleContext()
|
| 181 |
+
|
| 182 |
+
class InterpreterRuleContext(ParserRuleContext):
|
| 183 |
+
|
| 184 |
+
def __init__(self, parent:ParserRuleContext, invokingStateNumber:int, ruleIndex:int):
|
| 185 |
+
super().__init__(parent, invokingStateNumber)
|
| 186 |
+
self.ruleIndex = ruleIndex
|
evalkit_tf449/lib/python3.10/site-packages/antlr4/Recognizer.py
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 3 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 4 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 5 |
+
#
|
| 6 |
+
from antlr4.RuleContext import RuleContext
|
| 7 |
+
from antlr4.Token import Token
|
| 8 |
+
from antlr4.error.ErrorListener import ProxyErrorListener, ConsoleErrorListener
|
| 9 |
+
|
| 10 |
+
# need forward delcaration
|
| 11 |
+
RecognitionException = None
|
| 12 |
+
|
| 13 |
+
class Recognizer(object):
|
| 14 |
+
__slots__ = ('_listeners', '_interp', '_stateNumber')
|
| 15 |
+
|
| 16 |
+
tokenTypeMapCache = dict()
|
| 17 |
+
ruleIndexMapCache = dict()
|
| 18 |
+
|
| 19 |
+
def __init__(self):
|
| 20 |
+
self._listeners = [ ConsoleErrorListener.INSTANCE ]
|
| 21 |
+
self._interp = None
|
| 22 |
+
self._stateNumber = -1
|
| 23 |
+
|
| 24 |
+
def extractVersion(self, version):
|
| 25 |
+
pos = version.find(".")
|
| 26 |
+
major = version[0:pos]
|
| 27 |
+
version = version[pos+1:]
|
| 28 |
+
pos = version.find(".")
|
| 29 |
+
if pos==-1:
|
| 30 |
+
pos = version.find("-")
|
| 31 |
+
if pos==-1:
|
| 32 |
+
pos = len(version)
|
| 33 |
+
minor = version[0:pos]
|
| 34 |
+
return major, minor
|
| 35 |
+
|
| 36 |
+
def checkVersion(self, toolVersion):
|
| 37 |
+
runtimeVersion = "4.9.3"
|
| 38 |
+
rvmajor, rvminor = self.extractVersion(runtimeVersion)
|
| 39 |
+
tvmajor, tvminor = self.extractVersion(toolVersion)
|
| 40 |
+
if rvmajor!=tvmajor or rvminor!=tvminor:
|
| 41 |
+
print("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion)
|
| 42 |
+
|
| 43 |
+
def addErrorListener(self, listener):
|
| 44 |
+
self._listeners.append(listener)
|
| 45 |
+
|
| 46 |
+
def removeErrorListener(self, listener):
|
| 47 |
+
self._listeners.remove(listener)
|
| 48 |
+
|
| 49 |
+
def removeErrorListeners(self):
|
| 50 |
+
self._listeners = []
|
| 51 |
+
|
| 52 |
+
def getTokenTypeMap(self):
|
| 53 |
+
tokenNames = self.getTokenNames()
|
| 54 |
+
if tokenNames is None:
|
| 55 |
+
from antlr4.error.Errors import UnsupportedOperationException
|
| 56 |
+
raise UnsupportedOperationException("The current recognizer does not provide a list of token names.")
|
| 57 |
+
result = self.tokenTypeMapCache.get(tokenNames, None)
|
| 58 |
+
if result is None:
|
| 59 |
+
result = zip( tokenNames, range(0, len(tokenNames)))
|
| 60 |
+
result["EOF"] = Token.EOF
|
| 61 |
+
self.tokenTypeMapCache[tokenNames] = result
|
| 62 |
+
return result
|
| 63 |
+
|
| 64 |
+
# Get a map from rule names to rule indexes.
|
| 65 |
+
#
|
| 66 |
+
# <p>Used for XPath and tree pattern compilation.</p>
|
| 67 |
+
#
|
| 68 |
+
def getRuleIndexMap(self):
|
| 69 |
+
ruleNames = self.getRuleNames()
|
| 70 |
+
if ruleNames is None:
|
| 71 |
+
from antlr4.error.Errors import UnsupportedOperationException
|
| 72 |
+
raise UnsupportedOperationException("The current recognizer does not provide a list of rule names.")
|
| 73 |
+
result = self.ruleIndexMapCache.get(ruleNames, None)
|
| 74 |
+
if result is None:
|
| 75 |
+
result = zip( ruleNames, range(0, len(ruleNames)))
|
| 76 |
+
self.ruleIndexMapCache[ruleNames] = result
|
| 77 |
+
return result
|
| 78 |
+
|
| 79 |
+
def getTokenType(self, tokenName:str):
|
| 80 |
+
ttype = self.getTokenTypeMap().get(tokenName, None)
|
| 81 |
+
if ttype is not None:
|
| 82 |
+
return ttype
|
| 83 |
+
else:
|
| 84 |
+
return Token.INVALID_TYPE
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
# What is the error header, normally line/character position information?#
|
| 88 |
+
def getErrorHeader(self, e:RecognitionException):
|
| 89 |
+
line = e.getOffendingToken().line
|
| 90 |
+
column = e.getOffendingToken().column
|
| 91 |
+
return "line "+line+":"+column
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
# How should a token be displayed in an error message? The default
|
| 95 |
+
# is to display just the text, but during development you might
|
| 96 |
+
# want to have a lot of information spit out. Override in that case
|
| 97 |
+
# to use t.toString() (which, for CommonToken, dumps everything about
|
| 98 |
+
# the token). This is better than forcing you to override a method in
|
| 99 |
+
# your token objects because you don't have to go modify your lexer
|
| 100 |
+
# so that it creates a new Java type.
|
| 101 |
+
#
|
| 102 |
+
# @deprecated This method is not called by the ANTLR 4 Runtime. Specific
|
| 103 |
+
# implementations of {@link ANTLRErrorStrategy} may provide a similar
|
| 104 |
+
# feature when necessary. For example, see
|
| 105 |
+
# {@link DefaultErrorStrategy#getTokenErrorDisplay}.
|
| 106 |
+
#
|
| 107 |
+
def getTokenErrorDisplay(self, t:Token):
|
| 108 |
+
if t is None:
|
| 109 |
+
return "<no token>"
|
| 110 |
+
s = t.text
|
| 111 |
+
if s is None:
|
| 112 |
+
if t.type==Token.EOF:
|
| 113 |
+
s = "<EOF>"
|
| 114 |
+
else:
|
| 115 |
+
s = "<" + str(t.type) + ">"
|
| 116 |
+
s = s.replace("\n","\\n")
|
| 117 |
+
s = s.replace("\r","\\r")
|
| 118 |
+
s = s.replace("\t","\\t")
|
| 119 |
+
return "'" + s + "'"
|
| 120 |
+
|
| 121 |
+
def getErrorListenerDispatch(self):
|
| 122 |
+
return ProxyErrorListener(self._listeners)
|
| 123 |
+
|
| 124 |
+
# subclass needs to override these if there are sempreds or actions
|
| 125 |
+
# that the ATN interp needs to execute
|
| 126 |
+
def sempred(self, localctx:RuleContext, ruleIndex:int, actionIndex:int):
|
| 127 |
+
return True
|
| 128 |
+
|
| 129 |
+
def precpred(self, localctx:RuleContext , precedence:int):
|
| 130 |
+
return True
|
| 131 |
+
|
| 132 |
+
@property
|
| 133 |
+
def state(self):
|
| 134 |
+
return self._stateNumber
|
| 135 |
+
|
| 136 |
+
# Indicate that the recognizer has changed internal state that is
|
| 137 |
+
# consistent with the ATN state passed in. This way we always know
|
| 138 |
+
# where we are in the ATN as the parser goes along. The rule
|
| 139 |
+
# context objects form a stack that lets us see the stack of
|
| 140 |
+
# invoking rules. Combine this and we have complete ATN
|
| 141 |
+
# configuration information.
|
| 142 |
+
|
| 143 |
+
@state.setter
|
| 144 |
+
def state(self, atnState:int):
|
| 145 |
+
self._stateNumber = atnState
|
| 146 |
+
|
| 147 |
+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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
| 2 |
+
# Use of this file is governed by the BSD 3-clause license that
|
| 3 |
+
# can be found in the LICENSE.txt file in the project root.
|
| 4 |
+
#/
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
# A rule context is a record of a single rule invocation. It knows
|
| 8 |
+
# which context invoked it, if any. If there is no parent context, then
|
| 9 |
+
# naturally the invoking state is not valid. The parent link
|
| 10 |
+
# provides a chain upwards from the current rule invocation to the root
|
| 11 |
+
# of the invocation tree, forming a stack. We actually carry no
|
| 12 |
+
# information about the rule associated with this context (except
|
| 13 |
+
# when parsing). We keep only the state number of the invoking state from
|
| 14 |
+
# the ATN submachine that invoked this. Contrast this with the s
|
| 15 |
+
# pointer inside ParserRuleContext that tracks the current state
|
| 16 |
+
# being "executed" for the current rule.
|
| 17 |
+
#
|
| 18 |
+
# The parent contexts are useful for computing lookahead sets and
|
| 19 |
+
# getting error information.
|
| 20 |
+
#
|
| 21 |
+
# These objects are used during parsing and prediction.
|
| 22 |
+
# For the special case of parsers, we use the subclass
|
| 23 |
+
# ParserRuleContext.
|
| 24 |
+
#
|
| 25 |
+
# @see ParserRuleContext
|
| 26 |
+
#/
|
| 27 |
+
from io import StringIO
|
| 28 |
+
from antlr4.tree.Tree import RuleNode, INVALID_INTERVAL, ParseTreeVisitor
|
| 29 |
+
from antlr4.tree.Trees import Trees
|
| 30 |
+
|
| 31 |
+
# need forward declarations
|
| 32 |
+
RuleContext = None
|
| 33 |
+
Parser = None
|
| 34 |
+
|
| 35 |
+
class RuleContext(RuleNode):
|
| 36 |
+
__slots__ = ('parentCtx', 'invokingState')
|
| 37 |
+
EMPTY = None
|
| 38 |
+
|
| 39 |
+
def __init__(self, parent:RuleContext=None, invokingState:int=-1):
|
| 40 |
+
super().__init__()
|
| 41 |
+
# What context invoked this rule?
|
| 42 |
+
self.parentCtx = parent
|
| 43 |
+
# What state invoked the rule associated with this context?
|
| 44 |
+
# The "return address" is the followState of invokingState
|
| 45 |
+
# If parent is null, this should be -1.
|
| 46 |
+
self.invokingState = invokingState
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def depth(self):
|
| 50 |
+
n = 0
|
| 51 |
+
p = self
|
| 52 |
+
while p is not None:
|
| 53 |
+
p = p.parentCtx
|
| 54 |
+
n += 1
|
| 55 |
+
return n
|
| 56 |
+
|
| 57 |
+
# A context is empty if there is no invoking state; meaning nobody call
|
| 58 |
+
# current context.
|
| 59 |
+
def isEmpty(self):
|
| 60 |
+
return self.invokingState == -1
|
| 61 |
+
|
| 62 |
+
# satisfy the ParseTree / SyntaxTree interface
|
| 63 |
+
|
| 64 |
+
def getSourceInterval(self):
|
| 65 |
+
return INVALID_INTERVAL
|
| 66 |
+
|
| 67 |
+
def getRuleContext(self):
|
| 68 |
+
return self
|
| 69 |
+
|
| 70 |
+
def getPayload(self):
|
| 71 |
+
return self
|
| 72 |
+
|
| 73 |
+
# Return the combined text of all child nodes. This method only considers
|
| 74 |
+
# tokens which have been added to the parse tree.
|
| 75 |
+
# <p>
|
| 76 |
+
# Since tokens on hidden channels (e.g. whitespace or comments) are not
|
| 77 |
+
# added to the parse trees, they will not appear in the output of this
|
| 78 |
+
# method.
|
| 79 |
+
#/
|
| 80 |
+
def getText(self):
|
| 81 |
+
if self.getChildCount() == 0:
|
| 82 |
+
return ""
|
| 83 |
+
with StringIO() as builder:
|
| 84 |
+
for child in self.getChildren():
|
| 85 |
+
builder.write(child.getText())
|
| 86 |
+
return builder.getvalue()
|
| 87 |
+
|
| 88 |
+
def getRuleIndex(self):
|
| 89 |
+
return -1
|
| 90 |
+
|
| 91 |
+
# For rule associated with this parse tree internal node, return
|
| 92 |
+
# the outer alternative number used to match the input. Default
|
| 93 |
+
# implementation does not compute nor store this alt num. Create
|
| 94 |
+
# a subclass of ParserRuleContext with backing field and set
|
| 95 |
+
# option contextSuperClass.
|
| 96 |
+
# to set it.
|
| 97 |
+
def getAltNumber(self):
|
| 98 |
+
return 0 # should use ATN.INVALID_ALT_NUMBER but won't compile
|
| 99 |
+
|
| 100 |
+
# Set the outer alternative number for this context node. Default
|
| 101 |
+
# implementation does nothing to avoid backing field overhead for
|
| 102 |
+
# trees that don't need it. Create
|
| 103 |
+
# a subclass of ParserRuleContext with backing field and set
|
| 104 |
+
# option contextSuperClass.
|
| 105 |
+
def setAltNumber(self, altNumber:int):
|
| 106 |
+
pass
|
| 107 |
+
|
| 108 |
+
def getChild(self, i:int):
|
| 109 |
+
return None
|
| 110 |
+
|
| 111 |
+
def getChildCount(self):
|
| 112 |
+
return 0
|
| 113 |
+
|
| 114 |
+
def getChildren(self):
|
| 115 |
+
for c in []:
|
| 116 |
+
yield c
|
| 117 |
+
|
| 118 |
+
def accept(self, visitor:ParseTreeVisitor):
|
| 119 |
+
return visitor.visitChildren(self)
|
| 120 |
+
|
| 121 |
+
# # Call this method to view a parse tree in a dialog box visually.#/
|
| 122 |
+
# public Future<JDialog> inspect(@Nullable Parser parser) {
|
| 123 |
+
# List<String> ruleNames = parser != null ? Arrays.asList(parser.getRuleNames()) : null;
|
| 124 |
+
# return inspect(ruleNames);
|
| 125 |
+
# }
|
| 126 |
+
#
|
| 127 |
+
# public Future<JDialog> inspect(@Nullable List<String> ruleNames) {
|
| 128 |
+
# TreeViewer viewer = new TreeViewer(ruleNames, this);
|
| 129 |
+
# return viewer.open();
|
| 130 |
+
# }
|
| 131 |
+
#
|
| 132 |
+
# # Save this tree in a postscript file#/
|
| 133 |
+
# public void save(@Nullable Parser parser, String fileName)
|
| 134 |
+
# throws IOException, PrintException
|
| 135 |
+
# {
|
| 136 |
+
# List<String> ruleNames = parser != null ? Arrays.asList(parser.getRuleNames()) : null;
|
| 137 |
+
# save(ruleNames, fileName);
|
| 138 |
+
# }
|
| 139 |
+
#
|
| 140 |
+
# # Save this tree in a postscript file using a particular font name and size#/
|
| 141 |
+
# public void save(@Nullable Parser parser, String fileName,
|
| 142 |
+
# String fontName, int fontSize)
|
| 143 |
+
# throws IOException
|
| 144 |
+
# {
|
| 145 |
+
# List<String> ruleNames = parser != null ? Arrays.asList(parser.getRuleNames()) : null;
|
| 146 |
+
# save(ruleNames, fileName, fontName, fontSize);
|
| 147 |
+
# }
|
| 148 |
+
#
|
| 149 |
+
# # Save this tree in a postscript file#/
|
| 150 |
+
# public void save(@Nullable List<String> ruleNames, String fileName)
|
| 151 |
+
# throws IOException, PrintException
|
| 152 |
+
# {
|
| 153 |
+
# Trees.writePS(this, ruleNames, fileName);
|
| 154 |
+
# }
|
| 155 |
+
#
|
| 156 |
+
# # Save this tree in a postscript file using a particular font name and size#/
|
| 157 |
+
# public void save(@Nullable List<String> ruleNames, String fileName,
|
| 158 |
+
# String fontName, int fontSize)
|
| 159 |
+
# throws IOException
|
| 160 |
+
# {
|
| 161 |
+
# Trees.writePS(this, ruleNames, fileName, fontName, fontSize);
|
| 162 |
+
# }
|
| 163 |
+
#
|
| 164 |
+
# # Print out a whole tree, not just a node, in LISP format
|
| 165 |
+
# # (root child1 .. childN). Print just a node if this is a leaf.
|
| 166 |
+
# # We have to know the recognizer so we can get rule names.
|
| 167 |
+
# #/
|
| 168 |
+
# @Override
|
| 169 |
+
# public String toStringTree(@Nullable Parser recog) {
|
| 170 |
+
# return Trees.toStringTree(this, recog);
|
| 171 |
+
# }
|
| 172 |
+
#
|
| 173 |
+
# Print out a whole tree, not just a node, in LISP format
|
| 174 |
+
# (root child1 .. childN). Print just a node if this is a leaf.
|
| 175 |
+
#
|
| 176 |
+
def toStringTree(self, ruleNames:list=None, recog:Parser=None):
|
| 177 |
+
return Trees.toStringTree(self, ruleNames=ruleNames, recog=recog)
|
| 178 |
+
# }
|
| 179 |
+
#
|
| 180 |
+
# @Override
|
| 181 |
+
# public String toStringTree() {
|
| 182 |
+
# return toStringTree((List<String>)null);
|
| 183 |
+
# }
|
| 184 |
+
#
|
| 185 |
+
def __str__(self):
|
| 186 |
+
return self.toString(None, None)
|
| 187 |
+
|
| 188 |
+
# @Override
|
| 189 |
+
# public String toString() {
|
| 190 |
+
# return toString((List<String>)null, (RuleContext)null);
|
| 191 |
+
# }
|
| 192 |
+
#
|
| 193 |
+
# public final String toString(@Nullable Recognizer<?,?> recog) {
|
| 194 |
+
# return toString(recog, ParserRuleContext.EMPTY);
|
| 195 |
+
# }
|
| 196 |
+
#
|
| 197 |
+
# public final String toString(@Nullable List<String> ruleNames) {
|
| 198 |
+
# return toString(ruleNames, null);
|
| 199 |
+
# }
|
| 200 |
+
#
|
| 201 |
+
# // recog null unless ParserRuleContext, in which case we use subclass toString(...)
|
| 202 |
+
# public String toString(@Nullable Recognizer<?,?> recog, @Nullable RuleContext stop) {
|
| 203 |
+
# String[] ruleNames = recog != null ? recog.getRuleNames() : null;
|
| 204 |
+
# List<String> ruleNamesList = ruleNames != null ? Arrays.asList(ruleNames) : null;
|
| 205 |
+
# return toString(ruleNamesList, stop);
|
| 206 |
+
# }
|
| 207 |
+
|
| 208 |
+
def toString(self, ruleNames:list, stop:RuleContext)->str:
|
| 209 |
+
with StringIO() as buf:
|
| 210 |
+
p = self
|
| 211 |
+
buf.write("[")
|
| 212 |
+
while p is not None and p is not stop:
|
| 213 |
+
if ruleNames is None:
|
| 214 |
+
if not p.isEmpty():
|
| 215 |
+
buf.write(str(p.invokingState))
|
| 216 |
+
else:
|
| 217 |
+
ri = p.getRuleIndex()
|
| 218 |
+
ruleName = ruleNames[ri] if ri >= 0 and ri < len(ruleNames) else str(ri)
|
| 219 |
+
buf.write(ruleName)
|
| 220 |
+
|
| 221 |
+
if p.parentCtx is not None and (ruleNames is not None or not p.parentCtx.isEmpty()):
|
| 222 |
+
buf.write(" ")
|
| 223 |
+
|
| 224 |
+
p = p.parentCtx
|
| 225 |
+
|
| 226 |
+
buf.write("]")
|
| 227 |
+
return buf.getvalue()
|