blob: 3885d88a70ebd400734b3608d076b3c14695e9d8 [file] [log] [blame]
Guido van Rossumb0f3c821994-08-23 13:34:25 +00001/***********************************************************
2Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
3Amsterdam, The 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
25/* Macintosh Python main program */
26
27#ifdef HAVE_CONFIG_H
28#include "config.h"
29#endif
30
31/* Comment this out if you're not interested in STDWIN */
32#define USE_STDWIN
33
34#ifdef THINK_C
35#define CONSOLE_IO
36#endif
37
38#include <stdio.h>
39#include <string.h>
40
41#ifdef CONSOLE_IO
42#include <console.h>
43#endif
44
45main(argc, argv)
46 int argc;
47 char **argv;
48{
49#ifdef USE_STDWIN
50 /* Use STDWIN's wargs() to set argc/argv to list of files to open */
51 wargs(&argc, &argv);
52 /* Put About Python... in Apple menu */
53 {
54 extern char *about_message;
55 extern char *about_item;
56 extern char *getversion(), *getcopyright();
57 static char buf[256];
58 sprintf(buf, "Python %s\r\
59\r\
60%s\r\
61\r\
62Author: Guido van Rossum <guido@cwi.nl>\r\
63FTP: host ftp.cwi.nl, directory pub/python\r\
64Newsgroup: comp.lang.python\r\
65\r\
66Motto: \"Nobody expects the Spanish Inquisition!\"",
67 getversion(), getcopyright());
68 about_message = buf;
69 about_item = "About Python...";
70 }
71#endif /* USE_STDWIN */
72#ifdef CONSOLE_IO
73 if (argc >= 1 && argv[0][0] != '\0') {
74 static char buf[256];
75 buf[0] = strlen(argv[0]);
76 strncpy(buf+1, argv[0], buf[0]);
77 console_options.title = (unsigned char *)buf;
78 }
79 else
80 console_options.title = "\pPython";
81#endif /* CONSOLE_IO */
82 realmain(argc, argv);
83}