Kaydet (Commit) 950a1260 authored tarafından Guido van Rossum's avatar Guido van Rossum

New versions of almost all files.

üst 2b65444b
......@@ -34,11 +34,13 @@ extern void initaudioop();
extern void initbinascii();
extern void initcmath();
extern void initenvironment();
extern void initerrno();
extern void initimageop();
extern void initmath();
extern void initmd5();
extern void initnew();
extern void initnt();
extern void initoperator();
extern void initregex();
extern void initrgbimg();
extern void initrotor();
......@@ -64,11 +66,13 @@ struct _inittab inittab[] = {
{"binascii", initbinascii},
{"cmath", initcmath},
{"environment", initenvironment},
{"errno", initerrno},
{"imageop", initimageop},
{"math", initmath},
{"md5", initmd5},
{"new", initnew},
{"nt", initnt}, /* Use the NT os functions, not posix */
{"operator", initoperator},
{"regex", initregex},
{"rgbimg", initrgbimg},
{"rotor", initrotor},
......
......@@ -10,6 +10,22 @@ This is a manually maintained version used for the Watcom,
Borland and and Microsoft Visual C++ compilers. It is a
standard part of the Python distribution.
WINDOWS DEFINES:
The code specific to Windows should be wrapped around one of
the following #defines
MS_WIN32 - Code specific to the MS Win32 API
MS_WIN16 - Code specific to the old 16 bit Windows API.
MS_WINDOWS - Code specific to Windows, but all versions.
MS_COREDLL - Code if the Python core is built as a DLL.
Note that the old defines "NT" and "WIN32" are still supported, but
will soon be dropped.
Also note that neither "_M_IX86" or "_MSC_VER" should be used for
any purpose other than "Windows Intel x86 specific" and "Microsoft
compiler specific". Therefore, these should be very rare.
*/
/*
......@@ -25,6 +41,8 @@ standard part of the Python distribution.
#define DONT_HAVE_SIG_ALARM
#define DONT_HAVE_SIG_PAUSE
#define LONG_BIT 32
#define PREFIX ""
#define EXEC_PREFIX ""
/* Microsoft C defines _MSC_VER */
......@@ -33,12 +51,20 @@ standard part of the Python distribution.
#define NT /* NT is obsolete - please use MS_WIN32 instead */
#define MS_WIN32
#define MS_WINDOWS
#ifdef MS_COREDLL /* Python core is in a DLL */
#define main Py_Main
#ifndef USE_DL_EXPORT
#define USE_DL_IMPORT
#endif /* !USE_DL_EXPORT */
#endif /* MS_COREDLL */
#ifdef _M_IX86
#define COMPILER "[MSC 32 bit (Intel)]"
#else
#define COMPILER "[MSC (Unknown)]"
#endif
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win"
#define PYTHONPATH ".\\lib;.\\lib\\win"
typedef int pid_t;
#define WORD_BIT 32
#pragma warning(disable:4113)
......@@ -48,7 +74,6 @@ typedef int pid_t;
#define HAVE_STRFTIME
#define NT_THREADS
#define WITH_THREAD
#define _COMPLEX_DEFINED
#ifndef NETSCAPE_PI
#define USE_SOCKET
#endif
......@@ -58,7 +83,8 @@ typedef int pid_t;
#ifdef USE_DL_EXPORT
#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
#endif
#endif /* MS_WIN32 */
#endif /* _MSC_VER && > 850 */
#if defined(_MSC_VER) && _MSC_VER <= 850
/* Start of defines for 16-bit Windows using VC++ 1.5 */
......@@ -67,11 +93,10 @@ typedef int pid_t;
#define MS_WIN16
#define MS_WINDOWS
#endif
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\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
......@@ -109,7 +134,7 @@ int sscanf(const char *, const char *, ...);
/* The Watcom compiler defines __WATCOMC__ */
#ifdef __WATCOMC__
#define COMPILER "[Watcom]"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
#define IMPORT_8x3_NAMES
#include <ctype.h>
#include <direct.h>
......@@ -144,7 +169,7 @@ typedef int pid_t;
/* The Borland compiler defines __BORLANDC__ */
#ifdef __BORLANDC__
#define COMPILER "[Borland]"
#define PYTHONPATH "c:\\python\\lib;c:\\python\\lib\\win;c:\\python\\lib\\dos_8x3"
#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
#define IMPORT_8x3_NAMES
#define HAVE_CLOCK
#define HAVE_STRFTIME
......@@ -153,6 +178,18 @@ typedef int pid_t;
#endif
#endif /* BORLANDC */
/* End of compilers - finish up */
#ifdef MS_WIN32
#define PLATFORM "win32"
#else
#ifdef MS_WIN16
#define PLATFORM "win16"
#else
#define PLATFORM "dos"
#endif /* !MS_WIN16 */
#endif /* !MS_WIN32 */
/* Fairly standard from here! */
/* Define if on AIX 3.
......@@ -257,7 +294,7 @@ typedef int pid_t;
This requires the "dl" library by Jack Jansen,
ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
Don't bother on IRIX 5, it already has dynamic linking using SunOS
style shared libraries */
style shared libraries */
/* #undef WITH_SGI_DL */
/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
......@@ -268,7 +305,7 @@ typedef int pid_t;
as well as the "GNU dld" library,
ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
Don't bother on SunOS 4 or 5, they already have dynamic linking using
shared libraries */
shared libraries */
/* #undef WITH_DL_DLD */
/* Define if you want to compile in rudimentary thread support */
......
#! /usr/local/bin/python
# This program reads all *.py and test/*.py in "libDir", and
# copies those files with illegal DOS names to libDir/dos_8x3.
# Names are illegal if they are longer than 8x3 chars or if they
# contain uppercase chars. It also tests for name collisions.
# You must first create the directory libDir/dos_8x3 yourself.
# You should remove all files in dos_8x3 if you run it again.
# CHANGE libDir TO THE CORRECT DIRECTORY. RM dos_8x3/* FIRST.
import sys, os, regex, string
libDir = "./Lib" # Location of Python Lib
def make8x3():
reg_uppercase = regex.compile("[A-Z]")
collisions = {} # See if all names are unique in first 8 chars.
destDir = os.path.join(libDir, "dos_8x3")
if not os.path.isdir(destDir):
print "Please create the directory", destDir, "first."
err()
while 1:
ans = raw_input("Ok to copy to " + destDir + " [yn]? ")
if not ans:
continue
elif ans[0] == "n":
err()
elif ans[0] == "y":
break
for dirname in libDir, os.path.join(libDir, "test"):
for filename in os.listdir(dirname):
if filename[-3:] == ".py":
name = filename[0:-3]
if len(name) > 8 or reg_uppercase.search(name) >= 0:
shortName = string.lower(name[0:8])
if collisions.has_key(shortName):
print "Name not unique in first 8 chars:", collisions[shortName], name
else:
collisions[shortName] = name
fin = open(os.path.join(dirname, filename), "r")
dest = os.path.join(destDir, shortName + ".py")
fout = open(dest, "w")
fout.write(fin.read())
fin.close()
fout.close()
os.chmod(dest, 0644)
elif filename == "." or filename == "..":
continue
elif filename[-4:] == ".pyc":
continue
elif filename == "Makefile":
continue
else:
parts = string.splitfields(filename, ".")
if len(parts) > 2 or \
len(parts[0]) > 8 or \
reg_uppercase.search(filename) >= 0 or \
(len(parts) > 1 and len(parts[1]) > 3):
print "Illegal DOS name", os.path.join(dirname, filename)
sys.exit(0)
def err():
print "No files copied."
sys.exit(1)
if __name__ == "__main__":
make8x3()
NAME
EXETYPE WINDOWS
CODE PRELOAD MOVABLE DISCARDABLE
DATA PRELOAD MOVABLE
HEAPSIZE 4096
NAME
EXETYPE WINDOWS
CODE PRELOAD MOVABLE DISCARDABLE
DATA PRELOAD MOVABLE
HEAPSIZE 4096
......@@ -121,6 +121,8 @@ EXPORTS
PyImport_GetModuleDict
PyImport_AddModule
PyImport_ImportModule
PyImport_ImportFrozenModule
PyImport_FrozenModules
PyImport_ReloadModule
PyImport_Cleanup
PyInt_FromLong
......
project : n:\python\python-1.4b0b\pc\wat_os2\pyth_os2.exe n:\python\python-1&
.4b0b\pc\wat_dos\pyth_dos.exe .SYMBOLIC
!include n:\python\python-1.4b0b\pc\wat_os2\pyth_os2.mk1
!include n:\python\python-1.4b0b\pc\wat_dos\pyth_dos.mk1
project : n:\python\python-1.4b2\pc\wat_os2\pyth_os2.exe n:\python\python-1.&
4b2\pc\wat_dos\pyth_dos.exe .SYMBOLIC
!include n:\python\python-1.4b2\pc\wat_os2\pyth_os2.mk1
!include n:\python\python-1.4b2\pc\wat_dos\pyth_dos.mk1
40
projectIdent
0
VpeMain
1
WRect
0
0
9920
8704
2
MProject
3
MCommand
0
4
MCommand
0
2
5
WFileName
20
wat_os2\pyth_os2.tgt
6
WFileName
20
wat_dos\pyth_dos.tgt
7
WVList
2
8
VComponent
9
WRect
832
256
5632
4096
1
0
10
WFileName
20
wat_os2\pyth_os2.tgt
0
0
11
VComponent
12
WRect
0
0
5632
4147
0
0
13
WFileName
20
wat_dos\pyth_dos.tgt
0
0
11
40
projectIdent
0
VpeMain
1
WRect
0
0
9920
8704
2
MProject
3
MCommand
0
4
MCommand
0
2
5
WFileName
20
wat_os2\pyth_os2.tgt
6
WFileName
20
wat_dos\pyth_dos.tgt
7
WVList
2
8
VComponent
9
WRect
832
256
5632
4096
0
0
10
WFileName
20
wat_os2\pyth_os2.tgt
12
74
11
VComponent
12
WRect
128
85
5632
4113
0
0
13
WFileName
20
wat_dos\pyth_dos.tgt
9
9
11
NAME makesrc
FIL makesrc.obj
NAME makesrc
FIL makesrc.obj
!define BLANK ""
n:\python\python-1.4b0b\pc\utils\makesrc.obj : n:\python\python-1.4b0b\pc\ut&
ils\makesrc.c .AUTODEPEND
@n:
cd n:\python\python-1.4b0b\pc\utils
*wcc386 makesrc.c -i=C:\WATCOM\h;C:\WATCOM\h\nt -w4 -e25 -ei -zp4 -zq -otex&
an -d1 -5r -bt=nt -mf
n:\python\python-1.4b0b\pc\utils\makesrc.exe : n:\python\python-1.4b0b\pc\ut&
ils\makesrc.obj .AUTODEPEND
@n:
cd n:\python\python-1.4b0b\pc\utils
@%write makesrc.lk1 NAME makesrc
@%append makesrc.lk1 FIL makesrc.obj
@%append makesrc.lk1
!ifneq BLANK ""
*wlib -q -n -b makesrc.imp
@%append makesrc.lk1 LIBR makesrc.imp
!endif
*wlink SYS nt op m op st=20k op maxe=25 op q op symf @makesrc.lk1
!ifneq BLANK ""
wrc -q -ad makesrc.exe
!endif
!define BLANK ""
n:\python\python-1.4b0b\pc\utils\makesrc.obj : n:\python\python-1.4b0b\pc\ut&
ils\makesrc.c .AUTODEPEND
@n:
cd n:\python\python-1.4b0b\pc\utils
*wcc386 makesrc.c -i=C:\WATCOM\h;C:\WATCOM\h\nt -w4 -e25 -ei -zp4 -zq -otex&
an -d1 -5r -bt=nt -mf
n:\python\python-1.4b0b\pc\utils\makesrc.exe : n:\python\python-1.4b0b\pc\ut&
ils\makesrc.obj .AUTODEPEND
@n:
cd n:\python\python-1.4b0b\pc\utils
@%write makesrc.lk1 NAME makesrc
@%append makesrc.lk1 FIL makesrc.obj
@%append makesrc.lk1
!ifneq BLANK ""
*wlib -q -n -b makesrc.imp
@%append makesrc.lk1 LIBR makesrc.imp
!endif
*wlink SYS nt op m op st=20k op maxe=25 op q op symf @makesrc.lk1
!ifneq BLANK ""
wrc -q -ad makesrc.exe
!endif
40
targetIdent
0
MProject
1
MComponent
0
2
WString
4
NEXE
3
WString
5
nc2en
1
0
0
4
MCommand
0
5
MCommand
0
6
MItem
11
makesrc.exe
7
WString
4
NEXE
8
WVList
2
9
MVState
10
WString
7
WINLINK
11
WString
11
?????Stack:
1
12
WString
3
20k
0
13
MVState
14
WString
7
WINLINK
15
WString
11
?????Stack:
0
16
WString
3
20k
0
17
WVList
0
-1
1
1
0
18
WPickList
2
19
MItem
3
*.c
20
WString
4
COBJ
21
WVList
6
22
MCState
23
WString
3
WCC
24
WString
31
?????Force enums to be type int
1
1
25
MRState
26
WString
3
WCC
27
WString
20
?????Pack structures
1
0
28
MRState
29
WString
3
WCC
30
WString
21
?????4 byte alignment
1
1
31
MCState
32
WString
3
WCC
33
WString
31
?????Force enums to be type int
0
1
34
MRState
35
WString
3
WCC
36
WString
20
?????Pack structures
0
0
37
MRState
38
WString
3
WCC
39
WString
21
?????4 byte alignment
0
1
40
WVList
0
-1
1
1
0
41
MItem
9
makesrc.c
42
WString
4
COBJ
43
WVList
0
44
WVList
0
19
1
1
0
40
targetIdent
0
MProject
1
MComponent
0
2
WString
4
NEXE
3
WString
5
nc2en
1
0
0
4
MCommand
0
5
MCommand
0
6
MItem
11
makesrc.exe
7
WString
4
NEXE
8
WVList
2
9
MVState
10
WString
7
WINLINK
11
WString
11
?????Stack:
1
12
WString
3
20k
0
13
MVState
14
WString
7
WINLINK
15
WString
11
?????Stack:
0
16
WString
3
20k
0
17
WVList
0
-1
1
1
0
18
WPickList
2
19
MItem
3
*.c
20
WString
4
COBJ
21
WVList
6
22
MCState
23
WString
3
WCC
24
WString
31
?????Force enums to be type int
1
1
25
MRState
26
WString
3
WCC
27
WString
20
?????Pack structures
1
0
28
MRState
29
WString
3
WCC
30
WString
21
?????4 byte alignment
1
1
31
MCState
32
WString
3
WCC
33
WString
31
?????Force enums to be type int
0
1
34
MRState
35
WString
3
WCC
36
WString
20
?????Pack structures
0
0
37
MRState
38
WString
3
WCC
39
WString
21
?????4 byte alignment
0
1
40
WVList
0
-1
1
1
0
41
MItem
9
makesrc.c
42
WString
4
COBJ
43
WVList
0
44
WVList
0
19
1
1
0
project : n:\python\python-1.4b0b\pc\utils\makesrc.exe .SYMBOLIC
!include n:\python\python-1.4b0b\pc\utils\makesrc.mk1
project : n:\python\python-1.4b0b\pc\utils\makesrc.exe .SYMBOLIC
!include n:\python\python-1.4b0b\pc\utils\makesrc.mk1
40
projectIdent
0
VpeMain
1
WRect
0
0
9920
8704
2
MProject
3
MCommand
0
4
MCommand
0
1
5
WFileName
11
makesrc.tgt
6
WVList
1
7
VComponent
8
WRect
332
324
5670
4215
0
0
9
WFileName
11
makesrc.tgt
0
1
7
40
projectIdent
0
VpeMain
1
WRect
0
0
9920
8704
2
MProject
3
MCommand
0
4
MCommand
0
1
5
WFileName
11
makesrc.tgt
6
WVList
1
7
VComponent
8
WRect
332
324
5670
4215
0
0
9
WFileName
11
makesrc.tgt
0
1
7
This diff is collapsed.
[MSVC Status File]
Version=1.00
ProjectType=10
External=0
BrkptCount=0
WatchCount=0
[MSVC Status File]
Version=1.00
ProjectType=10
External=0
BrkptCount=0
WatchCount=0
This diff is collapsed.
[MSVC Status File]
Version=1.00
ProjectType=10
External=0
BrkptCount=0
WatchCount=0
[MSVC Status File]
Version=1.00
ProjectType=10
External=0
BrkptCount=0
WatchCount=0
This diff is collapsed.
NAME pyth_dos
FIL arraymodule.obj,audioop.obj,binascii.obj,cmathmodule.obj,environment.obj,getpath.obj,imageop.obj,main.obj,mathmodule.obj,md5c.obj,md5module.obj,newmodule.obj,regexmodule.obj,regexpr.obj,rgbimgmodule.obj,rotormodule.obj,signalmodule.obj,soundex.obj,stropmodule.obj,structmodule.obj,timemodule.obj,yuvconvert.obj,abstract.obj,accessobject.obj,classobject.obj,cobject.obj,complexobject.obj,fileobject.obj,floatobject.obj,frameobject.obj,funcobject.obj,intobject.obj,listobject.obj,longobject.obj,mappingobject.obj,methodobject.obj,moduleobject.obj,object.obj,rangeobject.obj,stringobject.obj,tupleobject.obj,typeobject.obj,acceler.obj,grammar1.obj,myreadline.obj,node.obj,parser.obj,parsetok.obj,tokenizer.obj,bltinmodule.obj,ceval.obj,cgensupport.obj,compile.obj,errors.obj,frozen.obj,getargs.obj,getcompiler.obj,getcopyright.obj,getmtime.obj,getopt.obj,getplatform.obj,getversion.obj,graminit.obj,importdl.obj,marshal.obj,modsupport.obj,mystrtoul.obj,pythonrun.obj,structmember.obj,sysmodule.obj,traceback.obj,config.obj,import.obj,posixmodule.obj
NAME pyth_dos
FIL arraymodule.obj,audioop.obj,binascii.obj,cmathmodule.obj,environment.obj,errnomodule.obj,getpath.obj,imageop.obj,main.obj,mathmodule.obj,md5c.obj,md5module.obj,newmodule.obj,operator.obj,posixmodule.obj,regexmodule.obj,regexpr.obj,rgbimgmodule.obj,rotormodule.obj,signalmodule.obj,soundex.obj,stropmodule.obj,structmodule.obj,timemodule.obj,yuvconvert.obj,abstract.obj,accessobject.obj,classobject.obj,cobject.obj,complexobject.obj,fileobject.obj,floatobject.obj,frameobject.obj,funcobject.obj,intobject.obj,listobject.obj,longobject.obj,mappingobject.obj,methodobject.obj,moduleobject.obj,object.obj,rangeobject.obj,stringobject.obj,tupleobject.obj,typeobject.obj,acceler.obj,grammar1.obj,myreadline.obj,node.obj,parser.obj,parsetok.obj,tokenizer.obj,bltinmodule.obj,ceval.obj,cgensupport.obj,compile.obj,errors.obj,frozen.obj,getargs.obj,getcompiler.obj,getcopyright.obj,getmtime.obj,getopt.obj,getplatform.obj,getversion.obj,graminit.obj,import.obj,importdl.obj,marshal.obj,modsupport.obj,mystrtoul.obj,pythonrun.obj,structmember.obj,sysmodule.obj,traceback.obj,config.obj
This diff is collapsed.
This diff is collapsed.
NAME pyth_os2
FIL arraymodule.obj,audioop.obj,binascii.obj,cmathmodule.obj,environment.obj,getpath.obj,imageop.obj,main.obj,mathmodule.obj,md5c.obj,md5module.obj,newmodule.obj,regexmodule.obj,regexpr.obj,rgbimgmodule.obj,rotormodule.obj,signalmodule.obj,soundex.obj,stropmodule.obj,structmodule.obj,timemodule.obj,yuvconvert.obj,abstract.obj,accessobject.obj,classobject.obj,cobject.obj,complexobject.obj,fileobject.obj,floatobject.obj,frameobject.obj,funcobject.obj,intobject.obj,listobject.obj,longobject.obj,mappingobject.obj,methodobject.obj,moduleobject.obj,object.obj,rangeobject.obj,stringobject.obj,tupleobject.obj,typeobject.obj,acceler.obj,grammar1.obj,myreadline.obj,node.obj,parser.obj,parsetok.obj,tokenizer.obj,bltinmodule.obj,ceval.obj,cgensupport.obj,compile.obj,errors.obj,frozen.obj,getargs.obj,getcompiler.obj,getcopyright.obj,getmtime.obj,getopt.obj,getplatform.obj,getversion.obj,graminit.obj,import.obj,importdl.obj,marshal.obj,modsupport.obj,mystrtoul.obj,pythonrun.obj,structmember.obj,sysmodule.obj,traceback.obj,config.obj,posixmodule.obj
NAME pyth_os2
FIL arraymodule.obj,audioop.obj,binascii.obj,cmathmodule.obj,environment.obj,getpath.obj,imageop.obj,main.obj,mathmodule.obj,md5c.obj,md5module.obj,newmodule.obj,posixmodule.obj,regexmodule.obj,regexpr.obj,rgbimgmodule.obj,rotormodule.obj,signalmodule.obj,soundex.obj,stropmodule.obj,structmodule.obj,timemodule.obj,yuvconvert.obj,abstract.obj,accessobject.obj,classobject.obj,cobject.obj,complexobject.obj,fileobject.obj,floatobject.obj,frameobject.obj,funcobject.obj,intobject.obj,listobject.obj,longobject.obj,mappingobject.obj,methodobject.obj,moduleobject.obj,object.obj,rangeobject.obj,stringobject.obj,tupleobject.obj,typeobject.obj,acceler.obj,grammar1.obj,myreadline.obj,node.obj,parser.obj,parsetok.obj,tokenizer.obj,bltinmodule.obj,ceval.obj,cgensupport.obj,compile.obj,errors.obj,frozen.obj,getargs.obj,getcompiler.obj,getcopyright.obj,getmtime.obj,getopt.obj,getplatform.obj,getversion.obj,graminit.obj,import.obj,importdl.obj,marshal.obj,modsupport.obj,mystrtoul.obj,pythonrun.obj,structmember.obj,sysmodule.obj,traceback.obj,config.obj
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment