Fix for command line problem introduced by --logfile.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1342 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2004-02-29 14:03:58 +00:00
parent 7fe60470ae
commit 1191226114
+4 -2
View File
@@ -93,6 +93,7 @@ main (int argc, char *argv[])
}; };
int option_index = 0, c; int option_index = 0, c;
const char *optstring = "r:d:foc:b:spn:?hM:S:T:m:q:ug:l:";
static struct option long_options[] = static struct option long_options[] =
{ {
{"res", 1, NULL, 'r'}, {"res", 1, NULL, 'r'},
@@ -129,7 +130,7 @@ main (int argc, char *argv[])
option. If it was given, redirect stderr to the named file option. If it was given, redirect stderr to the named file
*/ */
opterr = 0; opterr = 0;
while ((c = getopt_long (argc, argv, "l:", long_options, 0)) != -1) while ((c = getopt_long (argc, argv, optstring, long_options, 0)) != -1)
{ {
switch (c) { switch (c) {
case 'l': case 'l':
@@ -176,7 +177,8 @@ main (int argc, char *argv[])
addons[0] = NULL; addons[0] = NULL;
numAddons = 0; numAddons = 0;
while ((c = getopt_long(argc, argv, "r:d:foc:b:spn:?hM:S:T:m:q:ug:l:", long_options, &option_index)) != -1) while ((c = getopt_long(argc, argv, optstring, long_options,
&option_index)) != -1)
{ {
switch (c) { switch (c) {
case 'r': case 'r':