ReactOS 0.4.15-dev-8102-g108db8f
_invoke_matherr.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS CRT library
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: Implementation of _invoke_matherr and __setusermatherr
5 * COPYRIGHT: Copyright 2021 Timo Kreuzer <timo.kreuzer@reactos.org>
6 */
7
8#include <math.h>
9
10/* MS headers have this in corecrt_startup.h */
12
14
15void
18{
20}
21
22int
25 int type,
26 char* name,
27 double arg1,
28 double arg2,
29 double retval)
30{
31 if (user_matherr != NULL)
32 {
33 struct _exception excpt;
34 excpt.type = type;
35 excpt.name = name;
36 excpt.arg1 = arg1;
37 excpt.arg2 = arg2;
38 excpt.retval = retval;
39 return user_matherr(&excpt);
40 }
41 else
42 {
43 return 0;
44 }
45}
void __cdecl __setusermatherr(_UserMathErrorFunctionPointer func)
static _UserMathErrorFunctionPointer user_matherr
int __cdecl _invoke_matherr(int type, char *name, double arg1, double arg2, double retval)
int(* _UserMathErrorFunctionPointer)(struct _exception *)
#define __cdecl
Definition: accygwin.h:79
#define NULL
Definition: types.h:112
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum func
Definition: glext.h:6028
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
double retval
Definition: math.h:25
char * name
Definition: math.h:22
double arg2
Definition: math.h:24
int type
Definition: math.h:21
double arg1
Definition: math.h:23
Definition: name.c:39