Mercurial > hg > octave-nkf
diff src/sysdep.cc @ 5451:ed08548b9054
[project @ 2005-09-15 19:52:50 by jwe]
author | jwe |
---|---|
date | Thu, 15 Sep 2005 19:52:50 +0000 |
parents | 8db4eb48f546 |
children | ec44bd0917fe |
line wrap: on
line diff
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -75,6 +75,7 @@ #include "lo-mappers.h" #include "mach-info.h" #include "oct-env.h" +#include "quit.h" #include "defun.h" #include "error.h" @@ -104,6 +105,39 @@ } #endif +void +w32_set_quiet_shutdown (void) +{ +#if defined (__WIN32__) && ! defined (_POSIX_VERSION) + // Let the user close the console window or shutdown without the + // pesky dialog. + // + // XXX FIXME XXX -- should this be user configurable? + SetProcessShutdownParameters (0x280, SHUTDOWN_NORETRY); +#endif +} + +#if defined (__WIN32__) && ! defined (_POSIX_VERSION) +void +MINGW_signal_cleanup (void) +{ + w32_set_quiet_shutdown (void); + + w32_raise_final (): +} +#endif + +#if defined (__MINGW32__) +static void +MINGW_init (void) +{ + // Init mutex to protect setjmp/longjmp and get main thread context + w32_sigint_init (); + + w32_set_quiet_shutdown (); +} +#endif + #if defined (__CYGWIN__) #include <limits.h> @@ -199,6 +233,8 @@ BSD_init (); #elif defined (__CYGWIN__) CYGWIN_init (); +#elif defined (__MINGW32__) + MINGW_init (); #elif defined (NeXT) NeXT_init (); #elif defined (__EMX__) @@ -210,6 +246,12 @@ octave_ieee_init (); } +void +sysdep_cleanup (void) +{ + MINGW_SIGNAL_CLEANUP (); +} + // Set terminal in raw mode. From less-177. // // Change terminal to "raw mode", or restore to "normal" mode.