mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[WINESYNC] reg: Use is_switch() where possible.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id ab94653e8bb093b88406f7c509c7157ac7033f28 by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
parent
bcb87edb6a
commit
fa84e69673
4 changed files with 5 additions and 13 deletions
|
@ -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[])
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -4,4 +4,4 @@ directories:
|
|||
files:
|
||||
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
|
||||
tags:
|
||||
wine: 7e7d92d5e97f89a409db0dd091419b4f1bfe7ed4
|
||||
wine: ab94653e8bb093b88406f7c509c7157ac7033f28
|
||||
|
|
Loading…
Reference in a new issue