wrc: change -J to -I-

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

 



Cleanup a bit the command line.
I know, I've introduced -J but I did it under time pressure,
I never liked it :). It seems to me -I- is more intuitive,
and cleans up the options space for stuff that we actually
need. Moreover, this option is relevant mostly for Wine,
so it's better if it doesn't use on of the precious letters.


ChangeLog
  Rename -J to -I-, minor code cleanup.

Index: tools/wrc/wrc.c
===================================================================
RCS file: /var/cvs/wine/tools/wrc/wrc.c,v
retrieving revision 1.29
diff -u -r1.29 wrc.c
--- tools/wrc/wrc.c	26 Feb 2003 05:04:12 -0000	1.29
+++ tools/wrc/wrc.c	26 Feb 2003 06:28:23 -0000
@@ -96,7 +96,7 @@
 	"   -h		Prints this summary.\n"
 	"   -i file	The name of the input file.\n"
 	"   -I path     Set include search dir to path (multiple -I allowed)\n"
-	"   -J		Do not search the standard include path\n"
+	"      		(-I- disables searching the standard include path)\n"
 	"   -l lan      Set default language to lan (default is neutral {0, 0})\n"
 	"   -m          Do not remap numerical resource IDs\n"
 	"   -o file     Output to file (default is infile.res)\n"
@@ -110,15 +110,15 @@
 	"The following long options are supported:\n"
 	"   --input		Synonym for -i.\n"
 	"   --output		Synonym for -o.\n"
+	"   --output-format	Synonym for -O.\n"
 	"   --target		Synonym for -F.\n"
-	"   --format		Synonym for -O.\n"
+	"   --preprocessor	Synonym for -P.\n"
 	"   --include-dir	Synonym for -I.\n"
-	"   --nostdinc		Synonym for -J.\n"
 	"   --define		Synonym for -D.\n"
 	"   --language		Synonym for -l.\n"
+	"   --nostdinc		Synonym for -I-.\n"
 	"   --use-temp-file	Ignored for compatibility with windres.\n"
 	"   --no-use-temp-file	Ignored for compatibility with windres.\n"
-	"   --preprocessor	Synonym for -P.\n"
 	"   --help		Synonym for -h.\n"
 	"   --version		Synonym for -V.\n"
 #endif
@@ -223,22 +223,22 @@
 static void segvhandler(int sig);
 
 static const char* short_options = 
-	"a:AB:cC:d:D:eEF:hH:i:I:Jl:LmnNo:O:P:rtTvVw:W";
+	"a:AB:cC:d:D:eEF:hH:i:I:l:LmnNo:O:P:rtTvVw:W";
 #ifdef HAVE_GETOPT_LONG
 static struct option long_options[] = {
 	{ "input", 1, 0, 'i' },
 	{ "output", 1, 0, 'o' },
+	{ "output-format", 1, 0, 'O' },
 	{ "target", 1, 0, 'F' },
-	{ "format", 1, 0, 'O' },
+	{ "preprocessor", 1, 0, 'P' },
 	{ "include-dir", 1, 0, 'I' },
-	{ "nostdinc", 0, 0, 'J' },
 	{ "define", 1, 0, 'D' },
 	{ "language", 1, 0, 'l' },
-	{ "version", 0, 0, 'V' },
-	{ "help", 0, 0, 'h' },
-	{ "preprocessor", 1, 0, 'P' },
+	{ "nostdinc", 0, 0, 1 },
 	{ "use-temp-file", 0, 0, 2 },
 	{ "no-use-temp-file", 0, 0, 3 },
+	{ "help", 0, 0, 'h' },
+	{ "version", 0, 0, 'V' },
 	{ 0, 0, 0, 0 }
 };
 #endif
@@ -284,6 +284,9 @@
 	{
 		switch(optc)
 		{
+		case 1:
+			stdinc = 0;
+			break;
 		case 2:
 			fprintf(stderr, "--use-temp-file option not yet supported, ignored.\n");
 			break;
@@ -339,10 +342,8 @@
 			else error("Too many input files.\n");
 			break;
 		case 'I':
-			wpp_add_include_path(optarg);
-			break;
-		case 'J':
-			stdinc = 0;
+			if (strcmp(optarg, "-") == 0) stdinc = 0;
+			else wpp_add_include_path(optarg);
 			break;
 		case 'l':
 			{
Index: tools/wrc/wrc.man
===================================================================
RCS file: /var/cvs/wine/tools/wrc/wrc.man,v
retrieving revision 1.15
diff -u -r1.15 wrc.man
--- tools/wrc/wrc.man	26 Feb 2003 05:04:12 -0000	1.15
+++ tools/wrc/wrc.man	26 Feb 2003 06:30:23 -0000
@@ -67,10 +67,10 @@
 searched exclusively via the \fI\-I\fR set path, whereas the '""' quoted
 filenames are first tried to be opened in the current directory. Also
 resource statements with file references are located in the same way.
-.TP
-.I \-J
-Do not search the standard include path, look for include files only
-in the directories explicitly specified with the \fI\-I\fR option.
+.br
+Specifying \fI\-I-\fR disables searching the standard include path,
+only directories explicitly specified with the \fI\-I\fR option
+will be searched.
 .TP
 .I \-l lan
 Set default language to \fIlan\fR. Default is the neutral language 0
Index: Make.rules.in
===================================================================
RCS file: /var/cvs/wine/Make.rules.in,v
retrieving revision 1.142
diff -u -r1.142 Make.rules.in
--- Make.rules.in	9 Jan 2003 01:57:15 -0000	1.142
+++ Make.rules.in	26 Feb 2003 05:43:03 -0000
@@ -72,7 +72,7 @@
 WRC          = $(TOOLSDIR)/tools/wrc/wrc
 WMC          = $(TOOLSDIR)/tools/wmc/wmc
 WIDL         = $(TOOLSDIR)/tools/widl/widl
-WRCFLAGS     = -J -m $(EXTRAWRCFLAGS)
+WRCFLAGS     = -m $(EXTRAWRCFLAGS) -I-
 LDPATH       = @LDPATH@
 DLLDIR       = $(TOPOBJDIR)/dlls
 LIBWINE      = -L$(TOPOBJDIR)/library -lwine


-- 
Dimi.



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

  Powered by Linux