From 4e9e8f6064cb7887b152b498cc89f3cbe49ae7a0 Mon Sep 17 00:00:00 2001 From: "Guillermo J. Rozas" Date: Wed, 8 Sep 1993 04:46:00 +0000 Subject: [PATCH] Prevent multiple catatonia messages. --- v7/src/microcode/ntgui.h | 5 +++-- v7/src/microcode/ntsig.c | 3 ++- v7/src/microcode/ntutl/scheme16.c | 14 +++++++++----- v7/src/microcode/ntutl/scheme32.c | 14 +++++++++----- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/v7/src/microcode/ntgui.h b/v7/src/microcode/ntgui.h index 4608e7f17..b45a6f38b 100644 --- a/v7/src/microcode/ntgui.h +++ b/v7/src/microcode/ntgui.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntgui.h,v 1.4 1993/09/04 07:04:23 gjr Exp $ +$Id: ntgui.h,v 1.5 1993/09/08 04:44:41 gjr Exp $ Copyright (c) 1993 Massachusetts Institute of Technology @@ -57,7 +57,8 @@ MIT in each case. */ #ifndef REGBLOCK_CATATONIA_COUNTER /* They must be contiguous, with counter being lower. */ # define REGBLOCK_CATATONIA_COUNTER REGBLOCK_MINIMUM_LENGTH -# define REGBLOCK_CATATONIA_LIMIT (REGBLOCK_MINIMUM_LENGTH + 1) +# define REGBLOCK_CATATONIA_LIMIT (REGBLOCK_CATATONIA_COUNTER + 1) +# define REGBLOCK_CATATONIA_FLAG (REGBLOCK_CATATONIA_COUNTER + 2) #endif #define WM_CATATONIC (WM_USER) diff --git a/v7/src/microcode/ntsig.c b/v7/src/microcode/ntsig.c index ca31944d2..9aae23e3d 100644 --- a/v7/src/microcode/ntsig.c +++ b/v7/src/microcode/ntsig.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntsig.c,v 1.11 1993/09/07 19:03:46 gjr Exp $ +$Id: ntsig.c,v 1.12 1993/09/08 04:44:06 gjr Exp $ Copyright (c) 1992-1993 Massachusetts Institute of Technology @@ -419,6 +419,7 @@ DEFUN_VOID (install_timer) Registers[REGBLOCK_CATATONIA_COUNTER] = 0; Registers[REGBLOCK_CATATONIA_LIMIT] = (CATATONIA_PERIOD / ASYNC_TIMER_PERIOD); + Registers[REGBLOCK_CATATONIA_FLAG] = 0; switch (win32_install_async_timer (&timer_state, &Registers[0], REGBLOCK_MEMTOP, diff --git a/v7/src/microcode/ntutl/scheme16.c b/v7/src/microcode/ntutl/scheme16.c index 264d5757f..b37d422aa 100644 --- a/v7/src/microcode/ntutl/scheme16.c +++ b/v7/src/microcode/ntutl/scheme16.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: scheme16.c,v 1.5 1993/09/04 06:59:59 gjr Exp $ +$Id: scheme16.c,v 1.6 1993/09/08 04:46:00 gjr Exp $ Copyright (c) 1993 Massachusetts Institute of Technology @@ -340,10 +340,14 @@ scheme_asynctimer (void) > scm_timer->base[scm_timer->ctr_off + 1]) && (scm_timer->base[scm_timer->ctr_off + 1] != 0)) { - PostMessage (scm_timer->window, - scm_timer->message, - ((WPARAM) 0), - ((LPARAM) 0)); + if (scm_timer->base[scm_timer->ctr_off + 2] == 0) + { + PostMessage (scm_timer->window, + scm_timer->message, + ((WPARAM) 0), + ((LPARAM) 0)); + scm_timer->base[scm_timer->ctr_off + 2] = 1; + } scm_timer->base[scm_timer->ctr_off] = 0L; } scm_timer = scm_timer->next; diff --git a/v7/src/microcode/ntutl/scheme32.c b/v7/src/microcode/ntutl/scheme32.c index 650598ede..3cb33c1ab 100644 --- a/v7/src/microcode/ntutl/scheme32.c +++ b/v7/src/microcode/ntutl/scheme32.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: scheme32.c,v 1.5 1993/09/04 07:01:12 gjr Exp $ +$Id: scheme32.c,v 1.6 1993/09/08 04:45:26 gjr Exp $ Copyright (c) 1993 Massachusetts Institute of Technology @@ -111,10 +111,14 @@ win32_nt_timer_tick (UINT wID, UINT wMsg, DWORD dwUser, DWORD dw1, DWORD dw2) > timer_closure->block[timer_closure->ctr_off + 1]) && (timer_closure->block[timer_closure->ctr_off + 1] != 0)) { - PostMessage (timer_closure->window, - timer_closure->message, - ((WPARAM) 0), - ((LPARAM) 0)); + if (timer_closure->block[timer_closure->ctr_off + 2] == 0) + { + PostMessage (timer_closure->window, + timer_closure->message, + ((WPARAM) 0), + ((LPARAM) 0)); + timer_closure->block[timer_closure->ctr_off + 2] = 1; + } timer_closure->block[timer_closure->ctr_off] = 0; } return; -- 2.25.1