Eric Pouech : msvcrt: Implemented the raise function.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Feb 9 08:22:09 CST 2007
Module: wine
Branch: master
Commit: bb5a20c61aa93893134a97b16f52dbde0c19978d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb5a20c61aa93893134a97b16f52dbde0c19978d
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Thu Feb 8 21:33:39 2007 +0100
msvcrt: Implemented the raise function.
---
dlls/msvcrt/except.c | 34 ++++++++++++++++++++++++++++++++++
dlls/msvcrt/msvcrt.spec | 2 +-
2 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index 1ee13da..51fd82d 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -544,6 +544,40 @@ MSVCRT___sighandler_t CDECL MSVCRT_signa
}
/*********************************************************************
+ * raise (MSVCRT.@)
+ */
+int CDECL MSVCRT_raise(int sig)
+{
+ MSVCRT___sighandler_t handler;
+
+ TRACE("(%d)\n", sig);
+
+ switch (sig)
+ {
+ case MSVCRT_SIGABRT:
+ case MSVCRT_SIGFPE:
+ case MSVCRT_SIGILL:
+ case MSVCRT_SIGSEGV:
+ case MSVCRT_SIGINT:
+ case MSVCRT_SIGTERM:
+ handler = sighandlers[sig];
+ if (handler == MSVCRT_SIG_DFL) MSVCRT__exit(3);
+ if (handler != MSVCRT_SIG_IGN)
+ {
+ sighandlers[sig] = MSVCRT_SIG_DFL;
+ if (sig == MSVCRT_SIGFPE)
+ ((float_handler)handler)(sig, _FPE_EXPLICITGEN);
+ else
+ handler(sig);
+ }
+ break;
+ default:
+ return -1;
+ }
+ return 0;
+}
+
+/*********************************************************************
* _XcptFilter (MSVCRT.@)
*/
int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 9cdee2c..8c5b88e 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -686,7 +686,7 @@
@ cdecl putwc(long ptr) MSVCRT_fputwc
@ cdecl putwchar(long) _fputwchar
@ cdecl qsort(ptr long long ptr) ntdll.qsort
-@ stub raise #(long)
+@ cdecl raise(long) MSVCRT_raise
@ cdecl rand() MSVCRT_rand
@ cdecl realloc(ptr long) MSVCRT_realloc
@ cdecl remove(str) MSVCRT_remove
More information about the wine-cvs
mailing list