Commit 7f515f31 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

wcmd: Improve command line processing.

Make the command line processing more robust by continuing to process command line options if an unknown one is detected and remove the skipping of argv[0], which is no longer necessary. This fixes the parsing when argv[0] isn't set to the program name.
parent b3a8a3d5
...@@ -57,7 +57,6 @@ int main (int argc, char *argv[]) ...@@ -57,7 +57,6 @@ int main (int argc, char *argv[])
HANDLE h; HANDLE h;
int opt_c, opt_k, opt_q; int opt_c, opt_k, opt_q;
argv++;
opt_c=opt_k=opt_q=0; opt_c=opt_k=opt_q=0;
while (*argv!=NULL) while (*argv!=NULL)
{ {
...@@ -74,8 +73,6 @@ int main (int argc, char *argv[]) ...@@ -74,8 +73,6 @@ int main (int argc, char *argv[])
} else if (lstrcmpi(*argv,"/t")==0 || lstrcmpi(*argv,"/x")==0 || } else if (lstrcmpi(*argv,"/t")==0 || lstrcmpi(*argv,"/x")==0 ||
lstrcmpi(*argv,"/y")==0) { lstrcmpi(*argv,"/y")==0) {
/* Ignored for compatibility with Windows */ /* Ignored for compatibility with Windows */
} else {
break;
} }
argv++; argv++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment