annotate PC/config.c @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents a1b63c73ad1d
children 1a99695a41cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 /* -*- C -*- ***********************************************
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
2 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
3 The Netherlands.
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
4
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 All Rights Reserved
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
6
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
7 Permission to use, copy, modify, and distribute this software and its
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 documentation for any purpose and without fee is hereby granted,
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
9 provided that the above copyright notice appear in all copies and that
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 both that copyright notice and this permission notice appear in
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 supporting documentation, and that the names of Stichting Mathematisch
4503
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
12 Centrum or CWI or Corporation for National Research Initiatives or
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
13 CNRI not be used in advertising or publicity pertaining to
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
14 distribution of the software without specific, written prior
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
15 permission.
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
16
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
17 While CWI is the initial source for this software, a modified version
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
18 is made available by the Corporation for National Research Initiatives
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
19 (CNRI) at the Internet address ftp://ftp.python.org.
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
20
4503
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
21 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
22 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
23 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
24 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
25 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
26 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
27 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65d2d8e67da3 New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents: 4107
diff changeset
28 PERFORMANCE OF THIS SOFTWARE.
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
29
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
30 ******************************************************************/
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
31
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
32 /* Module configuration */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
33
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
34 /* This file contains the table of built-in modules.
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
35 See init_builtin() in import.c. */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
36
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
37 #include "Python.h"
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
38
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
39 extern void initarray();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
40 extern void initaudioop();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
41 extern void initbinascii();
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
42 extern void initcmath();
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
43 extern void initerrno();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 extern void initimageop();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 extern void initmath();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
46 extern void initmd5();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
47 extern void initnew();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
48 extern void initnt();
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
49 extern void initoperator();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
50 extern void initregex();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
51 extern void initrgbimg();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
52 extern void initrotor();
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
53 extern void initsignal();
3729
068556380cb0 new versions from Jim A
Guido van Rossum <guido@python.org>
parents: 3624
diff changeset
54 extern void initselect();
068556380cb0 new versions from Jim A
Guido van Rossum <guido@python.org>
parents: 3624
diff changeset
55 extern void init_socket();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
56 extern void initsoundex();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
57 extern void initstrop();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
58 extern void initstruct();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
59 extern void inittime();
4107
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
60 extern void initthread();
5417
abf33b882cfd Added cStringIO and cPickle to the supported modules.
Guido van Rossum <guido@python.org>
parents: 5378
diff changeset
61 extern void initcStringIO();
abf33b882cfd Added cStringIO and cPickle to the supported modules.
Guido van Rossum <guido@python.org>
parents: 5378
diff changeset
62 extern void initcPickle();
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
63
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
64 /* -- ADDMODULE MARKER 1 -- */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
65
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
66 extern void PyMarshal_Init();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
67 extern void initimp();
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
68
5378
319e3eaecdf4 One more inittab.
Guido van Rossum <guido@python.org>
parents: 4503
diff changeset
69 struct _inittab _PyImport_Inittab[] = {
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
70
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
71 {"array", initarray},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
72 #ifdef M_I386
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
73 {"audioop", initaudioop},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
74 #endif
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
75 {"binascii", initbinascii},
3736
6c9c2ac15e4b Added PC files from Jim Ahlstrom.
Guido van Rossum <guido@python.org>
parents: 3729
diff changeset
76 {"cmath", initcmath},
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
77 {"errno", initerrno},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
78 {"imageop", initimageop},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
79 {"math", initmath},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
80 {"md5", initmd5},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
81 {"new", initnew},
5418
a1b63c73ad1d Use spaces exclusively.
Guido van Rossum <guido@python.org>
parents: 5417
diff changeset
82 {"nt", initnt}, /* Use the NT os functions, not posix */
3846
fcd82a01507d New versions of almost all files.
Guido van Rossum <guido@python.org>
parents: 3736
diff changeset
83 {"operator", initoperator},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
84 {"regex", initregex},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
85 {"rgbimg", initrgbimg},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
86 {"rotor", initrotor},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
87 {"signal", initsignal},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
88 #ifdef USE_SOCKET
5418
a1b63c73ad1d Use spaces exclusively.
Guido van Rossum <guido@python.org>
parents: 5417
diff changeset
89 {"_socket", init_socket},
a1b63c73ad1d Use spaces exclusively.
Guido van Rossum <guido@python.org>
parents: 5417
diff changeset
90 {"select", initselect},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
91 #endif
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
92 {"soundex", initsoundex},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
93 {"strop", initstrop},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
94 {"struct", initstruct},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
95 {"time", inittime},
4107
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
96 #ifdef WITH_THREAD
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
97 {"thread", initthread},
3ac030cc33f0 Added thread module (it was already in the project!)
Guido van Rossum <guido@python.org>
parents: 4105
diff changeset
98 #endif
5418
a1b63c73ad1d Use spaces exclusively.
Guido van Rossum <guido@python.org>
parents: 5417
diff changeset
99 {"cStringIO", initcStringIO},
a1b63c73ad1d Use spaces exclusively.
Guido van Rossum <guido@python.org>
parents: 5417
diff changeset
100 {"cPickle", initcPickle},
3624
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
101
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
102 /* -- ADDMODULE MARKER 2 -- */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
103
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
104 /* This module "lives in" with marshal.c */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
105 {"marshal", PyMarshal_Init},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
106
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
107 /* This lives it with import.c */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
108 {"imp", initimp},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
109
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
110 /* These entries are here for sys.builtin_module_names */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
111 {"__main__", NULL},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
112 {"__builtin__", NULL},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
113 {"sys", NULL},
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
114
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
115 /* Sentinel */
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
116 {0, 0}
5a98a4fd58b8 config files for DOS and Windows (all versions, all compilers)
Guido van Rossum <guido@python.org>
parents:
diff changeset
117 };