ReactOS 0.4.17-dev-1421-g4623072
stubs.c File Reference
#include <stdint.h>
#include <intrin.h>
#include <malloc.h>
#include <math.h>
Include dependency graph for stubs.c:

Go to the source code of this file.

Macros

#define _USE_MATH_DEFINES
 

Functions

int __cdecl _crt_atexit (void(__cdecl *)(void))
 
int __cdecl atexit (void(__cdecl *function)(void))
 
void *__cdecl operator_new (size_t size)
 
void _cdecl operator_delete (void *mem)
 
int __cdecl __acrt_initialize_sse2 (void)
 
double copysign (double x, double y)
 
float copysignf (float x, float y)
 
double fmax (double x, double y)
 
float fmaxf (float x, float y)
 
double fmin (double x, double y)
 
float fminf (float x, float y)
 
double fma (double x, double y, double z)
 
float fmaf (float x, float y, float z)
 
double log2 (double x)
 
float log2f (float x)
 
long int lrint (double x)
 
long int lrintf (float x)
 

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

Definition at line 5 of file stubs.c.

Function Documentation

◆ __acrt_initialize_sse2()

int __cdecl __acrt_initialize_sse2 ( void  )

Definition at line 32 of file stubs.c.

33{
34 return 0;
35}

◆ _crt_atexit()

int __cdecl _crt_atexit ( void(__cdecl *)(void)  function)

Definition at line 41 of file onexit.cpp.

42{
43 return _register_onexit_function(&__acrt_atexit_table, reinterpret_cast<_onexit_t>(function));
44}
int(__cdecl * _onexit_t)(void)
int __cdecl _register_onexit_function(_onexit_table_t *const table, _onexit_t const function)
Definition: onexit.cpp:82
_onexit_table_t __acrt_atexit_table
Definition: onexit.cpp:25

Referenced by atexit().

◆ atexit()

int __cdecl atexit ( void(__cdecl *function)(void)  )

Definition at line 10 of file stubs.c.

11{
12 return _crt_atexit(function);
13}
int __cdecl _crt_atexit(void(__cdecl *)(void))
Definition: onexit.cpp:41

◆ copysign()

double copysign ( double  x,
double  y 
)

Definition at line 56 of file stubs.c.

57{
58 return _copysign(x, y);
59}
_ACRTIMP double __cdecl _copysign(double, double)
Definition: copysign.c:17
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ copysignf()

float copysignf ( float  x,
float  y 
)

Definition at line 61 of file stubs.c.

62{
63 return (float)_copysign((double)x, (double)y);
64}

◆ fma()

double fma ( double  x,
double  y,
double  z 
)

Definition at line 90 of file stubs.c.

91{
92 // Simplistic implementation
93 return (x * y) + z;
94}
GLdouble GLdouble z
Definition: glext.h:5874

◆ fmaf()

float fmaf ( float  x,
float  y,
float  z 
)

Definition at line 96 of file stubs.c.

97{
98 // Simplistic implementation
99 return (x * y) + z;
100}

◆ fmax()

double fmax ( double  x,
double  y 
)

Definition at line 66 of file stubs.c.

67{
68 if (x != x) return y;
69 if (y != y) return x;
70 return (x < y) ? y : x;
71}

Referenced by fmaxf(), fold_max(), GdipWidenPath(), GetMaxValue(), METAFILE_GraphicsDeleted(), pres_max(), and SOFTWARE_GdipDrawPath().

◆ fmaxf()

float fmaxf ( float  x,
float  y 
)

Definition at line 73 of file stubs.c.

74{
75 return (float)fmax((double)x, (double)y);
76}
double fmax(double x, double y)
Definition: stubs.c:66

Referenced by fold_max(), and get_region_bounding_box().

◆ fmin()

double fmin ( double  x,
double  y 
)

Definition at line 78 of file stubs.c.

79{
80 if (x != x) return y;
81 if (y != y) return x;
82 return (x < y) ? x : y;
83}

Referenced by fminf(), fold_min(), GetMaxValue(), METAFILE_GraphicsDeleted(), pres_min(), and test_DuplicateHandle().

◆ fminf()

float fminf ( float  x,
float  y 
)

Definition at line 85 of file stubs.c.

86{
87 return (float)fmin((double)x, (double)y);
88}
double fmin(double x, double y)
Definition: stubs.c:78

Referenced by fold_min(), and get_region_bounding_box().

◆ log2()

double log2 ( double  x)

Definition at line 102 of file stubs.c.

103{
104 // Simplistic implementation: log2(x) = log(x) / log(2)
105 return log(x) * M_LOG2E;
106}
#define M_LOG2E
Definition: math.h:405
#define log(outFile, fmt,...)
Definition: util.h:15

Referenced by exp2(), fold_log2(), log2f(), logbase2(), and pres_log().

◆ log2f()

float log2f ( float  x)

Definition at line 108 of file stubs.c.

109{
110 return (float)log2((double)x);
111}
double log2(double x)
Definition: stubs.c:102

Referenced by fold_log2(), and pres_log().

◆ lrint()

long int lrint ( double  x)

Definition at line 113 of file stubs.c.

114{
115 __debugbreak();
116 return 0;
117}
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698

◆ lrintf()

long int lrintf ( float  x)

Definition at line 119 of file stubs.c.

120{
121 __debugbreak();
122 return 0;
123}

◆ operator_delete()

void _cdecl operator_delete ( void *  mem)

Definition at line 20 of file stubs.c.

21{
22 free(mem);
23}
#define free
Definition: debug_ros.c:5
Definition: mem.c:349

◆ operator_new()

void *__cdecl operator_new ( size_t  size)

Definition at line 15 of file stubs.c.

16{
17 return malloc(size);
18}
#define malloc
Definition: debug_ros.c:4
GLsizeiptr size
Definition: glext.h:5919