This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
windres: -l
- From: "Dimitrie O. Paun" <dimi at intelliware dot ca>
- To: binutils at sources dot redhat dot com
- Date: Thu, 3 Apr 2003 12:33:31 -0500 (EST)
- Subject: windres: -l
Yet another small change that can go through. It cleans up a little the
handling of long options, and introduces -l as a synonym for --language
for compatibility with wrc and rc.
2003-04-03 Dimitrie O. Paun <dpaun at rogers dot com>
* windres.c: Add -l for compatibility with wrc, and rc.
Use the short option as a key for long options that have
a synonymous short option.
* doc/binutils.texi: Added -l to the list of options.
Index: windres.c
===================================================================
RCS file: /cvs/src/src/binutils/windres.c,v
retrieving revision 1.15
diff -u -r1.15 windres.c
--- windres.c 3 Apr 2003 13:40:51 -0000 1.15
+++ windres.c 3 Apr 2003 17:59:55 -0000
@@ -106,22 +106,19 @@
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
-#define OPTION_HELP 150
-#define OPTION_INCLUDE_DIR (OPTION_HELP + 1)
-#define OPTION_LANGUAGE (OPTION_INCLUDE_DIR + 1)
-#define OPTION_PREPROCESSOR (OPTION_LANGUAGE + 1)
+#define OPTION_INCLUDE_DIR 150
+#define OPTION_PREPROCESSOR (OPTION_INCLUDE_DIR + 1)
#define OPTION_USE_TEMP_FILE (OPTION_PREPROCESSOR + 1)
#define OPTION_NO_USE_TEMP_FILE (OPTION_USE_TEMP_FILE + 1)
-#define OPTION_VERSION (OPTION_NO_USE_TEMP_FILE + 1)
-#define OPTION_YYDEBUG (OPTION_VERSION + 1)
+#define OPTION_YYDEBUG (OPTION_NO_USE_TEMP_FILE + 1)
static const struct option long_options[] =
{
{"define", required_argument, 0, 'D'},
- {"help", no_argument, 0, OPTION_HELP},
+ {"help", no_argument, 0, 'h'},
{"include-dir", required_argument, 0, OPTION_INCLUDE_DIR},
{"input-format", required_argument, 0, 'I'},
- {"language", required_argument, 0, OPTION_LANGUAGE},
+ {"language", required_argument, 0, 'l'},
{"output-format", required_argument, 0, 'O'},
{"preprocessor", required_argument, 0, OPTION_PREPROCESSOR},
{"target", required_argument, 0, 'F'},
@@ -129,7 +126,7 @@
{"use-temp-file", no_argument, 0, OPTION_USE_TEMP_FILE},
{"no-use-temp-file", no_argument, 0, OPTION_NO_USE_TEMP_FILE},
{"verbose", no_argument, 0, 'v'},
- {"version", no_argument, 0, OPTION_VERSION},
+ {"version", no_argument, 0, 'V'},
{"yydebug", no_argument, 0, OPTION_YYDEBUG},
{0, no_argument, 0, 0}
};
@@ -904,7 +901,7 @@
break;
- case OPTION_LANGUAGE:
+ case 'l':
language = strtol (optarg, (char **) NULL, 16);
break;
@@ -924,12 +921,10 @@
case 'h':
case 'H':
- case OPTION_HELP:
usage (stdout, 0);
break;
case 'V':
- case OPTION_VERSION:
print_version ("windres");
break;
Index: doc/binutils.texi
===================================================================
RCS file: /cvs/src/src/binutils/doc/binutils.texi,v
retrieving revision 1.34
diff -u -r1.34 binutils.texi
--- doc/binutils.texi 3 Apr 2003 13:40:51 -0000 1.34
+++ doc/binutils.texi 3 Apr 2003 18:00:01 -0000
@@ -2626,6 +2626,7 @@
Enable verbose mode. This tells you what the preprocessor is if you
didn't specify one.
+ at item -l @var{val}
@item --language @var{val}
Specify the default language to use when reading an @code{rc} file.
@var{val} should be a hexadecimal language code. The low eight bits are
--
Dimi.