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
7308be6c
Commit
7308be6c
authored
Sep 25, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added Space() implementation.
parent
ff349394
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
global.c
dlls/vbscript/global.c
+28
-2
api.vbs
dlls/vbscript/tests/api.vbs
+4
-0
No files found.
dlls/vbscript/global.c
View file @
7308be6c
...
...
@@ -672,8 +672,34 @@ static HRESULT Global_Trim(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI
static
HRESULT
Global_Space
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
BSTR
str
;
int
n
,
i
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_variant
(
arg
));
hres
=
to_int
(
arg
,
&
n
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
n
<
0
)
{
FIXME
(
"n = %d
\n
"
,
n
);
return
E_NOTIMPL
;
}
if
(
!
res
)
return
S_OK
;
str
=
SysAllocStringLen
(
NULL
,
n
);
if
(
!
str
)
return
E_OUTOFMEMORY
;
for
(
i
=
0
;
i
<
n
;
i
++
)
str
[
i
]
=
' '
;
V_VT
(
res
)
=
VT_BSTR
;
V_BSTR
(
res
)
=
str
;
return
S_OK
;
}
static
HRESULT
Global_String
(
vbdisp_t
*
This
,
VARIANT
*
arg
,
unsigned
args_cnt
,
VARIANT
*
res
)
...
...
dlls/vbscript/tests/api.vbs
View file @
7308be6c
...
...
@@ -179,4 +179,8 @@ Call ok(Len(1) = 1, "Len(1) = " & Len(1))
Call
ok
(
isNull
(
Len
(
null
)),
"Len(null) = "
&
Len
(
null
))
Call
ok
(
Len
(
empty
)
=
0
,
"Len(empty) = "
&
Len
(
empty
))
Call
ok
(
Space
(
1
)
=
" "
,
"Space(1) = "
&
Space
(
1
)
&
"
""
"
)
Call
ok
(
Space
(
0
)
=
""
,
"Space(0) = "
&
Space
(
0
)
&
"
""
"
)
Call
ok
(
Space
(
5
)
=
" "
,
"Space(5) = "
&
Space
(
5
)
&
"
""
"
)
Call
reportSuccess
()
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