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
78846662
Commit
78846662
authored
Mar 21, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use byte length in dump_strW() for consistency.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9eab89be
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
13 deletions
+12
-13
atom.c
server/atom.c
+1
-1
object.c
server/object.c
+1
-1
registry.c
server/registry.c
+4
-4
symlink.c
server/symlink.c
+1
-1
trace.c
server/trace.c
+4
-5
unicode.c
server/unicode.c
+1
-1
No files found.
server/atom.c
View file @
78846662
...
...
@@ -188,7 +188,7 @@ static void atom_table_dump( struct object *obj, int verbose )
if
(
!
entry
)
continue
;
fprintf
(
stderr
,
" %04x: ref=%d pinned=%c hash=%d
\"
"
,
entry
->
atom
,
entry
->
count
,
entry
->
pinned
?
'Y'
:
'N'
,
entry
->
hash
);
dump_strW
(
entry
->
str
,
entry
->
len
/
sizeof
(
WCHAR
)
,
stderr
,
"
\"\"
"
);
dump_strW
(
entry
->
str
,
entry
->
len
,
stderr
,
"
\"\"
"
);
fprintf
(
stderr
,
"
\"\n
"
);
}
}
...
...
server/object.c
View file @
78846662
...
...
@@ -373,7 +373,7 @@ static void dump_name( struct object *obj )
if
(
!
name
)
return
;
if
(
name
->
parent
)
dump_name
(
name
->
parent
);
fputs
(
"
\\\\
"
,
stderr
);
dump_strW
(
name
->
name
,
name
->
len
/
sizeof
(
WCHAR
)
,
stderr
,
"[]"
);
dump_strW
(
name
->
name
,
name
->
len
,
stderr
,
"[]"
);
}
/* dump the name of an object to stderr */
...
...
server/registry.c
View file @
78846662
...
...
@@ -198,7 +198,7 @@ static void dump_path( const struct key *key, const struct key *base, FILE *f )
dump_path
(
key
->
parent
,
base
,
f
);
fprintf
(
f
,
"
\\\\
"
);
}
dump_strW
(
key
->
name
,
key
->
namelen
/
sizeof
(
WCHAR
)
,
f
,
"[]"
);
dump_strW
(
key
->
name
,
key
->
namelen
,
f
,
"[]"
);
}
/* dump a value to a text file */
...
...
@@ -210,7 +210,7 @@ static void dump_value( const struct key_value *value, FILE *f )
if
(
value
->
namelen
)
{
fputc
(
'\"'
,
f
);
count
=
1
+
dump_strW
(
value
->
name
,
value
->
namelen
/
sizeof
(
WCHAR
)
,
f
,
"
\"\"
"
);
count
=
1
+
dump_strW
(
value
->
name
,
value
->
namelen
,
f
,
"
\"\"
"
);
count
+=
fprintf
(
f
,
"
\"
="
);
}
else
count
=
fprintf
(
f
,
"@="
);
...
...
@@ -226,7 +226,7 @@ static void dump_value( const struct key_value *value, FILE *f )
if
(((
WCHAR
*
)
value
->
data
)[
value
->
len
/
sizeof
(
WCHAR
)
-
1
])
break
;
if
(
value
->
type
!=
REG_SZ
)
fprintf
(
f
,
"str(%x):"
,
value
->
type
);
fputc
(
'\"'
,
f
);
dump_strW
(
(
WCHAR
*
)
value
->
data
,
value
->
len
/
sizeof
(
WCHAR
)
,
f
,
"
\"\"
"
);
dump_strW
(
(
WCHAR
*
)
value
->
data
,
value
->
len
,
f
,
"
\"\"
"
);
fprintf
(
f
,
"
\"\n
"
);
return
;
...
...
@@ -272,7 +272,7 @@ static void save_subkeys( const struct key *key, const struct key *base, FILE *f
if
(
key
->
class
)
{
fprintf
(
f
,
"#class=
\"
"
);
dump_strW
(
key
->
class
,
key
->
classlen
/
sizeof
(
WCHAR
)
,
f
,
"
\"\"
"
);
dump_strW
(
key
->
class
,
key
->
classlen
,
f
,
"
\"\"
"
);
fprintf
(
f
,
"
\"\n
"
);
}
if
(
key
->
flags
&
KEY_SYMLINK
)
fputs
(
"#link
\n
"
,
f
);
...
...
server/symlink.c
View file @
78846662
...
...
@@ -81,7 +81,7 @@ static void symlink_dump( struct object *obj, int verbose )
assert
(
obj
->
ops
==
&
symlink_ops
);
fputs
(
"Symlink target=
\"
"
,
stderr
);
dump_strW
(
symlink
->
target
,
symlink
->
len
/
sizeof
(
WCHAR
)
,
stderr
,
"
\"\"
"
);
dump_strW
(
symlink
->
target
,
symlink
->
len
,
stderr
,
"
\"\"
"
);
fputs
(
"
\"\n
"
,
stderr
);
}
...
...
server/trace.c
View file @
78846662
...
...
@@ -105,7 +105,7 @@ static void dump_rectangle( const char *prefix, const rectangle_t *rect )
static
void
dump_char_info
(
const
char
*
prefix
,
const
char_info_t
*
info
)
{
fprintf
(
stderr
,
"%s{'"
,
prefix
);
dump_strW
(
&
info
->
ch
,
1
,
stderr
,
"
\'\'
"
);
dump_strW
(
&
info
->
ch
,
sizeof
(
info
->
ch
)
,
stderr
,
"
\'\'
"
);
fprintf
(
stderr
,
"',%04x}"
,
info
->
attr
);
}
...
...
@@ -544,7 +544,7 @@ static void dump_varargs_string( const char *prefix, data_size_t size )
static
void
dump_varargs_unicode_str
(
const
char
*
prefix
,
data_size_t
size
)
{
fprintf
(
stderr
,
"%sL
\"
"
,
prefix
);
dump_strW
(
cur_data
,
size
/
sizeof
(
WCHAR
)
,
stderr
,
"
\"\"
"
);
dump_strW
(
cur_data
,
size
,
stderr
,
"
\"\"
"
);
fputc
(
'\"'
,
stderr
);
remove_data
(
size
);
}
...
...
@@ -824,9 +824,8 @@ static data_size_t dump_inline_unicode_string( const char *prefix, data_size_t p
fputs
(
prefix
,
stderr
);
if
(
pos
>=
total_size
)
return
pos
;
if
(
len
>
total_size
-
pos
)
len
=
total_size
-
pos
;
len
/=
sizeof
(
WCHAR
);
dump_strW
(
(
const
WCHAR
*
)
cur_data
+
pos
/
sizeof
(
WCHAR
),
len
,
stderr
,
"
\"\"
"
);
return
pos
+
len
*
sizeof
(
WCHAR
);
return
pos
+
(
len
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
);
}
static
void
dump_varargs_startup_info
(
const
char
*
prefix
,
data_size_t
size
)
...
...
@@ -1133,7 +1132,7 @@ static void dump_varargs_object_attributes( const char *prefix, data_size_t size
dump_inline_security_descriptor
(
",sd="
,
(
const
struct
security_descriptor
*
)(
objattr
+
1
),
objattr
->
sd_len
);
str
=
(
const
WCHAR
*
)
objattr
+
(
sizeof
(
*
objattr
)
+
objattr
->
sd_len
)
/
sizeof
(
WCHAR
);
fprintf
(
stderr
,
",name=L
\"
"
);
dump_strW
(
str
,
objattr
->
name_len
/
sizeof
(
WCHAR
)
,
stderr
,
"
\"\"
"
);
dump_strW
(
str
,
objattr
->
name_len
,
stderr
,
"
\"\"
"
);
fputc
(
'\"'
,
stderr
);
remove_data
(
(
sizeof
(
*
objattr
)
+
(
objattr
->
sd_len
&
~
1
)
+
(
objattr
->
name_len
&
~
1
)
+
3
)
&
~
3
);
}
...
...
server/unicode.c
View file @
78846662
...
...
@@ -156,7 +156,7 @@ int dump_strW( const WCHAR *str, data_size_t len, FILE *f, const char escape[2]
char
*
pos
=
buffer
;
int
count
=
0
;
for
(;
len
;
str
++
,
len
--
)
for
(
len
/=
sizeof
(
WCHAR
)
;
len
;
str
++
,
len
--
)
{
if
(
pos
>
buffer
+
sizeof
(
buffer
)
-
8
)
{
...
...
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