Commit 9a364c1a authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Don't export _matherr().

parent 35d202fc
......@@ -62,24 +62,26 @@ void msvcrt_init_math(void)
}
/*********************************************************************
* _matherr (MSVCRT.@)
* _matherr (CRTDLL.@)
*/
int CDECL MSVCRT__matherr(struct MSVCRT__exception *e)
{
int ret;
return 0;
}
if (e)
TRACE("(%p = {%d, \"%s\", %g, %g, %g})\n", e, e->type, e->name, e->arg1, e->arg2, e->retval);
else
TRACE("(null)\n");
static void math_error(int type, const char *name, double arg1, double arg2, double retval)
{
TRACE("(%d, %s, %g, %g, %g)\n", type, debugstr_a(name), arg1, arg2, retval);
if (MSVCRT_default_matherr_func)
{
ret = MSVCRT_default_matherr_func(e);
if (ret) return ret;
struct MSVCRT__exception exception = {type, (char *)name, arg1, arg2, retval};
if (MSVCRT_default_matherr_func(&exception)) return;
}
switch (e->type)
switch (type)
{
case _DOMAIN:
*MSVCRT__errno() = MSVCRT_EDOM;
......@@ -94,8 +96,6 @@ int CDECL MSVCRT__matherr(struct MSVCRT__exception *e)
default:
ERR("Unhandled math error!\n");
}
return 0;
}
/*********************************************************************
......@@ -107,12 +107,6 @@ void CDECL MSVCRT___setusermatherr(MSVCRT_matherr_func func)
TRACE("new matherr handler %p\n", func);
}
static inline void math_error(int type, const char *name, double arg1, double arg2, double retval)
{
struct MSVCRT__exception exception = {type, (char *)name, arg1, arg2, retval};
MSVCRT__matherr(&exception);
}
/*********************************************************************
* _set_SSE2_enable (MSVCRT.@)
*/
......
......@@ -683,7 +683,6 @@
@ cdecl _makepath(ptr str str str str) MSVCRT__makepath
@ cdecl _makepath_s(ptr long str str str str) MSVCRT__makepath_s
# stub _malloc_dbg(long long str long)
@ cdecl _matherr(ptr) MSVCRT__matherr
@ cdecl _mbbtombc(long)
# stub _mbbtombc_l(long ptr)
@ cdecl _mbbtype(long long)
......
......@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <math.h>
#include "windef.h"
......@@ -48,3 +49,12 @@ void CDECL MSVCRT20__wgetmainargs( int *argc, WCHAR** *wargv, WCHAR** *wenvp,
{
__wgetmainargs( argc, wargv, wenvp, expand_wildcards, &new_mode );
}
/*********************************************************************
* _matherr (MSVCRT20.@)
*/
int CDECL MSVCRT20__matherr(struct _exception *e)
{
return 0;
}
......@@ -1012,7 +1012,7 @@
@ cdecl _ltoa(long ptr long) msvcrt._ltoa
@ cdecl _ltow(long ptr long) msvcrt._ltow
@ cdecl _makepath(ptr str str str str) msvcrt._makepath
@ cdecl _matherr(ptr) msvcrt._matherr
@ cdecl _matherr(ptr) MSVCRT20__matherr
@ cdecl _mbbtombc(long) msvcrt._mbbtombc
@ cdecl _mbbtype(long long) msvcrt._mbbtype
@ cdecl _mbccpy(ptr ptr) msvcrt._mbccpy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment