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
825487b1
Commit
825487b1
authored
Aug 19, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Use the global wine_dbgstr_w instead of a local variant.
parent
ee868cce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
53 deletions
+2
-53
registry.c
dlls/advapi32/tests/registry.c
+2
-53
No files found.
dlls/advapi32/tests/registry.c
View file @
825487b1
...
...
@@ -111,57 +111,6 @@ static const char *wine_debugstr_an( const char *str, int n )
return
res
;
}
static
const
char
*
wine_debugstr_wn
(
const
WCHAR
*
str
,
int
n
)
{
char
*
dst
,
*
res
;
size_t
size
;
if
(
!
HIWORD
(
str
))
{
if
(
!
str
)
return
"(null)"
;
res
=
get_temp_buffer
(
6
);
sprintf
(
res
,
"#%04x"
,
LOWORD
(
str
)
);
return
res
;
}
if
(
n
==
-
1
)
n
=
lstrlenW
(
str
);
if
(
n
<
0
)
n
=
0
;
size
=
12
+
min
(
300
,
n
*
5
);
dst
=
res
=
get_temp_buffer
(
n
*
5
+
7
);
*
dst
++
=
'L'
;
*
dst
++
=
'"'
;
while
(
n
--
>
0
&&
dst
<=
res
+
size
-
10
)
{
WCHAR
c
=
*
str
++
;
switch
(
c
)
{
case
'\n'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'n'
;
break
;
case
'\r'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'r'
;
break
;
case
'\t'
:
*
dst
++
=
'\\'
;
*
dst
++
=
't'
;
break
;
case
'"'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'"'
;
break
;
case
'\\'
:
*
dst
++
=
'\\'
;
*
dst
++
=
'\\'
;
break
;
default:
if
(
c
>=
' '
&&
c
<=
126
)
*
dst
++
=
(
char
)
c
;
else
{
*
dst
++
=
'\\'
;
sprintf
(
dst
,
"%04x"
,
c
);
dst
+=
4
;
}
}
}
*
dst
++
=
'"'
;
if
(
n
>
0
)
{
*
dst
++
=
'.'
;
*
dst
++
=
'.'
;
*
dst
++
=
'.'
;
}
*
dst
=
0
;
return
res
;
}
#define ADVAPI32_GET_PROC(func) \
p ## func = (void*)GetProcAddress(hadvapi32, #func);
...
...
@@ -288,8 +237,8 @@ static void _test_hkey_main_Value_W(int line, LPCWSTR name, LPCWSTR string,
if
(
string
)
{
lok
(
memcmp
(
value
,
string
,
cbData
)
==
0
,
"RegQueryValueExW failed: %s/%d != %s/%d
\n
"
,
wine_d
ebu
gstr_wn
((
WCHAR
*
)
value
,
cbData
/
sizeof
(
WCHAR
)),
cbData
,
wine_d
ebu
gstr_wn
(
string
,
full_byte_len
/
sizeof
(
WCHAR
)),
full_byte_len
);
wine_d
b
gstr_wn
((
WCHAR
*
)
value
,
cbData
/
sizeof
(
WCHAR
)),
cbData
,
wine_d
b
gstr_wn
(
string
,
full_byte_len
/
sizeof
(
WCHAR
)),
full_byte_len
);
}
/* This implies that when cbData == 0, RegQueryValueExW() should not modify the buffer */
lok
(
*
(
value
+
cbData
)
==
0xbd
,
"RegQueryValueExW/2 overflowed at %u: %02x != bd
\n
"
,
cbData
,
*
(
value
+
cbData
));
...
...
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