summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2001-07-17 01:19:19 +0000
committerDJ Delorie <dj@delorie.com>2001-07-17 01:19:19 +0000
commit37536cad9c31c0ce147236e9ba0571ef6803f8e0 (patch)
tree9ef7a435237020379a15dae6b833347560ee11bd
parent3728215e7fb3d570212a4014e6fe101e4bedb79b (diff)
downloadbinutils-redhat-37536cad9c31c0ce147236e9ba0571ef6803f8e0.tar.gz
* rcparse.y (styles): use SUBLANG_SHIFT instead of 8 (or the more
correct 10). * resrc.c (write_rc_resource): Likewise. * windres.h (SUBLANG_SHIFT): Define - as 10.
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/rcparse.y6
-rw-r--r--binutils/resrc.c4
-rw-r--r--binutils/windres.h2
4 files changed, 14 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 31de7a992a..40ca327593 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-16 DJ Delorie <dj@redhat.com>
+
+ * rcparse.y (styles): use SUBLANG_SHIFT instead of 8 (or the more
+ correct 10).
+ * resrc.c (write_rc_resource): Likewise.
+ * windres.h (SUBLANG_SHIFT): Define - as 10.
+
2001-07-15 Nick Clifton <nickc@cambridge.redhat.com>
* MAINTAINERS: Add Christian Groessler as maintainer for z8k port.
diff --git a/binutils/rcparse.y b/binutils/rcparse.y
index 89004e7c0b..f2378c0315 100644
--- a/binutils/rcparse.y
+++ b/binutils/rcparse.y
@@ -455,7 +455,7 @@ styles:
}
| styles LANGUAGE numexpr cnumexpr
{
- sub_res_info.language = $3 | ($4 << 8);
+ sub_res_info.language = $3 | ($4 << SUBLANG_SHIFT);
}
| styles VERSIONK numexpr
{
@@ -874,7 +874,7 @@ icon:
language:
LANGUAGE numexpr cnumexpr
{
- language = $2 | ($3 << 8);
+ language = $2 | ($3 << SUBLANG_SHIFT);
}
;
@@ -1329,7 +1329,7 @@ suboptions:
| suboptions LANGUAGE numexpr cnumexpr
{
$$ = $1;
- $$.language = $3 | ($4 << 8);
+ $$.language = $3 | ($4 << SUBLANG_SHIFT);
}
| suboptions VERSIONK numexpr
{
diff --git a/binutils/resrc.c b/binutils/resrc.c
index fca874ae35..a29a66424d 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -1889,8 +1889,8 @@ write_rc_resource (e, type, name, res, language)
if (res->res_info.language != 0 && res->res_info.language != *language)
fprintf (e, "%sLANGUAGE %d, %d\n",
modifiers ? "// " : "",
- res->res_info.language & 0xff,
- (res->res_info.language >> 8) & 0xff);
+ res->res_info.language & ((1<<SUBLANG_SHIFT)-1),
+ (res->res_info.language >> SUBLANG_SHIFT) & 0xff);
if (res->res_info.characteristics != 0)
fprintf (e, "%sCHARACTERISTICS %lu\n",
modifiers ? "// " : "",
diff --git a/binutils/windres.h b/binutils/windres.h
index 321be23f60..157d7514f4 100644
--- a/binutils/windres.h
+++ b/binutils/windres.h
@@ -184,6 +184,8 @@ struct res_resource
struct res_coff_info coff_info;
};
+#define SUBLANG_SHIFT 10
+
/* Memory flags in the memflags field of a struct res_resource. */
#define MEMFLAG_MOVEABLE 0x10