Do not display the long options in the usage message if we don't
actually support them. Small other cleanups.
This commit is contained in:
parent
a96caa0700
commit
e41ec931c7
|
@ -115,9 +115,10 @@ static char usage[] =
|
||||||
" -s Add structure with win32/16 (PE/NE) resource directory\n"
|
" -s Add structure with win32/16 (PE/NE) resource directory\n"
|
||||||
" -t Generate indirect loadable resource tables\n"
|
" -t Generate indirect loadable resource tables\n"
|
||||||
" -T Generate only indirect loadable resources tables\n"
|
" -T Generate only indirect loadable resources tables\n"
|
||||||
" -V Print version end exit\n"
|
" -V Print version and exit\n"
|
||||||
" -w 16|32 Select win16 or win32 output (default is win32)\n"
|
" -w 16|32 Select win16 or win32 output (default is win32)\n"
|
||||||
" -W Enable pedantic warnings\n"
|
" -W Enable pedantic warnings\n"
|
||||||
|
#ifdef HAVE_GETOPT_LONG
|
||||||
"The following long options are supported:\n"
|
"The following long options are supported:\n"
|
||||||
" --input Synonym for -i.\n"
|
" --input Synonym for -i.\n"
|
||||||
" --output Synonym for -o.\n"
|
" --output Synonym for -o.\n"
|
||||||
|
@ -129,7 +130,8 @@ static char usage[] =
|
||||||
" --language Synonym for -l.\n"
|
" --language Synonym for -l.\n"
|
||||||
" --preprocessor Specify the preprocessor to use, including arguments.\n"
|
" --preprocessor Specify the preprocessor to use, including arguments.\n"
|
||||||
" --help Prints a usage summary.\n"
|
" --help Prints a usage summary.\n"
|
||||||
" --version Prints the version number for wrc.\n"
|
" --version Synonym for -V.\n"
|
||||||
|
#endif
|
||||||
"Input is taken from stdin if no sourcefile specified.\n"
|
"Input is taken from stdin if no sourcefile specified.\n"
|
||||||
"Debug level 'n' is a bitmask with following meaning:\n"
|
"Debug level 'n' is a bitmask with following meaning:\n"
|
||||||
" * 0x01 Tell which resource is parsed (verbose mode)\n"
|
" * 0x01 Tell which resource is parsed (verbose mode)\n"
|
||||||
|
@ -304,7 +306,7 @@ static struct option long_options[] = {
|
||||||
{ "language", 1, 0, 'l' },
|
{ "language", 1, 0, 'l' },
|
||||||
{ "preprocessor", 1, 0, 1 },
|
{ "preprocessor", 1, 0, 1 },
|
||||||
{ "help", 0, 0, 2 },
|
{ "help", 0, 0, 2 },
|
||||||
{ "version", 0, 0, 3 },
|
{ "version", 0, 0, 'V' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -351,11 +353,9 @@ int main(int argc,char *argv[])
|
||||||
fprintf(stderr, "--preprocessor option not yet supported, ignored.\n");
|
fprintf(stderr, "--preprocessor option not yet supported, ignored.\n");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
fprintf(stderr, usage);
|
printf(usage);
|
||||||
return 0;
|
exit(0);
|
||||||
case 3:
|
break;
|
||||||
fprintf(stderr, version_string);
|
|
||||||
return 0;
|
|
||||||
case 'a':
|
case 'a':
|
||||||
alignment = atoi(optarg);
|
alignment = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue