]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Mac interrupt code moved to macglue.c
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 27 Jan 1995 14:40:41 +0000 (14:40 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 27 Jan 1995 14:40:41 +0000 (14:40 +0000)
Parser/intrcheck.c

index 96dd4841c88b587d16636ed78b7d6717ef24df0d..09df4607f1684c680c65f2186c5f17287f93e308 100644 (file)
@@ -116,82 +116,7 @@ intrcheck()
 
 #ifdef macintosh
 
-#ifdef applec /* MPW */
-#include <OSEvents.h>
-#include <SysEqu.h>
-#endif /* applec */
-
-#include <signal.h>
-
-static int interrupted;
-
-static RETSIGTYPE intcatcher PROTO((int));
-static RETSIGTYPE
-intcatcher(sig)
-       int sig;
-{
-       interrupted = 1;
-       signal(SIGINT, intcatcher);
-}
-
-void
-initintr()
-{
-       if (signal(SIGINT, SIG_IGN) != SIG_IGN)
-               signal(SIGINT, intcatcher);
-}
-
-#ifdef THINK_C
-/* MPW and MW runtime catch cmd-. and raise SIGINT, THINK does not, it seems */
-static void
-scan_event_queue(flush)
-       int flush;
-{
-       register EvQElPtr q;
-       
-       q = (EvQElPtr) GetEvQHdr()->qHead;
-       
-       for (; q; q = (EvQElPtr)q->qLink) {
-               if (q->evtQWhat == keyDown &&
-                               (char)q->evtQMessage == '.' &&
-                               (q->evtQModifiers & cmdKey) != 0) {
-                       if ( flush )
-                               FlushEvents(keyDownMask, 0);
-                       interrupted = 1;
-                       break;
-               }
-       }
-}
-#endif
-
-int
-intrcheck()
-{
-#ifdef THINK_C
-       scan_event_queue(1);
-#endif
-       PyMac_Yield();
-       if (interrupted) {
-               interrupted = 0;
-               return 1;
-       }
-       return 0;
-}
-
-/* intrpeek() is like intrcheck(), but it doesn't flush the events. The
-** idea is that you call intrpeek() somewhere in a busy-wait loop, and return
-** None as soon as it returns 1. The mainloop will then pick up the cmd-. soon
-** thereafter.
-*/
-int
-intrpeek()
-{
-#ifdef THINK_C
-       scan_event_queue(0);
-#endif
-       return interrupted;
-}
-
+/* The Mac interrupt code has moved to macglue.c */
 #define OK
 
 #endif /* macintosh */