Fix overlooked sublang shift bug.

Add testcase.
This commit is contained in:
Nick Clifton 2002-04-09 17:06:14 +00:00
parent f7d63484de
commit b24eb5ac22
5 changed files with 27 additions and 7 deletions

View File

@ -5,15 +5,17 @@
Fix typo in BEDIT warning. Fix typo in BEDIT warning.
Don't add default dialog style when explicit style specified. Don't add default dialog style when explicit style specified.
* rclex.l: "\xhex" encoding in strings corrected. * rclex.l (handle_quotes): "\xhex" encoding in strings corrected.
"\a" escape (used for right justified key definitions in menus) is (handle_quotes) "\a" escape (used for right justified key
encodes as binary 8. definitions in menus) is encodes as binary 8.
* resrc.c: Print style even if it is 0. * resrc.c (write_rc_dialog): Print style even if it is 0.
(write_rc_directory): Fix overlooked sublang shift bug.
* resbin.c: Use signature to identify DIALOGEX. * resbin.c (bin_to_res_dialog): Use signature to identify
DIALOGEX.
* windres.c: Set default LANGUAGE to english/us. * windres.c (main): Set default LANGUAGE to english/us.
2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk> 2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk>

View File

@ -1592,7 +1592,8 @@ write_rc_directory (e, rd, type, name, language, level)
&& (re->id.u.id & 0xffff) == re->id.u.id) && (re->id.u.id & 0xffff) == re->id.u.id)
{ {
fprintf (e, "LANGUAGE %lu, %lu\n", fprintf (e, "LANGUAGE %lu, %lu\n",
re->id.u.id & 0xff, (re->id.u.id >> 8) & 0xff); re->id.u.id & ((1 << SUBLANG_SHIFT) - 1),
(re->id.u.id >> SUBLANG_SHIFT) & 0xff);
*language = re->id.u.id; *language = re->id.u.id;
} }
break; break;

View File

@ -19,6 +19,10 @@
* binutils-all/windres/quoteclass.rc: New test case for quoted * binutils-all/windres/quoteclass.rc: New test case for quoted
CLASS definitions in DIALOG resources. CLASS definitions in DIALOG resources.
* binutils-all/windres/sublang.rc: New test case: Check assignment
of sub-language.
* binutils-all/windres/sublang.rsd: Expected output.
2002-02-18 Timothy Daly <remote_bob@yahoo.com> 2002-02-18 Timothy Daly <remote_bob@yahoo.com>
* binutils-all/readelf.r: Change expected output to match new, * binutils-all/readelf.r: Change expected output to match new,

View File

@ -0,0 +1,5 @@
LANGUAGE 9, 1
101 DIALOG DISCARDABLE 0, 0, 186, 95
BEGIN
DEFPUSHBUTTON "OK",1,129,7,50,14
END

View File

@ -0,0 +1,8 @@
0000 00000000 20000000 ffff0000 ffff0000 .... ...........
0010 00000000 00000000 00000000 00000000 ................
0020 36000000 20000000 ffff0500 ffff6500 6... .........e.
0030 00000000 10100904 00000000 00000000 ................
0040 00008880 00000000 01000000 0000ba00 ................
0050 5f000000 00000000 01000150 00000000 _..........P....
0060 81000700 32000e00 0100ffff 80004f00 ....2.........O.
0070 4b000000 00000000 K.......