This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Patch to solve some problems in windres
- To: binutils at sourceware dot cygnus dot com, kzmi at ca2 dot so-net dot ne dot jp, ian at zembu dot com
- Subject: Patch to solve some problems in windres
- From: Bernd Herd <info at herdsoft dot com>
- Date: Tue, 23 Nov 1999 15:36:04 +0100
- Organization: Herd Software Development
Hello,
I've developed patches for some Problems I had when converting an
existing Windows RC-Project to Cygnus for Windows
- Handling of Dialog template "CLASS" statement
Microsofts RC.EXE only accepts a class statement when putting " around
the class name such as
CLASS "MYDIALOGCLASS"
Windres only accepted without the "
CLASS MYDIALOGCLASS
- Handling of the Dialog Window Style flags:
windres assumed a default value of WS_VISIBLE | WS_POPUP and allowed
to remove flags by "NOT WS_POPUP". This
does not match the behaviour of Microsofts RC compiler. The Microsoft
Compiler uses some default value
if the style statement is omitted, but uses a default of zero if the
style statement is included.
- The Handling of hexadecimal escape sequences such as
STRINGTABLE
1, "90\xB0"
END
Didn't work.
- The escape sequence "\a" is translated by RC.EXE into a value of 8,
which is normally in C represented by "\b".
Those "\a" are frequently used in Windows Menus to separate
accelerator information from the menu text.
Windres encoded "\a" to be a value of 7, causing the resulting res
file to contain unexpected characters.
The patch is built against binutils-991122.
I'm quite a beginner in these things, so it would be nice if someone
could confirm by eMail that my changes are correctly transfered to the
official binutils build tree and not lost in the bit bucket.
Yours sincerely
Bernd Herd
:-)
-----------------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxx Herd Software Entwicklung
x x Bernd Herd
x xxxxxxxx x Rudolf-Virchow-Str. 8
x xxxxxxxxxxxx x 68642 Bürstadt
x xxxxxxxxxxxxxxxx x Germany
x xxxxxxx xxxxxxxxx Tel.: +49-6206-707775
x xxxxxx x Fax.: +49-6206-707776
x xxxxxxx xxxxxxxxx
x xxxxxxxxxxxxxxxx x eMail: herd@herdsoft.com
x xxxxxxxxxxxx x
x xxxxxxxx x WWW: http://www.herdsoft.com
x x UstIdNr (VAT-Registration ID): DE 151.015.793
xxxxxxxxxxxxxxxxxxxx
diff --context --recursive binutils-991116/binutils/rclex.l binutils-991122/binutils/rclex.l
*** binutils-991116/binutils/rclex.l Thu May 13 00:03:09 1999
--- binutils-991122/binutils/rclex.l Tue Nov 23 14:28:52 1999
***************
*** 331,342 ****
break;
case 'a':
! *s++ = ESCAPE_A;
! ++t;
! break;
!
! case 'b':
! *s++ = ESCAPE_B;
++t;
break;
--- 331,337 ----
break;
case 'a':
! *s++ = ESCAPE_B; /* Strange, but true... */
++t;
break;
***************
*** 394,402 ****
if (*t >= '0' && *t <= '9')
ch = (ch << 4) | (*t - '0');
else if (*t >= 'a' && *t <= 'f')
! ch = (ch << 4) | (*t - 'a');
else if (*t >= 'A' && *t <= 'F')
! ch = (ch << 4) | (*t - 'A');
else
break;
++t;
--- 389,397 ----
if (*t >= '0' && *t <= '9')
ch = (ch << 4) | (*t - '0');
else if (*t >= 'a' && *t <= 'f')
! ch = (ch << 4) | (*t - 'a' + 0xa);
else if (*t >= 'A' && *t <= 'F')
! ch = (ch << 4) | (*t - 'A' + 0xa);
else
break;
++t;
diff --context --recursive binutils-991116/binutils/rcparse.y binutils-991122/binutils/rcparse.y
*** binutils-991116/binutils/rcparse.y Thu May 13 00:03:10 1999
--- binutils-991122/binutils/rcparse.y Tue Nov 23 10:53:26 1999
***************
*** 416,427 ****
{
dialog.class = $3;
}
! | styles STYLE
! { style = dialog.style; }
styleexpr
{
dialog.style = style;
}
| styles EXSTYLE numexpr
{
dialog.exstyle = $3;
--- 416,439 ----
{
dialog.class = $3;
}
! | styles CLASS QUOTEDSTRING
! {
! res_string_to_id(&dialog.class, $3);
! }
!
!
! | styles STYLE
! { style = 0; }
styleexpr
{
dialog.style = style;
}
+
+ /* | styles STYLE numexpr
+ {
+ dialog.style = $3;
+ }
+ */
| styles EXSTYLE numexpr
{
dialog.exstyle = $3;
***************
*** 516,522 ****
{
$$ = $3;
if (dialog.ex == NULL)
! rcparse_warning (_("IEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "BEDIT");
}
| CHECKBOX
--- 528,534 ----
{
$$ = $3;
if (dialog.ex == NULL)
! rcparse_warning (_("BEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "BEDIT");
}
| CHECKBOX
begin:vcard
n:Herd;Bernd
tel;fax:+49-6206-707776
tel;work:+49-6206-707775
x-mozilla-html:FALSE
url:http://www.herdsoft.com
org:Herd Software Entwicklung
adr:;;Rudolf-Virchow-Str. 8;Bürstadt;Hessen;68642;Germany
version:2.1
email;internet:info@herdsoft.com
title:Dipl. Ing.
note:PGP / GNUPG public keys download von http://www.herdsoft.com/ftp/downloads.html
fn:Bernd Herd
end:vcard