* [PATCH] windres CONTROL statements with id, \a escapes, \xhex escapes, CLASS and STYLE in DIALOG
@ 2002-02-01 9:37 Bernd Herd
0 siblings, 0 replies; only message in thread
From: Bernd Herd @ 2002-02-01 9:37 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 122 bytes --]
windrestest.tar.bz2 contains an example RC file to illustrate the
problems solved. Created with microsoft visual C++ 5.0.
[-- Attachment #2: windres.patch --]
[-- Type: text/plain, Size: 3922 bytes --]
Index: binutils//ChangeLog
===================================================================
RCS file: /cvs/src/src/binutils/ChangeLog,v
retrieving revision 1.417
diff -c -r1.417 ChangeLog
*** ChangeLog 2002/02/01 03:26:31 1.417
--- ChangeLog 2002/02/01 17:18:44
***************
*** 1,3 ****
--- 1,16 ----
+ 2002-02-01 Bernd Herd <info@herdsoft.com>
+
+ * rclex.l: "\a" escape (used for right justified
+ key definitions in menus) is encodes as binary 8
+ * rclex.l: "\xhex" encoding in strings corrected
+ * rcparse.y: CLASS definitions in DIALOG resources
+ are quooted.
+ * rcparse.y: CONTROL statements may have a numeric first
+ parameters like icons do.
+ * rcparse.y: if style attribute of DIALOG resource
+ is given, there is *no* implicit start value of
+ WS_VISIBLE | WS_POPUP.
+
2002-02-01 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am"
Index: binutils//rclex.l
===================================================================
RCS file: /cvs/src/src/binutils/rclex.l,v
retrieving revision 1.4
diff -c -r1.4 rclex.l
*** rclex.l 2001/09/19 05:33:16 1.4
--- rclex.l 2002/02/01 17:18:44
***************
*** 331,345 ****
break;
case 'a':
! *s++ = ESCAPE_A;
++t;
break;
- case 'b':
- *s++ = ESCAPE_B;
- ++t;
- break;
-
case 'f':
*s++ = ESCAPE_F;
++t;
--- 331,340 ----
break;
case 'a':
! *s++ = ESCAPE_B; /* Strange, but true... */
++t;
break;
case 'f':
*s++ = ESCAPE_F;
++t;
***************
*** 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;
Index: binutils//rcparse.y
===================================================================
RCS file: /cvs/src/src/binutils/rcparse.y,v
retrieving revision 1.7
diff -c -r1.7 rcparse.y
*** rcparse.y 2001/09/19 05:33:16 1.7
--- rcparse.y 2002/02/01 17:18:46
***************
*** 415,426 ****
{
dialog.class = $3;
}
! | styles STYLE
! { style = dialog.style; }
styleexpr
{
dialog.style = style;
}
| styles EXSTYLE numexpr
{
dialog.exstyle = $3;
--- 415,438 ----
{
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;
***************
*** 515,521 ****
{
$$ = $3;
if (dialog.ex == NULL)
! rcparse_warning (_("IEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "BEDIT");
}
| CHECKBOX
--- 527,533 ----
{
$$ = $3;
if (dialog.ex == NULL)
! rcparse_warning (_("BEDIT requires DIALOGEX"));
res_string_to_id (&$$->class, "BEDIT");
}
| CHECKBOX
***************
*** 581,586 ****
--- 593,603 ----
$$->data = $13;
$$->class.named = 1;
unicode_from_ascii(&$$->class.u.n.length, &$$->class.u.n.name, $5);
+ }
+ | CONTROL resref numexpr ',' QUOTEDSTRING control_styleexpr
+ cnumexpr cnumexpr cnumexpr cnumexpr optcnumexpr opt_control_data
+ {
+ $$ = define_icon_control ($2, $3, $7, $8, style, $11, $11, $12, dialog.ex);
}
| CTEXT
{
[-- Attachment #3: windrestest.tar.bz2 --]
[-- Type: application/octet-stream, Size: 2686 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-02-01 17:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-01 9:37 [PATCH] windres CONTROL statements with id, \a escapes, \xhex escapes, CLASS and STYLE in DIALOG Bernd Herd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).