ReactOS  0.4.13-dev-66-gc714b7f
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
79  DbgBreakPoint();
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
99  DbgBreakPoint();
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 }
boolean suppress
Definition: jpeglib.h:1005
#define _EM_DENORMAL
Definition: float.h:48
unsigned int __cdecl _control87(unsigned int, unsigned int)
Definition: cntrlfp.c:43
#define _EM_INVALID
Definition: float.h:47
void int int ULONGLONG int l_or_L_prefix
Definition: winesup.h:32
void DbgBreakPoint()
Definition: mach.c:558
#define _EM_ZERODIVIDE
Definition: float.h:49
unsigned int BOOL
Definition: ntddk_ex.h:94
#define d
Definition: ke_i.h:81
#define _EM_INEXACT
Definition: float.h:52
#define _SET_NUMBER_(type)
Definition: winesup.c:63
#define _EM_OVERFLOW
Definition: float.h:50
DWORD exp
Definition: msg.c:15681
#define _EM_UNDERFLOW
Definition: float.h:51
__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _controlfp(_In_ unsigned int unNew, _In_ unsigned int unMask)