* Makefile: change location of FORMS library.
* posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not)
* Almost all .h files: added CPP magic to avoid duplicate inclusions and
to support inclusion from C++.
+#ifndef Py_ACCESSOBJECT_H
+#define Py_ACCESSOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
int hasaccessvalue PROTO((object *));
extern typeobject Anynumbertype, Anysequencetype, Anymappingtype;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ACCESSOBJECT_H */
+#ifndef Py_ALLOBJECTS_H
+#define Py_ALLOBJECTS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#include "errors.h"
#include "mymalloc.h"
+#include "modsupport.h"
+#include "ceval.h"
+
+#include "rename1.h"
+
extern void fatal PROTO((char *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ALLOBJECTS_H */
+#ifndef Py_ASSERT_H
+#define Py_ASSERT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
******************************************************************/
#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ASSERT_H */
+#ifndef Py_BITSET_H
+#define Py_BITSET_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_BITSET_H */
+#ifndef Py_BLTINMODULE_H
+#define Py_BLTINMODULE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Built-in module interface */
extern object *getbuiltin PROTO((object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_BLTINMODULE_H */
+#ifndef Py_CEVAL_H
+#define Py_CEVAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define END_SAVE }
#endif /* !USE_THREAD */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CEVAL_H */
+#ifndef Py_CGENSUPPORT_H
+#define Py_CGENSUPPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern int getishortarg PROTO((object *args, int nargs, int i, short *p_a));
extern int getifloatarg PROTO((object *args, int nargs, int i, float *p_a));
extern int getistringarg PROTO((object *args, int nargs, int i, string *p_a));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CGENSUPPORT_H */
+#ifndef Py_CLASSOBJECT_H
+#define Py_CLASSOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern object *instance_convert PROTO((object *, char *));
extern int issubclass PROTO((object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CLASSOBJECT_H */
+#ifndef Py_COMPILE_H
+#define Py_COMPILE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
codeobject *compile PROTO((struct _node *, char *));
codeobject *newcodeobject
PROTO((object *, object *, object *, object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_COMPILE_H */
+#ifndef Py_DICTOBJECT_H
+#define Py_DICTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define dict2lookup mappinglookup
#define dict2insert mappinginsert
#define dict2remove mappingremove
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_DICTOBJECT_H */
+#ifndef Py_ERRCODE_H
+#define Py_ERRCODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define E_NOMEM 15 /* Ran out of memory */
#define E_DONE 16 /* Parsing complete */
#define E_ERROR 17 /* Execution error */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ERRCODE_H */
+#ifndef Py_ERRORS_H
+#define Py_ERRORS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern void err_badcall PROTO((void));
extern object *err_getexc PROTO((void));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ERRORS_H */
+#ifndef Py_EVAL_H
+#define Py_EVAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
object *eval_code
PROTO((codeobject *, object *, object *, object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_EVAL_H */
+#ifndef Py_FILEOBJECT_H
+#define Py_FILEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
PROTO((FILE *, char *, char *, int (*)FPROTO((FILE *))));
extern FILE *getfilefile PROTO((object *));
extern object *filegetline PROTO((object *, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FILEOBJECT_H */
+#ifndef Py_FLOATOBJECT_H
+#define Py_FLOATOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Macro, trading safety for speed */
#define GETFLOATVALUE(op) ((op)->ob_fval)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FLOATOBJECT_H */
+#ifndef Py_FRAMEOBJECT_H
+#define Py_FRAMEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Extend the value stack */
object **extend_stack PROTO((frameobject *, int, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FRAMEOBJECT_H */
+#ifndef Py_FUNCOBJECT_H
+#define Py_FUNCOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern object *newfuncobject PROTO((object *, object *));
extern object *getfunccode PROTO((object *));
extern object *getfuncglobals PROTO((object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FUNCOBJECT_H */
+#ifndef Py_GRAMMAR_H
+#define Py_GRAMMAR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
void printgrammar PROTO((grammar *g, FILE *fp));
void printnonterminals PROTO((grammar *g, FILE *fp));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_GRAMMAR_H */
+#ifndef Py_IMPORT_H
+#define Py_IMPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
char *name;
void (*initfunc)();
} inittab[];
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_IMPORT_H */
+#ifndef Py_INTOBJECT_H
+#define Py_INTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Macro, trading safety for speed */
#define GETINTVALUE(op) ((op)->ob_ival)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTOBJECT_H */
+#ifndef Py_INTRCHECK_H
+#define Py_INTRCHECK_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern int intrcheck PROTO((void));
extern void initintr PROTO((void));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTRCHECK_H */
+#ifndef Py_LISTOBJECT_H
+#define Py_LISTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Macro, trading safety for speed */
#define GETLISTITEM(op, i) ((op)->ob_item[i])
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LISTOBJECT_H */
+#ifndef Py_LONGINTREPR_H
+#define Py_LONGINTREPR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
};
longobject *alloclongobject PROTO((int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LONGINTREPR_H */
+#ifndef Py_LONGOBJECT_H
+#define Py_LONGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
object *long_format PROTO((object *, int));
object *long_scan PROTO((char *, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LONGOBJECT_H */
+#ifndef Py_MAPPINGOBJECT_H
+#define Py_MAPPINGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern object *getmappingkeys PROTO((object *mp));
extern object *getmappingvalues PROTO((object *mp));
extern object *getmappingitems PROTO((object *mp));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MAPPINGOBJECT_H */
+#ifndef Py_MARSHAL_H
+#define Py_MARSHAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
int rd_short PROTO((FILE *));
object *rd_object PROTO((FILE *));
object *rds_object PROTO((char *, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MARSHAL_H */
+#ifndef Py_METAGRAMMAR_H
+#define Py_METAGRAMMAR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define ALT 259
#define ITEM 260
#define ATOM 261
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_METAGRAMMAR_H */
+#ifndef Py_METHODOBJECT_H
+#define Py_METHODOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
};
extern object *findmethod PROTO((struct methodlist *, object *, char *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_METHODOBJECT_H */
+#ifndef Py_MODSUPPORT_H
+#define Py_MODSUPPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define getintarg(v, a) getargs(v, "i", a)
#define getlongarg(v, a) getargs(v, "l", a)
#define getstrarg(v, a) getargs(v, "s", a)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MODSUPPORT_H */
+#ifndef Py_MODULEOBJECT_H
+#define Py_MODULEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern object *newmoduleobject PROTO((char *));
extern object *getmoduledict PROTO((object *));
extern char *getmodulename PROTO((object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MODULEOBJECT_H */
+#ifndef Py_MYMALLOC_H
+#define Py_MYMALLOC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern ANY *realloc PROTO((ANY *, MALLARG));
extern void free PROTO((ANY *)); /* XXX sometimes int on Unix old systems */
#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MYMALLOC_H */
+#ifndef Py_MYSELECT_H
+#define Py_MYSELECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define FD_ZERO(p) memset((char *)(p), '\0', sizeof(*(p)))
#endif /* FD_SET */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MYSELECT_H */
+#ifndef Py_NODE_H
+#define Py_NODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern void listtree PROTO((node *));
extern void listnode PROTO((FILE *, node *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_NODE_H */
+#ifndef Py_OBJECT_H
+#define Py_OBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
123456789-123456789-123456789-123456789-123456789-123456789-123456789-12
*/
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OBJECT_H */
+#ifndef Py_OBJIMPL_H
+#define Py_OBJIMPL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#define NEWOBJ(type, typeobj) ((type *) newobject(typeobj))
#define NEWVAROBJ(type, typeobj, n) ((type *) newvarobject(typeobj, n))
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OBJIMPL_H */
+#ifndef Py_OPCODE_H
+#define Py_OPCODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
enum cmp_op {LT, LE, EQ, NE, GT, GE, IN, NOT_IN, IS, IS_NOT, EXC_MATCH, BAD};
#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OPCODE_H */
+#ifndef Py_OSDEFS_H
+#define Py_OSDEFS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#ifndef DELIM
#define DELIM ':'
#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OSDEFS_H */
+#ifndef Py_PARSETOK_H
+#define Py_PARSETOK_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern int parsestring PROTO((char *, grammar *, int start, node **n_ret));
extern int parsefile PROTO((FILE *, char *, grammar *, int start,
char *ps1, char *ps2, node **n_ret));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PARSETOK_H */
+#ifndef Py_PGENHEADERS_H
+#define Py_PGENHEADERS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
#include "mymalloc.h"
extern void fatal PROTO((char *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PGENHEADERS_H */
+#ifndef Py_ERRORS_H
+#define Py_ERRORS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern void err_badcall PROTO((void));
extern object *err_getexc PROTO((void));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ERRORS_H */
+#ifndef Py_PYTHONRUN_H
+#define Py_PYTHONRUN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
void print_error PROTO((void));
void goaway PROTO((int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PYTHONRUN_H */
--- /dev/null
+#ifndef Py_RENAME1_H
+#define Py_RENAME1_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************
+Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Amsterdam, The Netherlands.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+/* This file contains a bunch of #defines that make it possible to use
+ "new style" names (e.g. PyObject) with the old style Python source
+ distribution. */
+
+typedef ANY *PyUnivPtr;
+
+#define Py_NO_DEBUG NDEBUG
+#define Py_TRACE_REFS TRACE_REFS
+#define Py_REF_DEBUG REF_DEBUG
+#define Py_HAVE_PROTOTYPES HAVE_PROTOTYPES
+#define Py_HAVE_STDLIB HAVE_STDLIB
+#define _Py_ZeroStruct FalseObject
+#define _Py_NoneStruct NoObject
+#define _Py_TrueStruct TrueObject
+#define Py_DebugFlag debugging
+#define _PyParser_Grammar gram
+#define _PySys_ProfileFunc sys_profile
+#define _PySys_TraceFunc sys_trace
+#define _PyThread_Started threads_started
+#define _PyParser_TokenNames tok_name
+#define Py_VerboseFlag verbose
+#define PyExc_AttributeError AttributeError
+#define PyExc_EOFError EOFError
+#define PyExc_IOError IOError
+#define PyExc_ImportError ImportError
+#define PyExc_IndexError IndexError
+#define PyExc_KeyError KeyError
+#define PyExc_MemoryError MemoryError
+#define PyExc_NameError NameError
+#define PyExc_OverflowError OverflowError
+#define PyExc_RuntimeError RuntimeError
+#define PyExc_SyntaxError SyntaxError
+#define PyExc_SystemError SystemError
+#define PyExc_TypeError TypeError
+#define PyExc_ValueError ValueError
+#define PyExc_ZeroDivisionError ZeroDivisionError
+#define PyExc_KeyboardInterrupt KeyboardInterrupt
+#define PyExc_SystemExit SystemExit
+#define PyFloat_Type Floattype
+#define PyInt_Type Inttype
+#define PyLong_Type Longtype
+#define PyNothing_Type Notype
+#define PyString_Type Stringtype
+#define PyType_Type Typetype
+#define PyList_Type Listtype
+#define PyDict_Type Dicttype
+#define PyTuple_Type Tupletype
+#define PyFile_Type Filetype
+#define PyClass_Type Classtype
+#define PyFunction_Type Functype
+#define PyMethod_Type Instancemethodtype
+#define PyInstance_Type Instancetype
+#define PyCFunction_Type Methodtype
+#define PyModule_Type Moduletype
+#define PyCode_Type Codetype
+#define PyFrame_Type Frametype
+#define PyFloatObject floatobject
+#define PyIntObject intobject
+#define PyLongObject longobject
+#define PyNothingObject noobject
+#define PyStringObject stringobject
+#define PyTypeObject typeobject
+#define PyListObject listobject
+#define PyDictObject dictobject
+#define PyTupleObject tupleobject
+#define PyFileObject fileobject
+#define PyClassObject classobject
+#define PyCodeObject codeobject
+#define PyFrameObject frameobject
+#define PyFunctionObject funcobject
+#define PyMethodObject instancemethodobject
+#define PyInstanceObject instanceobject
+#define PyCFunctionObject methodobject
+#define PyModuleObject moduleobject
+#define PyNumberMethods number_methods
+#define PySequenceMethods sequence_methods
+#define PyMappingMethods mapping_methods
+#define PyObject_HEAD OB_HEAD
+#define PyObject_VAR_HEAD OB_VARHEAD
+#define PyObject_HEAD_INIT OB_HEAD_INIT
+#define PyObject_NEW NEWOBJ
+#define PyObject_NEW_VAR NEWVAROBJ
+#define Py_PROTO PROTO
+#define Py_FPROTO PROTO
+#define PyMem_NEW NEW
+#define PyMem_RESIZE RESIZE
+#define PyMem_DEL DEL
+#define PyMem_XDEL XDEL
+#define Py_BEGIN_ALLOW_THREADS BGN_SAVE
+#define Py_BLOCK_THREADS RET_SAVE
+#define Py_UNBLOCK_THREADS RES_SAVE
+#define Py_END_ALLOW_THREADS END_SAVE
+#define PyFloat_Check is_floatobject
+#define PyInt_Check is_intobject
+#define PyLong_Check is_longobject
+#define PyNothing_Check is_noobject
+#define PyString_Check is_stringobject
+#define PyType_Check is_typeobject
+#define PyList_Check is_listobject
+#define PyDict_Check is_dictobject
+#define PyTuple_Check is_tupleobject
+#define PyFile_Check is_fileobject
+#define PyClass_Check is_classobject
+#define PyCode_Check is_codeobject
+#define PyFrame_Check is_frameobject
+#define PyFunction_Check is_funcobject
+#define PyMethod_Check is_instancemethodobject
+#define PyInstance_Check is_instanceobject
+#define PyCFunction_Check is_methodobject
+#define PyModule_Check is_moduleobject
+#define Py_INCREF INCREF
+#define Py_DECREF DECREF
+#define Py_XINCREF XINCREF
+#define Py_XDECREF XDECREF
+#define _Py_NewReference NEWREF
+#define _Py_Dealloc DELREF
+#define _Py_ForgetReference UNREF
+#define Py_None None
+#define Py_False False
+#define Py_True True
+#define PyObject_Compare cmpobject
+#define PyObject_GetAttrString getattr
+#define PyObject_GetAttr getattro
+#define PyObject_Hash hashobject
+#define _PyObject_New newobject
+#define _PyObject_NewVar newvarobject
+#define PyObject_Print printobject
+#define PyObject_Repr reprobject
+#define PyObject_SetAttrString setattr
+#define PyObject_SetAttr setattro
+#define PyObject_IsTrue testbool
+#define Py_PRINT_RAW PRINT_RAW
+#define PyFloat_AsString float_buf_repr
+#define PyFloat_AsDouble getfloatvalue
+#define PyFloat_AS_DOUBLE GETFLOATVALUE
+#define PyFloat_FromDouble newfloatobject
+#define PyInt_AsLong getintvalue
+#define PyInt_AS_LONG GETINTVALUE
+#define PyInt_FromLong newintobject
+#define _PyLong_New alloclongobject
+#define PyLong_AsDouble dgetlongvalue
+#define PyLong_FromDouble dnewlongobject
+#define PyLong_AsLong getlongvalue
+#define PyLong_FromString long_scan
+#define PyLong_FromLong newlongobject
+#define PyString_Format formatstring
+#define PyString_Size getstringsize
+#define PyString_AsString getstringvalue
+#define PyString_AS_STRING GETSTRINGVALUE
+#define PyString_Concat joinstring
+#define PyString_FromStringAndSize newsizedstringobject
+#define PyString_FromString newstringobject
+#define _PyString_Resize resizestring
+#define PyList_Append addlistitem
+#define PyList_GetItem getlistitem
+#define PyList_GET_ITEM GETLISTITEM
+#define PyList_Size getlistsize
+#define PyList_GetSlice getlistslice
+#define PyList_Insert inslistitem
+#define PyList_New newlistobject
+#define PyList_SetItem setlistitem
+#define PyList_SetSlice setlistslice
+#define PyList_Sort sortlist
+#define PyDict_SetItemString dictinsert
+#define PyDict_GetItemString dictlookup
+#define PyDict_DelItemString dictremove
+#define PyDict_Items getmappingitems
+#define PyDict_Keys getmappingkeys
+#define PyDict_Values getmappingvalues
+#define PyDict_Clear mappingclear
+#define PyDict_Next mappinggetnext
+#define PyDict_SetItem mappinginsert
+#define PyDict_GetItem mappinglookup
+#define PyDict_DelItem mappingremove
+#define PyDict_New newmappingobject
+#define PyTuple_GetItem gettupleitem
+#define PyTuple_GET_ITEM GETTUPLEITEM
+#define PyTuple_Size gettuplesize
+#define PyTuple_GetSlice gettupleslice
+#define PyTuple_New newtupleobject
+#define PyTuple_SetItem settupleitem
+#define PyFile_GetLine filegetline
+#define PyFile_AsFile getfilefile
+#define PyFile_FromString newfileobject
+#define PyFile_FromFile newopenfileobject
+#define PyFile_SoftSpace softspace
+#define PyFile_WriteObject writeobject
+#define PyFile_WriteString writestring
+#define PyMethod_Class instancemethodgetclass
+#define PyMethod_Function instancemethodgetfunc
+#define PyMethod_Self instancemethodgetself
+#define PyClass_IsSubclass issubclass
+#define PyClass_New newclassobject
+#define PyMethod_New newinstancemethodobject
+#define PyInstance_New newinstanceobject
+#define PyTryBlock block
+#define PyFrame_ExtendStack extend_stack
+#define PyFrame_New newframeobject
+#define PyFrame_BlockPop pop_block
+#define PyFrame_BlockSetup setup_block
+#define PyFunction_GetCode getfunccode
+#define PyFunction_GetGlobals getfuncglobals
+#define PyFunction_New newfuncobject
+#define PyCFunction method
+#define Py_FindMethod findmethod
+#define PyCFunction_GetFunction getmethod
+#define PyCFunction_GetSelf getself
+#define PyCFunction_IsVarArgs getvarargs
+#define PyCFunction_New newmethodobject
+#define PyModule_GetDict getmoduledict
+#define PyModule_GetName getmodulename
+#define PyModule_New newmoduleobject
+#define PyGrammar_AddAccelerators addaccelerators
+#define PyGrammar_FindDFA finddfa
+#define PyGrammar_LabelRepr labelrepr
+#define PyNode_ListTree listtree
+#define PyNode_AddChild addchild
+#define PyNode_Free freetree
+#define PyNode_New newtree
+#define PyParser_AddToken addtoken
+#define PyParser_Delete delparser
+#define PyParser_New newparser
+#define PyParser_ParseFile parsefile
+#define PyParser_ParseString parsestring
+#define PyToken_OneChar tok_1char
+#define PyToken_TwoChars tok_2char
+#define PyTokenizer_Free tok_free
+#define PyTokenizer_Get tok_get
+#define PyTokenizer_FromFile tok_setupf
+#define PyTokenizer_FromString tok_setups
+#define PyNode_Compile compile
+#define PyCode_New newcodeobject
+#define PyEval_CallObject call_object
+#define PyEval_EvalCode eval_code
+#define Py_FlushLine flushline
+#define PyEval_GetGlobals getglobals
+#define PyEval_GetLocals getlocals
+#define PyEval_InitThreads init_save_thread
+#define PyErr_PrintTraceBack printtraceback
+#define PyEval_RestoreThread restore_thread
+#define PyEval_SaveThread save_thread
+#define PyTraceBack_Fetch tb_fetch
+#define PyTraceBack_Here tb_here
+#define PyTraceBack_Print tb_print
+#define PyTraceBack_Store tb_store
+#define PyImport_AddModule add_module
+#define PyImport_Cleanup doneimport
+#define PyImport_GetModuleDict get_modules
+#define PyImport_ImportModule import_module
+#define PyImport_ImportFrozenModule init_frozen
+#define PyImport_Init initimport
+#define PyImport_ReloadModule reload_module
+#define PyNumber_Coerce coerce
+#define PyBuiltin_GetObject getbuiltin
+#define PyBuiltin_Init initbuiltin
+#define PyMarshal_Init initmarshal
+#define PyMarshal_ReadLongFromFile rd_long
+#define PyMarshal_ReadObjectFromFile rd_object
+#define PyMarshal_ReadObjectFromString rds_object
+#define PyMarshal_WriteLongToFile wr_long
+#define PyMarshal_WriteObjectToFile wr_object
+#define PySys_Init initsys
+#define PySys_SetArgv setpythonargv
+#define PySys_SetPath setpythonpath
+#define PySys_GetObject sysget
+#define PySys_GetFile sysgetfile
+#define PySys_SetObject sysset
+#define Py_CompileString compile_string
+#define Py_FatalError fatal
+#define Py_Exit goaway
+#define Py_Initialize initall
+#define PyErr_Print print_error
+#define PyParser_SimpleParseFile parse_file
+#define PyParser_SimpleParseString parse_string
+#define PyRun_AnyFile run
+#define PyRun_SimpleFile run_script
+#define PyRun_SimpleString run_command
+#define PyRun_File run_file
+#define PyRun_String run_string
+#define PyRun_InteractiveOne run_tty_1
+#define PyRun_InteractiveLoop run_tty_loop
+#define PyMember_Get getmember
+#define PyMember_Set setmember
+#define Py_InitModule initmodule
+#define Py_BuildValue mkvalue
+#define Py_VaBuildValue vmkvalue
+#define PyArg_Parse getargs
+#define PyArg_GetChar getichararg
+#define PyArg_GetDoubleArray getidoublearray
+#define PyArg_GetFloat getifloatarg
+#define PyArg_GetFloatArray getifloatarray
+#define PyArg_GetLong getilongarg
+#define PyArg_GetLongArray getilongarray
+#define PyArg_GetLongArraySize getilongarraysize
+#define PyArg_GetObject getiobjectarg
+#define PyArg_GetShort getishortarg
+#define PyArg_GetShortArray getishortarray
+#define PyArg_GetShortArraySize getishortarraysize
+#define PyArg_GetString getistringarg
+#define PyErr_BadArgument err_badarg
+#define PyErr_BadInternalCall err_badcall
+#define PyErr_Input err_input
+#define PyErr_NoMemory err_nomem
+#define PyErr_SetFromErrno err_errno
+#define PyErr_SetNone err_set
+#define PyErr_SetString err_setstr
+#define PyErr_SetObject err_setval
+#define PyErr_Occurred err_occurred
+#define PyErr_GetAndClear err_get
+#define PyErr_Clear err_clear
+#define PyOS_InterruptableGetString fgets_intr
+#define PyOS_InitInterrupts initintr
+#define PyOS_InterruptOccurred intrcheck
+#define PyOS_GetLastModificationTime getmtime
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_RENAME1_H */
+#ifndef Py_STRINGOBJECT_H
+#define Py_STRINGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Macro, trading safety for speed */
#define GETSTRINGVALUE(op) ((op)->ob_sval)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_STRINGOBJECT_H */
+#ifndef Py_STRUCTMEMBER_H
+#define Py_STRUCTMEMBER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
object *getmember PROTO((char *, struct memberlist *, char *));
int setmember PROTO((char *, struct memberlist *, char *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_STRUCTMEMBER_H */
+#ifndef Py_SYSMODULE_H
+#define Py_SYSMODULE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
void initsys PROTO((void));
extern object *sys_trace, *sys_profile;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_SYSMODULE_H */
+#ifndef Py_TOKEN_H
+#define Py_TOKEN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern char *tok_name[]; /* Token names */
extern int tok_1char PROTO((int));
extern int tok_2char PROTO((int, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TOKEN_H */
+#ifndef Py_TRACEBACK_H
+#define Py_TRACEBACK_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
object *tb_fetch PROTO((void));
int tb_store PROTO((object *));
int tb_print PROTO((object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TRACEBACK_H */
+#ifndef Py_TUPLEOBJECT_H
+#define Py_TUPLEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
/* Macro, trading safety for speed */
#define GETTUPLEITEM(op, i) ((op)->ob_item[i])
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TUPLEOBJECT_H */
+#ifndef Py_CGENSUPPORT_H
+#define Py_CGENSUPPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern int getishortarg PROTO((object *args, int nargs, int i, short *p_a));
extern int getifloatarg PROTO((object *args, int nargs, int i, float *p_a));
extern int getistringarg PROTO((object *args, int nargs, int i, string *p_a));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CGENSUPPORT_H */
#ifdef USE_ARRAY
extern void initarray();
#endif
+#ifdef USE_XT
+extern void initXt();
+#endif
+#ifdef USE_XAW
+extern void initXaw();
+#endif
+#ifdef USE_XM
+extern void initXm();
+#endif
+#ifdef USE_GLX
+extern void initGlx();
+#endif
+#ifdef USE_HTML
+extern void initHTML();
+#endif
/* -- ADDMODULE MARKER 1 -- */
struct {
{"array", initarray},
#endif
+#ifdef USE_XT
+ {"Xt", initXt},
+#endif
+
+#ifdef USE_XAW
+ {"Xaw", initXaw},
+#endif
+
+#ifdef USE_XM
+ {"Xm", initXm},
+#endif
+
+#ifdef USE_GLX
+ {"Glx", initGlx},
+#endif
+
+#ifdef USE_HTML
+ {"HTML", initHTML},
+#endif
+
/* -- ADDMODULE MARKER 2 -- */
{0, 0} /* Sentinel */
extern int rmdir PROTO((const char *));
extern int chmod PROTO((const char *, mode_t));
extern char *getcwd PROTO((char *, int)); /* XXX or size_t? */
-#if 0
+#ifndef MSDOS
extern char *strerror PROTO((int));
extern int link PROTO((const char *, const char *));
extern int rename PROTO((const char *, const char *));
extern int stat PROTO((const char *, struct stat *));
extern int unlink PROTO((const char *));
extern int pclose PROTO((FILE *));
-#endif
-#endif /* _SEQUENT_ */
+#endif /* !MSDOS */
+#endif /* !_SEQUENT_ */
#ifdef NO_LSTAT
#define lstat stat
#else
+#ifndef Py_REGEXPR_H
+#define Py_REGEXPR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
regexpr.h
#endif /* REGEXPR_H */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_REGEXPR_H */
+#ifndef Py_YUV_H
+#define Py_YUV_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* SVideo YUV 4:1:1 format.
*
void yuv_sv411_to_cl422dc(int, void *, void *, int, int);
void yuv_sv411_to_cl422dc_quartersize(int, void *, void *, int, int);
void yuv_sv411_to_cl422dc_sixteenthsize(int, void *, void *, int, int);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_YUV_H */
+#ifndef Py_ASSERT_H
+#define Py_ASSERT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
******************************************************************/
#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ASSERT_H */
+#ifndef Py_PARSER_H
+#define Py_PARSER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
void delparser PROTO((parser_state *ps));
int addtoken PROTO((parser_state *ps, int type, char *str, int lineno));
void addaccelerators PROTO((grammar *g));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PARSER_H */
+#ifndef Py_PGEN_H
+#define Py_PGEN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
struct _node;
extern grammar *pgen PROTO((struct _node *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PGEN_H */
+#ifndef Py_TOKENIZER_H
+#define Py_TOKENIZER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
extern struct tok_state *tok_setupf PROTO((FILE *, char *ps1, char *ps2));
extern void tok_free PROTO((struct tok_state *));
extern int tok_get PROTO((struct tok_state *, char **, char **));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TOKENIZER_H */