summaryrefslogtreecommitdiffstats
path: root/Parser/intrcheck.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-01-27 14:40:41 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-01-27 14:40:41 (GMT)
commit9fc3989c665e6a51168362af7800d43f33fa904c (patch)
treef86bbc16bd3044eb2f6b53ade952ed25fdee2fb9 /Parser/intrcheck.c
parent7e4b2def34f5cb6c954148a7458c8e1aa4584320 (diff)
downloadcpython-9fc3989c665e6a51168362af7800d43f33fa904c.zip
cpython-9fc3989c665e6a51168362af7800d43f33fa904c.tar.gz
cpython-9fc3989c665e6a51168362af7800d43f33fa904c.tar.bz2
Mac interrupt code moved to macglue.c
Diffstat (limited to 'Parser/intrcheck.c')
-rw-r--r--Parser/intrcheck.c77
1 files changed, 1 insertions, 76 deletions
diff --git a/Parser/intrcheck.c b/Parser/intrcheck.c
index 96dd484..09df460 100644
--- a/Parser/intrcheck.c
+++ b/Parser/intrcheck.c
@@ -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 */