summaryrefslogtreecommitdiff
path: root/binutils/resrc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-04-09 15:59:13 +0000
committerNick Clifton <nickc@redhat.com>2002-04-09 15:59:13 +0000
commitc66af9150a9f0a91a5b286ff3675e8df424f0539 (patch)
tree50f28ce5bf10ad04d2a7606d6ed9c81f6892b36d /binutils/resrc.c
parent05a0be610cd32165ecab5a349732312567c747c2 (diff)
downloadbinutils-redhat-c66af9150a9f0a91a5b286ff3675e8df424f0539.tar.gz
Don't add default dialog style when explicit style specified.
Print style even if it is 0. Add testcase.
Diffstat (limited to 'binutils/resrc.c')
-rw-r--r--binutils/resrc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/binutils/resrc.c b/binutils/resrc.c
index a576c80fdf..a9b3ba8f0b 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -131,7 +131,7 @@ static FILE *cpp_pipe;
static char *cpp_temp_file;
-/* Input stream is either a file or a pipe. */
+/* Input stream is either a file or a pipe. */
static enum {ISTREAM_PIPE, ISTREAM_FILE} istream_type;
@@ -2052,10 +2052,11 @@ write_rc_dialog (e, dialog)
{
const struct dialog_control *control;
- if (dialog->style != 0)
- fprintf (e, "STYLE 0x%lx\n", dialog->style);
+ fprintf (e, "STYLE 0x%lx\n", dialog->style);
+
if (dialog->exstyle != 0)
fprintf (e, "EXSTYLE 0x%lx\n", dialog->exstyle);
+
if ((dialog->class.named && dialog->class.u.n.length > 0)
|| dialog->class.u.id != 0)
{
@@ -2063,12 +2064,14 @@ write_rc_dialog (e, dialog)
res_id_print (e, dialog->class, 1);
fprintf (e, "\n");
}
+
if (dialog->caption != NULL)
{
fprintf (e, "CAPTION \"");
unicode_print (e, dialog->caption, -1);
fprintf (e, "\"\n");
}
+
if ((dialog->menu.named && dialog->menu.u.n.length > 0)
|| dialog->menu.u.id != 0)
{
@@ -2076,6 +2079,7 @@ write_rc_dialog (e, dialog)
res_id_print (e, dialog->menu, 0);
fprintf (e, "\n");
}
+
if (dialog->font != NULL)
{
fprintf (e, "FONT %d, \"", dialog->pointsize);