]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
mac changes:
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 13 Feb 1995 11:44:56 +0000 (11:44 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 13 Feb 1995 11:44:56 +0000 (11:44 +0000)
- Assume files of types 'PYC ' and 'APPL' are compiled python code
- For mwerks, show status line when program has terminated while
  keeping window open.

Python/pythonrun.c

index 43ff59914266e9303c39b1cacd594fed0b72339c..e46a526470598866cc938ac44a9a0306948047d8 100644 (file)
@@ -230,7 +230,13 @@ run_script(fp, filename)
                return -1;
        d = getmoduledict(m);
        ext = filename + strlen(filename) - 4;
+#ifdef macintosh
+       /* On a mac, we also assume a pyc file for types 'PYC ' and 'APPL' */
+       if ( strcmp(ext, ".pyc") == 0 || getfiletype(filename) == 'PYC ' ||
+                                       getfiletype(filename) == 'APPL' ) {
+#else
        if ( strcmp(ext, ".pyc") == 0 ) {
+#endif /* macintosh */
                /* Try to run a pyc file. First, re-open in binary */
                /* Don't close, done in main: fclose(fp); */
                if( (fp = fopen(filename, "rb")) == NULL ) {
@@ -667,6 +673,8 @@ goaway(sts)
 #ifdef __MWERKS__
        if (sts == 0)
                SIOUXSettings.autocloseonquit = 1;
+       else
+               SIOUXSettings.showstatusline = 1;
 #endif
        exit(sts);
 #endif /* WITH_THREAD */