annotate Mac/Python/macapplication.c @ 10171:73e5e3f51b87 legacy-trunk

(finally) unified the interpreter and the applet as Just suggested ages ago. The resulting program is called PythonInterpreter.
author Jack Jansen <jack.jansen@cwi.nl>
date Mon, 15 Feb 1999 21:33:34 +0000
parents d6b292a33cfe
children 744db86e0311
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
1 /***********************************************************
5079
d6b292a33cfe Added/updated copyright notices
Jack Jansen <jack.jansen@cwi.nl>
parents: 4021
diff changeset
2 Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3 The Netherlands.
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
4
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
5 All Rights Reserved
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
6
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
7 Permission to use, copy, modify, and distribute this software and its
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8 documentation for any purpose and without fee is hereby granted,
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
9 provided that the above copyright notice appear in all copies and that
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
10 both that copyright notice and this permission notice appear in
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
11 supporting documentation, and that the names of Stichting Mathematisch
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
12 Centrum or CWI not be used in advertising or publicity pertaining to
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
13 distribution of the software without specific, written prior permission.
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
14
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
15 STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
16 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
17 FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
18 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
21 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
22
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
23 ******************************************************************/
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
24
10171
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
25 /* Macintosh Python main program for both applets and interpreter */
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
26
10171
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
27 #include <Resources.h>
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
28
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
29 #ifdef __CFM68K__
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30 #pragma lib_export on
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
31 #endif
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
32
10171
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
33 extern void PyMac_InitApplet();
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
34 extern void PyMac_InitApplication();
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
35
4021
cf2630a41f87 Removed debug printf
Jack Jansen <jack.jansen@cwi.nl>
parents: 3422
diff changeset
36 void
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
37 main() {
10171
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
38 Handle mainpyc;
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
39
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
40 mainpyc = Get1NamedResource('PYC ', "\p__main__");
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
41 if (mainpyc != NULL)
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
42 PyMac_InitApplet();
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
43 else
73e5e3f51b87 (finally) unified the interpreter and the applet as Just suggested ages ago. The
Jack Jansen <jack.jansen@cwi.nl>
parents: 5079
diff changeset
44 PyMac_InitApplication();
2426
9bf18996eed8 MAde a few things more orthogonal and did some cleanups:
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45 }