? dist/bzip2-1.0.2 ? dist/db-4.2.52 ? dist/openssl-0.9.7g ? dist/tcl8.4.7 ? dist/tcltk ? dist/tix-8.1.4 ? dist/tk8.4.7 ? dist/zlib-1.2.1 ? dist/src/Mac/IDE scripts/Hold option to open a script ? dist/src/Mac/IDE scripts/Insert file name ? dist/src/Mac/IDE scripts/Insert folder name ? dist/src/Mac/IDE scripts/Search Python Documentation ? dist/src/Mac/IDE scripts/Hack/Remove .pyc files ? dist/src/Mac/IDE scripts/Hack/Toolbox Assistant ? dist/src/PCbuild/test.py ? dist/src/Parser/myreadline.c.20050610.diff Index: dist/src/Parser/myreadline.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Parser/myreadline.c,v retrieving revision 2.34 diff -c -r2.34 myreadline.c *** dist/src/Parser/myreadline.c 7 Apr 2005 10:11:18 -0000 2.34 --- dist/src/Parser/myreadline.c 16 Jul 2005 02:04:06 -0000 *************** *** 13,18 **** --- 13,19 ---- #ifdef MS_WINDOWS #define WIN32_LEAN_AND_MEAN #include "windows.h" + #include "conio.h" #endif /* MS_WINDOWS */ #ifdef __VMS *************** *** 41,52 **** { char *p; for (;;) { ! if (PyOS_InputHook != NULL) ! (void)(PyOS_InputHook)(); errno = 0; ! p = fgets(buf, len, fp); ! if (p != NULL) ! return 0; /* No error */ #ifdef MS_WINDOWS /* In the case of a Ctrl+C or some other external event interrupting the operation: --- 42,88 ---- { char *p; for (;;) { ! int has_input = 0; ! int fn = fileno(fp); ! #ifdef MS_WINDOWS ! HANDLE hStdIn = (HANDLE) _get_osfhandle(fn); ! ! errno = 0; ! ! while (!has_input) { ! DWORD timeout = 100; /* 100 milliseconds */ ! DWORD result; ! if (PyOS_InputHook) PyOS_InputHook(); ! result = WaitForSingleObject(hStdIn, timeout); ! if (result==WAIT_OBJECT_0 && fn==fileno(stdin)) { ! /* Check if this was a keyboard event, ! * not a mouse event */ ! if (_kbhit()) has_input = 1; ! } ! } ! #else ! fd_set selectset; errno = 0; ! ! FD_ZERO(&selectset); ! ! while (!has_input) { ! struct timeval timeout = {0, 100000}; ! /* 100000 microseconds */ ! FD_SET(fn, &selectset); ! if (PyOS_InputHook) PyOS_InputHook(); ! /* select resets selectset if no input was available */ ! has_input = select(fn+1, &selectset, ! NULL, NULL, &timeout); ! } ! #endif ! ! if (has_input > 0) { ! p = fgets(buf, len, fp); ! if (p != NULL) ! return 0; /* No error */ ! } ! #ifdef MS_WINDOWS /* In the case of a Ctrl+C or some other external event interrupting the operation: