From: Nick Clifton Date: Tue, 9 Apr 2002 17:23:19 +0000 (+0000) Subject: Add WS_CAPTION dialog style if CAPTION is specified. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b62a12ca8898734403c9a763d6156017cf611824;p=binutils-gdb.git Add WS_CAPTION dialog style if CAPTION is specified. Add testcase. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a1869a99a5d..5dca07d9dff 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -4,6 +4,7 @@ are quoted. Fix typo in BEDIT warning. Don't add default dialog style when explicit style specified. + Add WS_CAPTION dialog style if CAPTION is specified. * rclex.l (handle_quotes): "\xhex" encoding in strings corrected. (handle_quotes) "\a" escape (used for right justified key diff --git a/binutils/rcparse.y b/binutils/rcparse.y index fcd34cc2315..4ab9a0988a2 100644 --- a/binutils/rcparse.y +++ b/binutils/rcparse.y @@ -412,6 +412,8 @@ styles: /* empty */ | styles CAPTION QUOTEDSTRING { + dialog.style |= WS_CAPTION; + style |= WS_CAPTION; unicode_from_ascii ((int *) NULL, &dialog.caption, $3); } | styles CLASS id diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index d4eae760262..04306518c82 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2002-04-09 Nick Clifton + * binutils-all/windres/capstyle.rc: New test case: Set default + style for captions. + * binutils-all/windres/capstyle.rsd: Expected output. + * binutils-all/windres/deflang.rc: New test case: Check default language. * binutils-all/windres/deflang.rsd: Expected output. diff --git a/binutils/testsuite/binutils-all/windres/capstyle.rc b/binutils/testsuite/binutils-all/windres/capstyle.rc new file mode 100644 index 00000000000..238d21eaa9a --- /dev/null +++ b/binutils/testsuite/binutils-all/windres/capstyle.rc @@ -0,0 +1,5 @@ +101 DIALOG DISCARDABLE 0, 0, 186, 95 +CAPTION "" +BEGIN + DEFPUSHBUTTON "OK",1,129,7,50,14 +END diff --git a/binutils/testsuite/binutils-all/windres/capstyle.rsd b/binutils/testsuite/binutils-all/windres/capstyle.rsd new file mode 100644 index 00000000000..ad3d94f5e70 --- /dev/null +++ b/binutils/testsuite/binutils-all/windres/capstyle.rsd @@ -0,0 +1,8 @@ + 0000 00000000 20000000 ffff0000 ffff0000 .... ........... + 0010 00000000 00000000 00000000 00000000 ................ + 0020 36000000 20000000 ffff0500 ffff6500 6... .........e. + 0030 00000000 10100904 00000000 00000000 ................ + 0040 0000c880 00000000 01000000 0000ba00 ................ + 0050 5f000000 00000000 01000150 00000000 _..........P.... + 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O. + 0070 4b000000 00000000 K.......