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
a0e73a1f
Commit
a0e73a1f
authored
Jan 27, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/syslink: Don't use exported StrCmpNIW().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5090c22e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
31 deletions
+8
-31
syslink.c
dlls/comctl32/syslink.c
+8
-31
No files found.
dlls/comctl32/syslink.c
View file @
a0e73a1f
...
@@ -42,8 +42,6 @@
...
@@ -42,8 +42,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
syslink
);
WINE_DEFAULT_DEBUG_CHANNEL
(
syslink
);
INT
WINAPI
StrCmpNIW
(
LPCWSTR
,
LPCWSTR
,
INT
);
typedef
struct
typedef
struct
{
{
int
nChars
;
int
nChars
;
...
@@ -99,11 +97,6 @@ typedef struct
...
@@ -99,11 +97,6 @@ typedef struct
BOOL
IgnoreReturn
;
/* (infoPtr->Style & LWS_IGNORERETURN) on creation */
BOOL
IgnoreReturn
;
/* (infoPtr->Style & LWS_IGNORERETURN) on creation */
}
SYSLINK_INFO
;
}
SYSLINK_INFO
;
static
const
WCHAR
SL_LINKOPEN
[]
=
{
'<'
,
'a'
,
0
};
static
const
WCHAR
SL_HREF
[]
=
{
'h'
,
'r'
,
'e'
,
'f'
,
'='
,
'\"'
,
0
};
static
const
WCHAR
SL_ID
[]
=
{
'i'
,
'd'
,
'='
,
'\"'
,
0
};
static
const
WCHAR
SL_LINKCLOSE
[]
=
{
'<'
,
'/'
,
'a'
,
'>'
,
0
};
/* Control configuration constants */
/* Control configuration constants */
#define SL_LEFTMARGIN (0)
#define SL_LEFTMARGIN (0)
...
@@ -176,32 +169,16 @@ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr)
...
@@ -176,32 +169,16 @@ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr)
}
}
/***********************************************************************
/***********************************************************************
* SYSLINK_StrCmpNIW
* Wrapper for StrCmpNIW to ensure 'len' is not too big.
*/
static
INT
SYSLINK_StrCmpNIW
(
LPCWSTR
str
,
LPCWSTR
comp
,
INT
len
)
{
INT
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
!
str
[
i
])
{
len
=
i
+
1
;
break
;
}
}
return
StrCmpNIW
(
str
,
comp
,
len
);
}
/***********************************************************************
* SYSLINK_ParseText
* SYSLINK_ParseText
* Parses the window text string and creates a document. Returns the
* Parses the window text string and creates a document. Returns the
* number of document items created.
* number of document items created.
*/
*/
static
UINT
SYSLINK_ParseText
(
SYSLINK_INFO
*
infoPtr
,
LPCWSTR
Text
)
static
UINT
SYSLINK_ParseText
(
SYSLINK_INFO
*
infoPtr
,
LPCWSTR
Text
)
{
{
static
const
WCHAR
SL_LINKOPEN
[]
=
{
'<'
,
'a'
};
static
const
WCHAR
SL_HREF
[]
=
{
'h'
,
'r'
,
'e'
,
'f'
,
'='
,
'\"'
};
static
const
WCHAR
SL_ID
[]
=
{
'i'
,
'd'
,
'='
,
'\"'
};
static
const
WCHAR
SL_LINKCLOSE
[]
=
{
'<'
,
'/'
,
'a'
,
'>'
};
LPCWSTR
current
,
textstart
=
NULL
,
linktext
=
NULL
,
firsttag
=
NULL
;
LPCWSTR
current
,
textstart
=
NULL
,
linktext
=
NULL
,
firsttag
=
NULL
;
int
taglen
=
0
,
textlen
=
0
,
linklen
=
0
,
docitems
=
0
;
int
taglen
=
0
,
textlen
=
0
,
linklen
=
0
,
docitems
=
0
;
PDOC_ITEM
Last
=
NULL
;
PDOC_ITEM
Last
=
NULL
;
...
@@ -215,7 +192,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
...
@@ -215,7 +192,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
{
{
if
(
*
current
==
'<'
)
if
(
*
current
==
'<'
)
{
{
if
(
!
SYSLINK_StrCmpNIW
(
current
,
SL_LINKOPEN
,
2
)
&&
(
CurrentType
==
slText
))
if
(
!
strncmpiW
(
current
,
SL_LINKOPEN
,
sizeof
(
SL_LINKOPEN
)
/
sizeof
(
SL_LINKOPEN
[
0
])
)
&&
(
CurrentType
==
slText
))
{
{
BOOL
ValidParam
=
FALSE
,
ValidLink
=
FALSE
;
BOOL
ValidParam
=
FALSE
,
ValidLink
=
FALSE
;
...
@@ -243,14 +220,14 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
...
@@ -243,14 +220,14 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
CheckParameter:
CheckParameter:
/* compare the current position with all known parameters */
/* compare the current position with all known parameters */
if
(
!
SYSLINK_StrCmpNIW
(
tmp
,
SL_HREF
,
6
))
if
(
!
strncmpiW
(
tmp
,
SL_HREF
,
sizeof
(
SL_HREF
)
/
sizeof
(
SL_HREF
[
0
])
))
{
{
taglen
+=
6
;
taglen
+=
6
;
ValidParam
=
TRUE
;
ValidParam
=
TRUE
;
CurrentParameter
=
&
lpUrl
;
CurrentParameter
=
&
lpUrl
;
CurrentParameterLen
=
&
lenUrl
;
CurrentParameterLen
=
&
lenUrl
;
}
}
else
if
(
!
SYSLINK_StrCmpNIW
(
tmp
,
SL_ID
,
4
))
else
if
(
!
strncmpiW
(
tmp
,
SL_ID
,
sizeof
(
SL_ID
)
/
sizeof
(
SL_ID
[
0
])
))
{
{
taglen
+=
4
;
taglen
+=
4
;
ValidParam
=
TRUE
;
ValidParam
=
TRUE
;
...
@@ -324,7 +301,7 @@ CheckParameter:
...
@@ -324,7 +301,7 @@ CheckParameter:
}
}
}
}
}
}
else
if
(
!
SYSLINK_StrCmpNIW
(
current
,
SL_LINKCLOSE
,
4
)
&&
(
CurrentType
==
slLink
)
&&
firsttag
)
else
if
(
!
strncmpiW
(
current
,
SL_LINKCLOSE
,
sizeof
(
SL_LINKCLOSE
)
/
sizeof
(
SL_LINKCLOSE
[
0
])
)
&&
(
CurrentType
==
slLink
)
&&
firsttag
)
{
{
/* there's a <a...> tag opened, first add the previous text, if present */
/* there's a <a...> tag opened, first add the previous text, if present */
if
(
textstart
!=
NULL
&&
textlen
>
0
&&
firsttag
>
textstart
)
if
(
textstart
!=
NULL
&&
textlen
>
0
&&
firsttag
>
textstart
)
...
...
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