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
90427597
Commit
90427597
authored
Apr 21, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Output the value name and type via a separate function.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a9b76d00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
reg.c
programs/reg/reg.c
+11
-6
No files found.
programs/reg/reg.c
View file @
90427597
...
...
@@ -549,6 +549,16 @@ static const WCHAR *reg_type_to_wchar(DWORD type)
return
NULL
;
}
static
void
output_value
(
const
WCHAR
*
value_name
,
DWORD
type
)
{
WCHAR
fmt
[]
=
{
' '
,
' '
,
' '
,
' '
,
'%'
,
'1'
,
0
};
WCHAR
newlineW
[]
=
{
'\n'
,
0
};
output_string
(
fmt
,
value_name
);
output_string
(
fmt
,
reg_type_to_wchar
(
type
));
output_string
(
newlineW
);
}
static
int
query_all
(
HKEY
key
,
WCHAR
*
path
)
{
LONG
rc
;
...
...
@@ -556,7 +566,6 @@ static int query_all(HKEY key, WCHAR *path)
DWORD
num_values
,
max_value_len
,
value_len
;
DWORD
i
,
type
;
WCHAR
fmt
[]
=
{
'%'
,
'1'
,
'\n'
,
0
};
WCHAR
fmt_value
[]
=
{
' '
,
' '
,
' '
,
' '
,
'%'
,
'1'
,
0
};
WCHAR
fmt_path
[]
=
{
'%'
,
'1'
,
'\\'
,
'%'
,
'2'
,
'\n'
,
0
};
WCHAR
*
value_name
,
*
subkey_name
;
WCHAR
newlineW
[]
=
{
'\n'
,
0
};
...
...
@@ -584,11 +593,7 @@ static int query_all(HKEY key, WCHAR *path)
value_len
=
max_value_len
;
rc
=
RegEnumValueW
(
key
,
i
,
value_name
,
&
value_len
,
NULL
,
&
type
,
NULL
,
NULL
);
if
(
rc
==
ERROR_SUCCESS
)
{
output_string
(
fmt_value
,
value_name
);
output_string
(
fmt_value
,
reg_type_to_wchar
(
type
));
output_string
(
newlineW
);
}
output_value
(
value_name
,
type
);
}
HeapFree
(
GetProcessHeap
(),
0
,
value_name
);
...
...
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