diff options
author | Russell Lang <gsview@ghostgum.com.au> | 2003-04-18 01:18:53 +0000 |
---|---|---|
committer | Russell Lang <gsview@ghostgum.com.au> | 2003-04-18 01:18:53 +0000 |
commit | 6e5eae5351c215806b2b5ca70695d375501e4324 (patch) | |
tree | a55358cce524a4bd5810de27fa13546c500ed526 | |
parent | ed6b72cbe87a32ed0f6ee87217890a4706ea629e (diff) | |
download | ghostpdl-6e5eae5351c215806b2b5ca70695d375501e4324.tar.gz |
Call the gsapi polling function from the Macintosh gp_check_interrupts
function. Partial fix for Bug 686810 "CHECK_INTERRUPTS should allow
shorter worst-case abort".
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@3846 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/src/gp_mac.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/gs/src/gp_mac.c b/gs/src/gp_mac.c index 927db1761..7023ca9d3 100644 --- a/gs/src/gp_mac.c +++ b/gs/src/gp_mac.c @@ -334,16 +334,28 @@ gp_getenv_display(void) int gp_check_interrupts(void) { static unsigned long lastYieldTicks = 0; + int iRetVal = 0; if ((TickCount() - lastYieldTicks) > 2) { - lastYieldTicks = TickCount(); - /* the hwnd parameter which is submitted in gsdll_init to the DLL */ - /* is returned in every gsdll_poll message in the count parameter */ - if (pgsdll_callback) - return (*pgsdll_callback) (GSDLL_POLL, 0, (long) hwndtext); - else return 0; - } else { - return 0; + lastYieldTicks = TickCount(); + if (pgsdll_callback) { + /* WARNING: The use of the old gsdll interface is deprecated. + * The caller should use the newer gsapi_set_poll. + * If the caller needs access to "hwndtext", it should do + * this via caller_handle which is passed to poll_fn. + */ + /* the hwnd parameter which is submitted in gsdll_init + * to the DLL is returned in every gsdll_poll message + * in the count parameter + */ + iRetVal = (*pgsdll_callback)(GSDLL_POLL, 0, (long) hwndtext); + } + else { + gs_main_instance *minst = gs_main_instance_default(); + if (minst && minst->poll_fn) + iRetVal = (*minst->poll_fn)(minst->caller_handle); + } } + return iRetVal; } #endif |