This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: windres: serious bug
- From: Nick Clifton <nickc at redhat dot com>
- To: dimi at intelliware dot ca, ian at airs dot com
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 31 Mar 2003 11:15:12 +0100
- Subject: Re: windres: serious bug
- References: <200303210129.45853.dimi@intelliware.ca> <m31y11f9si.fsf@gossamer.airs.com>
Hi Dimitrie, Hi Ian,
: Ian writes:
:
: Here is an untested patch. I haven't even run it, although it does
: compile. It should point out the right places to change.
The patch appears to work and it does not break anything, so I am
applying it, together with a new test for the testsuite to check that
the fix works.
Cheers
Nick
PS. I created the dialogid.rsd file using windres rather than
Window's resource compiler because I do not have access to a Windows
build system. If anyone does have such access and can check that the
compiled dialogid.rc file really does match with the one I created,
(modulo the "Static" discrepancy), I would be very grateful.
binutils/ChangeLog
2003-03-31 Ian Lance Taylor <ian at airs dot com>
* rcparse.y: Replace uses of 'optstringrc' with 'optresid'.
(optresid): Handle a resource id that can be a string or a number.
* resrc.c (define_control): Replace 'text' parameter with 'iid' a
struct res_id.
(define_icon_control): Pass a struct res_id to define_control.
* windres.h (define_control): Change prototype.
binutils/testsuite/ChangeLog
2003-03-31 Nick Clifton <nickc at redhat dot com>
* binutils-all/windres/dialogid.rc: New test source file.
* binutils-all/windres/dialogid.rsd: New test expected results.
New test files:
*** /dev/null Sat Aug 31 00:31:37 2002
--- testsuite/binutils-all/windres/dialogid.rc Mon Mar 31 10:56:05 2003
***************
*** 0 ****
--- 1,9 ----
+ // Test created based on bug report submitted to binutils mailing list
+ // See: http://sources.redhat.com/ml/binutils/2003-03/msg00312.html
+
+ 101 DIALOGEX 0, 0, 200, 200
+
+ BEGIN
+ CONTROL 108, -1, "Static", 77, 11, 11, 83, 162
+ CONTROL "stringid", 102, "Static", 0x5000120e, 5, 5, 10, 10
+ END
*** /dev/null Sat Aug 31 00:31:37 2002
--- testsuite/binutils-all/windres/dialogid.rsd Mon Mar 31 11:01:03 2003
***************
*** 0 ****
--- 1,13 ----
+ 0000 00000000 20000000 ffff0000 ffff0000 .... ...........
+ 0010 00000000 00000000 00000000 00000000 ................
+ 0020 86000000 20000000 ffff0500 ffff6500 .... .........e.
+ 0030 00000000 30100904 00000000 00000000 ....0...........
+ 0040 0100ffff 00000000 00000000 00008880 ................
+ 0050 02000000 0000c800 c8000000 00000000 ................
+ 0060 00000000 00000000 4d000050 0b000b00 ........M..P....
+ 0070 5300a200 ffff0000 53007400 61007400 S.......S.t.a.t.
+ 0080 69006300 0000ffff 6c000000 00000000 i.c.....l.......
+ 0090 00000000 0e120050 05000500 0a000a00 .......P........
+ 00a0 66000000 53007400 61007400 69006300 f...S.t.a.t.i.c.
+ 00b0 00007300 74007200 69006e00 67006900 ..s.t.r.i.n.g.i.
+ 00c0 64000000 00000000 d.......