blob: a92eb3a12804bc096d1da2b6a997d9860c81c5ad [file] [log] [blame]
Jack Jansen76efd8e1995-02-24 22:53:16 +00001/***********************************************************
Jack Jansen42218ce1997-01-31 16:15:11 +00002Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
Jack Jansen76efd8e1995-02-24 22:53:16 +00003The Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23******************************************************************/
24
Jack Jansen6b6e61d1999-02-15 21:33:34 +000025/* Macintosh Python main program for both applets and interpreter */
Jack Jansen76efd8e1995-02-24 22:53:16 +000026
Jack Jansen6b6e61d1999-02-15 21:33:34 +000027#include <Resources.h>
28
29#ifdef __CFM68K__
Jack Jansen76efd8e1995-02-24 22:53:16 +000030#pragma lib_export on
31#endif
32
Jack Jansen6b6e61d1999-02-15 21:33:34 +000033extern void PyMac_InitApplet();
Jack Jansen76efd8e1995-02-24 22:53:16 +000034extern void PyMac_InitApplication();
35
Jack Jansen499a8af1996-08-19 11:38:03 +000036void
Jack Jansen76efd8e1995-02-24 22:53:16 +000037main() {
Jack Jansen6b6e61d1999-02-15 21:33:34 +000038 Handle mainpyc;
39
40 mainpyc = Get1NamedResource('PYC ', "\p__main__");
41 if (mainpyc != NULL)
42 PyMac_InitApplet();
43 else
44 PyMac_InitApplication();
Jack Jansen76efd8e1995-02-24 22:53:16 +000045}