wrc: -v, --[no-]use-temp-file

Dimitrie O. Paun dpaun at rogers.com
Wed Jan 8 22:59:06 CST 2003


ChangeLog
  Added windres compatibility switches: -v, --[no-]use-temp-file.
  Updated documentation, minor option parsing cleanup.

Index: tools/wrc/wrc.c
===================================================================
RCS file: /var/cvs/wine/tools/wrc/wrc.c,v
retrieving revision 1.23
diff -u -r1.23 wrc.c
--- tools/wrc/wrc.c	9 Jan 2003 00:03:53 -0000	1.23
+++ tools/wrc/wrc.c	9 Jan 2003 04:55:56 -0000
@@ -110,6 +110,7 @@
 	"   -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          Enable verbose mode.\n"
 	"   -V          Print version and exit\n"
 	"   -w 16|32    Select win16 or win32 output (default is win32)\n"
 	"   -W          Enable pedantic warnings\n"
@@ -123,6 +124,8 @@
 	"   --nostdinc		Synonym for -J.\n"
 	"   --define		Synonym for -D.\n"
 	"   --language		Synonym for -l.\n"
+	"   --use-temp-file	Ignored for compatibility with windres.\n"
+	"   --no-use-temp-file	Ignored for compatibility with windres.\n"
 	"   --preprocessor	Specify the preprocessor to use, including arguments.\n"
 	"   --help		Prints a usage summary.\n"
 	"   --version		Synonym for -V.\n"
@@ -135,11 +138,8 @@
 	"    * 0x08 Preprocessor messages\n"
 	"    * 0x10 Preprocessor lex messages\n"
 	"    * 0x20 Preprocessor yacc trace\n"
-	"The -o option only applies to the final destination file, which is\n"
-	"in case of normal compile a .s file. You must use the '-H header.h'\n"
-	"option to override the header-filename.\n"
 	"If no input filename is given and the output name is not overridden\n"
-	"with -o and/or -H, then the output is written to \"wrc.tab.[sh]\"\n"
+	"with -o, then the output is written to \"wrc.tab.[sh]\"\n"
 	;
 
 char version_string[] = "Wine Resource Compiler Version " WRC_FULLVERSION "\n"
@@ -272,6 +272,8 @@
 static void rm_tempfile(void);
 static void segvhandler(int sig);
 
+static const char* short_options = 
+	"a:AbB:cC:d:D:eEF:ghH:i:I:Jl:LmnNo:O:p:rstTvVw:W";
 #ifdef HAVE_GETOPT_LONG
 static struct option long_options[] = {
 	{ "input", 1, 0, 'i' },
@@ -282,9 +284,11 @@
 	{ "nostdinc", 0, 0, 'J' },
 	{ "define", 1, 0, 'D' },
 	{ "language", 1, 0, 'l' },
+	{ "version", 0, 0, 'V' },
 	{ "preprocessor", 1, 0, 1 },
 	{ "help", 0, 0, 2 },
-	{ "version", 0, 0, 'V' },
+	{ "use-temp-file", 0, 0, 3 },
+	{ "no-use-temp-file", 0, 0, 4 },
 	{ 0, 0, 0, 0 }
 };
 #endif
@@ -320,9 +324,9 @@
 	}
 
 #ifdef HAVE_GETOPT_LONG
-	while((optc = getopt_long(argc, argv, "a:AbB:cC:d:D:eEF:ghH:i:I:Jl:LmnNo:O:p:rstTVw:W", long_options, &opti)) != EOF)
+	while((optc = getopt_long(argc, argv, short_options, long_options, &opti)) != EOF)
 #else
-	while((optc = getopt(argc, argv, "a:AbB:cC:d:D:eEF:ghH:i:I:Jl:LmnNo:O:p:rstTVw:W")) != EOF)
+	while((optc = getopt(argc, argv, short_options)) != EOF)
 #endif
 	{
 		switch(optc)
@@ -334,6 +338,12 @@
 			printf(usage);
 			exit(0);
 			break;
+		case 3:
+			fprintf(stderr, "--use-temp-file option not yet supported, ignored.\n");
+			break;
+		case 4:
+			fprintf(stderr, "--no-use-temp-file option not yet supported, ignored.\n");
+			break;
 		case 'a':
 			alignment = atoi(optarg);
 			break;
@@ -433,6 +443,9 @@
 			/* Fall through */
 		case 't':
 			indirect = 1;
+			break;
+		case 'v':
+			debuglevel = DEBUGLEVEL_CHAT;
 			break;
 		case 'V':
 			printf(version_string);

-- 
Dimi.




More information about the wine-patches mailing list