diff options
author | DJ Delorie <dj@redhat.com> | 2000-06-13 21:21:43 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2000-06-13 21:21:43 +0000 |
commit | 2104a50e3e7d2d543fa1ae5dc8393a985e1f786c (patch) | |
tree | 9b05d18d8fd27beb2a7d7545f823ab67210dd5f7 /binutils/rcparse.y | |
parent | 98ecb0a78be9b1064f6c7f644d2e7fccb1111f0c (diff) | |
download | gdb-2104a50e3e7d2d543fa1ae5dc8393a985e1f786c.zip gdb-2104a50e3e7d2d543fa1ae5dc8393a985e1f786c.tar.gz gdb-2104a50e3e7d2d543fa1ae5dc8393a985e1f786c.tar.bz2 |
* rcparse.y (control): ICON controls take an id as the first
parameter, not an optional string. Also, call new convenience
function that takes res_id's.
* resrc.c (define_control): missing text means zero-length string,
not zero ID.
(define_icon_control): New.
* windres.h: declare define_icon_control.
Diffstat (limited to 'binutils/rcparse.y')
-rw-r--r-- | binutils/rcparse.y | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/binutils/rcparse.y b/binutils/rcparse.y index 03cbbdc..39551c2 100644 --- a/binutils/rcparse.y +++ b/binutils/rcparse.y @@ -636,39 +636,29 @@ control: rcparse_warning (_("IEDIT requires DIALOGEX")); res_string_to_id (&$$->class, "HEDIT"); } - | ICON optstringc numexpr cnumexpr cnumexpr opt_control_data - { - $$ = define_control ($2, $3, $4, $5, 0, 0, CTL_STATIC, - SS_ICON | WS_CHILD | WS_VISIBLE, 0); - if ($6 != NULL) - { - if (dialog.ex == NULL) - rcparse_warning (_("control data requires DIALOGEX")); - $$->data = $6; - } - } - | ICON optstringc numexpr cnumexpr cnumexpr cnumexpr cnumexpr + | ICON id cnumexpr cnumexpr cnumexpr opt_control_data + { + $$ = define_icon_control ($2, $3, $4, $5, 0, 0, 0, $6, + dialog.ex); + } + | ICON id cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr + opt_control_data + { + $$ = define_icon_control ($2, $3, $4, $5, 0, 0, 0, $8, + dialog.ex); + } + | ICON id cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr icon_styleexpr optcnumexpr opt_control_data - { - $$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC, - style, $9); - if ($10 != NULL) - { - if (dialog.ex == NULL) - rcparse_warning (_("control data requires DIALOGEX")); - $$->data = $10; - } - } - | ICON optstringc numexpr cnumexpr cnumexpr cnumexpr cnumexpr + { + $$ = define_icon_control ($2, $3, $4, $5, style, $9, 0, $10, + dialog.ex); + } + | ICON id numexpr cnumexpr cnumexpr cnumexpr cnumexpr icon_styleexpr cnumexpr cnumexpr opt_control_data - { - $$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC, - style, $9); - if (dialog.ex == NULL) - rcparse_warning (_("help ID requires DIALOGEX")); - $$->help = $10; - $$->data = $11; - } + { + $$ = define_icon_control ($2, $3, $4, $5, style, $9, $10, $11, + dialog.ex); + } | IEDIT { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; |