Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 1 | /*********************************************************** |
| 2 | Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum, |
| 3 | Amsterdam, The Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI not be used in advertising or publicity pertaining to |
| 13 | distribution of the software without specific, written prior permission. |
| 14 | |
| 15 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 16 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 18 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 20 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 21 | OF 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 | |
Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 31 | #ifdef THINK_C |
| 32 | #define CONSOLE_IO |
| 33 | #endif |
| 34 | |
| 35 | #include <stdio.h> |
| 36 | #include <string.h> |
| 37 | |
| 38 | #ifdef CONSOLE_IO |
| 39 | #include <console.h> |
| 40 | #endif |
| 41 | |
| 42 | main(argc, argv) |
| 43 | int argc; |
| 44 | char **argv; |
| 45 | { |
| 46 | #ifdef USE_STDWIN |
| 47 | /* Use STDWIN's wargs() to set argc/argv to list of files to open */ |
| 48 | wargs(&argc, &argv); |
| 49 | /* Put About Python... in Apple menu */ |
| 50 | { |
| 51 | extern char *about_message; |
| 52 | extern char *about_item; |
| 53 | extern char *getversion(), *getcopyright(); |
| 54 | static char buf[256]; |
| 55 | sprintf(buf, "Python %s\r\ |
| 56 | \r\ |
| 57 | %s\r\ |
| 58 | \r\ |
| 59 | Author: Guido van Rossum <guido@cwi.nl>\r\ |
| 60 | FTP: host ftp.cwi.nl, directory pub/python\r\ |
| 61 | Newsgroup: comp.lang.python\r\ |
| 62 | \r\ |
| 63 | Motto: \"Nobody expects the Spanish Inquisition!\"", |
| 64 | getversion(), getcopyright()); |
| 65 | about_message = buf; |
| 66 | about_item = "About Python..."; |
| 67 | } |
| 68 | #endif /* USE_STDWIN */ |
| 69 | #ifdef CONSOLE_IO |
| 70 | if (argc >= 1 && argv[0][0] != '\0') { |
| 71 | static char buf[256]; |
| 72 | buf[0] = strlen(argv[0]); |
| 73 | strncpy(buf+1, argv[0], buf[0]); |
| 74 | console_options.title = (unsigned char *)buf; |
| 75 | } |
| 76 | else |
| 77 | console_options.title = "\pPython"; |
| 78 | #endif /* CONSOLE_IO */ |
| 79 | realmain(argc, argv); |
| 80 | } |