Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2270f14e
Commit
2270f14e
authored
Feb 19, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added RegExp2 flags getters and setters implementation.
parent
4b0f4753
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
12 deletions
+71
-12
regexp.c
dlls/vbscript/regexp.c
+18
-0
regexp.h
dlls/vbscript/regexp.h
+1
-0
vbregexp.c
dlls/vbscript/vbregexp.c
+52
-12
No files found.
dlls/vbscript/regexp.c
View file @
2270f14e
...
...
@@ -3286,3 +3286,21 @@ out:
heap_pool_clear
(
mark
);
return
re
;
}
HRESULT
regexp_set_flags
(
regexp_t
**
regexp
,
void
*
cx
,
heap_pool_t
*
pool
,
WORD
flags
)
{
if
(((
*
regexp
)
->
flags
&
REG_FOLD
)
!=
(
flags
&
REG_FOLD
))
{
regexp_t
*
new_regexp
=
regexp_new
(
cx
,
pool
,
(
*
regexp
)
->
source
,
(
*
regexp
)
->
source_len
,
flags
,
FALSE
);
if
(
!
new_regexp
)
return
E_FAIL
;
regexp_destroy
(
*
regexp
);
*
regexp
=
new_regexp
;
}
else
{
(
*
regexp
)
->
flags
=
flags
;
}
return
S_OK
;
}
dlls/vbscript/regexp.h
View file @
2270f14e
...
...
@@ -65,6 +65,7 @@ regexp_t* regexp_new(void*, heap_pool_t*, const WCHAR*, DWORD, WORD, BOOL) DECLS
void
regexp_destroy
(
regexp_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
regexp_execute
(
regexp_t
*
,
void
*
,
heap_pool_t
*
,
const
WCHAR
*
,
DWORD
,
match_state_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
regexp_set_flags
(
regexp_t
**
,
void
*
,
heap_pool_t
*
,
WORD
)
DECLSPEC_HIDDEN
;
static
inline
match_state_t
*
alloc_match_state
(
regexp_t
*
regexp
,
heap_pool_t
*
pool
,
const
WCHAR
*
pos
)
...
...
dlls/vbscript/vbregexp.c
View file @
2270f14e
...
...
@@ -247,43 +247,79 @@ static HRESULT WINAPI RegExp2_put_Pattern(IRegExp2 *iface, BSTR pattern)
static
HRESULT
WINAPI
RegExp2_get_IgnoreCase
(
IRegExp2
*
iface
,
VARIANT_BOOL
*
pIgnoreCase
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pIgnoreCase
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pIgnoreCase
);
if
(
!
pIgnoreCase
)
return
E_POINTER
;
*
pIgnoreCase
=
This
->
flags
&
REG_FOLD
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_put_IgnoreCase
(
IRegExp2
*
iface
,
VARIANT_BOOL
ignoreCase
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
ignoreCase
?
"true"
:
"false"
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
ignoreCase
?
"true"
:
"false"
);
if
(
ignoreCase
)
This
->
flags
|=
REG_FOLD
;
else
This
->
flags
&=
~
REG_FOLD
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_get_Global
(
IRegExp2
*
iface
,
VARIANT_BOOL
*
pGlobal
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pGlobal
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pGlobal
);
if
(
!
pGlobal
)
return
E_POINTER
;
*
pGlobal
=
This
->
flags
&
REG_GLOB
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_put_Global
(
IRegExp2
*
iface
,
VARIANT_BOOL
global
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
global
?
"true"
:
"false"
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
global
?
"true"
:
"false"
);
if
(
global
)
This
->
flags
|=
REG_GLOB
;
else
This
->
flags
&=
~
REG_GLOB
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_get_Multiline
(
IRegExp2
*
iface
,
VARIANT_BOOL
*
pMultiline
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pMultiline
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pMultiline
);
if
(
!
pMultiline
)
return
E_POINTER
;
*
pMultiline
=
This
->
flags
&
REG_MULTILINE
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_put_Multiline
(
IRegExp2
*
iface
,
VARIANT_BOOL
multiline
)
{
RegExp2
*
This
=
impl_from_IRegExp2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
multiline
?
"true"
:
"false"
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
multiline
?
"true"
:
"false"
);
if
(
multiline
)
This
->
flags
|=
REG_MULTILINE
;
else
This
->
flags
&=
~
REG_MULTILINE
;
return
S_OK
;
}
static
HRESULT
WINAPI
RegExp2_Execute
(
IRegExp2
*
iface
,
...
...
@@ -313,6 +349,10 @@ static HRESULT WINAPI RegExp2_Test(IRegExp2 *iface, BSTR sourceString, VARIANT_B
strlenW
(
This
->
pattern
),
This
->
flags
,
FALSE
);
if
(
!
This
->
regexp
)
return
E_FAIL
;
}
else
{
hres
=
regexp_set_flags
(
&
This
->
regexp
,
NULL
,
&
This
->
pool
,
This
->
flags
);
if
(
FAILED
(
hres
))
return
hres
;
}
mark
=
heap_pool_mark
(
&
This
->
pool
);
...
...
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