Commit d46cc43f authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Added support for the DECIMAL type.

Names are no longer suffixed with 32! Removed it.
parent 9a8a106f
...@@ -584,7 +584,7 @@ ICOM_DEFINE(IMalloc,IUnknown) ...@@ -584,7 +584,7 @@ ICOM_DEFINE(IMalloc,IUnknown)
#define IMalloc_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b) #define IMalloc_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IMalloc_AddRef(p) ICOM_CALL (AddRef,p) #define IMalloc_AddRef(p) ICOM_CALL (AddRef,p)
#define IMalloc_Release(p) ICOM_CALL (Release,p) #define IMalloc_Release(p) ICOM_CALL (Release,p)
/*** IMalloc32 methods ***/ /*** IMalloc methods ***/
#define IMalloc_Alloc(p,a) ICOM_CALL1(Alloc,p,a) #define IMalloc_Alloc(p,a) ICOM_CALL1(Alloc,p,a)
#define IMalloc_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b) #define IMalloc_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b)
#define IMalloc_Free(p,a) ICOM_CALL1(Free,p,a) #define IMalloc_Free(p,a) ICOM_CALL1(Free,p,a)
......
...@@ -141,7 +141,7 @@ struct tagVARIANT { ...@@ -141,7 +141,7 @@ struct tagVARIANT {
DATE date; DATE date;
BSTR bstrVal; BSTR bstrVal;
CY cyVal; CY cyVal;
/* DECIMAL decVal; */ DECIMAL decVal;
IUnknown* punkVal; IUnknown* punkVal;
IDispatch* pdispVal; IDispatch* pdispVal;
SAFEARRAY* parray; SAFEARRAY* parray;
...@@ -164,7 +164,7 @@ struct tagVARIANT { ...@@ -164,7 +164,7 @@ struct tagVARIANT {
VARIANT* pvarVal; VARIANT* pvarVal;
PVOID byref; PVOID byref;
CY* pcyVal; CY* pcyVal;
/* DECIMAL* pdecVal; */ DECIMAL* pdecVal;
IUnknown** ppunkVal; IUnknown** ppunkVal;
IDispatch** ppdispVal; IDispatch** ppdispVal;
SAFEARRAY** pparray; SAFEARRAY** pparray;
......
...@@ -163,6 +163,39 @@ typedef union tagCY { ...@@ -163,6 +163,39 @@ typedef union tagCY {
#endif /* _tagCY_DEFINED */ #endif /* _tagCY_DEFINED */
typedef struct tagDEC {
USHORT wReserved;
union {
struct {
BYTE scale;
BYTE sign;
} DUMMYSTRUCTNAME1;
USHORT signscale;
} DUMMYUNIONNAME1;
ULONG Hi32;
union {
struct {
#ifdef BIG_ENDIAN
ULONG Mid32;
ULONG Lo32;
#else /* defined(BIG_ENDIAN) */
ULONG Lo32;
ULONG Mid32;
#endif /* defined(BIG_ENDIAN) */
} DUMMYSTRUCTNAME2;
ULONGLONG Lo64;
} DUMMYUNIONNAME2;
} DECIMAL;
#define DECIMAL_NEG ((BYTE)0x80)
#ifndef NONAMELESSUNION
#define DECIMAL_SETZERO(d) \
do {(d).Lo64 = 0; (d).Hi32 = 0; (d).signscale = 0;} while (0)
#else
#define DECIMAL_SETZERO(d) \
do {(d).u2.Lo64 = 0; (d).Hi32 = 0; (d).u1.signscale = 0;} while (0)
#endif
/* /*
* 0 == FALSE and -1 == TRUE * 0 == FALSE and -1 == TRUE
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment