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
Releases
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
Patrick Hibbs
wine
Commits
22c2ac72
Commit
22c2ac72
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Implemented inline version of the iswxxx functions.
parent
e2c477b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/msvcrt/wcs.c
+11
-11
11 additions, 11 deletions
dlls/msvcrt/wcs.c
dlls/shlwapi/url.c
+7
-7
7 additions, 7 deletions
dlls/shlwapi/url.c
include/wine/unicode.h
+56
-0
56 additions, 0 deletions
include/wine/unicode.h
with
74 additions
and
18 deletions
dlls/msvcrt/wcs.c
+
11
−
11
View file @
22c2ac72
...
...
@@ -268,7 +268,7 @@ INT MSVCRT_wctomb( char *dst, WCHAR ch )
*/
INT
MSVCRT_iswalnum
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
(
C1_ALPHA
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
return
isalnum
W
(
wc
);
}
/*********************************************************************
...
...
@@ -276,7 +276,7 @@ INT MSVCRT_iswalnum( WCHAR wc )
*/
INT
MSVCRT_iswalpha
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
(
C1_ALPHA
|
C1_LOWER
|
C1_UPPER
);
return
isalpha
W
(
wc
);
}
/*********************************************************************
...
...
@@ -284,7 +284,7 @@ INT MSVCRT_iswalpha( WCHAR wc )
*/
INT
MSVCRT_iswcntrl
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
C1_CNTRL
;
return
iscntrl
W
(
wc
);
}
/*********************************************************************
...
...
@@ -292,7 +292,7 @@ INT MSVCRT_iswcntrl( WCHAR wc )
*/
INT
MSVCRT_iswdigit
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
C1_DIGIT
;
return
isdigit
W
(
wc
);
}
/*********************************************************************
...
...
@@ -300,7 +300,7 @@ INT MSVCRT_iswdigit( WCHAR wc )
*/
INT
MSVCRT_iswgraph
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
(
C1_ALPHA
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
return
isgraph
W
(
wc
);
}
/*********************************************************************
...
...
@@ -308,7 +308,7 @@ INT MSVCRT_iswgraph( WCHAR wc )
*/
INT
MSVCRT_iswlower
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
C1_LOWER
;
return
islower
W
(
wc
);
}
/*********************************************************************
...
...
@@ -316,7 +316,7 @@ INT MSVCRT_iswlower( WCHAR wc )
*/
INT
MSVCRT_iswprint
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
(
C1_ALPHA
|
C1_BLANK
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
return
isprint
W
(
wc
);
}
/*********************************************************************
...
...
@@ -324,7 +324,7 @@ INT MSVCRT_iswprint( WCHAR wc )
*/
INT
MSVCRT_iswpunct
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
C1_PUNCT
;
return
ispunct
W
(
wc
);
}
/*********************************************************************
...
...
@@ -332,7 +332,7 @@ INT MSVCRT_iswpunct( WCHAR wc )
*/
INT
MSVCRT_iswspace
(
WCHAR
wc
)
{
return
get_char_typ
eW
(
wc
)
&
C1_SPACE
;
return
isspac
eW
(
wc
);
}
/*********************************************************************
...
...
@@ -340,7 +340,7 @@ INT MSVCRT_iswspace( WCHAR wc )
*/
INT
MSVCRT_iswupper
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
C1_UPPER
;
return
isupper
W
(
wc
);
}
/*********************************************************************
...
...
@@ -348,7 +348,7 @@ INT MSVCRT_iswupper( WCHAR wc )
*/
INT
MSVCRT_iswxdigit
(
WCHAR
wc
)
{
return
get_char_type
W
(
wc
)
&
C1_XDIGIT
;
return
isxdigit
W
(
wc
);
}
/*********************************************************************
...
...
This diff is collapsed.
Click to expand it.
dlls/shlwapi/url.c
+
7
−
7
View file @
22c2ac72
...
...
@@ -88,7 +88,7 @@ static BOOL URL_NeedEscapeA(CHAR ch, DWORD dwFlags)
static
BOOL
URL_NeedEscapeW
(
WCHAR
ch
,
DWORD
dwFlags
)
{
if
(
is
w
alnum
(
ch
))
if
(
isalnum
W
(
ch
))
return
FALSE
;
if
(
dwFlags
&
URL_ESCAPE_SPACES_ONLY
)
{
...
...
@@ -136,7 +136,7 @@ static BOOL URL_JustLocation(LPCWSTR str)
if
(
*
str
)
{
while
(
*
str
&&
((
*
str
==
L'-'
)
||
(
*
str
==
L'.'
)
||
is
w
alnum
(
*
str
)))
str
++
;
isalnum
W
(
*
str
)))
str
++
;
if
(
*
str
==
L'/'
)
return
FALSE
;
}
return
TRUE
;
...
...
@@ -233,9 +233,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
while
(
*
wk1
)
{
switch
(
state
)
{
case
0
:
if
(
!
is
w
alnum
(
*
wk1
))
{
state
=
3
;
break
;}
if
(
!
isalnum
W
(
*
wk1
))
{
state
=
3
;
break
;}
*
wk2
++
=
*
wk1
++
;
if
(
!
is
w
alnum
(
*
wk1
))
{
state
=
3
;
break
;}
if
(
!
isalnum
W
(
*
wk1
))
{
state
=
3
;
break
;}
*
wk2
++
=
*
wk1
++
;
state
=
1
;
break
;
...
...
@@ -256,8 +256,8 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
wk2
+=
strlenW
(
wk2
);
break
;
case
4
:
if
(
!
is
w
alnum
(
*
wk1
)
&&
(
*
wk1
!=
L'-'
))
{
state
=
3
;
break
;}
while
(
is
w
alnum
(
*
wk1
)
||
(
*
wk1
==
L'-'
))
*
wk2
++
=
*
wk1
++
;
if
(
!
isalnum
W
(
*
wk1
)
&&
(
*
wk1
!=
L'-'
))
{
state
=
3
;
break
;}
while
(
isalnum
W
(
*
wk1
)
||
(
*
wk1
==
L'-'
))
*
wk2
++
=
*
wk1
++
;
state
=
5
;
break
;
case
5
:
...
...
@@ -946,7 +946,7 @@ HRESULT WINAPI UrlUnescapeW(
(
*
src
==
L'#'
||
*
src
==
L'?'
))
{
stop_unescapping
=
TRUE
;
next
=
*
src
;
}
else
if
(
*
src
==
L'%'
&&
is
w
xdigit
(
*
(
src
+
1
))
&&
is
w
xdigit
(
*
(
src
+
2
))
}
else
if
(
*
src
==
L'%'
&&
isxdigit
W
(
*
(
src
+
1
))
&&
isxdigit
W
(
*
(
src
+
2
))
&&
stop_unescapping
==
FALSE
)
{
INT
ih
;
WCHAR
buf
[
3
];
...
...
This diff is collapsed.
Click to expand it.
include/wine/unicode.h
+
56
−
0
View file @
22c2ac72
...
...
@@ -8,6 +8,7 @@
#define __WINE_UNICODE_H
#include
"windef.h"
#include
"winnls.h"
/* code page info common to SBCS and DBCS */
struct
cp_info
...
...
@@ -81,6 +82,61 @@ static inline unsigned short get_char_typeW( WCHAR ch )
return
wctype_table
[
wctype_table
[
ch
>>
8
]
+
(
ch
&
0xff
)];
}
inline
static
int
iscntrlW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_CNTRL
;
}
inline
static
int
ispunctW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_PUNCT
;
}
inline
static
int
isspaceW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_SPACE
;
}
inline
static
int
isdigitW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_DIGIT
;
}
inline
static
int
isxdigitW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_XDIGIT
;
}
inline
static
int
islowerW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_LOWER
;
}
inline
static
int
isupperW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_UPPER
;
}
inline
static
int
isalnumW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
}
inline
static
int
isalphaW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_LOWER
|
C1_UPPER
);
}
inline
static
int
isgraphW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
}
inline
static
int
isprintW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_BLANK
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
}
/* some useful string manipulation routines */
static
inline
unsigned
int
strlenW
(
const
WCHAR
*
str
)
...
...
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