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
02f6ea92
Commit
02f6ea92
authored
Oct 15, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added Chr implementation.
parent
f3d15811
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
global.c
dlls/vbscript/global.c
+23
-2
api.vbs
dlls/vbscript/tests/api.vbs
+4
-0
No files found.
dlls/vbscript/global.c
View file @
02f6ea92
...
...
@@ -1070,8 +1070,29 @@ static HRESULT Global_Asc(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIA
static
HRESULT
Global_Chr
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
int
c
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
hres
=
to_int
(
arg
,
&
c
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
c
<=
0
||
c
>=
0x100
)
{
FIXME
(
"invalid arg
\n
"
);
return
E_FAIL
;
}
if
(
res
)
{
WCHAR
ch
=
c
;
V_VT
(
res
)
=
VT_BSTR
;
V_BSTR
(
res
)
=
SysAllocStringLen
(
&
ch
,
1
);
if
(
!
V_BSTR
(
res
))
return
E_OUTOFMEMORY
;
}
return
S_OK
;
}
static
HRESULT
Global_AscW
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
02f6ea92
...
...
@@ -50,6 +50,10 @@ TestCStr 3, "3"
if
isEnglishLang
then
TestCStr
3.5
,
"3.5"
if
isEnglishLang
then
TestCStr
true
,
"True"
Call
ok
(
getVT
(
Chr
(
120
))
=
"VT_BSTR"
,
"getVT(Chr(120)) = "
&
getVT
(
Chr
(
120
)))
Call
ok
(
getVT
(
Chr
(
255
))
=
"VT_BSTR"
,
"getVT(Chr(255)) = "
&
getVT
(
Chr
(
255
)))
Call
ok
(
Chr
(
120
)
=
"x"
,
"Chr(120) = "
&
Chr
(
120
))
Call
ok
(
isObject
(
new
EmptyClass
),
"isObject(new EmptyClass) is not true?"
)
Set
x
=
new
EmptyClass
Call
ok
(
isObject
(
x
),
"isObject(x) is not true?"
)
...
...
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