This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] windres (ungarbled): (12) quoted class definitions (Bernd Herd)
- From: Gunnar Degnbol <gunnar at danbbs dot dk>
- To: binutils at sources dot redhat dot com
- Date: Wed, 20 Mar 2002 00:33:49 +0100
- Subject: [PATCH] windres (ungarbled): (12) quoted class definitions (Bernd Herd)
This was posted by Bernd Herd in february as part of a large
patch bundling several fixes:
http://sources.redhat.com/ml/binutils/2002-02/msg00021.html
I have added a fix so windres also prints the quotes when
decompiling. rc.exe does not understand unquoted class names.
ChangeLog:
2002-03-19 Bernd Herd <info@herdsoft.com>
* rcparse.y: CLASS definitions in DIALOG resources
are quoted.
2002-03-19 Gunnar Degnbol <degnbol@danbbs.dk>
* resrc.c: print CLASS names in quotes
quoteclass.rc:
101 DIALOG DISCARDABLE 0, 0, 186, 95
CLASS "myclass"
BEGIN
DEFPUSHBUTTON "OK",1,129,7,50,14
END
Before patch:
$ rc quoteclass.rc
$ /bin/windres -i quoteclass.rc
/bin/windres (ungarbled): quoteclass.rc:2: parse error
After patch:
$ /usr/local/bin/windres -i quoteclass.rc
LANGUAGE 9, 1
101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
CLASS "myclass"
BEGIN
DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END
quoteclass.patch:
--- binutils/rcparse.y Sun Mar 17 19:01:01 2002
+++ binutils.new/rcparse.y Sun Mar 17 19:35:23 2002
@@ -425,6 +425,10 @@
{
dialog.style = style;
}
+ | styles CLASS QUOTEDSTRING
+ {
+ res_string_to_id(&dialog.class, $3);
+ }
| styles EXSTYLE numexpr
{
dialog.exstyle = $3;
--- binutils/resrc.c Sun Mar 17 19:34:54 2002
+++ binutils.new/resrc.c Sun Mar 17 19:30:57 2002
@@ -2061,7 +2061,7 @@
|| dialog->class.u.id != 0)
{
fprintf (e, "CLASS ");
- res_id_print (e, dialog->class, 0);
+ res_id_print (e, dialog->class, 1);
fprintf (e, "\n");
}
if (dialog->caption != NULL)