Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 1 | /*********************************************************** |
Guido van Rossum | 9954699 | 1995-01-08 14:33:34 +0000 | [diff] [blame] | 2 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | The Netherlands. |
Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 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 | 5c83252 | 1995-01-17 15:57:48 +0000 | [diff] [blame^] | 31 | #include "rename2.h" |
| 32 | |
Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 33 | #ifdef THINK_C |
| 34 | #define CONSOLE_IO |
| 35 | #endif |
| 36 | |
| 37 | #include <stdio.h> |
| 38 | #include <string.h> |
| 39 | |
| 40 | #ifdef CONSOLE_IO |
| 41 | #include <console.h> |
| 42 | #endif |
| 43 | |
Jack Jansen | bac428d | 1994-12-14 13:47:30 +0000 | [diff] [blame] | 44 | char *fileargument; |
| 45 | |
Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 46 | main(argc, argv) |
| 47 | int argc; |
| 48 | char **argv; |
| 49 | { |
| 50 | #ifdef USE_STDWIN |
| 51 | /* Use STDWIN's wargs() to set argc/argv to list of files to open */ |
| 52 | wargs(&argc, &argv); |
| 53 | /* Put About Python... in Apple menu */ |
| 54 | { |
| 55 | extern char *about_message; |
| 56 | extern char *about_item; |
| 57 | extern char *getversion(), *getcopyright(); |
Jack Jansen | bac428d | 1994-12-14 13:47:30 +0000 | [diff] [blame] | 58 | static char buf[1024]; |
Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 59 | sprintf(buf, "Python %s\r\ |
| 60 | \r\ |
| 61 | %s\r\ |
| 62 | \r\ |
| 63 | Author: Guido van Rossum <guido@cwi.nl>\r\ |
| 64 | FTP: host ftp.cwi.nl, directory pub/python\r\ |
| 65 | Newsgroup: comp.lang.python\r\ |
| 66 | \r\ |
| 67 | Motto: \"Nobody expects the Spanish Inquisition!\"", |
| 68 | getversion(), getcopyright()); |
| 69 | about_message = buf; |
| 70 | about_item = "About Python..."; |
| 71 | } |
| 72 | #endif /* USE_STDWIN */ |
| 73 | #ifdef CONSOLE_IO |
| 74 | if (argc >= 1 && argv[0][0] != '\0') { |
| 75 | static char buf[256]; |
| 76 | buf[0] = strlen(argv[0]); |
| 77 | strncpy(buf+1, argv[0], buf[0]); |
| 78 | console_options.title = (unsigned char *)buf; |
| 79 | } |
| 80 | else |
| 81 | console_options.title = "\pPython"; |
| 82 | #endif /* CONSOLE_IO */ |
Jack Jansen | bac428d | 1994-12-14 13:47:30 +0000 | [diff] [blame] | 83 | if ( argc > 1 ) |
| 84 | fileargument = argv[1]; /* Mod by Jack to do chdir */ |
Guido van Rossum | b0f3c82 | 1994-08-23 13:34:25 +0000 | [diff] [blame] | 85 | realmain(argc, argv); |
| 86 | } |