ReactOS 0.4.15-dev-7924-g5949c20
_handle_error.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 _handle_error / _handle_errorf for libm
5 * COPYRIGHT: Copyright 2022 Timo Kreuzer <timo.kreuzer@reactos.org>
6 */
7
8#include <math.h>
9
10int
13 int type,
14 char* name,
15 double arg1,
16 double arg2,
17 double retval);
18
32double
35 char *fname,
36 int opcode,
37 unsigned long long value,
38 int type,
39 int flags,
40 int error,
41 double arg1,
42 double arg2,
43 int nargs)
44{
45 float retval = *(double*)&value;
46
47 _invoke_matherr(type, fname, arg1, arg2, retval);
48
49 return retval;
50}
51
52
53
54float
57 char *fname,
58 int opcode,
59 unsigned long long value,
60 int type,
61 int flags,
62 int error,
63 float arg1,
64 float arg2,
65 int nargs)
66{
67 float retval = *(float*)&value;
68
69 _invoke_matherr(type, fname, arg1, arg2, retval);
70
71 return retval;
72}
double __cdecl _handle_error(char *fname, int opcode, unsigned long long value, int type, int flags, int error, double arg1, double arg2, int nargs)
Handles an error condition.
Definition: _handle_error.c:34
float __cdecl _handle_errorf(char *fname, int opcode, unsigned long long value, int type, int flags, int error, float arg1, float arg2, int nargs)
Definition: _handle_error.c:56
int __cdecl _invoke_matherr(int type, char *name, double arg1, double arg2, double retval)
#define __cdecl
Definition: accygwin.h:79
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
GLbitfield flags
Definition: glext.h:7161
#define error(str)
Definition: mkdosfs.c:1605
Definition: name.c:39
Definition: pdh_main.c:94