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
fcc9b717
Commit
fcc9b717
authored
Sep 30, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Add Day function implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b84a4aa5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
global.c
dlls/vbscript/global.c
+20
-2
api.vbs
dlls/vbscript/tests/api.vbs
+3
-0
No files found.
dlls/vbscript/global.c
View file @
fcc9b717
...
@@ -198,6 +198,19 @@ static HRESULT to_string(VARIANT *v, BSTR *ret)
...
@@ -198,6 +198,19 @@ static HRESULT to_string(VARIANT *v, BSTR *ret)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
to_system_time
(
VARIANT
*
v
,
SYSTEMTIME
*
st
)
{
VARIANT
date
;
HRESULT
hres
;
V_VT
(
&
date
)
=
VT_EMPTY
;
hres
=
VariantChangeType
(
&
date
,
v
,
0
,
VT_DATE
);
if
(
FAILED
(
hres
))
return
hres
;
return
VariantTimeToSystemTime
(
V_DATE
(
&
date
),
st
);
}
static
HRESULT
set_object_site
(
script_ctx_t
*
ctx
,
IUnknown
*
obj
)
static
HRESULT
set_object_site
(
script_ctx_t
*
ctx
,
IUnknown
*
obj
)
{
{
IObjectWithSite
*
obj_site
;
IObjectWithSite
*
obj_site
;
...
@@ -1596,8 +1609,13 @@ static HRESULT Global_Time(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
...
@@ -1596,8 +1609,13 @@ static HRESULT Global_Time(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
static
HRESULT
Global_Day
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Day
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
{
FIXME
(
"
\n
"
);
SYSTEMTIME
st
;
return
E_NOTIMPL
;
HRESULT
hres
;
TRACE
(
"(%s)
\n
"
,
debugstr_variant
(
arg
));
hres
=
to_system_time
(
arg
,
&
st
);
return
FAILED
(
hres
)
?
hres
:
return_short
(
res
,
st
.
wDay
);
}
}
static
HRESULT
Global_Month
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Month
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
fcc9b717
...
@@ -1442,6 +1442,9 @@ Call ok(getVT(Log(CByte(2))) = "VT_R8", "getVT(Log(CByte(2))) = " & getVT(Log(CB
...
@@ -1442,6 +1442,9 @@ Call ok(getVT(Log(CByte(2))) = "VT_R8", "getVT(Log(CByte(2))) = " & getVT(Log(CB
Call
ok
(
getVT
(
Date
)
=
"VT_DATE"
,
"getVT(Date) = "
&
getVT
(
Date
))
Call
ok
(
getVT
(
Date
)
=
"VT_DATE"
,
"getVT(Date) = "
&
getVT
(
Date
))
Call
ok
(
getVT
(
Time
)
=
"VT_DATE"
,
"getVT(Time) = "
&
getVT
(
Time
))
Call
ok
(
getVT
(
Time
)
=
"VT_DATE"
,
"getVT(Time) = "
&
getVT
(
Time
))
Call
ok
(
getVT
(
Day
(
now
))
=
"VT_I2"
,
"getVT(Day(now)) = "
&
getVT
(
Day
(
now
)))
Call
ok
(
Day
(
2
)
=
1
,
"Day(time) = "
&
Day
(
2
))
Sub
testRGBError
(
arg1
,
arg2
,
arg3
,
error_num
)
Sub
testRGBError
(
arg1
,
arg2
,
arg3
,
error_num
)
on
error
resume
next
on
error
resume
next
Dim
x
Dim
x
...
...
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