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
6ca76dc5
Commit
6ca76dc5
authored
Dec 02, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Remove some no longer used Unicode functions.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1514c54c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
133 deletions
+13
-133
analyzer.c
dlls/dwrite/analyzer.c
+3
-1
device.c
dlls/mountmgr.sys/device.c
+1
-1
netapi32.c
dlls/netapi32/netapi32.c
+1
-1
autocomplete.c
dlls/shell32/autocomplete.c
+1
-1
keyboard.c
dlls/winemac.drv/keyboard.c
+1
-1
unicode.h
include/wine/unicode.h
+4
-120
memory.c
programs/winedbg/memory.c
+2
-8
No files found.
dlls/dwrite/analyzer.c
View file @
6ca76dc5
...
...
@@ -293,9 +293,11 @@ static inline UINT16 get_char_script(WCHAR c)
static
DWRITE_SCRIPT_ANALYSIS
get_char_sa
(
WCHAR
c
)
{
DWRITE_SCRIPT_ANALYSIS
sa
;
WORD
type
;
GetStringTypeW
(
CT_CTYPE1
,
&
c
,
1
,
&
type
);
sa
.
script
=
get_char_script
(
c
);
sa
.
shapes
=
iscntrlW
(
c
)
||
c
==
0x2028
/* LINE SEPARATOR */
||
c
==
0x2029
/* PARAGRAPH SEPARATOR */
?
sa
.
shapes
=
(
type
&
C1_CNTRL
)
||
c
==
0x2028
/* LINE SEPARATOR */
||
c
==
0x2029
/* PARAGRAPH SEPARATOR */
?
DWRITE_SCRIPT_SHAPES_NO_VISUAL
:
DWRITE_SCRIPT_SHAPES_DEFAULT
;
return
sa
;
}
...
...
dlls/mountmgr.sys/device.c
View file @
6ca76dc5
...
...
@@ -2086,7 +2086,7 @@ static void create_port_devices( DRIVER_OBJECT *driver )
if
(
type
!=
REG_SZ
||
strncmpiW
(
port
,
port_prefix
,
3
))
continue
;
n
=
ato
l
W
(
port
+
3
);
n
=
ato
i
W
(
port
+
3
);
if
(
n
<
1
||
n
>=
MAX_PORTS
)
continue
;
...
...
dlls/netapi32/netapi32.c
View file @
6ca76dc5
...
...
@@ -3621,7 +3621,7 @@ DWORD WINAPI DavGetUNCFromHTTPPath(const WCHAR *http_path, WCHAR *buf, DWORD *bu
if
(
*
p
==
':'
)
{
port
=
++
p
;
while
(
*
p
&&
isdigitW
(
*
p
)
)
{
p
++
;
len_port
++
;
};
while
(
*
p
>=
'0'
&&
*
p
<=
'9'
)
{
p
++
;
len_port
++
;
};
if
(
len_port
==
2
&&
!
ssl
&&
!
memcmp
(
port
,
port80W
,
sizeof
(
port80W
)
))
port
=
NULL
;
else
if
(
len_port
==
3
&&
ssl
&&
!
memcmp
(
port
,
port443W
,
sizeof
(
port443W
)
))
port
=
NULL
;
path
=
p
;
...
...
dlls/shell32/autocomplete.c
View file @
6ca76dc5
...
...
@@ -799,7 +799,7 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
This
->
no_fwd_char
=
'\0'
;
/* Don't autocomplete at all on most control characters */
if
(
iscntrlW
(
wParam
)
&&
!
(
wParam
>=
'\b'
&&
wParam
<=
'\r'
))
if
(
wParam
<
32
&&
!
(
wParam
>=
'\b'
&&
wParam
<=
'\r'
))
break
;
ret
=
CallWindowProcW
(
This
->
wpOrigEditProc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
...
...
dlls/winemac.drv/keyboard.c
View file @
6ca76dc5
...
...
@@ -1242,7 +1242,7 @@ INT CDECL macdrv_GetKeyNameText(LONG lparam, LPWSTR buffer, INT size)
0
,
&
deadKeyState
,
size
-
1
,
&
len
,
(
UniChar
*
)
buffer
);
if
(
status
!=
noErr
)
len
=
0
;
if
(
len
&&
isgraphW
(
buffer
[
0
])
)
if
(
len
&&
buffer
[
0
]
>
32
)
buffer
[
len
]
=
0
;
vkey
=
thread_data
->
keyc2vkey
[
keyc
];
...
...
include/wine/unicode.h
View file @
6ca76dc5
...
...
@@ -28,18 +28,10 @@
#include <winnls.h>
#include <winternl.h>
#ifdef __WINE_WINE_TEST_H
#error This file should not be used in Wine tests
#endif
#ifdef __WINE_USE_MSVCRT
#error This file should not be used with msvcrt headers
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
#ifndef WINE_UNICODE_INLINE
#define WINE_UNICODE_INLINE static FORCEINLINE
#endif
...
...
@@ -54,72 +46,13 @@ WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch )
return
RtlUpcaseUnicodeChar
(
ch
);
}
/* the character type contains the C1_* flags in the low 12 bits */
/* and the C2_* type in the high 4 bits */
WINE_UNICODE_INLINE
unsigned
short
get_char_typeW
(
WCHAR
ch
)
{
unsigned
short
type
;
GetStringTypeW
(
CT_CTYPE1
,
&
ch
,
1
,
&
type
);
return
type
;
}
WINE_UNICODE_INLINE
int
iscntrlW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_CNTRL
;
}
WINE_UNICODE_INLINE
int
ispunctW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_PUNCT
;
}
WINE_UNICODE_INLINE
int
isspaceW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_SPACE
;
}
WINE_UNICODE_INLINE
int
isdigitW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_DIGIT
;
}
WINE_UNICODE_INLINE
int
isxdigitW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_XDIGIT
;
}
WINE_UNICODE_INLINE
int
islowerW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_LOWER
;
}
WINE_UNICODE_INLINE
int
isupperW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
C1_UPPER
;
}
WINE_UNICODE_INLINE
int
isalnumW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
}
WINE_UNICODE_INLINE
int
isalphaW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_LOWER
|
C1_UPPER
);
}
WINE_UNICODE_INLINE
int
isgraphW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
}
WINE_UNICODE_INLINE
int
isprintW
(
WCHAR
wc
)
{
return
get_char_typeW
(
wc
)
&
(
C1_ALPHA
|
C1_BLANK
|
C1_PUNCT
|
C1_DIGIT
|
C1_LOWER
|
C1_UPPER
);
unsigned
short
type
;
GetStringTypeW
(
CT_CTYPE1
,
&
wc
,
1
,
&
type
);
return
type
&
C1_SPACE
;
}
/* some useful string manipulation routines */
WINE_UNICODE_INLINE
unsigned
int
strlenW
(
const
WCHAR
*
str
)
{
const
WCHAR
*
s
=
str
;
...
...
@@ -134,9 +67,6 @@ WINE_UNICODE_INLINE WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
return
dst
;
}
/* strncpy doesn't do what you think, don't use it */
#define strncpyW(d,s,n) error do_not_use_strncpyW_use_lstrcpynW_or_memcpy_instead
WINE_UNICODE_INLINE
int
strcmpW
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
while
(
*
str1
&&
(
*
str1
==
*
str2
))
{
str1
++
;
str2
++
;
}
...
...
@@ -175,20 +105,6 @@ WINE_UNICODE_INLINE WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept )
return
NULL
;
}
WINE_UNICODE_INLINE
size_t
strspnW
(
const
WCHAR
*
str
,
const
WCHAR
*
accept
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
!
strchrW
(
accept
,
*
ptr
))
break
;
return
ptr
-
str
;
}
WINE_UNICODE_INLINE
size_t
strcspnW
(
const
WCHAR
*
str
,
const
WCHAR
*
reject
)
{
const
WCHAR
*
ptr
;
for
(
ptr
=
str
;
*
ptr
;
ptr
++
)
if
(
strchrW
(
reject
,
*
ptr
))
break
;
return
ptr
-
str
;
}
WINE_UNICODE_INLINE
WCHAR
*
strlwrW
(
WCHAR
*
str
)
{
WCHAR
*
ret
;
...
...
@@ -196,13 +112,6 @@ WINE_UNICODE_INLINE WCHAR *strlwrW( WCHAR *str )
return
ret
;
}
WINE_UNICODE_INLINE
WCHAR
*
struprW
(
WCHAR
*
str
)
{
WCHAR
*
ret
;
for
(
ret
=
str
;
*
str
;
str
++
)
*
str
=
toupperW
(
*
str
);
return
ret
;
}
WINE_UNICODE_INLINE
WCHAR
*
memchrW
(
const
WCHAR
*
ptr
,
WCHAR
ch
,
size_t
n
)
{
const
WCHAR
*
end
;
...
...
@@ -210,14 +119,6 @@ WINE_UNICODE_INLINE WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n )
return
NULL
;
}
WINE_UNICODE_INLINE
WCHAR
*
memrchrW
(
const
WCHAR
*
ptr
,
WCHAR
ch
,
size_t
n
)
{
const
WCHAR
*
end
;
WCHAR
*
ret
=
NULL
;
for
(
end
=
ptr
+
n
;
ptr
<
end
;
ptr
++
)
if
(
*
ptr
==
ch
)
ret
=
(
WCHAR
*
)(
ULONG_PTR
)
ptr
;
return
ret
;
}
WINE_UNICODE_INLINE
int
strcmpiW
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
for
(;;)
...
...
@@ -237,14 +138,6 @@ WINE_UNICODE_INLINE int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n )
return
ret
;
}
WINE_UNICODE_INLINE
int
memicmpW
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
,
int
n
)
{
int
ret
=
0
;
for
(
;
n
>
0
;
n
--
,
str1
++
,
str2
++
)
if
((
ret
=
tolowerW
(
*
str1
)
-
tolowerW
(
*
str2
)))
break
;
return
ret
;
}
WINE_UNICODE_INLINE
WCHAR
*
strstrW
(
const
WCHAR
*
str
,
const
WCHAR
*
sub
)
{
while
(
*
str
)
...
...
@@ -350,14 +243,9 @@ WINE_UNICODE_INLINE ULONG strtoulW( LPCWSTR s, LPWSTR *end, INT base )
return
negative
?
-
ret
:
ret
;
}
WINE_UNICODE_INLINE
long
int
atolW
(
const
WCHAR
*
str
)
{
return
strtolW
(
str
,
(
WCHAR
**
)
0
,
10
);
}
WINE_UNICODE_INLINE
int
atoiW
(
const
WCHAR
*
str
)
{
return
(
int
)
atolW
(
str
);
return
(
int
)
strtolW
(
str
,
(
WCHAR
**
)
0
,
10
);
}
NTSYSAPI
int
__cdecl
_vsnwprintf
(
WCHAR
*
,
size_t
,
const
WCHAR
*
,
__ms_va_list
);
...
...
@@ -384,8 +272,4 @@ static inline int WINAPIV sprintfW( WCHAR *str, const WCHAR *format, ...)
#undef WINE_UNICODE_INLINE
#ifdef __cplusplus
}
#endif
#endif
/* __WINE_WINE_UNICODE_H */
programs/winedbg/memory.c
View file @
6ca76dc5
...
...
@@ -394,15 +394,9 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
*/
if
(
!
dbg_curr_process
->
be_cpu
->
fetch_integer
(
lvalue
,
size
,
TRUE
,
&
val_int
))
return
;
print_char:
if
(
size
==
1
&&
isprint
((
char
)
val_int
))
if
((
size
==
1
&&
isprint
((
char
)
val_int
))
||
(
size
==
2
&&
val_int
<
127
&&
isprint
((
char
)
val_int
)))
dbg_printf
(
"'%c'"
,
(
char
)
val_int
);
else
if
(
size
==
2
&&
isprintW
((
WCHAR
)
val_int
))
{
WCHAR
wch
=
(
WCHAR
)
val_int
;
dbg_printf
(
"'"
);
dbg_outputW
(
&
wch
,
1
);
dbg_printf
(
"'"
);
}
else
dbg_printf
(
"%d"
,
(
int
)
val_int
);
break
;
...
...
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