Fixed a bug in the logfile option
Also added the --logfile long form and documented it more thoroughly. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1325 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -65,6 +65,11 @@ Print fps information in the status window.
|
|||||||
|
|
||||||
Set the directory where the game will seek its data.
|
Set the directory where the game will seek its data.
|
||||||
|
|
||||||
|
-l (or --logfile)
|
||||||
|
|
||||||
|
Set a file to receive the diagnostic information that would otherwise go
|
||||||
|
to the console.
|
||||||
|
|
||||||
-h (or --help)
|
-h (or --help)
|
||||||
|
|
||||||
Display a help message.
|
Display a help message.
|
||||||
|
|||||||
+3
-2
@@ -112,6 +112,7 @@ main (int argc, char *argv[])
|
|||||||
{"nosubtitles", 0, NULL, 'u'},
|
{"nosubtitles", 0, NULL, 'u'},
|
||||||
{"music", 1, NULL, 'm'},
|
{"music", 1, NULL, 'm'},
|
||||||
{"gamma", 1, NULL, 'g'},
|
{"gamma", 1, NULL, 'g'},
|
||||||
|
{"logfile", 1, NULL, 'l'},
|
||||||
// options with no short equivalent
|
// options with no short equivalent
|
||||||
{"cscan", 1, NULL, CSCAN_OPT},
|
{"cscan", 1, NULL, CSCAN_OPT},
|
||||||
{"menu", 1, NULL, MENU_OPT},
|
{"menu", 1, NULL, MENU_OPT},
|
||||||
@@ -128,7 +129,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:", NULL, 0)) != -1)
|
while ((c = getopt_long (argc, argv, "l:", long_options, 0)) != -1)
|
||||||
{
|
{
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'l':
|
case 'l':
|
||||||
@@ -349,7 +350,7 @@ main (int argc, char *argv[])
|
|||||||
printf(" -q, --audioquality=QUALITY (high, medium or low, "
|
printf(" -q, --audioquality=QUALITY (high, medium or low, "
|
||||||
"default medium)\n");
|
"default medium)\n");
|
||||||
printf(" -u, --nosubtitles\n");
|
printf(" -u, --nosubtitles\n");
|
||||||
printf(" -l FILE (sends console output to logfile FILE)\n");
|
printf(" -l, --logfile=FILE (sends console output to logfile FILE)\n");
|
||||||
printf(" --addon <addon> (using a specific addon; "
|
printf(" --addon <addon> (using a specific addon; "
|
||||||
"may be specified multiple times)\n");
|
"may be specified multiple times)\n");
|
||||||
printf(" --sound=DRIVER (openal, mixsdl, none; default "
|
printf(" --sound=DRIVER (openal, mixsdl, none; default "
|
||||||
|
|||||||
Reference in New Issue
Block a user