comparison 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
comparison
equal deleted inserted replaced
5450:6b42c78c77d3 5451:ed08548b9054
73 #include "cmd-edit.h" 73 #include "cmd-edit.h"
74 #include "file-ops.h" 74 #include "file-ops.h"
75 #include "lo-mappers.h" 75 #include "lo-mappers.h"
76 #include "mach-info.h" 76 #include "mach-info.h"
77 #include "oct-env.h" 77 #include "oct-env.h"
78 #include "quit.h"
78 79
79 #include "defun.h" 80 #include "defun.h"
80 #include "error.h" 81 #include "error.h"
81 #include "input.h" 82 #include "input.h"
82 #include "oct-obj.h" 83 #include "oct-obj.h"
102 fpsetmask (~(FP_X_OFL|FP_X_INV|FP_X_DZ|FP_X_DNML|FP_X_UFL|FP_X_IMP)); 103 fpsetmask (~(FP_X_OFL|FP_X_INV|FP_X_DZ|FP_X_DNML|FP_X_UFL|FP_X_IMP));
103 #endif 104 #endif
104 } 105 }
105 #endif 106 #endif
106 107
108 void
109 w32_set_quiet_shutdown (void)
110 {
111 #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
112 // Let the user close the console window or shutdown without the
113 // pesky dialog.
114 //
115 // XXX FIXME XXX -- should this be user configurable?
116 SetProcessShutdownParameters (0x280, SHUTDOWN_NORETRY);
117 #endif
118 }
119
120 #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
121 void
122 MINGW_signal_cleanup (void)
123 {
124 w32_set_quiet_shutdown (void);
125
126 w32_raise_final ():
127 }
128 #endif
129
130 #if defined (__MINGW32__)
131 static void
132 MINGW_init (void)
133 {
134 // Init mutex to protect setjmp/longjmp and get main thread context
135 w32_sigint_init ();
136
137 w32_set_quiet_shutdown ();
138 }
139 #endif
140
107 #if defined (__CYGWIN__) 141 #if defined (__CYGWIN__)
108 142
109 #include <limits.h> 143 #include <limits.h>
110 #include <sys/cygwin.h> 144 #include <sys/cygwin.h>
111 145
197 { 231 {
198 #if defined (__386BSD__) || defined (__FreeBSD__) 232 #if defined (__386BSD__) || defined (__FreeBSD__)
199 BSD_init (); 233 BSD_init ();
200 #elif defined (__CYGWIN__) 234 #elif defined (__CYGWIN__)
201 CYGWIN_init (); 235 CYGWIN_init ();
236 #elif defined (__MINGW32__)
237 MINGW_init ();
202 #elif defined (NeXT) 238 #elif defined (NeXT)
203 NeXT_init (); 239 NeXT_init ();
204 #elif defined (__EMX__) 240 #elif defined (__EMX__)
205 OS2_init (); 241 OS2_init ();
206 #elif defined (SCO) 242 #elif defined (SCO)
207 SCO_init (); 243 SCO_init ();
208 #endif 244 #endif
209 245
210 octave_ieee_init (); 246 octave_ieee_init ();
247 }
248
249 void
250 sysdep_cleanup (void)
251 {
252 MINGW_SIGNAL_CLEANUP ();
211 } 253 }
212 254
213 // Set terminal in raw mode. From less-177. 255 // Set terminal in raw mode. From less-177.
214 // 256 //
215 // Change terminal to "raw mode", or restore to "normal" mode. 257 // Change terminal to "raw mode", or restore to "normal" mode.