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
441c8dcc
Commit
441c8dcc
authored
Feb 10, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Feb 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
combase: Implement WindowsTrimStringEnd.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
211b8b5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
api-ms-win-core-winrt-string-l1-1-0.spec
...rt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec
+1
-1
combase.spec
dlls/combase/combase.spec
+1
-1
string.c
dlls/combase/string.c
+27
-0
No files found.
dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec
View file @
441c8dcc
...
...
@@ -23,5 +23,5 @@
@ stdcall WindowsStringHasEmbeddedNull(ptr ptr) combase.WindowsStringHasEmbeddedNull
@ stdcall WindowsSubstring(ptr long ptr) combase.WindowsSubstring
@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr) combase.WindowsSubstringWithSpecifiedLength
@ st
ub
WindowsTrimStringEnd
@ st
dcall WindowsTrimStringEnd(ptr ptr ptr) combase.
WindowsTrimStringEnd
@ stdcall WindowsTrimStringStart(ptr ptr ptr) combase.WindowsTrimStringStart
dlls/combase/combase.spec
View file @
441c8dcc
...
...
@@ -304,5 +304,5 @@
@ stdcall WindowsStringHasEmbeddedNull(ptr ptr)
@ stdcall WindowsSubstring(ptr long ptr)
@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr)
@ st
ub WindowsTrimStringEnd
@ st
dcall WindowsTrimStringEnd(ptr ptr ptr)
@ stdcall WindowsTrimStringStart(ptr ptr ptr)
dlls/combase/string.c
View file @
441c8dcc
...
...
@@ -433,3 +433,30 @@ HRESULT WINAPI WindowsTrimStringStart(HSTRING str1, HSTRING str2, HSTRING *out)
return
start
?
WindowsCreateString
(
&
priv1
->
buffer
[
start
],
priv1
->
length
-
start
,
out
)
:
WindowsDuplicateString
(
str1
,
out
);
}
/***********************************************************************
* WindowsTrimStringEnd (combase.@)
*/
HRESULT
WINAPI
WindowsTrimStringEnd
(
HSTRING
str1
,
HSTRING
str2
,
HSTRING
*
out
)
{
struct
hstring_private
*
priv1
=
impl_from_HSTRING
(
str1
);
struct
hstring_private
*
priv2
=
impl_from_HSTRING
(
str2
);
UINT32
len
;
TRACE
(
"(%p, %p, %p)
\n
"
,
str1
,
str2
,
out
);
if
(
!
out
||
!
str2
||
!
priv2
->
length
)
return
E_INVALIDARG
;
if
(
!
str1
)
{
*
out
=
NULL
;
return
S_OK
;
}
for
(
len
=
priv1
->
length
;
len
>
0
;
len
--
)
{
if
(
!
memchrW
(
priv2
->
buffer
,
priv1
->
buffer
[
len
-
1
],
priv2
->
length
))
break
;
}
return
(
len
<
priv1
->
length
)
?
WindowsCreateString
(
priv1
->
buffer
,
len
,
out
)
:
WindowsDuplicateString
(
str1
,
out
);
}
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