From 91eafb409b7bdf9462b9e5d0ba690c288814e979 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 9 Apr 2002 15:59:13 +0000 Subject: Don't add default dialog style when explicit style specified. Print style even if it is 0. Add testcase. --- binutils/rcparse.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'binutils/rcparse.y') diff --git a/binutils/rcparse.y b/binutils/rcparse.y index b141f4a..fcd34cc 100644 --- a/binutils/rcparse.y +++ b/binutils/rcparse.y @@ -340,6 +340,7 @@ dialog: dialog.ex = NULL; dialog.controls = NULL; sub_res_info = $3; + style = 0; } styles BEG controls END { @@ -363,6 +364,7 @@ dialog: memset (dialog.ex, 0, sizeof (struct dialog_ex)); dialog.controls = NULL; sub_res_info = $3; + style = 0; } styles BEG controls END { @@ -387,6 +389,7 @@ dialog: dialog.ex->help = $9; dialog.controls = NULL; sub_res_info = $3; + style = 0; } styles BEG controls END { @@ -416,7 +419,6 @@ styles: dialog.class = $3; } | styles STYLE - { style = dialog.style; } styleexpr { dialog.style = style; @@ -432,12 +434,14 @@ styles: | styles FONT numexpr ',' QUOTEDSTRING { dialog.style |= DS_SETFONT; + style |= DS_SETFONT; dialog.pointsize = $3; unicode_from_ascii ((int *) NULL, &dialog.font, $5); } | styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr { dialog.style |= DS_SETFONT; + style |= DS_SETFONT; dialog.pointsize = $3; unicode_from_ascii ((int *) NULL, &dialog.font, $5); if (dialog.ex == NULL) -- cgit v1.1