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
ab94653e
Commit
ab94653e
authored
Mar 18, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
Mar 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Use is_switch() where possible.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0ad80117
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
export.c
programs/reg/export.c
+1
-7
reg.c
programs/reg/reg.c
+2
-5
reg.h
programs/reg/reg.h
+1
-0
No files found.
programs/reg/export.c
View file @
ab94653e
...
...
@@ -361,13 +361,7 @@ static HANDLE get_file_handle(WCHAR *filename, BOOL overwrite_file)
static
BOOL
is_overwrite_switch
(
const
WCHAR
*
s
)
{
if
(
lstrlenW
(
s
)
>
2
)
return
FALSE
;
if
((
s
[
0
]
==
'/'
||
s
[
0
]
==
'-'
)
&&
(
s
[
1
]
==
'y'
||
s
[
1
]
==
'Y'
))
return
TRUE
;
return
FALSE
;
return
is_switch
(
s
,
'y'
);
}
int
reg_export
(
int
argc
,
WCHAR
*
argv
[])
...
...
programs/reg/reg.c
View file @
ab94653e
...
...
@@ -289,7 +289,7 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path, WCHAR **long
return
TRUE
;
}
static
BOOL
is_switch
(
const
WCHAR
*
s
,
const
WCHAR
c
)
BOOL
is_switch
(
const
WCHAR
*
s
,
const
WCHAR
c
)
{
if
(
lstrlenW
(
s
)
>
2
)
return
FALSE
;
...
...
@@ -302,10 +302,7 @@ static BOOL is_switch(const WCHAR *s, const WCHAR c)
static
BOOL
is_help_switch
(
const
WCHAR
*
s
)
{
if
(
is_switch
(
s
,
'?'
)
||
is_switch
(
s
,
'h'
))
return
TRUE
;
return
FALSE
;
return
(
is_switch
(
s
,
'?'
)
||
is_switch
(
s
,
'h'
));
}
enum
operations
{
...
...
programs/reg/reg.h
View file @
ab94653e
...
...
@@ -40,6 +40,7 @@ BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info);
HKEY
path_get_rootkey
(
const
WCHAR
*
path
);
WCHAR
*
build_subkey_path
(
WCHAR
*
path
,
DWORD
path_len
,
WCHAR
*
subkey_name
,
DWORD
subkey_len
);
BOOL
parse_registry_key
(
const
WCHAR
*
key
,
HKEY
*
root
,
WCHAR
**
path
,
WCHAR
**
long_key
);
BOOL
is_switch
(
const
WCHAR
*
s
,
const
WCHAR
c
);
/* add.c */
int
reg_add
(
HKEY
root
,
WCHAR
*
path
,
WCHAR
*
value_name
,
BOOL
value_empty
,
...
...
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