aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binutils/ChangeLog14
-rw-r--r--binutils/resrc.c3
-rw-r--r--binutils/testsuite/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/windres/sublang.rc5
-rw-r--r--binutils/testsuite/binutils-all/windres/sublang.rsd8
5 files changed, 27 insertions, 7 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ecbd2ac..f7e942d 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -5,15 +5,17 @@
Fix typo in BEDIT warning.
Don't add default dialog style when explicit style specified.
- * rclex.l: "\xhex" encoding in strings corrected.
- "\a" escape (used for right justified key definitions in menus) is
- encodes as binary 8.
+ * rclex.l (handle_quotes): "\xhex" encoding in strings corrected.
+ (handle_quotes) "\a" escape (used for right justified key
+ 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>
diff --git a/binutils/resrc.c b/binutils/resrc.c
index a9b3ba8..773e08a 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -1592,7 +1592,8 @@ write_rc_directory (e, rd, type, name, language, level)
&& (re->id.u.id & 0xffff) == re->id.u.id)
{
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;
}
break;
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 033935a..63b1a5c 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -19,6 +19,10 @@
* binutils-all/windres/quoteclass.rc: New test case for quoted
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>
* binutils-all/readelf.r: Change expected output to match new,
diff --git a/binutils/testsuite/binutils-all/windres/sublang.rc b/binutils/testsuite/binutils-all/windres/sublang.rc
new file mode 100644
index 0000000..a37921b
--- /dev/null
+++ b/binutils/testsuite/binutils-all/windres/sublang.rc
@@ -0,0 +1,5 @@
+LANGUAGE 9, 1
+101 DIALOG DISCARDABLE 0, 0, 186, 95
+BEGIN
+ DEFPUSHBUTTON "OK",1,129,7,50,14
+END
diff --git a/binutils/testsuite/binutils-all/windres/sublang.rsd b/binutils/testsuite/binutils-all/windres/sublang.rsd
new file mode 100644
index 0000000..36b68c2
--- /dev/null
+++ b/binutils/testsuite/binutils-all/windres/sublang.rsd
@@ -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.......