Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
39aab380
Commit
39aab380
authored
May 15, 2003
by
Stefan Leichter
Committed by
Alexandre Julliard
May 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partial implementation of VarDecFromStr.
parent
eb359e26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+1
-1
variant.c
dlls/oleaut32/variant.c
+48
-0
No files found.
dlls/oleaut32/oleaut32.spec
View file @
39aab380
...
...
@@ -192,7 +192,7 @@
194 stub VarDecFromR8
195 stub VarDecFromDate
196 stub VarDecFromCy
197 st
ub VarDecFromStr
197 st
dcall VarDecFromStr(wstr long long ptr)
198 stub VarDecFromDisp
199 stub VarDecFromBool
200 stdcall GetErrorInfo(long ptr) ole32.GetErrorInfo
...
...
dlls/oleaut32/variant.c
View file @
39aab380
...
...
@@ -4573,6 +4573,54 @@ HRESULT WINAPI VarCyFromUI4(ULONG ulIn, CY* pcyOut) {
return
S_OK
;
}
/**********************************************************************
* VarDecFromStr [OLEAUT32.@]
*/
HRESULT
WINAPI
VarDecFromStr
(
OLECHAR
*
strIn
,
LCID
lcid
,
ULONG
dwFlags
,
DECIMAL
*
pdecOut
)
{
WCHAR
*
p
=
strIn
;
ULONGLONG
t
;
ULONG
cy
;
#ifdef FIXIT
DECIMAL_SETZERO
(
pdecOut
);
#else
pdecOut
->
u
.
s
.
sign
=
pdecOut
->
u
.
s
.
scale
=
UI1_MIN
;
pdecOut
->
Hi32
=
pdecOut
->
u1
.
s1
.
Mid32
=
pdecOut
->
u1
.
s1
.
Lo32
=
UI4_MIN
;
#endif
if
(
*
p
==
(
WCHAR
)
'-'
)
pdecOut
->
u
.
s
.
sign
=
DECIMAL_NEG
;
if
((
*
p
==
(
WCHAR
)
'-'
)
||
(
*
p
==
(
WCHAR
)
'+'
))
p
++
;
for
(;
*
p
!=
(
WCHAR
)
0
;
p
++
)
{
if
((
*
p
<
(
WCHAR
)
'0'
)
||
(
*
p
>
(
WCHAR
)
'9'
))
goto
error
;
t
=
(
ULONGLONG
)
pdecOut
->
u1
.
s1
.
Lo32
*
(
ULONGLONG
)
10
+
(
ULONGLONG
)(
*
p
-
(
WCHAR
)
'0'
);
cy
=
(
ULONG
)(
t
>>
32
);
pdecOut
->
u1
.
s1
.
Lo32
=
(
ULONG
)(
t
&
(
ULONGLONG
)
UI4_MAX
);
t
=
(
ULONGLONG
)
pdecOut
->
u1
.
s1
.
Mid32
*
(
ULONGLONG
)
10
+
(
ULONGLONG
)
cy
;
cy
=
(
ULONG
)(
t
>>
32
);
pdecOut
->
u1
.
s1
.
Mid32
=
(
ULONG
)(
t
&
(
ULONGLONG
)
UI4_MAX
);
t
=
(
ULONGLONG
)
pdecOut
->
Hi32
*
(
ULONGLONG
)
10
+
(
ULONGLONG
)
cy
;
cy
=
(
ULONG
)(
t
>>
32
);
pdecOut
->
Hi32
=
(
ULONG
)(
t
&
(
ULONGLONG
)
UI4_MAX
);
if
(
cy
)
goto
overflow
;
}
TRACE
(
"(4) %s -> sign %02x,hi %08lx,mid %08lx, lo%08lx, scale %08x
\n
"
,
debugstr_w
(
strIn
),
pdecOut
->
u
.
s
.
sign
,
pdecOut
->
Hi32
,
pdecOut
->
u1
.
s1
.
Mid32
,
pdecOut
->
u1
.
s1
.
Lo32
,
pdecOut
->
u
.
s
.
scale
);
return
S_OK
;
overflow:
/* like NT4 SP5 */
pdecOut
->
Hi32
=
pdecOut
->
u1
.
s1
.
Mid32
=
pdecOut
->
u1
.
s1
.
Lo32
=
0xffffffff
;
return
DISP_E_OVERFLOW
;
error:
ERR
(
"%s: unknown char at pos %d
\n
"
,
debugstr_w
(
strIn
),
p
-
strIn
+
1
);
return
DISP_E_TYPEMISMATCH
;
}
/**********************************************************************
* DosDateTimeToVariantTime [OLEAUT32.14]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment