]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Parser/intrcheck.c
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Parser / intrcheck.c
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Parser/intrcheck.c b/AppPkg/Applications/Python/Python-2.7.2/Parser/intrcheck.c
deleted file mode 100644 (file)
index bc2b8e4..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-\r
-/* Check for interrupts */\r
-\r
-#include "Python.h"\r
-#include "pythread.h"\r
-\r
-#ifdef QUICKWIN\r
-\r
-#include <io.h>\r
-\r
-void\r
-PyOS_InitInterrupts(void)\r
-{\r
-}\r
-\r
-void\r
-PyOS_FiniInterrupts(void)\r
-{\r
-}\r
-\r
-int\r
-PyOS_InterruptOccurred(void)\r
-{\r
-    _wyield();\r
-}\r
-\r
-#define OK\r
-\r
-#endif /* QUICKWIN */\r
-\r
-#if defined(_M_IX86) && !defined(__QNX__)\r
-#include <io.h>\r
-#endif\r
-\r
-#if defined(MSDOS) && !defined(QUICKWIN)\r
-\r
-#ifdef __GNUC__\r
-\r
-/* This is for DJGPP's GO32 extender.  I don't know how to trap\r
- * control-C  (There's no API for ctrl-C, and I don't want to mess with\r
- * the interrupt vectors.)  However, this DOES catch control-break.\r
- * --Amrit\r
- */\r
-\r
-#include <go32.h>\r
-\r
-void\r
-PyOS_InitInterrupts(void)\r
-{\r
-    _go32_want_ctrl_break(1 /* TRUE */);\r
-}\r
-\r
-void\r
-PyOS_FiniInterrupts(void)\r
-{\r
-}\r
-\r
-int\r
-PyOS_InterruptOccurred(void)\r
-{\r
-    return _go32_was_ctrl_break_hit();\r
-}\r
-\r
-#else /* !__GNUC__ */\r
-\r
-/* This might work for MS-DOS (untested though): */\r
-\r
-void\r
-PyOS_InitInterrupts(void)\r
-{\r
-}\r
-\r
-void\r
-PyOS_FiniInterrupts(void)\r
-{\r
-}\r
-\r
-int\r
-PyOS_InterruptOccurred(void)\r
-{\r
-    int interrupted = 0;\r
-    while (kbhit()) {\r
-        if (getch() == '\003')\r
-            interrupted = 1;\r
-    }\r
-    return interrupted;\r
-}\r
-\r
-#endif /* __GNUC__ */\r
-\r
-#define OK\r
-\r
-#endif /* MSDOS && !QUICKWIN */\r
-\r
-\r
-#ifndef OK\r
-\r
-/* Default version -- for real operating systems and for Standard C */\r
-\r
-#include <stdio.h>\r
-#include <string.h>\r
-#include <signal.h>\r
-\r
-static int interrupted;\r
-\r
-void\r
-PyErr_SetInterrupt(void)\r
-{\r
-    interrupted = 1;\r
-}\r
-\r
-extern int PyErr_CheckSignals(void);\r
-\r
-static int\r
-checksignals_witharg(void * arg)\r
-{\r
-    return PyErr_CheckSignals();\r
-}\r
-\r
-static void\r
-intcatcher(int sig)\r
-{\r
-    extern void Py_Exit(int);\r
-    static char message[] =\r
-"python: to interrupt a truly hanging Python program, interrupt once more.\n";\r
-    switch (interrupted++) {\r
-    case 0:\r
-        break;\r
-    case 1:\r
-#ifdef RISCOS\r
-        fprintf(stderr, message);\r
-#else\r
-        write(2, message, strlen(message));\r
-#endif\r
-        break;\r
-    case 2:\r
-        interrupted = 0;\r
-        Py_Exit(1);\r
-        break;\r
-    }\r
-    PyOS_setsig(SIGINT, intcatcher);\r
-    Py_AddPendingCall(checksignals_witharg, NULL);\r
-}\r
-\r
-static void (*old_siginthandler)(int) = SIG_DFL;\r
-\r
-void\r
-PyOS_InitInterrupts(void)\r
-{\r
-    if ((old_siginthandler = PyOS_setsig(SIGINT, SIG_IGN)) != SIG_IGN)\r
-        PyOS_setsig(SIGINT, intcatcher);\r
-}\r
-\r
-void\r
-PyOS_FiniInterrupts(void)\r
-{\r
-    PyOS_setsig(SIGINT, old_siginthandler);\r
-}\r
-\r
-int\r
-PyOS_InterruptOccurred(void)\r
-{\r
-    if (!interrupted)\r
-        return 0;\r
-    interrupted = 0;\r
-    return 1;\r
-}\r
-\r
-#endif /* !OK */\r
-\r
-void\r
-PyOS_AfterFork(void)\r
-{\r
-#ifdef WITH_THREAD\r
-    PyEval_ReInitThreads();\r
-    PyThread_ReInitTLS();\r
-#endif\r
-}\r