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
543716e1
Commit
543716e1
authored
Jun 30, 2006
by
Thomas Kho
Committed by
Alexandre Julliard
Jul 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wcmd: Modify option parser to allow compound options.
parent
343597b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
wcmdmain.c
programs/wcmd/wcmdmain.c
+19
-10
No files found.
programs/wcmd/wcmdmain.c
View file @
543716e1
...
...
@@ -61,21 +61,30 @@ int main (int argc, char *argv[])
opt_c
=
opt_k
=
opt_q
=
0
;
while
(
*
argv
!=
NULL
)
{
if
(
lstrcmpi
(
*
argv
,
"/c"
)
==
0
)
{
opt_c
=
1
;
char
c
;
if
((
*
argv
)[
0
]
!=
'/'
||
(
*
argv
)[
1
]
==
'\0'
)
{
argv
++
;
break
;
}
else
if
(
lstrcmpi
(
*
argv
,
"/q"
)
==
0
)
{
continue
;
}
c
=
(
*
argv
)[
1
];
if
(
tolower
(
c
)
==
'c'
)
{
opt_c
=
1
;
}
else
if
(
tolower
(
c
)
==
'q'
)
{
opt_q
=
1
;
}
else
if
(
lstrcmpi
(
*
argv
,
"/k"
)
==
0
)
{
}
else
if
(
tolower
(
c
)
==
'k'
)
{
opt_k
=
1
;
argv
++
;
break
;
}
else
if
(
lstrcmpi
(
*
argv
,
"/t"
)
==
0
||
lstrcmpi
(
*
argv
,
"/x"
)
==
0
||
lstrcmpi
(
*
argv
,
"/y"
)
==
0
)
{
}
else
if
(
tolower
(
c
)
==
't'
||
tolower
(
c
)
==
'x'
||
tolower
(
c
)
==
'y'
)
{
/* Ignored for compatibility with Windows */
}
argv
++
;
if
((
*
argv
)[
2
]
==
0
)
argv
++
;
else
/* handle `cmd /cnotepad.exe` and `cmd /x/c ...` */
*
argv
+=
2
;
if
(
opt_c
||
opt_k
)
/* break out of parsing immediately after c or k */
break
;
}
if
(
opt_q
)
{
...
...
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