]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Generalize to macintosh.
authorGuido van Rossum <guido@python.org>
Mon, 24 Jun 1991 22:30:42 +0000 (22:30 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 24 Jun 1991 22:30:42 +0000 (22:30 +0000)
Include/pgenheaders.h
Parser/intrcheck.c
Parser/pgenmain.c
Parser/tokenizer.c
Python/import.c
Python/sysmodule.c

index 47124316060b6b37d8bc78bc539e4a65d702b2d6..59c7e324f6c49c0d30646dd0be7ff81011fd476b 100644 (file)
@@ -25,11 +25,15 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 /* Include files and extern declarations used by most of the parser.
    This is a precompiled header for THINK C. */
 
+#ifdef THINK_C
+#define macintosh
+/* #define THINK_C_3_0         /*** TURN THIS ON FOR THINK C 3.0 ***/
+#endif
+
 #include <stdio.h>
 #include <string.h>
 
 #ifdef THINK_C
-/* #define THINK_C_3_0                 /*** TURN THIS ON FOR THINK C 3.0 ****/
 #define label label_
 #undef label
 #endif
@@ -38,7 +42,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <proto.h>
 #endif
 
-#ifdef THINK_C
+#ifdef macintosh
 #ifndef THINK_C_3_0
 #include <stdlib.h>
 #endif
index 8dbeb5f0cfc01106d2960994213031cfa88bc123..ee14ecaf1eaab3995e08cafa5b985a472a04bbf6 100644 (file)
@@ -24,6 +24,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 /* Check for interrupts */
 
+#ifdef THINK_C
+#define macintosh
+#endif
+
+
 #ifdef MSDOS
 
 /* This might work for MS-DOS (untested though): */
@@ -49,19 +54,26 @@ intrcheck()
 #endif
 
 
-#ifdef THINK_C
+#ifdef macintosh
 
+#ifdef THINK_C
 /* This is for THINK C 4.0.
    For 3.0, you may have to remove the signal stuff. */
-
 #include <MacHeaders>
+#else
+/* This is for MPW 3.1 */
+/* XXX Untested */
+#include <OSEvents.h>
+#include <SysEqu.h>
+#endif
+
 #include <signal.h>
 #include "sigtype.h"
 
 static int interrupted;
 
 static SIGTYPE
-intcatcher(sig)
+intcatcher(ig)
        int sig;
 {
        interrupted = 1;
@@ -80,17 +92,15 @@ intrcheck()
 {
        register EvQElPtr q;
        
-       /* This is like THINK C 4.0's <console.h>.
-          I'm not sure why FlushEvents must be called from asm{}. */
-       for (q = (EvQElPtr)EventQueue.qHead; q; q = (EvQElPtr)q->qLink) {
+       /* This is like THINK C 4.0's <console.h> */
+       /* q = (EvQElPtr) EventQueue.qHead; */
+       q = (EvQElPtr) GetEvQHdr()->qHead;
+       
+       for (; q; q = (EvQElPtr)q->qLink) {
                if (q->evtQWhat == keyDown &&
                                (char)q->evtQMessage == '.' &&
                                (q->evtQModifiers & cmdKey) != 0) {
-                       
-                       asm {
-                               moveq   #keyDownMask,d0
-                               _FlushEvents
-                       }
+                       FlushEvents(keyDownMask, 0);
                        interrupted = 1;
                        break;
                }
@@ -104,7 +114,7 @@ intrcheck()
 
 #define OK
 
-#endif /* THINK_C */
+#endif /* macintosh */
 
 
 #ifndef OK
index c1bd486f8859278886bd2bff1d0f0294429dc6d1..da6aa2ee3acbaa191837bb0e3987b6db38efb135 100644 (file)
@@ -42,7 +42,7 @@ int debugging;
 
 /* Forward */
 grammar *getgrammar PROTO((char *filename));
-#ifdef THINK_C
+#ifdef macintosh
 int main PROTO((int, char **));
 char *askfile PROTO((void));
 #endif
@@ -57,7 +57,7 @@ main(argc, argv)
        FILE *fp;
        char *filename;
        
-#ifdef THINK_C
+#ifdef macintosh
        filename = askfile();
 #else
        if (argc != 2) {
@@ -115,7 +115,7 @@ getgrammar(filename)
        return g;
 }
 
-#ifdef THINK_C
+#ifdef macintosh
 char *
 askfile()
 {
index 62a3da0084cac98663de52c3af947d5daa4ef2cd..ccff9d11377b03517fcb38c9bfa381920216e8be 100644 (file)
@@ -37,7 +37,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "tokenizer.h"
 #include "errcode.h"
 
-#ifdef THINK_C
+#ifdef macintosh
 #define TABSIZE 4
 #endif
 
index a4995ea003aecdde06db4f1b3476a08ef1e4a8bc..f62d1d266a1eafa2f90a6b43256b195722619014 100644 (file)
@@ -37,13 +37,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "compile.h"
 #include "ceval.h"
 
-#ifdef THINK_C
-#define macintosh
-#endif
-
 /* Define pathname separator used in file names */
 
-#ifdef THINK_C
+#ifdef macintosh
 #define SEP ':'
 #endif
 
index e66223e6f7b725b0db187881da0033e3d0d6dd7e..69489c84f67e132ad7bc86a7581483f8e3a18b80 100644 (file)
@@ -45,7 +45,7 @@ Data members:
 
 /* Define delimiter used in $PYTHONPATH */
 
-#ifdef THINK_C
+#ifdef macintosh
 #define DELIM ' '
 #endif