summaryrefslogtreecommitdiffstats
path: root/private/crt32/direct/seterrm.c
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/crt32/direct/seterrm.c
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/crt32/direct/seterrm.c')
-rw-r--r--private/crt32/direct/seterrm.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/private/crt32/direct/seterrm.c b/private/crt32/direct/seterrm.c
new file mode 100644
index 000000000..838854db0
--- /dev/null
+++ b/private/crt32/direct/seterrm.c
@@ -0,0 +1,63 @@
+/***
+*seterrm.c - Set mode for handling critical errors
+*
+* Copyright (c) 1991, Microsoft Corporation. All rights reserved
+*
+*Purpose:
+* Defines signal() and raise().
+*
+*Revision History:
+* 08-21-92 BWM Wrote for Win32.
+*
+*******************************************************************************/
+
+#include <cruntime.h>
+#include <oscalls.h>
+
+/***
+*void _seterrormode(mode) - set the critical error mode
+*
+*Purpose:
+*
+*Entry:
+* int mode - error mode:
+*
+* 0 means system displays a prompt asking user how to
+* respond to the error. Choices differ depending on the
+* error but may include Abort, Retry, Ignore, and Fail.
+*
+* 1 means the call system call causing the error will fail
+* and return an error indicating the cause.
+*
+*Exit:
+* none
+*
+*Exceptions:
+*
+*******************************************************************************/
+
+void _CALLTYPE1 _seterrormode(int mode)
+{
+#ifdef _CRUISER_
+
+ if (mode == 1) {
+ DOSERROR(1);
+ else if (mode == 0) {
+ DOSERROR(0);
+ }
+
+#else /* ndef _CRUISER_ */
+
+#ifdef _WIN32_
+
+ SetErrorMode(mode);
+
+#else /* ndef _WIN32_ */
+
+#error ERROR - ONLY CRUISER OR WIN32 TARGET SUPPORTED!
+
+#endif /* _WIN32_ */
+
+#endif /* _CRUISER_ */
+
+}