public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields
@ 2003-06-26 11:38 Danny Smith
  2003-06-26 16:13 ` Christopher Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Danny Smith @ 2003-06-26 11:38 UTC (permalink / raw)
  To: binutils; +Cc: ian

Hello

Currently, rc files with LISTBOX, COMBOBOX, EDITTEXT and SCROLLBAR controls
defined like

501 DIALOG DISCARDABLE  0, 0, 168, 137
BEGIN
    COMBOBOX        1001,10,10,50,54, CBS_SIMPLE | WS_TABSTOP
END

fail to produce valid resource objects with windres

This failure can be traced to this change:

2003-03-31  Ian Lance Taylor <ian@airs.com>

	* rcparse.y: Replace uses of 'optstringrc' with 'optresid'.
	(optresid): Handle a resource id that can be a string or a number.

With the old 'optstringrc', the first field after the COMBOBOX keyword was
an empty string and the remaining fields were bumped so that everything was
in place. Now it is treated as an ordinal alias for a name in an res_id union,
so the fields are off-by-one unless we put in an explict empty string field,
eg.
  COMBOBOX        "",1001,10,10,50,54, CBS_SIMPLE | WS_TABSTOP


The LISTBOX, COMBOBOX, EDITTEXT and SCROLLBAR controls should not accept
a text field (nor a numerical alias stored in a res_id structure) in
syntax definition, but should expect a resource reference id (integer only) to
be the first field after the control name keyword. 
For the first three of these control types, this is documented
by MSDN which give the definition syntax as:

LISTBOX id, x, y, width, height [[, style [[, extended-style]]]]
COMBOBOX id, x, y, width, height [, style [, extended-style]]
EDITTEXT id, x, y, width, height [[, style [[, extended-style]]]]

Note, id here is not a res_id name field but a resource reference id.
There is no text field.

For SCROLLBAR, MSDN documents the syntax for definition as:

SCROLLBAR text, id, x, y, width, height [[, style [[, extended-style]]]]

But the version of rc that ships with VC++6 chokes on that syntax
eg

/* bad-scrollbar.rc */
501 DIALOGEX 0, 0, 168, 137
BEGIN
    SCROLLBAR       "anytext",1001,43,68,105,10,0,0,0x81f503e9
END

Fails with:
"error RC2116: expecting number for id."
then
"error RC2108: expecting numerical dialog constant"\

The same errors are reported by rc.exe with LISTBOX, COMBOBOX and EDITEXT
when a text field follows the controlname keyword.

The following patch fixes by defining a new <dialog_control>
control_params_no_text, like control_params, but passing a
null-text res_id as first parameter to define_control.

I'm not sure this is the best way to do this, but I'm finding it
difficult to discern what the "real" rules should be when the behaviour
of native resource compiler sometimes disagrees with documentation.

I've also noted that although MSDN documents the default-style for
COMBOBOX as CBS_SIMPLE | WS_TABSTOP, the actual behaviour of MS rc is to
define _no_ default style for this control. I've left the default_style
in rcparse.y, but modified the testcase to explicitly set the
documented default.

The testcase .rsd file are dumps from res file generated by
MS rc.exe version 5.00.1641.1.

Danny

ChangeLog

2003-06-27  Danny Smith  <dannysmith@usrs.sourceforge.net>

	* rcparse.y (null_text): New static const struct res_id object,
	with empty name field.
	(control_params_no_text): New <dialog_control> for handling
	of controls without lead text field.	 
	(control): Use control_params_no_text for COMBOBOX,
	LISTBOX, EDITTEXT and SCROLLBAR.
	* resrc.c (define_control): Make first param const.
	* windres.h (define_control): Adjust prototype.

testsuite

	* binutils-all/windres/combobox.rc: New file.
	* binutils-all/windres/combobox.rsd: New file.
	* binutils-all/windres/edittext.rc: New file.
	* binutils-all/windres/edittext.rsd: New file.
	* binutils-all/windres/listbox.rc: New file.
	* binutils-all/windres/listbox.rsd: New file.
	* binutils-all/windres/scrollbar.rc: New file.
	* binutils-all/windres/scrollbar.rsd: Newfile.


Index: rcparse.y
===================================================================
RCS file: /cvs/src/src/binutils/rcparse.y,v
retrieving revision 1.17
diff -c -3 -p -r1.17 rcparse.y
*** rcparse.y	31 Mar 2003 10:15:58 -0000	1.17
--- rcparse.y	26 Jun 2003 09:49:22 -0000
*************** static unsigned long base_style;
*** 53,58 ****
--- 53,62 ----
  static unsigned long default_style;
  static unsigned long class;
  
+ /* This is used in control_params_no_text. COMBOBOX, LISTBOX and EDITTEXT
+    do not allow resource 'text' field in control definition. */
+ static const struct res_id null_text = { 1, {{0, L""}}};
+ 
  %}
  
  %union
*************** static unsigned long class;
*** 125,131 ****
  
  %type <pacc> acc_entries
  %type <acc> acc_entry acc_event
! %type <dialog_control> control control_params
  %type <menuitem> menuitems menuitem menuexitems menuexitem
  %type <rcdata> optrcdata_data optrcdata_data_int rcdata_data
  %type <rcdata_item> opt_control_data
--- 129,135 ----
  
  %type <pacc> acc_entries
  %type <acc> acc_entry acc_event
! %type <dialog_control> control control_params control_params_no_text
  %type <menuitem> menuitems menuitem menuexitems menuexitem
  %type <rcdata> optrcdata_data optrcdata_data_int rcdata_data
  %type <rcdata_item> opt_control_data
*************** control:
*** 588,598 ****
  	  }
  	| COMBOBOX
  	    {
  	      default_style = CBS_SIMPLE | WS_TABSTOP;
  	      base_style = 0;
  	      class = CTL_COMBOBOX;
  	    }
! 	    control_params
  	  {
  	    $$ = $3;
  	  }
--- 592,604 ----
  	  }
  	| COMBOBOX
  	    {
+ 	      /* This is as per MSDN documentation.  With some (???)
+ 		 versions of MS rc.exe their is no default style.  */
  	      default_style = CBS_SIMPLE | WS_TABSTOP;
  	      base_style = 0;
  	      class = CTL_COMBOBOX;
  	    }
! 	    control_params_no_text
  	  {
  	    $$ = $3;
  	  }
*************** control:
*** 666,672 ****
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
  	    }
! 	    control_params
  	  {
  	    $$ = $3;
  	  }
--- 672,678 ----
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
  	    }
! 	    control_params_no_text
  	  {
  	    $$ = $3;
  	  }
*************** control:
*** 735,741 ****
  	      base_style = LBS_NOTIFY | WS_BORDER;
  	      class = CTL_LISTBOX;
  	    }
! 	    control_params
  	  {
  	    $$ = $3;
  	  }
--- 741,747 ----
  	      base_style = LBS_NOTIFY | WS_BORDER;
  	      class = CTL_LISTBOX;
  	    }
! 	    control_params_no_text
  	  {
  	    $$ = $3;
  	  }
*************** control:
*** 795,801 ****
  	      base_style = 0;
  	      class = CTL_SCROLLBAR;
  	    }
! 	    control_params
  	  {
  	    $$ = $3;
  	  }
--- 801,807 ----
  	      base_style = 0;
  	      class = CTL_SCROLLBAR;
  	    }
! 	    control_params_no_text
  	  {
  	    $$ = $3;
  	  }
*************** control_params:
*** 858,863 ****
--- 864,904 ----
  	      rcparse_warning (_("help ID requires DIALOGEX"));
  	    $$->help = $9;
  	    $$->data = $10;
+ 	  }
+ 	;
+ 
+ /* Like control_params, but no text field allowed in definition.  */
+ control_params_no_text:
+ 	  numexpr cnumexpr cnumexpr cnumexpr cnumexpr opt_control_data
+ 	  {
+ 	    $$ = define_control (null_text, $1, $2, $3, $4, $5, class,
+ 				 default_style | WS_CHILD | WS_VISIBLE, 0);
+ 	    if ($6 != NULL)
+ 	      {
+ 		if (dialog.ex == NULL)
+ 		  rcparse_warning (_("control data requires DIALOGEX"));
+ 		$$->data = $6;
+ 	      }
+ 	  }
+ 	| numexpr cnumexpr cnumexpr cnumexpr cnumexpr
+ 	    control_params_styleexpr optcnumexpr opt_control_data
+ 	  {
+ 	    $$ = define_control (null_text, $1, $2, $3, $4, $5, class, style, $7);
+ 	    if ($8 != NULL)
+ 	      {
+ 		if (dialog.ex == NULL)
+ 		  rcparse_warning (_("control data requires DIALOGEX"));
+ 		$$->data = $8;
+ 	      }
+ 	  }
+ 	| numexpr cnumexpr cnumexpr cnumexpr cnumexpr
+ 	    control_params_styleexpr cnumexpr cnumexpr opt_control_data
+ 	  {
+ 	    $$ = define_control (null_text, $1, $2, $3, $4, $5, class, style, $7);
+ 	    if (dialog.ex == NULL)
+ 	      rcparse_warning (_("help ID requires DIALOGEX"));
+ 	    $$->help = $8;
+ 	    $$->data = $9;
  	  }
  	;
  
Index: resrc.c
===================================================================
RCS file: /cvs/src/src/binutils/resrc.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 resrc.c
*** resrc.c	31 Mar 2003 10:15:58 -0000	1.21
--- resrc.c	26 Jun 2003 09:49:25 -0000
*************** define_dialog (id, resinfo, dialog)
*** 819,825 ****
  
  struct dialog_control *
  define_control (iid, id, x, y, width, height, class, style, exstyle)
!      struct res_id iid;
       unsigned long id;
       unsigned long x;
       unsigned long y;
--- 819,825 ----
  
  struct dialog_control *
  define_control (iid, id, x, y, width, height, class, style, exstyle)
!      const struct res_id iid;
       unsigned long id;
       unsigned long x;
       unsigned long y;
Index: windres.h
===================================================================
RCS file: /cvs/src/src/binutils/windres.h,v
retrieving revision 1.9
diff -c -3 -p -r1.9 windres.h
*** windres.h	31 Mar 2003 10:15:58 -0000	1.9
--- windres.h	26 Jun 2003 09:49:26 -0000
*************** extern void define_cursor
*** 814,820 ****
  extern void define_dialog
    PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
  extern struct dialog_control *define_control
!   PARAMS ((struct res_id, unsigned long, unsigned long, unsigned long,
  	   unsigned long, unsigned long, unsigned long, unsigned long,
  	   unsigned long));
  extern struct dialog_control *define_icon_control
--- 814,820 ----
  extern void define_dialog
    PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
  extern struct dialog_control *define_control
!   PARAMS ((const struct res_id, unsigned long, unsigned long, unsigned long,
  	   unsigned long, unsigned long, unsigned long, unsigned long,
  	   unsigned long));
  extern struct dialog_control *define_icon_control
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/combobox.rc	Sat Jun 21 11:32:53 2003
***************
*** 0 ****
--- 1,8 ----
+ #define CBS_SIMPLE 0x1
+ #define WS_TABSTOP 0x10000
+ 
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+     COMBOBOX        1001,10,10,50,54, CBS_SIMPLE | WS_TABSTOP
+ END
+ 
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/combobox.rsd	Tue Jun 24 23:21:20 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 01000150 00000000  ...........P....
+  0060 0a000a00 32003600 e903ffff 85000000  ....2.6.........
+  0070 00000000                             ....            
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/edittext.rc	Sat Jun 21 08:30:53 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   EDITTEXT      1001, 28, 63, 137, 52
+ END
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/edittext.rsd	Tue Jun 24 23:21:30 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 00008150 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 81000000  ..?...4.........
+  0070 00000000                             ....            
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/listbox.rc	Sat Jun 21 08:35:18 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   LISTBOX     1001, 28, 63, 137, 52
+ END
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/listbox.rsd	Tue Jun 24 23:21:38 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 01008050 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 83000000  ..?...4.........
+  0070 00000000                             ....            
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/scrollbar.rc	Thu Jun 26 08:52:54 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOGEX 0, 0, 168, 137
+ BEGIN
+     SCROLLBAR       1001,43,68,105,10,0,0,0x81f503e9
+ END
*** /dev/null	Thu Jun 26 10:41:50 2003
--- testsuite/binutils-all/windres/scrollbar.rsd	Tue Jun 24 23:21:43 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 40000000 20000000 ffff0500 fffff501  @... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 0100ffff 00000000 00000000 00008880  ................
+  0050 01000000 0000a800 89000000 00000000  ................
+  0060 e903f581 00000000 00000050 19002300  ...........P..#.
+  0070 0a006400 e9030000 ffff8400 00000000  ..d.............
*** /dev/null	Thu Jun 26 10:50:22 2003
--- testsuite/binutils-all/windres/combobox.rc	Sat Jun 21 11:32:53 2003
***************
*** 0 ****
--- 1,8 ----
+ #define CBS_SIMPLE 0x1
+ #define WS_TABSTOP 0x10000
+ 
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+     COMBOBOX        1001,10,10,50,54, CBS_SIMPLE | WS_TABSTOP
+ END
+ 
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/combobox.rsd	Tue Jun 24 23:21:20 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 01000150 00000000  ...........P....
+  0060 0a000a00 32003600 e903ffff 85000000  ....2.6.........
+  0070 00000000                             ....            
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/edittext.rc	Sat Jun 21 08:30:53 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   EDITTEXT      1001, 28, 63, 137, 52
+ END
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/edittext.rsd	Tue Jun 24 23:21:30 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 00008150 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 81000000  ..?...4.........
+  0070 00000000                             ....            
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/listbox.rc	Sat Jun 21 08:35:18 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   LISTBOX     1001, 28, 63, 137, 52
+ END
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/listbox.rsd	Tue Jun 24 23:21:38 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 01008050 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 83000000  ..?...4.........
+  0070 00000000                             ....            
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/scrollbar.rc	Thu Jun 26 08:52:54 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOGEX 0, 0, 168, 137
+ BEGIN
+     SCROLLBAR       1001,43,68,105,10,0,0,0x81f503e9
+ END
*** /dev/null	Thu Jun 26 10:50:23 2003
--- testsuite/binutils-all/windres/scrollbar.rsd	Tue Jun 24 23:21:43 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 40000000 20000000 ffff0500 fffff501  @... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 0100ffff 00000000 00000000 00008880  ................
+  0050 01000000 0000a800 89000000 00000000  ................
+  0060 e903f581 00000000 00000050 19002300  ...........P..#.
+  0070 0a006400 e9030000 ffff8400 00000000  ..d.............


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields
  2003-06-26 11:38 [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields Danny Smith
@ 2003-06-26 16:13 ` Christopher Faylor
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2003-06-26 16:13 UTC (permalink / raw)
  To: binutils

On Thu, Jun 26, 2003 at 09:38:05PM +1000, Danny Smith wrote:
>The following patch fixes by defining a new <dialog_control>
>control_params_no_text, like control_params, but passing a
>null-text res_id as first parameter to define_control.
>
>I'm not sure this is the best way to do this, but I'm finding it
>difficult to discern what the "real" rules should be when the behaviour
>of native resource compiler sometimes disagrees with documentation.

Two minor problems with this patch.  One is a misspelling of "their" rather
than "there" (I know: picky, picky).

The other is a feel that control_parms and control_params_no_text should
be using a common rule somehow.  It looks like there is some code duplication
now which is generally a bad thing unless there is no way around this.

Isn't there some way to merge the rules to avoid the duplication?

cgf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields
  2003-06-27  6:07 Danny Smith
  2003-06-27 13:46 ` Ian Lance Taylor
@ 2003-06-27 15:27 ` Christopher Faylor
  1 sibling, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2003-06-27 15:27 UTC (permalink / raw)
  To: Danny Smith; +Cc: binutils

On Fri, Jun 27, 2003 at 04:07:49PM +1000, Danny Smith wrote:
>Okay, here is a revised patch that avoids code duplication (and, in fact,
>make it easier to separate out some more inconsistencies between rc and
>windres independently -- later. Thanks Chris).

Wow, it's much more invasive than the last patch but I guess that's to
be expected.  My yacc grammar parsing skills are slightly rusty but
this looks fine to me.  Please check in.

>On further testing with MS rc.exe I am finding that, in some cases, the
>leading text field in control definition statements is not optional with
>MS rc.exe but obligatory. That is, gnu windres (before or after my proposed
>patch) accepts syntax for which rc.exe reports syntax errors. Should I
>incorporate these additional changes (to make make windres fail or warn) now
>or do that separately since those changes are orthogonal to what *this patch
>does? 

I agree with Ian on this one.  I see no reason why windres can't be more flexible
than rc.  So, I don't think that we need to be error compliant if there is a
reasonable default behavior.

cgf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields
  2003-06-27  6:07 Danny Smith
@ 2003-06-27 13:46 ` Ian Lance Taylor
  2003-06-27 15:27 ` Christopher Faylor
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2003-06-27 13:46 UTC (permalink / raw)
  To: Danny Smith; +Cc: binutils, Christopher Faylor

Danny Smith <danny_r_smith_2001@yahoo.co.nz> writes:

> On further testing with MS rc.exe I am finding that, in some cases, the
> leading text field in control definition statements is not optional with
> MS rc.exe but obligatory. That is, gnu windres (before or after my proposed
> patch) accepts syntax for which rc.exe reports syntax errors. Should I
> incorporate these additional changes (to make make windres fail or warn) now
> or do that separately since those changes are orthogonal to what *this patch
> does? 

Those should be separate.  In fact, I'm not sure how much we need
them.  It's obviously important that windres accept anything which rc
will accept--as you've discovered, this is not precisely what is
documented.  However, it is not at all important that windres reject
anything which rc would reject.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields
@ 2003-06-27  6:07 Danny Smith
  2003-06-27 13:46 ` Ian Lance Taylor
  2003-06-27 15:27 ` Christopher Faylor
  0 siblings, 2 replies; 5+ messages in thread
From: Danny Smith @ 2003-06-27  6:07 UTC (permalink / raw)
  To: binutils; +Cc: Christopher Faylor

cgf said on Jun 26, 2003:

> On Thu, Jun 26, 2003 at 09:38:05PM +1000, Danny Smith wrote:
> >The following patch fixes by defining a new <dialog_control>
> >control_params_no_text, like control_params, but passing a
> >null-text res_id as first parameter to define_control.
> >
> >I'm not sure this is the best way to do this, but I'm finding it
> >difficult to discern what the "real" rules should be when the behaviour
> >of native resource compiler sometimes disagrees with documentation.
> 
> Two minor problems with this patch.  One is a misspelling of "their" rather
> than "there" (I know: picky, picky).

OK

> 
> The other is a feel that control_parms and control_params_no_text should
> be using a common rule somehow.  It looks like there is some code duplication
> now which is generally a bad thing unless there is no way around this.
> 
> Isn't there some way to merge the rules to avoid the duplication?
> 
> cgf
>

Okay, here is a revised patch that avoids code duplication (and, in fact,
make it easier to separate out some more inconsistencies between rc and
windres independently -- later. Thanks Chris).

I have also added a new testcase (for CHECKBOX) as a case that does
accept a text field, but .... 

On further testing with MS rc.exe I am finding that, in some cases, the
leading text field in control definition statements is not optional with
MS rc.exe but obligatory. That is, gnu windres (before or after my proposed
patch) accepts syntax for which rc.exe reports syntax errors. Should I
incorporate these additional changes (to make make windres fail or warn) now
or do that separately since those changes are orthogonal to what *this patch
does? 

2003-06-27  Danny Smith  <dannysmith@usrs.sourceforge.net>

	* rcparse.y (res_text_field): New res_id variable.
	(res_null_text): New static const struct res_id object,
	with empty unicode name field.
	(control): Pop parsing of optresidc up one level. Set
	res_text_field to $2 except for controls which do not accept
	a text field.  Set res_text_field to res_null_text for the
	special cases (viz. COMBOBOX, EDITTEXT, LISTBOX, SCROLLBAR).
	(control_params): Adjust to use res_text_field rather
	than optresidc.
	(COMBOBOX): Add comment about discrepency between documented
	vs. observed default style.
	* resrc.c (define_control): Make first param const.
	* windres.h (define_control): Adjust prototype.

testsuite

	* binutils-all/windres/checkbox.rc: New file.
	* binutils-all/windres/checkbox.rsd: New file.
	* binutils-all/windres/combobox.rc: New file.
	* binutils-all/windres/combobox.rsd: New file.
	* binutils-all/windres/edittext.rc: New file.
	* binutils-all/windres/edittext.rsd: New file.
	* binutils-all/windres/listbox.rc: New file.
	* binutils-all/windres/listbox.rsd: New file.
	* binutils-all/windres/scrollbar.rc: New file.
	* binutils-all/windres/scrollbar.rsd: Newfile.

Index: rcparse.y
===================================================================
RCS file: /cvs/src/src/binutils/rcparse.y,v
retrieving revision 1.17
diff -c -3 -p -r1.17 rcparse.y
*** rcparse.y	31 Mar 2003 10:15:58 -0000	1.17
--- rcparse.y	27 Jun 2003 02:32:19 -0000
*************** static unsigned long style;
*** 52,57 ****
--- 52,62 ----
  static unsigned long base_style;
  static unsigned long default_style;
  static unsigned long class;
+ static struct res_id res_text_field;
+ 
+ /* This is used for COMBOBOX, LISTBOX, EDITTEXT, SCROLLBAR which
+    do not allow resource 'text' field in control definition. */
+ static const struct res_id res_null_text = { 1, {{0, L""}}};
  
  %}
  
*************** controls:
*** 533,596 ****
  	;
  
  control:
! 	  AUTO3STATE
  	    {
  	      default_style = BS_AUTO3STATE | WS_TABSTOP;
  	      base_style = BS_AUTO3STATE;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| AUTOCHECKBOX
  	    {
  	      default_style = BS_AUTOCHECKBOX | WS_TABSTOP;
  	      base_style = BS_AUTOCHECKBOX;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| AUTORADIOBUTTON
  	    {
  	      default_style = BS_AUTORADIOBUTTON | WS_TABSTOP;
  	      base_style = BS_AUTORADIOBUTTON;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| BEDIT
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("BEDIT requires DIALOGEX"));
  	    res_string_to_id (&$$->class, "BEDIT");
  	  }
! 	| CHECKBOX
  	    {
  	      default_style = BS_CHECKBOX | WS_TABSTOP;
  	      base_style = BS_CHECKBOX | WS_TABSTOP;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
  	| COMBOBOX
  	    {
  	      default_style = CBS_SIMPLE | WS_TABSTOP;
  	      base_style = 0;
  	      class = CTL_COMBOBOX;
  	    }
  	    control_params
  	  {
--- 538,609 ----
  	;
  
  control:
! 	  AUTO3STATE optresidc
  	    {
  	      default_style = BS_AUTO3STATE | WS_TABSTOP;
  	      base_style = BS_AUTO3STATE;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| AUTOCHECKBOX optresidc
  	    {
  	      default_style = BS_AUTOCHECKBOX | WS_TABSTOP;
  	      base_style = BS_AUTOCHECKBOX;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| AUTORADIOBUTTON optresidc
  	    {
  	      default_style = BS_AUTORADIOBUTTON | WS_TABSTOP;
  	      base_style = BS_AUTORADIOBUTTON;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| BEDIT optresidc
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("BEDIT requires DIALOGEX"));
  	    res_string_to_id (&$$->class, "BEDIT");
  	  }
! 	| CHECKBOX optresidc
  	    {
  	      default_style = BS_CHECKBOX | WS_TABSTOP;
  	      base_style = BS_CHECKBOX | WS_TABSTOP;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
  	| COMBOBOX
  	    {
+ 	      /* This is as per MSDN documentation.  With some (???)
+ 		 versions of MS rc.exe, there is no default style.  */
  	      default_style = CBS_SIMPLE | WS_TABSTOP;
  	      base_style = 0;
  	      class = CTL_COMBOBOX;
+ 	      res_text_field = res_null_text;	
  	    }
  	    control_params
  	  {
*************** control:
*** 640,694 ****
  	    $$->class.named = 1;
    	    unicode_from_ascii (&$$->class.u.n.length, &$$->class.u.n.name, $5);
  	  }
! 	| CTEXT
  	    {
  	      default_style = SS_CENTER | WS_GROUP;
  	      base_style = SS_CENTER;
  	      class = CTL_STATIC;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| DEFPUSHBUTTON
  	    {
  	      default_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
  	      base_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
  	| EDITTEXT
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
  	    }
  	    control_params
  	  {
  	    $$ = $3;
  	  }
! 	| GROUPBOX
  	    {
  	      default_style = BS_GROUPBOX;
  	      base_style = BS_GROUPBOX;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| HEDIT
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("IEDIT requires DIALOGEX"));
  	    res_string_to_id (&$$->class, "HEDIT");
--- 653,712 ----
  	    $$->class.named = 1;
    	    unicode_from_ascii (&$$->class.u.n.length, &$$->class.u.n.name, $5);
  	  }
! 	| CTEXT optresidc
  	    {
  	      default_style = SS_CENTER | WS_GROUP;
  	      base_style = SS_CENTER;
  	      class = CTL_STATIC;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| DEFPUSHBUTTON optresidc
  	    {
  	      default_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
  	      base_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
  	| EDITTEXT
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
+ 	      res_text_field = res_null_text;	
  	    }
  	    control_params
  	  {
  	    $$ = $3;
  	  }
! 	| GROUPBOX optresidc
  	    {
  	      default_style = BS_GROUPBOX;
  	      base_style = BS_GROUPBOX;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| HEDIT optresidc
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("IEDIT requires DIALOGEX"));
  	    res_string_to_id (&$$->class, "HEDIT");
*************** control:
*** 716,730 ****
  	    $$ = define_icon_control ($2, $3, $4, $5, style, $9, $10, $11,
  				      dialog.ex);
            }
! 	| IEDIT
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("IEDIT requires DIALOGEX"));
  	    res_string_to_id (&$$->class, "IEDIT");
--- 734,749 ----
  	    $$ = define_icon_control ($2, $3, $4, $5, style, $9, $10, $11,
  				      dialog.ex);
            }
! 	| IEDIT optresidc
  	    {
  	      default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
  	      class = CTL_EDIT;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("IEDIT requires DIALOGEX"));
  	    res_string_to_id (&$$->class, "IEDIT");
*************** control:
*** 734,755 ****
  	      default_style = LBS_NOTIFY | WS_BORDER;
  	      base_style = LBS_NOTIFY | WS_BORDER;
  	      class = CTL_LISTBOX;
  	    }
  	    control_params
  	  {
  	    $$ = $3;
  	  }
! 	| LTEXT
  	    {
  	      default_style = SS_LEFT | WS_GROUP;
  	      base_style = SS_LEFT;
  	      class = CTL_STATIC;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| PUSHBOX
  	    {
  	      default_style = BS_PUSHBOX | WS_TABSTOP;
  	      base_style = BS_PUSHBOX;
--- 753,776 ----
  	      default_style = LBS_NOTIFY | WS_BORDER;
  	      base_style = LBS_NOTIFY | WS_BORDER;
  	      class = CTL_LISTBOX;
+ 	      res_text_field = res_null_text;	
  	    }
  	    control_params
  	  {
  	    $$ = $3;
  	  }
! 	| LTEXT optresidc
  	    {
  	      default_style = SS_LEFT | WS_GROUP;
  	      base_style = SS_LEFT;
  	      class = CTL_STATIC;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| PUSHBOX optresidc
  	    {
  	      default_style = BS_PUSHBOX | WS_TABSTOP;
  	      base_style = BS_PUSHBOX;
*************** control:
*** 757,813 ****
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| PUSHBUTTON
  	    {
  	      default_style = BS_PUSHBUTTON | WS_TABSTOP;
  	      base_style = BS_PUSHBUTTON | WS_TABSTOP;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| RADIOBUTTON
  	    {
  	      default_style = BS_RADIOBUTTON | WS_TABSTOP;
  	      base_style = BS_RADIOBUTTON;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
! 	| RTEXT
  	    {
  	      default_style = SS_RIGHT | WS_GROUP;
  	      base_style = SS_RIGHT;
  	      class = CTL_STATIC;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
  	| SCROLLBAR
  	    {
  	      default_style = SBS_HORZ;
  	      base_style = 0;
  	      class = CTL_SCROLLBAR;
  	    }
  	    control_params
  	  {
  	    $$ = $3;
  	  }
! 	| STATE3
  	    {
  	      default_style = BS_3STATE | WS_TABSTOP;
  	      base_style = BS_3STATE;
  	      class = CTL_BUTTON;
  	    }
  	    control_params
  	  {
! 	    $$ = $3;
  	  }
  	| USERBUTTON resref numexpr ',' numexpr ',' numexpr ','
  	    numexpr ',' numexpr ',' 
--- 778,839 ----
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| PUSHBUTTON optresidc
  	    {
  	      default_style = BS_PUSHBUTTON | WS_TABSTOP;
  	      base_style = BS_PUSHBUTTON | WS_TABSTOP;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| RADIOBUTTON optresidc
  	    {
  	      default_style = BS_RADIOBUTTON | WS_TABSTOP;
  	      base_style = BS_RADIOBUTTON;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
! 	| RTEXT optresidc
  	    {
  	      default_style = SS_RIGHT | WS_GROUP;
  	      base_style = SS_RIGHT;
  	      class = CTL_STATIC;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
  	| SCROLLBAR
  	    {
  	      default_style = SBS_HORZ;
  	      base_style = 0;
  	      class = CTL_SCROLLBAR;
+ 	      res_text_field = res_null_text;	
  	    }
  	    control_params
  	  {
  	    $$ = $3;
  	  }
! 	| STATE3 optresidc
  	    {
  	      default_style = BS_3STATE | WS_TABSTOP;
  	      base_style = BS_3STATE;
  	      class = CTL_BUTTON;
+ 	      res_text_field = $2;	
  	    }
  	    control_params
  	  {
! 	    $$ = $4;
  	  }
  	| USERBUTTON resref numexpr ',' numexpr ',' numexpr ','
  	    numexpr ',' numexpr ',' 
*************** control:
*** 827,863 ****
     style.  CLASS is the class of the control.  */
  
  control_params:
! 	  optresidc numexpr cnumexpr cnumexpr cnumexpr cnumexpr
! 	    opt_control_data
  	  {
! 	    $$ = define_control ($1, $2, $3, $4, $5, $6, class,
  				 default_style | WS_CHILD | WS_VISIBLE, 0);
! 	    if ($7 != NULL)
  	      {
  		if (dialog.ex == NULL)
  		  rcparse_warning (_("control data requires DIALOGEX"));
! 		$$->data = $7;
  	      }
  	  }
! 	| optresidc numexpr cnumexpr cnumexpr cnumexpr cnumexpr
  	    control_params_styleexpr optcnumexpr opt_control_data
  	  {
! 	    $$ = define_control ($1, $2, $3, $4, $5, $6, class, style, $8);
! 	    if ($9 != NULL)
  	      {
  		if (dialog.ex == NULL)
  		  rcparse_warning (_("control data requires DIALOGEX"));
! 		$$->data = $9;
  	      }
  	  }
! 	| optresidc numexpr cnumexpr cnumexpr cnumexpr cnumexpr
  	    control_params_styleexpr cnumexpr cnumexpr opt_control_data
  	  {
! 	    $$ = define_control ($1, $2, $3, $4, $5, $6, class, style, $8);
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("help ID requires DIALOGEX"));
! 	    $$->help = $9;
! 	    $$->data = $10;
  	  }
  	;
  
--- 853,888 ----
     style.  CLASS is the class of the control.  */
  
  control_params:
! 	  numexpr cnumexpr cnumexpr cnumexpr cnumexpr opt_control_data
  	  {
! 	    $$ = define_control (res_text_field, $1, $2, $3, $4, $5, class,
  				 default_style | WS_CHILD | WS_VISIBLE, 0);
! 	    if ($6 != NULL)
  	      {
  		if (dialog.ex == NULL)
  		  rcparse_warning (_("control data requires DIALOGEX"));
! 		$$->data = $6;
  	      }
  	  }
! 	| numexpr cnumexpr cnumexpr cnumexpr cnumexpr
  	    control_params_styleexpr optcnumexpr opt_control_data
  	  {
! 	    $$ = define_control (res_text_field, $1, $2, $3, $4, $5, class, style, $7);
! 	    if ($8 != NULL)
  	      {
  		if (dialog.ex == NULL)
  		  rcparse_warning (_("control data requires DIALOGEX"));
! 		$$->data = $8;
  	      }
  	  }
! 	| numexpr cnumexpr cnumexpr cnumexpr cnumexpr
  	    control_params_styleexpr cnumexpr cnumexpr opt_control_data
  	  {
! 	    $$ = define_control (res_text_field, $1, $2, $3, $4, $5, class, style, $7);
  	    if (dialog.ex == NULL)
  	      rcparse_warning (_("help ID requires DIALOGEX"));
! 	    $$->help = $8;
! 	    $$->data = $9;
  	  }
  	;
  
Index: resrc.c
===================================================================
RCS file: /cvs/src/src/binutils/resrc.c,v
retrieving revision 1.21
diff -c -3 -p -r1.21 resrc.c
*** resrc.c	31 Mar 2003 10:15:58 -0000	1.21
--- resrc.c	27 Jun 2003 02:32:22 -0000
*************** define_dialog (id, resinfo, dialog)
*** 819,825 ****
  
  struct dialog_control *
  define_control (iid, id, x, y, width, height, class, style, exstyle)
!      struct res_id iid;
       unsigned long id;
       unsigned long x;
       unsigned long y;
--- 819,825 ----
  
  struct dialog_control *
  define_control (iid, id, x, y, width, height, class, style, exstyle)
!      const struct res_id iid;
       unsigned long id;
       unsigned long x;
       unsigned long y;
Index: windres.h
===================================================================
RCS file: /cvs/src/src/binutils/windres.h,v
retrieving revision 1.9
diff -c -3 -p -r1.9 windres.h
*** windres.h	31 Mar 2003 10:15:58 -0000	1.9
--- windres.h	27 Jun 2003 02:32:24 -0000
*************** extern void define_cursor
*** 814,820 ****
  extern void define_dialog
    PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
  extern struct dialog_control *define_control
!   PARAMS ((struct res_id, unsigned long, unsigned long, unsigned long,
  	   unsigned long, unsigned long, unsigned long, unsigned long,
  	   unsigned long));
  extern struct dialog_control *define_icon_control
--- 814,820 ----
  extern void define_dialog
    PARAMS ((struct res_id, const struct res_res_info *, const struct dialog *));
  extern struct dialog_control *define_control
!   PARAMS ((const struct res_id, unsigned long, unsigned long, unsigned long,
  	   unsigned long, unsigned long, unsigned long, unsigned long,
  	   unsigned long));
  extern struct dialog_control *define_icon_control
*** /dev/null	Fri Jun 27 05:42:27 2003
--- testsuite/binutils-all/windres/checkbox.rc	Fri Jun 27 05:11:20 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   CHECKBOX     "tick me", 1001, 28, 63, 137, 52
+ END
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/checkbox.rsd	Fri Jun 27 05:11:28 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 40000000 20000000 ffff0500 fffff501  @... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 02000150 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 80007400  ..?...4.......t.
+  0070 69006300 6b002000 6d006500 00000000  i.c.k. .m.e.....
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/combobox.rc	Sat Jun 21 11:32:53 2003
***************
*** 0 ****
--- 1,8 ----
+ #define CBS_SIMPLE 0x1
+ #define WS_TABSTOP 0x10000
+ 
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+     COMBOBOX        1001,10,10,50,54, CBS_SIMPLE | WS_TABSTOP
+ END
+ 
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/combobox.rsd	Fri Jun 27 05:11:30 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 01000150 00000000  ...........P....
+  0060 0a000a00 32003600 e903ffff 85000000  ....2.6.........
+  0070 00000000                             ....            
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/edittext.rc	Sat Jun 21 08:30:53 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   EDITTEXT      1001, 28, 63, 137, 52
+ END
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/edittext.rsd	Fri Jun 27 05:11:37 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 00008150 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 81000000  ..?...4.........
+  0070 00000000                             ....            
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/listbox.rc	Sat Jun 21 08:35:18 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOG DISCARDABLE  0, 0, 168, 137
+ BEGIN
+   LISTBOX     1001, 28, 63, 137, 52
+ END
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/listbox.rsd	Fri Jun 27 05:11:42 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 32000000 20000000 ffff0500 fffff501  2... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 00008880 00000000 01000000 0000a800  ................
+  0050 89000000 00000000 01008050 00000000  ...........P....
+  0060 1c003f00 89003400 e903ffff 83000000  ..?...4.........
+  0070 00000000                             ....            
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/scrollbar.rc	Thu Jun 26 08:52:54 2003
***************
*** 0 ****
--- 1,4 ----
+ 501 DIALOGEX 0, 0, 168, 137
+ BEGIN
+     SCROLLBAR       1001,43,68,105,10,0,0,0x81f503e9
+ END
*** /dev/null	Fri Jun 27 05:42:28 2003
--- testsuite/binutils-all/windres/scrollbar.rsd	Fri Jun 27 05:11:46 2003
***************
*** 0 ****
--- 1,8 ----
+  0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+  0010 00000000 00000000 00000000 00000000  ................
+  0020 40000000 20000000 ffff0500 fffff501  @... ...........
+  0030 00000000 30100904 00000000 00000000  ....0...........
+  0040 0100ffff 00000000 00000000 00008880  ................
+  0050 01000000 0000a800 89000000 00000000  ................
+  0060 e903f581 00000000 00000050 2b004400  ...........P+.D.
+  0070 69000a00 e9030000 ffff8400 00000000  i...............


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-27 15:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 11:38 [Patch]: Fix a windres (rcparse.y) parsing bug for controls without text fields Danny Smith
2003-06-26 16:13 ` Christopher Faylor
2003-06-27  6:07 Danny Smith
2003-06-27 13:46 ` Ian Lance Taylor
2003-06-27 15:27 ` Christopher Faylor

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).