wrc long option cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog
  Do not display the long options in the usage message
  if we don't actually support them. Small other cleanups.


Index: tools/wrc/wrc.c
===================================================================
RCS file: /var/cvs/wine/tools/wrc/wrc.c,v
retrieving revision 1.20
diff -u -r1.20 wrc.c
--- tools/wrc/wrc.c	11 Dec 2002 01:31:22 -0000	1.20
+++ tools/wrc/wrc.c	12 Dec 2002 06:56:26 -0000
@@ -115,9 +115,10 @@
 	"   -s          Add structure with win32/16 (PE/NE) resource directory\n"
 	"   -t          Generate indirect loadable resource 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          Enable pedantic warnings\n"
+#ifdef HAVE_GETOPT_LONG
 	"The following long options are supported:\n"
 	"   --input		Synonym for -i.\n"
 	"   --output		Synonym for -o.\n"
@@ -129,7 +130,8 @@
 	"   --language		Synonym for -l.\n"
 	"   --preprocessor	Specify the preprocessor to use, including arguments.\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"
 	"Debug level 'n' is a bitmask with following meaning:\n"
 	"    * 0x01 Tell which resource is parsed (verbose mode)\n"
@@ -304,7 +306,7 @@
 	{ "language", 1, 0, 'l' },
 	{ "preprocessor", 1, 0, 1 },
 	{ "help", 0, 0, 2 },
-	{ "version", 0, 0, 3 },
+	{ "version", 0, 0, 'V' },
 	{ 0, 0, 0, 0 }
 };
 #endif
@@ -351,11 +353,9 @@
 			fprintf(stderr, "--preprocessor option not yet supported, ignored.\n");
 			break;
 		case 2:
-			fprintf(stderr, usage);
-			return 0;
-		case 3:
-			fprintf(stderr, version_string);
-			return 0;
+			printf(usage);
+			exit(0);
+			break;
 		case 'a':
 			alignment = atoi(optarg);
 			break;


-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux