Skip to content

Commit

Permalink
Added PC files from Jim Ahlstrom.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Jun 28, 1996
1 parent c012547 commit 1bc716f
Show file tree
Hide file tree
Showing 33 changed files with 17,716 additions and 21 deletions.
19 changes: 5 additions & 14 deletions PC/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

#include "Python.h"

#ifndef MS_WIN16
/* Assume all 32-bit platforms come standard with a WINSOCK library */
#define USE_SOCKET
#define USE_SELECT
#endif

extern void initarray();
extern void initaudioop();
extern void initbinascii();
extern void initcmath();
extern void initenvironment();
extern void initimageop();
extern void initmath();
Expand All @@ -47,8 +42,8 @@ extern void initnt();
extern void initregex();
extern void initrgbimg();
extern void initrotor();
extern void initselect();
extern void initsignal();
extern void initselect();
extern void init_socket();
extern void initsoundex();
extern void initstrop();
Expand All @@ -60,16 +55,14 @@ extern void inittime();
extern void PyMarshal_Init();
extern void initimp();

struct {
char *name;
void (*initfunc)();
} inittab[] = {
struct _inittab inittab[] = {

{"array", initarray},
#ifdef M_I386
{"audioop", initaudioop},
#endif
{"binascii", initbinascii},
{"cmath", initcmath},
{"environment", initenvironment},
{"imageop", initimageop},
{"math", initmath},
Expand All @@ -79,12 +72,10 @@ struct {
{"regex", initregex},
{"rgbimg", initrgbimg},
{"rotor", initrotor},
#ifdef USE_SELECT
{"select", initselect},
#endif
{"signal", initsignal},
#ifdef USE_SOCKET
{"_socket", init_socket},
{"select", initselect},
#endif
{"soundex", initsoundex},
{"strop", initstrop},
Expand Down
41 changes: 34 additions & 7 deletions PC/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,31 @@ standard part of the Python distribution.
#define HAVE_HYPOT
#define DONT_HAVE_SIG_ALARM
#define DONT_HAVE_SIG_PAUSE
#define LONG_BIT 32

/* Microsoft C defines _MSC_VER */

#if defined(_MSC_VER) && _MSC_VER > 850
/* Start of defines for NT using VC++ 2.0 and up */
#define NT
/* Start of defines for MS_WIN32 using VC++ 2.0 and up */
#define NT /* NT is obsolete - please use MS_WIN32 instead */
#define MS_WIN32
#define MS_WINDOWS
#ifdef _M_IX86
#define COMPILER "[MSC 32 bit (Intel)]"
#else
#define COMPILER "[MSC (Unknown)]"
#endif
#define PYTHONPATH "c:\\python\\lib"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win"
typedef int pid_t;
#define WORD_BIT 32
#pragma warning(disable:4113)
#define hypot _hypot
#include <stdio.h>
#define HAVE_CLOCK
#define HAVE_STRFTIME
#define NT_THREADS
#define WITH_THREAD
#define _COMPLEX_DEFINED
#ifndef NETSCAPE_PI
#define USE_SOCKET
#endif
Expand All @@ -53,15 +58,20 @@ typedef int pid_t;
#ifdef USE_DL_EXPORT
#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
#endif
#endif /* NT */
#endif /* MS_WIN32 */

#if defined(_MSC_VER) && _MSC_VER <= 850
/* Start of defines for 16-bit Windows using VC++ 1.5 */
#define COMPILER "[MSC 16-bit]"
#ifdef _WINDOWS
#define MS_WIN16
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\dos_8x3"
#define MS_WINDOWS
#endif
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
#define IMPORT_8x3_NAMES
typedef int pid_t;
#define WORD_BIT 16
#define _COMPLEX_DEFINED
#pragma warning(disable:4113)
#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
#define hypot _hypot
Expand Down Expand Up @@ -99,13 +109,30 @@ int sscanf(const char *, const char *, ...);
/* The Watcom compiler defines __WATCOMC__ */
#ifdef __WATCOMC__
#define COMPILER "[Watcom]"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\dos_8x3"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
#define IMPORT_8x3_NAMES
#include <ctype.h>
#include <direct.h>
typedef int mode_t;
typedef int uid_t;
typedef int gid_t;
typedef int pid_t;
#if defined(__NT__)
#define NT /* NT is obsolete - please use MS_WIN32 instead */
#define MS_WIN32
#define MS_WINDOWS
#define NT_THREADS
#define USE_SOCKET
#define WITH_THREAD
#elif defined(__WINDOWS__)
#define MS_WIN16
#define MS_WINDOWS
#endif
#ifdef M_I386
#define WORD_BIT 32
#else
#define WORD_BIT 16
#endif
#define VA_LIST_IS_ARRAY
#define HAVE_CLOCK
#define HAVE_STRFTIME
Expand All @@ -117,7 +144,7 @@ typedef int gid_t;
/* The Borland compiler defines __BORLANDC__ */
#ifdef __BORLANDC__
#define COMPILER "[Borland]"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\dos_8x3"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
#define IMPORT_8x3_NAMES
#define HAVE_CLOCK
#define HAVE_STRFTIME
Expand Down
Binary file added PC/makesrc.exe
Binary file not shown.
5 changes: 5 additions & 0 deletions PC/pyth_w31.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NAME
EXETYPE WINDOWS
CODE PRELOAD MOVABLE DISCARDABLE
DATA PRELOAD MOVABLE
HEAPSIZE 4096
231 changes: 231 additions & 0 deletions PC/python.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
EXPORTS
Py_GetCopyright
Py_GetVersion
Py_FindMethod
_PyObject_New
_PyString_Resize
PySys_SetArgv
PyObject_Cmp
PyObject_CallObject
PyObject_CallFunction
PyObject_CallMethod
PyObject_Type
PyObject_Length
PyObject_GetItem
PyObject_SetItem
PyNumber_Check
PyNumber_Add
PyNumber_Subtract
PyNumber_Multiply
PyNumber_Divide
PyNumber_Remainder
PyNumber_Divmod
PyNumber_Power
PyNumber_Negative
PyNumber_Positive
PyNumber_Absolute
PyNumber_Invert
PyNumber_Lshift
PyNumber_Rshift
PyNumber_And
PyNumber_Xor
PyNumber_Or
PyNumber_Int
PyNumber_Long
PyNumber_Float
PySequence_Check
PySequence_Concat
PySequence_Repeat
PySequence_GetItem
PySequence_GetSlice
PySequence_SetItem
PySequence_SetSlice
PySequence_Tuple
PySequence_Count
PySequence_In
PySequence_Index
PyMapping_Check
PyMapping_Length
PyMapping_HasKeyString
PyMapping_HasKey
PyMapping_GetItemString
PyMapping_SetItemString
PyAccess_FromValue
PyAccess_AsValue
PyAccess_SetValue
PyAccess_SetOwner
PyAccess_Clone
PyAccess_HasValue
PyEval_CallObject
PyEval_GetBuiltins
PyEval_GetGlobals
PyEval_GetLocals
PyEval_GetOwner
PyEval_GetFrame
PyEval_GetRestricted
Py_FlushLine
Py_AddPendingCall
Py_MakePendingCalls
PyEval_InitThreads
PyEval_SaveThread
PyEval_RestoreThread
PyArg_GetObject
PyArg_GetLong
PyArg_GetShort
PyArg_GetFloat
PyArg_GetString
PyClass_New
PyInstance_New
PyMethod_New
PyMethod_Function
PyMethod_Self
PyMethod_Class
PyClass_IsSubclass
PyNode_Compile
PyCode_New
PyErr_SetNone
PyErr_SetObject
PyErr_SetString
PyErr_Occurred
PyErr_Clear
PyErr_Fetch
PyErr_Restore
PyErr_BadArgument
PyErr_NoMemory
PyErr_SetFromErrno
PyErr_BadInternalCall
PyErr_CheckSignals
PyEval_EvalCode
PyFile_FromFile
PyFile_FromString
PyFile_SetBufSize
PyFile_AsFile
PyFile_Name
PyFile_GetLine
PyFloat_FromDouble
PyFloat_AsDouble
PyFrame_BlockSetup
PyFrame_BlockPop
PyFrame_LocalsToFast
PyFrame_FastToLocals
PyFunction_New
PyFunction_GetCode
PyFunction_GetGlobals
PyFunction_GetDefaults
PyFunction_SetDefaults
PyGrammar_FindDFA
PyGrammar_LabelRepr
PyGrammar_AddAccelerators
PyImport_GetMagicNumber
PyImport_ExecCodeModule
PyImport_GetModuleDict
PyImport_AddModule
PyImport_ImportModule
PyImport_ReloadModule
PyImport_Cleanup
PyInt_FromLong
PyInt_AsLong
PyOS_InterruptOccurred
PyOS_InitInterrupts
PyList_New
PyList_Size
PyList_GetItem
PyList_SetItem
PyList_Insert
PyList_Append
PyList_GetSlice
PyList_SetSlice
PyList_Sort
PyList_Reverse
PyList_AsTuple
PyLong_FromLong
PyLong_FromDouble
PyLong_AsLong
PyLong_AsDouble
PyLong_FromString
PyDict_New
PyDict_GetItem
PyDict_SetItem
PyDict_DelItem
PyDict_Clear
PyDict_Keys
PyDict_Values
PyDict_Items
PyDict_Size
PyDict_GetItemString
PyDict_SetItemString
PyDict_DelItemString
PyMarshal_WriteLongToFile
PyMarshal_WriteObjectToFile
PyMarshal_ReadLongFromFile
PyMarshal_ReadObjectFromFile
PyMarshal_ReadObjectFromString
PyCFunction_GetFunction
PyCFunction_GetSelf
PyCFunction_GetFlags
PyArg_Parse
PyArg_ParseTuple
Py_BuildValue
Py_VaBuildValue
Py_InitModule4
PyModule_New
PyModule_GetDict
PyModule_GetName
PyNode_New
PyNode_AddChild
PyNode_Free
PyObject_Print
PyObject_Repr
PyObject_Str
PyObject_Compare
PyObject_GetAttrString
PyObject_SetAttrString
PyObject_HasAttrString
PyObject_GetAttr
PyObject_SetAttr
PyObject_Hash
PyObject_IsTrue
PyCallable_Check
PyParser_ParseString
PyParser_ParseFile
Py_FatalError
Py_Initialize
PyRun_AnyFile
PyRun_SimpleString
PyRun_SimpleFile
PyRun_InteractiveOne
PyRun_InteractiveLoop
PyParser_SimpleParseString
PyParser_SimpleParseFile
PyRun_String
PyRun_File
Py_CompileString
PyErr_Print
Py_AtExit
Py_Exit
Py_Cleanup
PyRange_New
PyString_FromStringAndSize
PyString_FromString
PyString_Size
PyString_AsString
PyString_Concat
PyString_ConcatAndDel
PyString_Format
PyMember_Get
PyMember_Set
PySys_GetObject
PySys_SetObject
PySys_GetFile
PySys_Init
PyToken_OneChar
PyToken_TwoChars
PyTraceBack_Here
PyTraceBack_Fetch
PyTraceBack_Store
PyTraceBack_Print
PyTuple_New
PyTuple_Size
PyTuple_GetItem
PyTuple_SetItem
PyTuple_GetSlice
Loading

0 comments on commit 1bc716f

Please sign in to comment.