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
9554e44e
Commit
9554e44e
authored
Sep 28, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added Now() implementation.
parent
c5a4878f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
global.c
dlls/vbscript/global.c
+17
-2
api.vbs
dlls/vbscript/tests/api.vbs
+2
-0
run.c
dlls/vbscript/tests/run.c
+2
-0
No files found.
dlls/vbscript/global.c
View file @
9554e44e
...
@@ -130,6 +130,15 @@ static inline HRESULT return_null(VARIANT *res)
...
@@ -130,6 +130,15 @@ static inline HRESULT return_null(VARIANT *res)
return
S_OK
;
return
S_OK
;
}
}
static
inline
HRESULT
return_date
(
VARIANT
*
res
,
double
date
)
{
if
(
res
)
{
V_VT
(
res
)
=
VT_DATE
;
V_DATE
(
res
)
=
date
;
}
return
S_OK
;
}
static
HRESULT
to_int
(
VARIANT
*
v
,
int
*
ret
)
static
HRESULT
to_int
(
VARIANT
*
v
,
int
*
ret
)
{
{
switch
(
V_VT
(
v
))
{
switch
(
V_VT
(
v
))
{
...
@@ -967,8 +976,14 @@ static HRESULT Global_Sgn(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
...
@@ -967,8 +976,14 @@ static HRESULT Global_Sgn(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static
HRESULT
Global_Now
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Now
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
{
FIXME
(
"
\n
"
);
SYSTEMTIME
lt
;
return
E_NOTIMPL
;
double
date
;
TRACE
(
"
\n
"
);
GetLocalTime
(
&
lt
);
SystemTimeToVariantTime
(
&
lt
,
&
date
);
return
return_date
(
res
,
date
);
}
}
static
HRESULT
Global_Date
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
static
HRESULT
Global_Date
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
9554e44e
...
@@ -232,4 +232,6 @@ if isEnglishLang then
...
@@ -232,4 +232,6 @@ if isEnglishLang then
Call
ok
(
MonthName
(
12
,
true
)
=
"Dec"
,
"MonthName(12, true) = "
&
MonthName
(
12
,
true
))
Call
ok
(
MonthName
(
12
,
true
)
=
"Dec"
,
"MonthName(12, true) = "
&
MonthName
(
12
,
true
))
end
if
end
if
Call
ok
(
getVT
(
Now
())
=
"VT_DATE"
,
"getVT(Now()) = "
&
getVT
(
Now
()))
Call
reportSuccess
()
Call
reportSuccess
()
dlls/vbscript/tests/run.c
View file @
9554e44e
...
@@ -173,6 +173,8 @@ static const char *vt2a(VARIANT *v)
...
@@ -173,6 +173,8 @@ static const char *vt2a(VARIANT *v)
return
"VT_I4"
;
return
"VT_I4"
;
case
VT_R8
:
case
VT_R8
:
return
"VT_R8"
;
return
"VT_R8"
;
case
VT_DATE
:
return
"VT_DATE"
;
case
VT_BSTR
:
case
VT_BSTR
:
return
"VT_BSTR"
;
return
"VT_BSTR"
;
case
VT_DISPATCH
:
case
VT_DISPATCH
:
...
...
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