Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 1 | /*********************************************************** |
Guido van Rossum | e35399e | 1993-01-10 18:33:56 +0000 | [diff] [blame] | 2 | Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum, |
| 3 | Amsterdam, The Netherlands. |
Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 28a83ab | 1991-01-18 15:32:01 +0000 | [diff] [blame] | 25 | /* Configurable Python configuration file */ |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 26 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 27 | /* These modules are normally always included, but *may* be taken out */ |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 28 | #define USE_MARSHAL 1 /* This is linked anyway */ |
Guido van Rossum | aee0879 | 1992-09-08 09:05:33 +0000 | [diff] [blame] | 29 | #define USE_MATH 1 |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 30 | #define USE_STRUCT 1 |
| 31 | #define USE_STROP 1 |
| 32 | #define USE_TIME 1 |
| 33 | |
| 34 | #ifdef macintosh |
| 35 | #define USE_AUDIOOP 1 |
| 36 | #define USE_IMAGEOP 1 |
| 37 | #define USE_MAC 1 |
| 38 | #define USE_REGEX 1 |
| 39 | #define USE_ROTOR 1 |
| 40 | #define USE_STDWIN 1 /* You may turn this off */ |
| 41 | #endif |
| 42 | |
| 43 | #ifdef unix |
| 44 | #define USE_GRP 1 /* Use together with pwd */ |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 45 | #define USE_POSIX 1 |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 46 | #define USE_PWD 1 /* Use together with grp */ |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 47 | #define USE_SELECT 1 |
| 48 | #define USE_SOCKET 1 |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 49 | #endif |
| 50 | |
| 51 | #include <stdio.h> |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 52 | |
Guido van Rossum | c888bf7 | 1992-06-03 17:05:13 +0000 | [diff] [blame] | 53 | #include "PROTO.h" |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 54 | #include "mymalloc.h" |
Guido van Rossum | c888bf7 | 1992-06-03 17:05:13 +0000 | [diff] [blame] | 55 | |
Guido van Rossum | 9b4e1b3 | 1991-12-30 01:43:49 +0000 | [diff] [blame] | 56 | #include "patchlevel.h" |
| 57 | |
Guido van Rossum | 450ed49 | 1992-01-19 16:27:42 +0000 | [diff] [blame] | 58 | #define VERSION "0.9.%d (%s)" |
Guido van Rossum | aa01141 | 1991-12-16 13:05:20 +0000 | [diff] [blame] | 59 | |
| 60 | #ifdef __DATE__ |
| 61 | #define DATE __DATE__ |
| 62 | #else |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 63 | #define DATE ">= 11 Jan 1993" |
Guido van Rossum | aa01141 | 1991-12-16 13:05:20 +0000 | [diff] [blame] | 64 | #endif |
Guido van Rossum | 9f462af | 1991-12-10 13:54:12 +0000 | [diff] [blame] | 65 | |
Guido van Rossum | 28a83ab | 1991-01-18 15:32:01 +0000 | [diff] [blame] | 66 | #ifdef USE_STDWIN |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 67 | #ifdef macintosh |
| 68 | #include ":::src:stdwin:H:stdwin.h" |
| 69 | #else /* !macintosh */ |
| 70 | #include "stdwin.h" |
| 71 | #endif /* !macintosh */ |
| 72 | #endif /* USE_STDWIN */ |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 73 | |
Guido van Rossum | aa01141 | 1991-12-16 13:05:20 +0000 | [diff] [blame] | 74 | char version[80]; |
| 75 | |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 76 | char *argv0; /* For dynamic loading in import.c */ |
Guido van Rossum | 450ed49 | 1992-01-19 16:27:42 +0000 | [diff] [blame] | 77 | |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 78 | /*ARGSUSED*/ |
| 79 | void |
| 80 | initargs(p_argc, p_argv) |
| 81 | int *p_argc; |
| 82 | char ***p_argv; |
| 83 | { |
Guido van Rossum | 9b4e1b3 | 1991-12-30 01:43:49 +0000 | [diff] [blame] | 84 | sprintf(version, VERSION, PATCHLEVEL, DATE); |
Guido van Rossum | aa01141 | 1991-12-16 13:05:20 +0000 | [diff] [blame] | 85 | |
Guido van Rossum | 450ed49 | 1992-01-19 16:27:42 +0000 | [diff] [blame] | 86 | argv0 = **p_argv; |
| 87 | |
Guido van Rossum | 28a83ab | 1991-01-18 15:32:01 +0000 | [diff] [blame] | 88 | #ifdef USE_STDWIN |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 89 | #ifdef THINK_C_3_0 |
| 90 | wsetstdio(1); |
Guido van Rossum | 28a83ab | 1991-01-18 15:32:01 +0000 | [diff] [blame] | 91 | #endif |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 92 | wargs(p_argc, p_argv); |
| 93 | #endif /* USE_STDWIN */ |
Guido van Rossum | 9f462af | 1991-12-10 13:54:12 +0000 | [diff] [blame] | 94 | if (*p_argc < 2 && isatty(0) && isatty(1)) |
| 95 | { |
| 96 | printf("Python %s.\n", version); |
Guido van Rossum | aa01141 | 1991-12-16 13:05:20 +0000 | [diff] [blame] | 97 | printf( |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 98 | "Copyright 1990, 1991, 1992, 1993 Stichting Mathematisch Centrum, Amsterdam\n"); |
Guido van Rossum | 9f462af | 1991-12-10 13:54:12 +0000 | [diff] [blame] | 99 | } |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | void |
| 103 | initcalls() |
| 104 | { |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | void |
| 108 | donecalls() |
| 109 | { |
Guido van Rossum | 28a83ab | 1991-01-18 15:32:01 +0000 | [diff] [blame] | 110 | #ifdef USE_STDWIN |
Guido van Rossum | 5b02dbc | 1991-06-07 13:55:41 +0000 | [diff] [blame] | 111 | wdone(); |
Guido van Rossum | 28a83ab | 1991-01-18 15:32:01 +0000 | [diff] [blame] | 112 | #endif |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 113 | #ifdef USE_AUDIO |
| 114 | asa_done(); |
| 115 | #endif |
| 116 | } |
| 117 | |
| 118 | #ifndef PYTHONPATH |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 119 | #ifdef macintosh |
| 120 | /* On the Mac, the search path is a space-separated list of directories */ |
| 121 | #define PYTHONPATH ": :lib :demo" |
| 122 | #else /* !macintosh */ |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 123 | #define PYTHONPATH ".:/usr/local/lib/python" |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 124 | #endif /* !macintosh */ |
| 125 | #endif /* !PYTHONPATH */ |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 126 | |
| 127 | extern char *getenv(); |
| 128 | |
| 129 | char * |
| 130 | getpythonpath() |
| 131 | { |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 132 | #ifdef macintosh |
| 133 | return PYTHONPATH; |
| 134 | #else /* !macintosh */ |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 135 | char *path = getenv("PYTHONPATH"); |
Guido van Rossum | c888bf7 | 1992-06-03 17:05:13 +0000 | [diff] [blame] | 136 | char *defpath = PYTHONPATH; |
| 137 | char *buf; |
| 138 | int n; |
| 139 | |
| 140 | if (path == 0 || *path == '\0') |
| 141 | return defpath; |
| 142 | n = strlen(path) + strlen(defpath) + 2; |
| 143 | buf = malloc(n); |
| 144 | if (buf == NULL) |
| 145 | return path; /* XXX too bad -- but not likely */ |
| 146 | strcpy(buf, path); |
| 147 | strcat(buf, ":"); |
| 148 | strcat(buf, defpath); |
| 149 | return buf; |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 150 | #endif /* !macintosh */ |
Guido van Rossum | aec7855 | 1990-12-20 23:03:58 +0000 | [diff] [blame] | 151 | } |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 152 | |
| 153 | |
| 154 | /* Table of built-in modules. |
| 155 | These are initialized when first imported. */ |
| 156 | |
| 157 | /* Standard modules */ |
Guido van Rossum | 6f7b959 | 1991-06-04 19:47:46 +0000 | [diff] [blame] | 158 | |
Guido van Rossum | 188f832 | 1991-09-10 14:55:08 +0000 | [diff] [blame] | 159 | #ifdef USE_AL |
| 160 | extern void inital(); |
| 161 | #endif |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 162 | #ifdef USE_AMOEBA |
| 163 | extern void initamoeba(); |
| 164 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 165 | #ifdef USE_AUDIO |
| 166 | extern void initaudio(); |
| 167 | #endif |
Guido van Rossum | c89705d | 1992-11-26 08:54:07 +0000 | [diff] [blame] | 168 | #ifdef USE_AUDIOOP |
| 169 | extern void initaudioop(); |
| 170 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 171 | #ifdef USE_CD |
| 172 | extern void initcd(); |
| 173 | #endif |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 174 | #ifdef USE_CL |
| 175 | extern void initcl(); |
| 176 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 177 | #ifdef USE_DBM |
| 178 | extern void initdbm(); |
| 179 | #endif |
| 180 | #ifdef USE_FCNTL |
| 181 | extern void initfcntl(); |
| 182 | #endif |
Guido van Rossum | 3fecef7 | 1991-08-16 08:58:56 +0000 | [diff] [blame] | 183 | #ifdef USE_FL |
| 184 | extern void initfl(); |
| 185 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 186 | #ifdef USE_FM |
| 187 | extern void initfm(); |
| 188 | #endif |
| 189 | #ifdef USE_GL |
| 190 | extern void initgl(); |
| 191 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 192 | #ifdef USE_GRP |
| 193 | extern void initgrp(); |
| 194 | #endif |
| 195 | #ifdef USE_IMGFILE |
| 196 | extern void initimgfile(); |
| 197 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 198 | #ifdef USE_JPEG |
| 199 | extern void initjpeg(); |
| 200 | #endif |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 201 | #ifdef USE_MAC |
| 202 | extern void initmac(); |
| 203 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 204 | #ifdef USE_MARSHAL |
| 205 | extern void initmarshal(); |
| 206 | #endif |
| 207 | #ifdef USE_MATH |
| 208 | extern void initmath(); |
| 209 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 210 | #ifdef USE_NIS |
| 211 | extern void initnis(); |
Guido van Rossum | 2abc7a6 | 1991-04-03 19:01:18 +0000 | [diff] [blame] | 212 | #endif |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 213 | #ifdef USE_PANEL |
| 214 | extern void initpanel(); |
| 215 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 216 | #ifdef USE_POSIX |
| 217 | extern void initposix(); |
| 218 | #endif |
| 219 | #ifdef USE_PWD |
| 220 | extern void initpwd(); |
| 221 | #endif |
Guido van Rossum | 38fbf52 | 1992-08-12 15:28:52 +0000 | [diff] [blame] | 222 | #ifdef USE_REGEX |
| 223 | extern void initregex(); |
| 224 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 225 | #ifdef USE_ROTOR |
| 226 | extern void initrotor(); |
| 227 | #endif |
| 228 | #ifdef USE_SELECT |
| 229 | extern void initselect(); |
| 230 | #endif |
| 231 | #ifdef USE_SGI |
| 232 | extern void initsgi(); |
| 233 | #endif |
| 234 | #ifdef USE_SOCKET |
| 235 | extern void initsocket(); |
| 236 | #endif |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 237 | #ifdef USE_STDWIN |
Guido van Rossum | 5b02dbc | 1991-06-07 13:55:41 +0000 | [diff] [blame] | 238 | extern void initstdwin(); |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 239 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 240 | #ifdef USE_STROP |
| 241 | extern void initstrop(); |
| 242 | #endif |
| 243 | #ifdef USE_STRUCT |
| 244 | extern void initstruct(); |
| 245 | #endif |
| 246 | #ifdef USE_SUNAUDIODEV |
| 247 | extern void initsunaudiodev(); |
| 248 | #endif |
Guido van Rossum | 1984f1e | 1992-08-04 12:41:02 +0000 | [diff] [blame] | 249 | #ifdef USE_THREAD |
| 250 | extern void initthread(); |
| 251 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 252 | #ifdef USE_SV |
| 253 | extern void initsv(); |
Guido van Rossum | 38fbf52 | 1992-08-12 15:28:52 +0000 | [diff] [blame] | 254 | #endif |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 255 | #ifdef USE_TIME |
| 256 | extern void inittime(); |
| 257 | #endif |
Guido van Rossum | 0317a47 | 1992-10-26 13:40:15 +0000 | [diff] [blame] | 258 | #ifdef USE_IMAGEOP |
| 259 | extern void initimageop(); |
| 260 | #endif |
Guido van Rossum | 8ed2941 | 1992-12-08 16:10:18 +0000 | [diff] [blame] | 261 | #ifdef USE_MPZ |
| 262 | extern void initmpz(); |
| 263 | #endif |
| 264 | #ifdef USE_MD5 |
| 265 | extern void initmd5(); |
| 266 | #endif |
Guido van Rossum | 3a40ae4 | 1992-09-25 21:54:05 +0000 | [diff] [blame] | 267 | /* -- ADDMODULE MARKER 1 -- */ |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 268 | |
| 269 | struct { |
| 270 | char *name; |
| 271 | void (*initfunc)(); |
| 272 | } inittab[] = { |
| 273 | |
Guido van Rossum | 188f832 | 1991-09-10 14:55:08 +0000 | [diff] [blame] | 274 | #ifdef USE_AL |
| 275 | {"al", inital}, |
| 276 | #endif |
| 277 | |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 278 | #ifdef USE_AMOEBA |
| 279 | {"amoeba", initamoeba}, |
| 280 | #endif |
| 281 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 282 | #ifdef USE_AUDIO |
| 283 | {"audio", initaudio}, |
| 284 | #endif |
| 285 | |
Guido van Rossum | c89705d | 1992-11-26 08:54:07 +0000 | [diff] [blame] | 286 | #ifdef USE_AUDIOOP |
| 287 | {"audioop", initaudioop}, |
| 288 | #endif |
| 289 | |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 290 | #ifdef USE_CD |
| 291 | {"cd", initcd}, |
| 292 | #endif |
| 293 | |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 294 | #ifdef USE_CL |
| 295 | {"cl", initcl}, |
| 296 | #endif |
| 297 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 298 | #ifdef USE_DBM |
| 299 | {"dbm", initdbm}, |
| 300 | #endif |
| 301 | |
| 302 | #ifdef USE_FCNTL |
| 303 | {"fcntl", initfcntl}, |
| 304 | #endif |
| 305 | |
Guido van Rossum | 3fecef7 | 1991-08-16 08:58:56 +0000 | [diff] [blame] | 306 | #ifdef USE_FL |
| 307 | {"fl", initfl}, |
| 308 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 309 | |
| 310 | #ifdef USE_FM |
| 311 | {"fm", initfm}, |
Guido van Rossum | 2abc7a6 | 1991-04-03 19:01:18 +0000 | [diff] [blame] | 312 | #endif |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 313 | |
| 314 | #ifdef USE_GL |
| 315 | {"gl", initgl}, |
| 316 | #endif |
| 317 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 318 | #ifdef USE_GRP |
| 319 | {"grp", initgrp}, |
| 320 | #endif |
| 321 | |
| 322 | #ifdef USE_IMGFILE |
| 323 | {"imgfile", initimgfile}, |
| 324 | #endif |
| 325 | |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 326 | #ifdef USE_JPEG |
| 327 | {"jpeg", initjpeg}, |
| 328 | #endif |
| 329 | |
Guido van Rossum | 0b0db8e | 1993-01-21 16:07:51 +0000 | [diff] [blame^] | 330 | #ifdef USE_MAC |
| 331 | {"mac", initmac}, |
| 332 | #endif |
| 333 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 334 | #ifdef USE_MARSHAL |
| 335 | {"marshal", initmarshal}, |
| 336 | #endif |
| 337 | |
| 338 | #ifdef USE_MATH |
| 339 | {"math", initmath}, |
| 340 | #endif |
| 341 | |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 342 | #ifdef USE_NIS |
| 343 | {"nis", initnis}, |
| 344 | #endif |
| 345 | |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 346 | #ifdef USE_PANEL |
| 347 | {"pnl", initpanel}, |
| 348 | #endif |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 349 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 350 | #ifdef USE_POSIX |
| 351 | {"posix", initposix}, |
| 352 | #endif |
| 353 | |
| 354 | #ifdef USE_PWD |
| 355 | {"pwd", initpwd}, |
| 356 | #endif |
| 357 | |
Guido van Rossum | 38fbf52 | 1992-08-12 15:28:52 +0000 | [diff] [blame] | 358 | #ifdef USE_REGEX |
| 359 | {"regex", initregex}, |
| 360 | #endif |
| 361 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 362 | #ifdef USE_ROTOR |
| 363 | {"rotor", initrotor}, |
| 364 | #endif |
| 365 | |
| 366 | #ifdef USE_SELECT |
| 367 | {"select", initselect}, |
| 368 | #endif |
| 369 | |
| 370 | #ifdef USE_SGI |
| 371 | {"sgi", initsgi}, |
| 372 | #endif |
| 373 | |
| 374 | #ifdef USE_SOCKET |
| 375 | {"socket", initsocket}, |
| 376 | #endif |
| 377 | |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 378 | #ifdef USE_STDWIN |
Guido van Rossum | 5b02dbc | 1991-06-07 13:55:41 +0000 | [diff] [blame] | 379 | {"stdwin", initstdwin}, |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 380 | #endif |
| 381 | |
Guido van Rossum | aee0879 | 1992-09-08 09:05:33 +0000 | [diff] [blame] | 382 | #ifdef USE_STROP |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 383 | {"strop", initstrop}, |
| 384 | #endif |
| 385 | |
| 386 | #ifdef USE_STRUCT |
| 387 | {"struct", initstruct}, |
| 388 | #endif |
| 389 | |
| 390 | #ifdef USE_SUNAUDIODEV |
| 391 | {"sunaudiodev", initsunaudiodev}, |
Guido van Rossum | 1984f1e | 1992-08-04 12:41:02 +0000 | [diff] [blame] | 392 | #endif |
| 393 | |
Guido van Rossum | b001f7a | 1992-08-19 16:44:41 +0000 | [diff] [blame] | 394 | #ifdef USE_SV |
| 395 | {"sv", initsv}, |
Guido van Rossum | 38fbf52 | 1992-08-12 15:28:52 +0000 | [diff] [blame] | 396 | #endif |
| 397 | |
Guido van Rossum | 97f0277 | 1992-09-03 20:49:55 +0000 | [diff] [blame] | 398 | #ifdef USE_THREAD |
| 399 | {"thread", initthread}, |
| 400 | #endif |
| 401 | |
| 402 | #ifdef USE_TIME |
| 403 | {"time", inittime}, |
| 404 | #endif |
| 405 | |
Guido van Rossum | 0317a47 | 1992-10-26 13:40:15 +0000 | [diff] [blame] | 406 | #ifdef USE_IMAGEOP |
| 407 | {"imageop", initimageop}, |
| 408 | #endif |
| 409 | |
Guido van Rossum | 8ed2941 | 1992-12-08 16:10:18 +0000 | [diff] [blame] | 410 | #ifdef USE_MPZ |
| 411 | {"mpz", initmpz}, |
| 412 | #endif |
| 413 | |
| 414 | #ifdef USE_MD5 |
| 415 | {"md5", initmd5}, |
| 416 | #endif |
| 417 | |
Guido van Rossum | 3a40ae4 | 1992-09-25 21:54:05 +0000 | [diff] [blame] | 418 | /* -- ADDMODULE MARKER 2 -- */ |
| 419 | |
Guido van Rossum | 59e53a5 | 1991-02-19 12:22:24 +0000 | [diff] [blame] | 420 | {0, 0} /* Sentinel */ |
| 421 | }; |