Define MEMFLAGS_DISCARDABLE by default for dialogs.
authorNick Clifton <nickc@redhat.com>
Tue, 16 Apr 2002 08:13:03 +0000 (08:13 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 16 Apr 2002 08:13:03 +0000 (08:13 +0000)
Add a test for this.

binutils/ChangeLog
binutils/rcparse.y
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/windres/dialog0.rc [new file with mode: 0644]
binutils/testsuite/binutils-all/windres/dialog0.rsd [new file with mode: 0644]
binutils/testsuite/binutils-all/windres/dialog1.rc [new file with mode: 0644]
binutils/testsuite/binutils-all/windres/dialog1.rsd [new file with mode: 0644]

index 347bb4b..9275ba4 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * rcparse.y: Set MEMFLAG_DISCARDABLE by default.
+
 2002-04-15  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * resrc.c (write_rc_dialog): If charset is non-default value
index 24ef35c..5b3ffe3 100644 (file)
@@ -1357,7 +1357,7 @@ suboptions:
            memset (&$$, 0, sizeof (struct res_res_info));
            $$.language = language;
            /* FIXME: Is this the right default?  */
-           $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE;
+           $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
          }
        | suboptions memflag
          {
@@ -1406,7 +1406,7 @@ memflags_move:
          {
            memset (&$$, 0, sizeof (struct res_res_info));
            $$.language = language;
-           $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE;
+           $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
          }
        | memflags_move memflag
          {
index 3077224..74587d0 100644 (file)
@@ -1,3 +1,12 @@
+2002-04-16  Eric Kohl <ekohl@rz-online.de>
+
+       * binutils-all/windres/dialog0.rc: New test case: Check default
+       attributes for dialogs
+       * binutils-all/windres/dialog0.rsd: New file: Expected output.
+       * binutils-all/windres/dialog1.rc: New test case: Check
+       DISCARDABLE flag is propogated.
+       * binutils-all/windres/dialog1.rsd: New file: Expected output.
+
 2002-04-15  Eric Kohl <ekohl@rz-online.de>
 
        * binutils-all/windres/dlgfont.rc: New test case: Checks FONT
diff --git a/binutils/testsuite/binutils-all/windres/dialog0.rc b/binutils/testsuite/binutils-all/windres/dialog0.rc
new file mode 100644 (file)
index 0000000..fba7ed7
--- /dev/null
@@ -0,0 +1,4 @@
+101 DIALOG 0, 0, 186, 95\r
+BEGIN\r
+    DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14\r
+END\r
diff --git a/binutils/testsuite/binutils-all/windres/dialog0.rsd b/binutils/testsuite/binutils-all/windres/dialog0.rsd
new file mode 100644 (file)
index 0000000..270b622
--- /dev/null
@@ -0,0 +1,8 @@
+ 0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+ 0010 00000000 00000000 00000000 00000000  ................
+ 0020 36000000 20000000 ffff0500 ffff6500  6... .........e.
+ 0030 00000000 30100904 00000000 00000000  ....0...........
+ 0040 00008880 00000000 01000000 0000ba00  ................
+ 0050 5f000000 00000000 01000150 00000000  _..........P....
+ 0060 81000700 32000e00 0100ffff 80004f00  ....2.........O.
+ 0070 4b000000 00000000                    K.......        
diff --git a/binutils/testsuite/binutils-all/windres/dialog1.rc b/binutils/testsuite/binutils-all/windres/dialog1.rc
new file mode 100644 (file)
index 0000000..71deb4a
--- /dev/null
@@ -0,0 +1,5 @@
+101 DIALOG DISCARDABLE 0, 0, 186, 95\r
+BEGIN\r
+    DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14\r
+END\r
+\r
diff --git a/binutils/testsuite/binutils-all/windres/dialog1.rsd b/binutils/testsuite/binutils-all/windres/dialog1.rsd
new file mode 100644 (file)
index 0000000..270b622
--- /dev/null
@@ -0,0 +1,8 @@
+ 0000 00000000 20000000 ffff0000 ffff0000  .... ...........
+ 0010 00000000 00000000 00000000 00000000  ................
+ 0020 36000000 20000000 ffff0500 ffff6500  6... .........e.
+ 0030 00000000 30100904 00000000 00000000  ....0...........
+ 0040 00008880 00000000 01000000 0000ba00  ................
+ 0050 5f000000 00000000 01000150 00000000  _..........P....
+ 0060 81000700 32000e00 0100ffff 80004f00  ....2.........O.
+ 0070 4b000000 00000000                    K.......