Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 1 | /* -*- C -*- *********************************************** |
| 2 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | The Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI not be used in advertising or publicity pertaining to |
| 13 | distribution of the software without specific, written prior permission. |
| 14 | |
| 15 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 16 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 18 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 21 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | |
| 23 | ******************************************************************/ |
| 24 | |
| 25 | /* Module configuration */ |
| 26 | |
| 27 | /* This file contains the table of built-in modules. |
| 28 | See init_builtin() in import.c. */ |
| 29 | |
| 30 | #include "Python.h" |
| 31 | |
Guido van Rossum | f2e98b4 | 1996-06-26 19:53:41 +0000 | [diff] [blame^] | 32 | #ifndef MS_WIN16 |
| 33 | /* Assume all 32-bit platforms come standard with a WINSOCK library */ |
| 34 | #define USE_SOCKET |
| 35 | #define USE_SELECT |
| 36 | #endif |
| 37 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 38 | extern void initarray(); |
| 39 | extern void initaudioop(); |
| 40 | extern void initbinascii(); |
| 41 | extern void initenvironment(); |
| 42 | extern void initimageop(); |
| 43 | extern void initmath(); |
| 44 | extern void initmd5(); |
| 45 | extern void initnew(); |
| 46 | extern void initnt(); |
| 47 | extern void initregex(); |
| 48 | extern void initrgbimg(); |
| 49 | extern void initrotor(); |
Guido van Rossum | f2e98b4 | 1996-06-26 19:53:41 +0000 | [diff] [blame^] | 50 | extern void initselect(); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 51 | extern void initsignal(); |
Guido van Rossum | f2e98b4 | 1996-06-26 19:53:41 +0000 | [diff] [blame^] | 52 | extern void init_socket(); |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 53 | extern void initsoundex(); |
| 54 | extern void initstrop(); |
| 55 | extern void initstruct(); |
| 56 | extern void inittime(); |
| 57 | |
| 58 | /* -- ADDMODULE MARKER 1 -- */ |
| 59 | |
| 60 | extern void PyMarshal_Init(); |
| 61 | extern void initimp(); |
| 62 | |
| 63 | struct { |
| 64 | char *name; |
| 65 | void (*initfunc)(); |
| 66 | } inittab[] = { |
| 67 | |
| 68 | {"array", initarray}, |
| 69 | #ifdef M_I386 |
| 70 | {"audioop", initaudioop}, |
| 71 | #endif |
| 72 | {"binascii", initbinascii}, |
| 73 | {"environment", initenvironment}, |
| 74 | {"imageop", initimageop}, |
| 75 | {"math", initmath}, |
| 76 | {"md5", initmd5}, |
| 77 | {"new", initnew}, |
| 78 | {"nt", initnt}, /* Use the NT os functions, not posix */ |
| 79 | {"regex", initregex}, |
| 80 | {"rgbimg", initrgbimg}, |
| 81 | {"rotor", initrotor}, |
Guido van Rossum | f2e98b4 | 1996-06-26 19:53:41 +0000 | [diff] [blame^] | 82 | #ifdef USE_SELECT |
| 83 | {"select", initselect}, |
| 84 | #endif |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 85 | {"signal", initsignal}, |
| 86 | #ifdef USE_SOCKET |
Guido van Rossum | f2e98b4 | 1996-06-26 19:53:41 +0000 | [diff] [blame^] | 87 | {"_socket", init_socket}, |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 88 | #endif |
| 89 | {"soundex", initsoundex}, |
| 90 | {"strop", initstrop}, |
| 91 | {"struct", initstruct}, |
| 92 | {"time", inittime}, |
| 93 | |
| 94 | /* -- ADDMODULE MARKER 2 -- */ |
| 95 | |
| 96 | /* This module "lives in" with marshal.c */ |
| 97 | {"marshal", PyMarshal_Init}, |
| 98 | |
| 99 | /* This lives it with import.c */ |
| 100 | {"imp", initimp}, |
| 101 | |
| 102 | /* These entries are here for sys.builtin_module_names */ |
| 103 | {"__main__", NULL}, |
| 104 | {"__builtin__", NULL}, |
| 105 | {"sys", NULL}, |
| 106 | |
| 107 | /* Sentinel */ |
| 108 | {0, 0} |
| 109 | }; |