aboutsummaryrefslogtreecommitdiff
path: root/binutils/windmc.c
diff options
context:
space:
mode:
authorJoel Anderson <joelanderson333@gmail.com>2020-06-03 16:44:37 +0100
committerNick Clifton <nickc@redhat.com>2020-06-03 16:44:37 +0100
commit913e0fd47321873e1bfecedd73d5882b765fc8e6 (patch)
tree757a713b5e6bb5d7b396d27cdc2adccd76933ed0 /binutils/windmc.c
parent5144dfba285d9b467016b7a2f72f0240fda7ce8f (diff)
downloadbinutils-913e0fd47321873e1bfecedd73d5882b765fc8e6.zip
binutils-913e0fd47321873e1bfecedd73d5882b765fc8e6.tar.gz
binutils-913e0fd47321873e1bfecedd73d5882b765fc8e6.tar.bz2
[PATCH] fix windmc typedef bug
While a typedef can be specified in message files for the messages following with the `MessageIdTypedef` directive, only the last typedef was honored by windmc. This corrects this behavior, matching mc.exe functionality. * windmc.h (struct mc_node): Add id_typecast field. * mcparse.y (message): Initialise the id_typecast field. * windmc.c (write_dbg): Use the id_typecast field as a parameter when calling write_dbg_define. (write_header): Likewise.
Diffstat (limited to 'binutils/windmc.c')
-rw-r--r--binutils/windmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/windmc.c b/binutils/windmc.c
index 0aae650..98bb3ad 100644
--- a/binutils/windmc.c
+++ b/binutils/windmc.c
@@ -821,7 +821,7 @@ write_dbg (FILE *fp)
while (h != NULL)
{
if (h->symbol)
- write_dbg_define (fp, h->symbol, mcset_msg_id_typedef);
+ write_dbg_define (fp, h->symbol, h->id_typecast);
h = h->next;
}
fprintf (fp, " { (");
@@ -908,7 +908,7 @@ write_header (FILE *fp)
fprintf (fp, "%s", s);
}
if (h->symbol)
- write_header_define (fp, h->symbol, h->vid, mcset_msg_id_typedef, h->sub);
+ write_header_define (fp, h->symbol, h->vid, h->id_typecast, h->sub);
h = h->next;
}
}