Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
374280aa
Commit
374280aa
authored
12 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vbscript: Added interp_case implementation.
parent
f17aaf8d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/vbscript/interp.c
+39
-9
39 additions, 9 deletions
dlls/vbscript/interp.c
with
39 additions
and
9 deletions
dlls/vbscript/interp.c
+
39
−
9
View file @
374280aa
...
...
@@ -1302,6 +1302,20 @@ static HRESULT interp_imp(exec_ctx_t *ctx)
return
stack_push
(
ctx
,
&
v
);
}
static
HRESULT
var_cmp
(
exec_ctx_t
*
ctx
,
VARIANT
*
l
,
VARIANT
*
r
)
{
TRACE
(
"%s %s
\n
"
,
debugstr_variant
(
l
),
debugstr_variant
(
r
));
if
(
V_VT
(
l
)
==
VT_NULL
||
V_VT
(
r
)
==
VT_NULL
)
{
FIXME
(
"comparing nulls is not implemented
\n
"
);
return
E_NOTIMPL
;
}
/* FIXME: Fix comparing string to number */
return
VarCmp
(
l
,
r
,
ctx
->
script
->
lcid
,
0
);
}
static
HRESULT
cmp_oper
(
exec_ctx_t
*
ctx
)
{
variant_val_t
l
,
r
;
...
...
@@ -1313,16 +1327,11 @@ static HRESULT cmp_oper(exec_ctx_t *ctx)
hres
=
stack_pop_val
(
ctx
,
&
l
);
if
(
SUCCEEDED
(
hres
))
{
if
(
V_VT
(
l
.
v
)
==
VT_NULL
||
V_VT
(
r
.
v
)
==
VT_NULL
)
{
FIXME
(
"comparing nulls is not implemented
\n
"
);
hres
=
E_NOTIMPL
;
}
else
{
hres
=
VarCmp
(
l
.
v
,
r
.
v
,
ctx
->
script
->
lcid
,
0
);
}
hres
=
var_cmp
(
ctx
,
l
.
v
,
r
.
v
);
release_val
(
&
l
);
}
release_val
(
&
r
);
release_val
(
&
l
);
return
hres
;
}
...
...
@@ -1424,8 +1433,29 @@ static HRESULT interp_lteq(exec_ctx_t *ctx)
static
HRESULT
interp_case
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
const
unsigned
arg
=
ctx
->
instr
->
arg1
.
uint
;
variant_val_t
v
;
HRESULT
hres
;
TRACE
(
"%d
\n
"
,
arg
);
hres
=
stack_pop_val
(
ctx
,
&
v
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
var_cmp
(
ctx
,
stack_top
(
ctx
,
0
),
v
.
v
);
release_val
(
&
v
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
hres
==
VARCMP_EQ
)
{
stack_popn
(
ctx
,
1
);
instr_jmp
(
ctx
,
arg
);
}
else
{
ctx
->
instr
++
;
}
return
S_OK
;
}
static
HRESULT
disp_cmp
(
IDispatch
*
disp1
,
IDispatch
*
disp2
,
VARIANT_BOOL
*
ret
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment