From 80a0b534a81e86f4fabebbcc30634cb0052c08e2 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 1 Feb 1998 05:35:41 +0000 Subject: [PATCH] Disable critical-error and GPF pop-up boxes. --- v7/src/microcode/ntfs.c | 18 +++++++----------- v7/src/microcode/nttrap.c | 8 +++----- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/v7/src/microcode/ntfs.c b/v7/src/microcode/ntfs.c index 86d5b9e3e..24edb3050 100644 --- a/v7/src/microcode/ntfs.c +++ b/v7/src/microcode/ntfs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: ntfs.c,v 1.21 1998/01/09 05:33:52 cph Exp $ +$Id: ntfs.c,v 1.22 1998/02/01 05:35:41 cph Exp $ Copyright (c) 1992-98 Massachusetts Institute of Technology @@ -143,16 +143,12 @@ valid_drive_p (const char * namestring) DWORD bytes_per_sector; DWORD number_of_free_clusters; DWORD total_number_of_clusters; - BOOL result; - SetErrorMode (SEM_FAILCRITICALERRORS); - result - = (GetDiskFreeSpace (namestring, - (§ors_per_cluster), - (&bytes_per_sector), - (&number_of_free_clusters), - (&total_number_of_clusters))); - SetErrorMode (0); - return (result); + return + (GetDiskFreeSpace (namestring, + (§ors_per_cluster), + (&bytes_per_sector), + (&number_of_free_clusters), + (&total_number_of_clusters))); } static HANDLE diff --git a/v7/src/microcode/nttrap.c b/v7/src/microcode/nttrap.c index fcff1ca23..323c73769 100644 --- a/v7/src/microcode/nttrap.c +++ b/v7/src/microcode/nttrap.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: nttrap.c,v 1.14 1997/06/26 07:02:22 cph Exp $ +$Id: nttrap.c,v 1.15 1998/02/01 05:35:33 cph Exp $ -Copyright (c) 1992-97 Massachusetts Institute of Technology +Copyright (c) 1992-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -347,7 +347,7 @@ DEFUN_VOID (NT_initialize_traps) { trap_state = trap_state_recover; user_trap_state = trap_state_recover; - return; + (void) SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); } void @@ -1345,8 +1345,6 @@ DEFUN (WinntEnterHook, (enter_interpreter), { #ifdef USE_SET_UNHANDLED_EXCEPTION_FILTER (void) SetUnhandledExceptionFilter (scheme_unhandled_exception_filter); - /* Doesn't seem to work as it should: */ - (void) SetErrorMode (SEM_NOGPFAULTERRORBOX); (* enter_interpreter) (); outf_fatal ("Exception!\n"); termination_trap (); -- 2.25.1