Print style even if it is 0.
Add testcase.
* rcparse.y: CLASS definitions in DIALOG resources
are quoted.
Fix typo in BEDIT warning.
+ Don't add default dialog style when explicit style specified.
* rclex.l: "\xhex" encoding in strings corrected.
"\a" escape (used for right justified key definitions in menus) is
encodes as binary 8.
+ * resrc.c: Print style even if it is 0.
+
2002-04-09 Gunnar Degnbol <degnbol@danbbs.dk>
* resrc.c: print CLASS names in quotes
dialog.ex = NULL;
dialog.controls = NULL;
sub_res_info = $3;
+ style = 0;
}
styles BEG controls END
{
memset (dialog.ex, 0, sizeof (struct dialog_ex));
dialog.controls = NULL;
sub_res_info = $3;
+ style = 0;
}
styles BEG controls END
{
dialog.ex->help = $9;
dialog.controls = NULL;
sub_res_info = $3;
+ style = 0;
}
styles BEG controls END
{
dialog.class = $3;
}
| styles STYLE
- { style = dialog.style; }
styleexpr
{
dialog.style = style;
| 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)
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;
{
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)
{
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)
{
res_id_print (e, dialog->menu, 0);
fprintf (e, "\n");
}
+
if (dialog->font != NULL)
{
fprintf (e, "FONT %d, \"", dialog->pointsize);
--- /dev/null
+101 DIALOG DISCARDABLE 0, 0, 186, 95
+STYLE 0
+BEGIN
+ DEFPUSHBUTTON "OK",1,129,7,50,14
+END
+
--- /dev/null
+ 0000 00000000 20000000 ffff0000 ffff0000 .... ...........
+ 0010 00000000 00000000 00000000 00000000 ................
+ 0020 36000000 20000000 ffff0500 ffff6500 6... .........e.
+ 0030 00000000 10100000 00000000 00000000 ................
+ 0040 00000000 00000000 01000000 0000ba00 ................
+ 0050 5f000000 00000000 01000150 00000000 _..........P....
+ 0060 81000700 32000e00 0100ffff 80004f00 ....2.........O.
+ 0070 4b000000 00000000 K.......