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
7e72247d
Commit
7e72247d
authored
Jun 22, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Jun 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Replace error_unknown_switch() with simpler error handling.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3e8d4e31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
20 deletions
+4
-20
regedit.c
programs/regedit/regedit.c
+4
-20
No files found.
programs/regedit/regedit.c
View file @
7e72247d
...
...
@@ -230,24 +230,6 @@ static BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
return
TRUE
;
}
/**
* Process unknown switch.
*
* Params:
* chu - the switch character in upper-case.
* s - the command line string where s points to the switch character.
*/
static
void
error_unknown_switch
(
char
chu
,
char
*
s
)
{
if
(
isalpha
(
chu
))
{
fprintf
(
stderr
,
"%s: Undefined switch /%c!
\n
"
,
getAppName
(),
chu
);
}
else
{
fprintf
(
stderr
,
"%s: Alphabetic character is expected after '%c' "
"in switch specification
\n
"
,
getAppName
(),
*
(
s
-
1
));
}
exit
(
1
);
}
BOOL
ProcessCmdLine
(
LPSTR
lpCmdLine
)
{
REGEDIT_ACTION
action
=
ACTION_UNDEF
;
...
...
@@ -284,7 +266,8 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine)
exit
(
0
);
break
;
default:
error_unknown_switch
(
chu
,
s
);
fprintf
(
stderr
,
"regedit: Invalid or unrecognized switch [/%c]
\n
"
,
chu
);
exit
(
1
);
break
;
}
}
...
...
@@ -301,7 +284,8 @@ BOOL ProcessCmdLine(LPSTR lpCmdLine)
}
break
;
default:
error_unknown_switch
(
chu
,
s
);
fprintf
(
stderr
,
"regedit: Invalid or unrecognized switch [/%c]
\n
"
,
chu
);
exit
(
1
);
break
;
}
}
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