aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-10-12 17:47:35 +0000
committerDJ Delorie <dj@redhat.com>2000-10-12 17:47:35 +0000
commit9eb01b42f62888ad4a7ffd0fef8c140b93e01919 (patch)
treef2451e8d814c18ad1703f72429ac8bf75da25ac0
parentfba7f19cf6f801ee55018614b3a6f2ead2b1fb3b (diff)
downloadgdb-9eb01b42f62888ad4a7ffd0fef8c140b93e01919.zip
gdb-9eb01b42f62888ad4a7ffd0fef8c140b93e01919.tar.gz
gdb-9eb01b42f62888ad4a7ffd0fef8c140b93e01919.tar.bz2
* Make comma after string after icon/control optional.
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/rcparse.y54
2 files changed, 52 insertions, 6 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 4632f34..5e42e36 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2000-10-12 Roger Sayle <roger@metaphorics.com>
+
+ * Make comma after string after icon/control optional.
+
2000-09-13 Anders Norlander <anorland@acc.umu.se>
* readelf.c (get_machine_flags): Also print EF_MIPS_MACH field.
diff --git a/binutils/rcparse.y b/binutils/rcparse.y
index 39551c2..b67338f 100644
--- a/binutils/rcparse.y
+++ b/binutils/rcparse.y
@@ -136,11 +136,11 @@ static unsigned long class;
%type <vervar> vertrans
%type <res_info> suboptions memflags_move_discard memflags_move
%type <memflags> memflag
-%type <id> id
+%type <id> id resref
%type <il> exstyle parennumber
%type <il> numexpr posnumexpr cnumexpr optcnumexpr cposnumexpr
%type <is> acc_options acc_option menuitem_flags menuitem_flag
-%type <s> optstringc file_name
+%type <s> optstringc file_name resname
%type <i> sizednumexpr sizedposnumexpr
%left '|'
@@ -636,24 +636,24 @@ control:
rcparse_warning (_("IEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "HEDIT");
}
- | ICON id cnumexpr cnumexpr cnumexpr opt_control_data
+ | ICON resref numexpr cnumexpr cnumexpr opt_control_data
{
$$ = define_icon_control ($2, $3, $4, $5, 0, 0, 0, $6,
dialog.ex);
}
- | ICON id cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr
+ | ICON resref numexpr cnumexpr cnumexpr cnumexpr cnumexpr
opt_control_data
{
$$ = define_icon_control ($2, $3, $4, $5, 0, 0, 0, $8,
dialog.ex);
}
- | ICON id cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr
+ | ICON resref numexpr cnumexpr cnumexpr cnumexpr cnumexpr
icon_styleexpr optcnumexpr opt_control_data
{
$$ = define_icon_control ($2, $3, $4, $5, style, $9, 0, $10,
dialog.ex);
}
- | ICON id numexpr cnumexpr cnumexpr cnumexpr cnumexpr
+ | ICON resref numexpr cnumexpr cnumexpr cnumexpr cnumexpr
icon_styleexpr cnumexpr cnumexpr opt_control_data
{
$$ = define_icon_control ($2, $3, $4, $5, style, $9, $10, $11,
@@ -809,6 +809,10 @@ optstringc:
{
$$ = NULL;
}
+ | QUOTEDSTRING
+ {
+ $$ = $1;
+ }
| QUOTEDSTRING ','
{
$$ = $1;
@@ -1262,6 +1266,44 @@ id:
}
;
+/* A resource reference. */
+
+resname:
+ QUOTEDSTRING
+ {
+ $$ = $1;
+ }
+ | QUOTEDSTRING ','
+ {
+ $$ = $1;
+ }
+ | STRING ','
+ {
+ $$ = $1;
+ }
+ ;
+
+
+resref:
+ posnumexpr ','
+ {
+ $$.named = 0;
+ $$.u.id = $1;
+ }
+ | resname
+ {
+ char *copy, *s;
+
+ /* It seems that resource ID's are forced to upper case. */
+ copy = xstrdup ($1);
+ for (s = copy; *s != '\0'; s++)
+ if (islower ((unsigned char) *s))
+ *s = toupper ((unsigned char) *s);
+ res_string_to_id (&$$, copy);
+ free (copy);
+ }
+ ;
+
/* Generic suboptions. These may appear before the BEGIN in any
multiline statement. */