cpython/Mac/Modules/macconfig.c

318 lines
7.3 KiB
C
Raw Normal View History

/***********************************************************
Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
1995-01-08 10:33:34 -04:00
The Netherlands.
1994-01-05 12:17:15 -04:00
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
1994-08-23 10:28:34 -03:00
/* Macintosh Python configuration file */
1994-01-05 12:17:15 -04:00
#include "Python.h"
1994-01-05 12:17:15 -04:00
/* Table of built-in modules.
These are initialized when first imported.
Note: selection of optional extensions is now generally done by the
makesetup script. */
extern void initarray();
extern void initmath();
1996-01-29 11:47:19 -04:00
#ifndef WITHOUT_COMPLEX
extern void initcmath();
#endif
1994-01-05 12:17:15 -04:00
extern void initparser();
extern void initmac();
extern void initMacOS();
1994-01-05 12:17:15 -04:00
extern void initregex();
extern void initstrop();
extern void initstruct();
extern void inittime();
extern void initdbm();
extern void initfcntl();
extern void initnis();
extern void initpwd();
extern void initgrp();
extern void initcrypt();
1994-01-05 12:17:15 -04:00
extern void initselect();
extern void init_socket();
1994-01-05 12:17:15 -04:00
extern void initaudioop();
extern void initimageop();
extern void initrgbimg();
extern void initmd5();
extern void initmpz();
extern void initrotor();
extern void inital();
extern void initcd();
extern void initcl();
extern void initfm();
extern void initgl();
extern void initimgfile();
1994-08-23 10:28:34 -03:00
extern void initimgformat();
1994-01-05 12:17:15 -04:00
extern void initsgi();
extern void initsv();
extern void initfl();
extern void initthread();
extern void inittiming();
extern void initsignal();
extern void initnew();
extern void initdl();
extern void initsyslog();
1994-08-23 10:28:34 -03:00
extern void initgestalt();
extern void initmacfs();
1995-08-07 11:35:24 -03:00
extern void initbinascii();
extern void initsoundex();
extern void initoperator();
extern void initerrno();
1997-10-08 12:34:03 -03:00
extern void initpcre();
extern void initunicodedata();
extern void init_codecs();
#ifdef USE_MACCTB
extern void initctb();
#endif
#ifdef USE_MACSPEECH
extern void initmacspeech();
#endif
#ifdef USE_MACTCP
extern void initmacdnr();
extern void initmactcp();
#endif
#ifdef USE_IC
extern void initicglue();
#endif
#ifdef USE_TOOLBOX
#ifndef USE_CORE_TOOLBOX
#define USE_CORE_TOOLBOX
#endif
extern void initApp();
1996-01-15 10:39:11 -04:00
extern void initFm();
extern void initHelp();
extern void initIcn();
1995-08-31 10:58:28 -03:00
extern void initList();
extern void initQdoffs();
extern void initSnd();
1998-04-15 11:09:19 -03:00
extern void initSndihooks();
1996-04-12 13:27:54 -03:00
extern void initScrap();
extern void initTE();
extern void initColorPicker();
extern void initPrinting();
#endif
#ifdef USE_CORE_TOOLBOX
extern void initAE();
extern void initCtl();
extern void initDlg();
extern void initDrag();
2000-06-20 04:42:23 -03:00
extern void initEvt();
extern void initMenu();
extern void initQd();
extern void initRes();
extern void initWin();
extern void initNav();
#endif
#ifdef USE_QT
extern void initCm();
extern void initQt();
#endif
1994-01-05 12:17:15 -04:00
#ifdef USE_IMG
extern void initimgcolormap();
extern void initimgformat();
extern void initimggif();
extern void initimgjpeg();
extern void initimgpbm();
extern void initimgppm();
extern void initimgpgm();
extern void initimgtiff();
extern void initimgsgi();
1997-01-30 11:47:08 -04:00
extern void initimgpng();
extern void initimgop();
#endif
1995-11-10 10:54:53 -04:00
#ifdef USE_TK
extern void init_tkinter();
#endif
1996-02-14 12:02:30 -04:00
#ifdef USE_GUSI
extern void init_socket();
1996-02-14 12:02:30 -04:00
extern void initselect();
#endif
1996-05-20 08:31:13 -03:00
#ifdef USE_WASTE
extern void initwaste();
#endif
1996-12-23 13:21:20 -04:00
#ifdef USE_GDBM
extern void initgdbm();
#endif
1997-06-03 12:28:52 -03:00
#ifdef USE_ZLIB
extern void initzlib();
#endif
2000-04-07 06:24:53 -03:00
#ifdef WITH_THREAD
extern void initthread();
#endif
#ifdef USE_PYEXPAT
extern void initpyexpat();
#endif
1998-01-06 08:08:49 -04:00
extern void initcPickle();
extern void initcStringIO();
2000-04-07 06:24:53 -03:00
extern void init_codecs();
extern void initsha();
2000-06-20 04:42:23 -03:00
extern void init_locale();
#ifdef USE_UCNHASH
extern void initucnhash();
#endif
extern void init_sre();
1994-01-05 12:17:15 -04:00
/* -- ADDMODULE MARKER 1 -- */
extern void PyMarshal_Init();
extern void initimp();
1994-01-05 12:17:15 -04:00
1997-05-23 12:36:53 -03:00
struct _inittab _PyImport_Inittab[] = {
1994-01-05 12:17:15 -04:00
{"array", initarray},
{"math", initmath},
1996-01-29 11:47:19 -04:00
#ifndef WITHOUT_COMPLEX
{"cmath", initcmath},
#endif
1994-01-05 12:17:15 -04:00
{"parser", initparser},
{"mac", initmac},
{"MacOS", initMacOS},
1994-01-05 12:17:15 -04:00
{"regex", initregex},
{"strop", initstrop},
{"struct", initstruct},
{"time", inittime},
{"audioop", initaudioop},
{"imageop", initimageop},
{"rgbimg", initrgbimg},
{"md5", initmd5},
{"rotor", initrotor},
{"new", initnew},
1994-08-23 10:28:34 -03:00
{"gestalt", initgestalt},
{"macfs", initmacfs},
1995-08-07 11:35:24 -03:00
{"binascii", initbinascii},
{"soundex", initsoundex},
{"operator", initoperator},
{"errno", initerrno},
1997-10-08 12:34:03 -03:00
{"pcre", initpcre},
{"unicodedata", initunicodedata},
{"_codecs", init_codecs},
{"sha", initsha},
#ifdef USE_MACCTB
{"ctb", initctb},
#endif
/* This could probably be made to work on other compilers... */
#ifdef USE_MACSPEECH
{"macspeech", initmacspeech},
#endif
#ifdef USE_MACTCP
{"macdnr", initmacdnr},
{"mactcp", initmactcp},
1995-01-18 19:59:06 -04:00
#endif
#ifdef USE_IC
{"icglue", initicglue},
#endif
#ifdef USE_CORE_TOOLBOX
{"AE", initAE},
{"Ctl", initCtl},
{"Dlg", initDlg},
{"Drag", initDrag},
2000-06-20 04:42:23 -03:00
{"Evt", initEvt},
{"Menu", initMenu},
{"Nav", initNav},
{"Qd", initQd},
{"Win", initWin},
{"Res", initRes},
#endif
#ifdef USE_TOOLBOX
{"App", initApp},
1996-01-15 10:39:11 -04:00
{"Fm", initFm},
{"Icn", initIcn},
1995-08-31 10:58:28 -03:00
{"List", initList},
{"Qdoffs", initQdoffs},
{"Snd", initSnd},
1998-04-15 11:09:19 -03:00
{"Sndihooks", initSndihooks},
#if !TARGET_API_MAC_CARBON_NOTYET
/* Carbon scrap manager is completely different */
1996-04-12 13:27:54 -03:00
{"Scrap", initScrap},
#endif
1996-04-12 13:27:54 -03:00
{"TE", initTE},
{"ColorPicker", initColorPicker},
#if !TARGET_API_MAC_CARBON
{"Help", initHelp},
{"Printing", initPrinting},
#endif
#endif
#ifdef USE_QT
{"Cm", initCm},
{"Qt", initQt},
#endif
#ifdef USE_IMG
{"imgcolormap", initimgcolormap},
{"imgformat", initimgformat},
{"imggif", initimggif},
{"imgjpeg", initimgjpeg},
{"imgpbm", initimgpbm},
{"imgppm", initimgppm},
{"imgpgm", initimgpgm},
{"imgtiff", initimgtiff},
{"imgsgi", initimgsgi},
1997-01-30 11:47:08 -04:00
{"imgpng", initimgpng},
{"imgop", initimgop},
#endif
1995-11-10 10:54:53 -04:00
#ifdef USE_TK
{"_tkinter", init_tkinter},
#endif
1996-02-14 12:02:30 -04:00
#ifdef USE_GUSI
{"_socket", init_socket},
1996-02-14 12:02:30 -04:00
{"select", initselect},
#endif
1996-05-20 08:31:13 -03:00
#ifdef USE_WASTE
{"waste", initwaste},
#endif
1996-12-23 13:21:20 -04:00
#ifdef USE_GDBM
{"gdbm", initgdbm},
#endif /* USE_GDBM */
1997-06-03 12:28:52 -03:00
#ifdef USE_ZLIB
{"zlib", initzlib},
#endif
2000-04-07 06:24:53 -03:00
#ifdef WITH_THREAD
{"thread", initthread},
#endif
#ifdef USE_PYEXPAT
{"pyexpat", initpyexpat},
2000-04-07 06:24:53 -03:00
#endif
1998-01-06 08:08:49 -04:00
{"cPickle", initcPickle},
{"cStringIO", initcStringIO},
2000-06-20 04:42:23 -03:00
{"_locale", init_locale},
#ifdef USE_UCNHASH
{"ucnhash", initucnhash},
#endif
{"_sre", init_sre},
1994-01-05 12:17:15 -04:00
/* -- ADDMODULE MARKER 2 -- */
/* This module "lives in" with marshal.c */
{"marshal", PyMarshal_Init},
/* This module "lives in" with import.c */
{"imp", initimp},
1994-01-05 12:17:15 -04:00
/* These entries are here for sys.builtin_module_names */
{"__main__", NULL},
{"__builtin__", NULL},
{"sys", NULL},
/* Sentinel */
{0, 0}
};