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
211b8b5f
Commit
211b8b5f
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 WindowsTrimStringStart.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f3827dab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-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
+28
-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 @
211b8b5f
...
@@ -24,4 +24,4 @@
...
@@ -24,4 +24,4 @@
@ stdcall WindowsSubstring(ptr long ptr) combase.WindowsSubstring
@ stdcall WindowsSubstring(ptr long ptr) combase.WindowsSubstring
@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr) combase.WindowsSubstringWithSpecifiedLength
@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr) combase.WindowsSubstringWithSpecifiedLength
@ stub WindowsTrimStringEnd
@ stub WindowsTrimStringEnd
@ st
ub
WindowsTrimStringStart
@ st
dcall WindowsTrimStringStart(ptr ptr ptr) combase.
WindowsTrimStringStart
dlls/combase/combase.spec
View file @
211b8b5f
...
@@ -305,4 +305,4 @@
...
@@ -305,4 +305,4 @@
@ stdcall WindowsSubstring(ptr long ptr)
@ stdcall WindowsSubstring(ptr long ptr)
@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr)
@ stdcall WindowsSubstringWithSpecifiedLength(ptr long long ptr)
@ stub WindowsTrimStringEnd
@ stub WindowsTrimStringEnd
@ st
ub WindowsTrimStringStart
@ st
dcall WindowsTrimStringStart(ptr ptr ptr)
dlls/combase/string.c
View file @
211b8b5f
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "windows.h"
#include "windows.h"
#include "winerror.h"
#include "winerror.h"
#include "hstring.h"
#include "hstring.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
winstring
);
WINE_DEFAULT_DEBUG_CHANNEL
(
winstring
);
...
@@ -405,3 +406,30 @@ HRESULT WINAPI WindowsCompareStringOrdinal(HSTRING str1, HSTRING str2, INT32 *re
...
@@ -405,3 +406,30 @@ HRESULT WINAPI WindowsCompareStringOrdinal(HSTRING str1, HSTRING str2, INT32 *re
*
res
=
CompareStringOrdinal
(
buf1
,
len1
,
buf2
,
len2
,
FALSE
)
-
CSTR_EQUAL
;
*
res
=
CompareStringOrdinal
(
buf1
,
len1
,
buf2
,
len2
,
FALSE
)
-
CSTR_EQUAL
;
return
S_OK
;
return
S_OK
;
}
}
/***********************************************************************
* WindowsTrimStringStart (combase.@)
*/
HRESULT
WINAPI
WindowsTrimStringStart
(
HSTRING
str1
,
HSTRING
str2
,
HSTRING
*
out
)
{
struct
hstring_private
*
priv1
=
impl_from_HSTRING
(
str1
);
struct
hstring_private
*
priv2
=
impl_from_HSTRING
(
str2
);
UINT32
start
;
TRACE
(
"(%p, %p, %p)
\n
"
,
str1
,
str2
,
out
);
if
(
!
out
||
!
str2
||
!
priv2
->
length
)
return
E_INVALIDARG
;
if
(
!
str1
)
{
*
out
=
NULL
;
return
S_OK
;
}
for
(
start
=
0
;
start
<
priv1
->
length
;
start
++
)
{
if
(
!
memchrW
(
priv2
->
buffer
,
priv1
->
buffer
[
start
],
priv2
->
length
))
break
;
}
return
start
?
WindowsCreateString
(
&
priv1
->
buffer
[
start
],
priv1
->
length
-
start
,
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