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
6ce85242
Commit
6ce85242
authored
Jun 03, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Jun 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Recognise hyphen and forward slash help switches.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
10058e7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
reg.c
programs/reg/reg.c
+15
-9
No files found.
programs/reg/reg.c
View file @
6ce85242
...
...
@@ -877,6 +877,17 @@ static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL
return
ret
;
}
static
BOOL
is_help_switch
(
const
WCHAR
*
s
)
{
if
(
strlenW
(
s
)
>
2
)
return
FALSE
;
if
((
s
[
0
]
==
'/'
||
s
[
0
]
==
'-'
)
&&
(
s
[
1
]
==
'h'
||
s
[
1
]
==
'?'
))
return
TRUE
;
return
FALSE
;
}
int
wmain
(
int
argc
,
WCHAR
*
argvW
[])
{
int
i
;
...
...
@@ -886,13 +897,11 @@ int wmain(int argc, WCHAR *argvW[])
static
const
WCHAR
queryW
[]
=
{
'q'
,
'u'
,
'e'
,
'r'
,
'y'
,
0
};
static
const
WCHAR
slashDW
[]
=
{
'/'
,
'd'
,
0
};
static
const
WCHAR
slashFW
[]
=
{
'/'
,
'f'
,
0
};
static
const
WCHAR
slashHW
[]
=
{
'/'
,
'h'
,
0
};
static
const
WCHAR
slashSW
[]
=
{
'/'
,
's'
,
0
};
static
const
WCHAR
slashTW
[]
=
{
'/'
,
't'
,
0
};
static
const
WCHAR
slashVW
[]
=
{
'/'
,
'v'
,
0
};
static
const
WCHAR
slashVAW
[]
=
{
'/'
,
'v'
,
'a'
,
0
};
static
const
WCHAR
slashVEW
[]
=
{
'/'
,
'v'
,
'e'
,
0
};
static
const
WCHAR
slashHelpW
[]
=
{
'/'
,
'?'
,
0
};
if
(
argc
==
1
)
{
...
...
@@ -901,7 +910,7 @@ int wmain(int argc, WCHAR *argvW[])
return
1
;
}
if
(
!
lstrcmpW
(
argvW
[
1
],
slashHelpW
)
||
!
lstrcmpiW
(
argvW
[
1
],
slashHW
))
if
(
is_help_switch
(
argvW
[
1
]
))
{
output_message
(
STRING_USAGE
);
return
0
;
...
...
@@ -918,8 +927,7 @@ int wmain(int argc, WCHAR *argvW[])
output_message
(
STRING_FUNC_HELP
,
struprW
(
argvW
[
1
]));
return
1
;
}
else
if
(
argc
==
3
&&
(
!
lstrcmpW
(
argvW
[
2
],
slashHelpW
)
||
!
lstrcmpiW
(
argvW
[
2
],
slashHW
)))
else
if
(
argc
==
3
&&
is_help_switch
(
argvW
[
2
]))
{
output_message
(
STRING_ADD_USAGE
);
return
0
;
...
...
@@ -976,8 +984,7 @@ int wmain(int argc, WCHAR *argvW[])
output_message
(
STRING_FUNC_HELP
,
struprW
(
argvW
[
1
]));
return
1
;
}
else
if
(
argc
==
3
&&
(
!
lstrcmpW
(
argvW
[
2
],
slashHelpW
)
||
!
lstrcmpiW
(
argvW
[
2
],
slashHW
)))
else
if
(
argc
==
3
&&
is_help_switch
(
argvW
[
2
]))
{
output_message
(
STRING_DELETE_USAGE
);
return
0
;
...
...
@@ -1014,8 +1021,7 @@ int wmain(int argc, WCHAR *argvW[])
output_message
(
STRING_FUNC_HELP
,
struprW
(
argvW
[
1
]));
return
1
;
}
else
if
(
argc
==
3
&&
(
!
lstrcmpW
(
argvW
[
2
],
slashHelpW
)
||
!
lstrcmpiW
(
argvW
[
2
],
slashHW
)))
else
if
(
argc
==
3
&&
is_help_switch
(
argvW
[
2
]))
{
output_message
(
STRING_QUERY_USAGE
);
return
0
;
...
...
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