ReactOS 0.4.15-dev-5669-g09dde2c
winesup.c File Reference
#include "precomp.h"
#include "winesup.h"
Include dependency graph for winesup.c:

Go to the source code of this file.

Macros

#define _SET_NUMBER_(type)   *va_arg((*ap), type*) = negative ? -cur : cur
 

Functions

void __declspec (noinline)
 

Macro Definition Documentation

◆ _SET_NUMBER_

#define _SET_NUMBER_ (   type)    *va_arg((*ap), type*) = negative ? -cur : cur

Definition at line 63 of file winesup.c.

Function Documentation

◆ __declspec()

void __declspec ( noinline  )

Definition at line 66 of file winesup.c.

74{
75 long double cur = 1, expcnt = 10;
76 unsigned fpcontrol;
77 BOOL negexp;
78#ifdef _M_ARM
80 fpcontrol = _controlfp(0, 0);
81#else
82 fpcontrol = _control87(0, 0);
85#endif
86 negexp = (exp < 0);
87 if(negexp)
88 exp = -exp;
89 /* update 'cur' with this exponent. */
90 while(exp) {
91 if(exp & 1)
92 cur *= expcnt;
93 exp /= 2;
94 expcnt = expcnt*expcnt;
95 }
96 cur = (negexp ? d/cur : d*cur);
97
98#ifdef _M_ARM
100 _controlfp(fpcontrol, 0xffffffff);
101#else
102 _control87(fpcontrol, 0xffffffff);
103#endif
104
105 if (!suppress) {
106 if (l_or_L_prefix) _SET_NUMBER_(double);
107 else _SET_NUMBER_(float);
108 }
109}
unsigned int BOOL
Definition: ntddk_ex.h:94
FxCollectionEntry * cur
#define _EM_UNDERFLOW
Definition: float.h:51
#define _EM_ZERODIVIDE
Definition: float.h:49
#define _EM_INEXACT
Definition: float.h:52
#define _EM_OVERFLOW
Definition: float.h:50
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _controlfp(_In_ unsigned int unNew, _In_ unsigned int unMask)
#define _EM_INVALID
Definition: float.h:47
#define _EM_DENORMAL
Definition: float.h:48
NTSYSAPI void WINAPI DbgBreakPoint(void)
boolean suppress
Definition: jpeglib.h:1006
#define d
Definition: ke_i.h:81
unsigned int __cdecl _control87(unsigned int, unsigned int)
Definition: _control87.c:16
DWORD exp
Definition: msg.c:16058
#define _SET_NUMBER_(type)
Definition: winesup.c:63
void int int ULONGLONG int l_or_L_prefix
Definition: winesup.h:35