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
3f62729b
Commit
3f62729b
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: Add initial 'query' support.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cdd2f163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
reg.c
programs/reg/reg.c
+27
-6
No files found.
programs/reg/reg.c
View file @
3f62729b
...
...
@@ -537,12 +537,33 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
return
0
;
}
static
int
reg_query
(
WCHAR
*
key_name
,
WCHAR
*
value_name
,
BOOL
value_empty
,
BOOL
subkey
)
static
int
reg_query
(
WCHAR
*
key_name
,
WCHAR
*
value_name
,
BOOL
value_empty
,
BOOL
recurse
)
{
WCHAR
*
p
;
HKEY
root
;
static
const
WCHAR
stubW
[]
=
{
'S'
,
'T'
,
'U'
,
'B'
,
' '
,
'Q'
,
'U'
,
'E'
,
'R'
,
'Y'
,
' '
,
'-'
,
' '
,
'%'
,
'1'
,
' '
,
'%'
,
'2'
,
' '
,
'%'
,
'3'
,
'!'
,
'd'
,
'!'
,
' '
,
'%'
,
'4'
,
'!'
,
'd'
,
'!'
,
'\n'
,
0
};
output_string
(
stubW
,
key_name
,
value_name
,
value_empty
,
subkey
);
if
(
!
sane_path
(
key_name
))
return
1
;
if
(
value_name
&&
value_empty
)
{
output_message
(
STRING_INVALID_CMDLINE
);
return
1
;
}
root
=
path_get_rootkey
(
key_name
);
if
(
!
root
)
{
output_message
(
STRING_INVALID_KEY
);
return
1
;
}
p
=
strchrW
(
key_name
,
'\\'
);
if
(
p
)
p
++
;
output_string
(
stubW
,
key_name
,
value_name
,
value_empty
,
recurse
);
return
1
;
}
...
...
@@ -668,7 +689,7 @@ int wmain(int argc, WCHAR *argvW[])
else
if
(
!
lstrcmpiW
(
argvW
[
1
],
queryW
))
{
WCHAR
*
key_name
,
*
value_name
=
NULL
;
BOOL
value_empty
=
FALSE
,
subkey
=
FALSE
;
BOOL
value_empty
=
FALSE
,
recurse
=
FALSE
;
if
(
argc
<
3
)
{
...
...
@@ -696,9 +717,9 @@ int wmain(int argc, WCHAR *argvW[])
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashVEW
))
value_empty
=
TRUE
;
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashSW
))
subkey
=
TRUE
;
recurse
=
TRUE
;
}
return
reg_query
(
key_name
,
value_name
,
value_empty
,
subkey
);
return
reg_query
(
key_name
,
value_name
,
value_empty
,
recurse
);
}
else
{
...
...
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