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
22c2ac72
Commit
22c2ac72
authored
Nov 08, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented inline version of the iswxxx functions.
parent
e2c477b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
18 deletions
+74
-18
wcs.c
dlls/msvcrt/wcs.c
+11
-11
url.c
dlls/shlwapi/url.c
+7
-7
unicode.h
include/wine/unicode.h
+56
-0
No files found.
dlls/msvcrt/wcs.c
View file @
22c2ac72
...
@@ -268,7 +268,7 @@ INT MSVCRT_wctomb( char *dst, WCHAR ch )
...
@@ -268,7 +268,7 @@ INT MSVCRT_wctomb( char *dst, WCHAR ch )
*/
*/
INT
MSVCRT_iswalnum
(
WCHAR
wc
)
INT
MSVCRT_iswalnum
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
return
isalnumW
(
wc
);
}
}
/*********************************************************************
/*********************************************************************
...
@@ -276,7 +276,7 @@ INT MSVCRT_iswalnum( WCHAR wc )
...
@@ -276,7 +276,7 @@ INT MSVCRT_iswalnum( WCHAR wc )
*/
*/
INT
MSVCRT_iswalpha
(
WCHAR
wc
)
INT
MSVCRT_iswalpha
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_LOWER
|
C1_UPPER
);
return
isalphaW
(
wc
);
}
}
/*********************************************************************
/*********************************************************************
...
@@ -284,7 +284,7 @@ INT MSVCRT_iswalpha( WCHAR wc )
...
@@ -284,7 +284,7 @@ INT MSVCRT_iswalpha( WCHAR wc )
*/
*/
INT
MSVCRT_iswcntrl
(
WCHAR
wc
)
INT
MSVCRT_iswcntrl
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_CNTRL
;
return
iscntrlW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
@@ -292,7 +292,7 @@ INT MSVCRT_iswcntrl( WCHAR wc )
...
@@ -292,7 +292,7 @@ INT MSVCRT_iswcntrl( WCHAR wc )
*/
*/
INT
MSVCRT_iswdigit
(
WCHAR
wc
)
INT
MSVCRT_iswdigit
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_DIGIT
;
return
isdigitW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
@@ -300,7 +300,7 @@ INT MSVCRT_iswdigit( WCHAR wc )
...
@@ -300,7 +300,7 @@ INT MSVCRT_iswdigit( WCHAR wc )
*/
*/
INT
MSVCRT_iswgraph
(
WCHAR
wc
)
INT
MSVCRT_iswgraph
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
return
isgraphW
(
wc
);
}
}
/*********************************************************************
/*********************************************************************
...
@@ -308,7 +308,7 @@ INT MSVCRT_iswgraph( WCHAR wc )
...
@@ -308,7 +308,7 @@ INT MSVCRT_iswgraph( WCHAR wc )
*/
*/
INT
MSVCRT_iswlower
(
WCHAR
wc
)
INT
MSVCRT_iswlower
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_LOWER
;
return
islowerW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
@@ -316,7 +316,7 @@ INT MSVCRT_iswlower( WCHAR wc )
...
@@ -316,7 +316,7 @@ INT MSVCRT_iswlower( WCHAR wc )
*/
*/
INT
MSVCRT_iswprint
(
WCHAR
wc
)
INT
MSVCRT_iswprint
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_BLANK
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
return
isprintW
(
wc
);
}
}
/*********************************************************************
/*********************************************************************
...
@@ -324,7 +324,7 @@ INT MSVCRT_iswprint( WCHAR wc )
...
@@ -324,7 +324,7 @@ INT MSVCRT_iswprint( WCHAR wc )
*/
*/
INT
MSVCRT_iswpunct
(
WCHAR
wc
)
INT
MSVCRT_iswpunct
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_PUNCT
;
return
ispunctW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
@@ -332,7 +332,7 @@ INT MSVCRT_iswpunct( WCHAR wc )
...
@@ -332,7 +332,7 @@ INT MSVCRT_iswpunct( WCHAR wc )
*/
*/
INT
MSVCRT_iswspace
(
WCHAR
wc
)
INT
MSVCRT_iswspace
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_SPACE
;
return
isspaceW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
@@ -340,7 +340,7 @@ INT MSVCRT_iswspace( WCHAR wc )
...
@@ -340,7 +340,7 @@ INT MSVCRT_iswspace( WCHAR wc )
*/
*/
INT
MSVCRT_iswupper
(
WCHAR
wc
)
INT
MSVCRT_iswupper
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_UPPER
;
return
isupperW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
@@ -348,7 +348,7 @@ INT MSVCRT_iswupper( WCHAR wc )
...
@@ -348,7 +348,7 @@ INT MSVCRT_iswupper( WCHAR wc )
*/
*/
INT
MSVCRT_iswxdigit
(
WCHAR
wc
)
INT
MSVCRT_iswxdigit
(
WCHAR
wc
)
{
{
return
get_char_typeW
(
wc
)
&
C1_XDIGIT
;
return
isxdigitW
(
wc
)
;
}
}
/*********************************************************************
/*********************************************************************
...
...
dlls/shlwapi/url.c
View file @
22c2ac72
...
@@ -88,7 +88,7 @@ static BOOL URL_NeedEscapeA(CHAR ch, DWORD dwFlags)
...
@@ -88,7 +88,7 @@ static BOOL URL_NeedEscapeA(CHAR ch, DWORD dwFlags)
static
BOOL
URL_NeedEscapeW
(
WCHAR
ch
,
DWORD
dwFlags
)
static
BOOL
URL_NeedEscapeW
(
WCHAR
ch
,
DWORD
dwFlags
)
{
{
if
(
is
walnum
(
ch
))
if
(
is
alnumW
(
ch
))
return
FALSE
;
return
FALSE
;
if
(
dwFlags
&
URL_ESCAPE_SPACES_ONLY
)
{
if
(
dwFlags
&
URL_ESCAPE_SPACES_ONLY
)
{
...
@@ -136,7 +136,7 @@ static BOOL URL_JustLocation(LPCWSTR str)
...
@@ -136,7 +136,7 @@ static BOOL URL_JustLocation(LPCWSTR str)
if
(
*
str
)
{
if
(
*
str
)
{
while
(
*
str
&&
((
*
str
==
L'-'
)
||
while
(
*
str
&&
((
*
str
==
L'-'
)
||
(
*
str
==
L'.'
)
||
(
*
str
==
L'.'
)
||
is
walnum
(
*
str
)))
str
++
;
is
alnumW
(
*
str
)))
str
++
;
if
(
*
str
==
L'/'
)
return
FALSE
;
if
(
*
str
==
L'/'
)
return
FALSE
;
}
}
return
TRUE
;
return
TRUE
;
...
@@ -233,9 +233,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
...
@@ -233,9 +233,9 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
while
(
*
wk1
)
{
while
(
*
wk1
)
{
switch
(
state
)
{
switch
(
state
)
{
case
0
:
case
0
:
if
(
!
is
walnum
(
*
wk1
))
{
state
=
3
;
break
;}
if
(
!
is
alnumW
(
*
wk1
))
{
state
=
3
;
break
;}
*
wk2
++
=
*
wk1
++
;
*
wk2
++
=
*
wk1
++
;
if
(
!
is
walnum
(
*
wk1
))
{
state
=
3
;
break
;}
if
(
!
is
alnumW
(
*
wk1
))
{
state
=
3
;
break
;}
*
wk2
++
=
*
wk1
++
;
*
wk2
++
=
*
wk1
++
;
state
=
1
;
state
=
1
;
break
;
break
;
...
@@ -256,8 +256,8 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
...
@@ -256,8 +256,8 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized,
wk2
+=
strlenW
(
wk2
);
wk2
+=
strlenW
(
wk2
);
break
;
break
;
case
4
:
case
4
:
if
(
!
is
walnum
(
*
wk1
)
&&
(
*
wk1
!=
L'-'
))
{
state
=
3
;
break
;}
if
(
!
is
alnumW
(
*
wk1
)
&&
(
*
wk1
!=
L'-'
))
{
state
=
3
;
break
;}
while
(
is
walnum
(
*
wk1
)
||
(
*
wk1
==
L'-'
))
*
wk2
++
=
*
wk1
++
;
while
(
is
alnumW
(
*
wk1
)
||
(
*
wk1
==
L'-'
))
*
wk2
++
=
*
wk1
++
;
state
=
5
;
state
=
5
;
break
;
break
;
case
5
:
case
5
:
...
@@ -946,7 +946,7 @@ HRESULT WINAPI UrlUnescapeW(
...
@@ -946,7 +946,7 @@ HRESULT WINAPI UrlUnescapeW(
(
*
src
==
L'#'
||
*
src
==
L'?'
))
{
(
*
src
==
L'#'
||
*
src
==
L'?'
))
{
stop_unescapping
=
TRUE
;
stop_unescapping
=
TRUE
;
next
=
*
src
;
next
=
*
src
;
}
else
if
(
*
src
==
L'%'
&&
is
wxdigit
(
*
(
src
+
1
))
&&
iswxdigit
(
*
(
src
+
2
))
}
else
if
(
*
src
==
L'%'
&&
is
xdigitW
(
*
(
src
+
1
))
&&
isxdigitW
(
*
(
src
+
2
))
&&
stop_unescapping
==
FALSE
)
{
&&
stop_unescapping
==
FALSE
)
{
INT
ih
;
INT
ih
;
WCHAR
buf
[
3
];
WCHAR
buf
[
3
];
...
...
include/wine/unicode.h
View file @
22c2ac72
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#define __WINE_UNICODE_H
#define __WINE_UNICODE_H
#include "windef.h"
#include "windef.h"
#include "winnls.h"
/* code page info common to SBCS and DBCS */
/* code page info common to SBCS and DBCS */
struct
cp_info
struct
cp_info
...
@@ -81,6 +82,61 @@ static inline unsigned short get_char_typeW( WCHAR ch )
...
@@ -81,6 +82,61 @@ static inline unsigned short get_char_typeW( WCHAR ch )
return
wctype_table
[
wctype_table
[
ch
>>
8
]
+
(
ch
&
0xff
)];
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 */
/* some useful string manipulation routines */
static
inline
unsigned
int
strlenW
(
const
WCHAR
*
str
)
static
inline
unsigned
int
strlenW
(
const
WCHAR
*
str
)
...
...
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