Kaydet (Commit) 97f02772 authored tarafından Guido van Rossum's avatar Guido van Rossum

Restructured (yet again) to treat all modules more alike.

üst cf7448bf
...@@ -24,6 +24,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -24,6 +24,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Configurable Python configuration file */ /* Configurable Python configuration file */
/* These modules are normally always included, but *may* be taken out */
#define USE_GRP 1 /* Use together with pwd */
#define USE_MARSHAL 1 /* This is linked anyway */
#define USE_PWD 1 /* Use together with grp */
#define USE_POSIX 1
#define USE_SELECT 1
#define USE_SOCKET 1
#define USE_TIME 1
#define USE_MATH 1
#include "PROTO.h" #include "PROTO.h"
#include "mymalloc.h" #include "mymalloc.h"
...@@ -85,7 +95,7 @@ donecalls() ...@@ -85,7 +95,7 @@ donecalls()
} }
#ifndef PYTHONPATH #ifndef PYTHONPATH
#define PYTHONPATH ".:/usr/local/lib/python" #define PYTHONPATH ".:/usr/local/lib/python"
#endif #endif
extern char *getenv(); extern char *getenv();
...@@ -115,27 +125,25 @@ getpythonpath() ...@@ -115,27 +125,25 @@ getpythonpath()
These are initialized when first imported. */ These are initialized when first imported. */
/* Standard modules */ /* Standard modules */
extern void initgrp();
extern void initmarshal();
extern void initmath();
extern void initposix();
extern void initpwd();
extern void initselect();
extern void initsocket();
extern void inittime();
#ifdef USE_AUDIO
extern void initaudio();
#endif
#ifdef USE_AL #ifdef USE_AL
extern void inital(); extern void inital();
#endif #endif
#ifdef USE_AMOEBA #ifdef USE_AMOEBA
extern void initamoeba(); extern void initamoeba();
#endif #endif
#ifdef USE_AUDIO
extern void initaudio();
#endif
#ifdef USE_CD #ifdef USE_CD
extern void initcd(); extern void initcd();
#endif #endif
#ifdef USE_DBM
extern void initdbm();
#endif
#ifdef USE_FCNTL
extern void initfcntl();
#endif
#ifdef USE_FL #ifdef USE_FL
extern void initfl(); extern void initfl();
#endif #endif
...@@ -145,50 +153,75 @@ extern void initfm(); ...@@ -145,50 +153,75 @@ extern void initfm();
#ifdef USE_GL #ifdef USE_GL
extern void initgl(); extern void initgl();
#endif #endif
#ifdef USE_GRP
extern void initgrp();
#endif
#ifdef USE_IMGFILE
extern void initimgfile();
#endif
#ifdef USE_JPEG #ifdef USE_JPEG
extern void initjpeg(); extern void initjpeg();
#endif #endif
#ifdef USE_MARSHAL
extern void initmarshal();
#endif
#ifdef USE_MATH
extern void initmath();
#endif
#ifdef USE_NIS #ifdef USE_NIS
extern void initnis(); extern void initnis();
#endif #endif
#ifdef USE_PANEL #ifdef USE_PANEL
extern void initpanel(); extern void initpanel();
#endif #endif
#ifdef USE_POSIX
extern void initposix();
#endif
#ifdef USE_PWD
extern void initpwd();
#endif
#ifdef USE_REGEX #ifdef USE_REGEX
extern void initregex(); extern void initregex();
#endif #endif
#ifdef USE_ROTOR
extern void initrotor();
#endif
#ifdef USE_SELECT
extern void initselect();
#endif
#ifdef USE_SGI
extern void initsgi();
#endif
#ifdef USE_SOCKET
extern void initsocket();
#endif
#ifdef USE_STDWIN #ifdef USE_STDWIN
extern void initstdwin(); extern void initstdwin();
#endif #endif
#ifdef USE_STROP
extern void initstrop();
#endif
#ifdef USE_STRUCT
extern void initstruct();
#endif
#ifdef USE_SUNAUDIODEV
extern void initsunaudiodev();
#endif
#ifdef USE_THREAD #ifdef USE_THREAD
extern void initthread(); extern void initthread();
#endif #endif
#ifdef USE_SV #ifdef USE_SV
extern void initsv(); extern void initsv();
#endif #endif
#ifdef USE_TIME
extern void inittime();
#endif
struct { struct {
char *name; char *name;
void (*initfunc)(); void (*initfunc)();
} inittab[] = { } inittab[] = {
/* Standard modules, in alphabetical order */
{"grp", initgrp},
{"marshal", initmarshal},
{"math", initmath},
{"posix", initposix},
{"pwd", initpwd},
{"select", initselect},
{"socket", initsocket},
{"time", inittime},
/* Optional modules, in alphabetical order */
#ifdef USE_AUDIO
{"audio", initaudio},
#endif
#ifdef USE_AL #ifdef USE_AL
{"al", inital}, {"al", inital},
#endif #endif
...@@ -197,10 +230,22 @@ struct { ...@@ -197,10 +230,22 @@ struct {
{"amoeba", initamoeba}, {"amoeba", initamoeba},
#endif #endif
#ifdef USE_AUDIO
{"audio", initaudio},
#endif
#ifdef USE_CD #ifdef USE_CD
{"cd", initcd}, {"cd", initcd},
#endif #endif
#ifdef USE_DBM
{"dbm", initdbm},
#endif
#ifdef USE_FCNTL
{"fcntl", initfcntl},
#endif
#ifdef USE_FL #ifdef USE_FL
{"fl", initfl}, {"fl", initfl},
#endif #endif
...@@ -213,10 +258,26 @@ struct { ...@@ -213,10 +258,26 @@ struct {
{"gl", initgl}, {"gl", initgl},
#endif #endif
#ifdef USE_GRP
{"grp", initgrp},
#endif
#ifdef USE_IMGFILE
{"imgfile", initimgfile},
#endif
#ifdef USE_JPEG #ifdef USE_JPEG
{"jpeg", initjpeg}, {"jpeg", initjpeg},
#endif #endif
#ifdef USE_MARSHAL
{"marshal", initmarshal},
#endif
#ifdef USE_MATH
{"math", initmath},
#endif
#ifdef USE_NIS #ifdef USE_NIS
{"nis", initnis}, {"nis", initnis},
#endif #endif
...@@ -225,21 +286,61 @@ struct { ...@@ -225,21 +286,61 @@ struct {
{"pnl", initpanel}, {"pnl", initpanel},
#endif #endif
#ifdef USE_POSIX
{"posix", initposix},
#endif
#ifdef USE_PWD
{"pwd", initpwd},
#endif
#ifdef USE_REGEX #ifdef USE_REGEX
{"regex", initregex}, {"regex", initregex},
#endif #endif
#ifdef USE_ROTOR
{"rotor", initrotor},
#endif
#ifdef USE_SELECT
{"select", initselect},
#endif
#ifdef USE_SGI
{"sgi", initsgi},
#endif
#ifdef USE_SOCKET
{"socket", initsocket},
#endif
#ifdef USE_STDWIN #ifdef USE_STDWIN
{"stdwin", initstdwin}, {"stdwin", initstdwin},
#endif #endif
#ifdef USE_THREAD #ifdef USE_STRUCT
{"thread", initthread}, {"strop", initstrop},
#endif
#ifdef USE_STRUCT
{"struct", initstruct},
#endif
#ifdef USE_SUNAUDIODEV
{"sunaudiodev", initsunaudiodev},
#endif #endif
#ifdef USE_SV #ifdef USE_SV
{"sv", initsv}, {"sv", initsv},
#endif #endif
#ifdef USE_THREAD
{"thread", initthread},
#endif
#ifdef USE_TIME
{"time", inittime},
#endif
{0, 0} /* Sentinel */ {0, 0} /* Sentinel */
}; };
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