ReactOS 0.4.16-dev-889-g9563c07
matherr.cpp File Reference
#include <math.h>
#include <corecrt_startup.h>
#include <corecrt_internal.h>
Include dependency graph for matherr.cpp:

Go to the source code of this file.

Functions

void __cdecl __acrt_initialize_user_matherr (void *encoded_null)
 
bool __cdecl __acrt_has_user_matherr (void)
 
int __cdecl __acrt_invoke_user_matherr (struct _exception *_Exp)
 
void __cdecl __setusermatherr (_UserMathErrorFunctionPointer _UserMathErrorFunction)
 
int __cdecl _invoke_matherr (int type, char *name, double arg1, double arg2, double retval)
 

Variables

static __crt_state_management::dual_state_global< _UserMathErrorFunctionPointer__acrt_global_user_matherr
 

Function Documentation

◆ __acrt_has_user_matherr()

bool __cdecl __acrt_has_user_matherr ( void  )

Definition at line 32 of file matherr.cpp.

33{
35 __crt_fast_decode_pointer(__acrt_global_user_matherr.value());
36 return user_matherr != nullptr;
37}
static _UserMathErrorFunctionPointer user_matherr
int(__cdecl * _UserMathErrorFunctionPointer)(struct _exception *)
static __crt_state_management::dual_state_global< _UserMathErrorFunctionPointer > __acrt_global_user_matherr
Definition: matherr.cpp:15

◆ __acrt_initialize_user_matherr()

void __cdecl __acrt_initialize_user_matherr ( void encoded_null)

Definition at line 22 of file matherr.cpp.

23{
25 reinterpret_cast<_UserMathErrorFunctionPointer>(encoded_null));
26}

Referenced by initialize_pointers().

◆ __acrt_invoke_user_matherr()

int __cdecl __acrt_invoke_user_matherr ( struct _exception _Exp)

Definition at line 43 of file matherr.cpp.

44{
46 __crt_fast_decode_pointer(__acrt_global_user_matherr.value());
47 if (user_matherr != nullptr)
48 {
49 return user_matherr(_Exp);
50 }
51
52 return 0;
53}
_CRTIMP short __cdecl _Exp(double *, double, short)

Referenced by _invoke_matherr().

◆ __setusermatherr()

void __cdecl __setusermatherr ( _UserMathErrorFunctionPointer  _UserMathErrorFunction)

Definition at line 61 of file matherr.cpp.

63{
65 __crt_fast_encode_pointer(_UserMathErrorFunction);
66
67 __acrt_global_user_matherr.value() = encodedPtr;
68}

Referenced by test_math_errors().

◆ _invoke_matherr()

int __cdecl _invoke_matherr ( int  type,
char name,
double  arg1,
double  arg2,
double  retval 
)

Definition at line 76 of file matherr.cpp.

82{
83 struct _exception excpt;
84 excpt.type = type;
85 excpt.name = name;
86 excpt.arg1 = arg1;
87 excpt.arg2 = arg2;
88 excpt.retval = retval;
89 return __acrt_invoke_user_matherr(&excpt);
90}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
int __cdecl __acrt_invoke_user_matherr(struct _exception *_Exp)
Definition: matherr.cpp:43
char * name
Definition: math.h:22
int type
Definition: math.h:21
int retval
Definition: wcstombs.cpp:91

Referenced by _handle_error(), and _handle_errorf().

Variable Documentation

◆ __acrt_global_user_matherr

__crt_state_management::dual_state_global<_UserMathErrorFunctionPointer> __acrt_global_user_matherr
static