Apply patch from Bernd Herd to fix quoted class definitions inside dialogs.
authorNick Clifton <nickc@redhat.com>
Tue, 9 Apr 2002 15:21:01 +0000 (15:21 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 9 Apr 2002 15:21:01 +0000 (15:21 +0000)
binutils/ChangeLog
binutils/rcparse.y
binutils/resrc.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/windres/quoteclass.rc [new file with mode: 0644]

index 4b3f4ba..ff01d21 100644 (file)
@@ -1,4 +1,13 @@
-Tue Apr  9 15:13:10 2002  J"orn Rennecke <joern.rennecke@superh.com>
+2002-04-09  Bernd Herd <info@herdsoft.com>
+
+       * rcparse.y: CLASS definitions in DIALOG resources 
+       are quoted.
+
+2002-04-09  Gunnar Degnbol <degnbol@danbbs.dk>
+
+       * resrc.c: print CLASS names in quotes
+
+2002-04-09  J"orn Rennecke <joern.rennecke@superh.com>
 
        * MAINTAINERS: Update my email address.
 
index 152c8ee..3b8726a 100644 (file)
@@ -425,6 +425,10 @@ styles:
          {
            dialog.exstyle = $3;
          }
+       | styles CLASS QUOTEDSTRING
+         {
+           res_string_to_id (& dialog.class, $3);
+         }
        | styles FONT numexpr ',' QUOTEDSTRING
          {
            dialog.style |= DS_SETFONT;
index eb7db96..a576c80 100644 (file)
@@ -1,5 +1,5 @@
 /* resrc.c -- read and write Windows rc files.
-   Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
 
    This file is part of GNU Binutils.
@@ -173,7 +173,7 @@ static void get_data
   PARAMS ((FILE *, unsigned char *, unsigned long, const char *));
 static void define_fontdirs PARAMS ((void));
 \f
-/* Run `cmd' and redirect the output to `redir'. */
+/* Run `cmd' and redirect the output to `redir'.  */
 
 static int
 run_cmd (cmd, redir)
@@ -518,7 +518,7 @@ close_input_stream ()
        pclose (cpp_pipe);
     }
 
-  /* Since this is also run via xatexit, safeguard. */
+  /* Since this is also run via xatexit, safeguard.  */
   cpp_pipe = NULL;
   cpp_temp_file = NULL;
 }
@@ -1580,7 +1580,7 @@ write_rc_directory (e, rd, type, name, language, level)
 
        case 2:
          /* If we're at level 2, the key of this resource is the name
-            we are going to use in the rc printout. */
+            we are going to use in the rc printout.  */
          name = &re->id;
          break;
 
@@ -2060,7 +2060,7 @@ write_rc_dialog (e, dialog)
       || dialog->class.u.id != 0)
     {
       fprintf (e, "CLASS ");
-      res_id_print (e, dialog->class, 0);
+      res_id_print (e, dialog->class, 1);
       fprintf (e, "\n");
     }
   if (dialog->caption != NULL)
index 26f1f7b..e61a687 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-09  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * binutils-all/windres/quoteclass.rc: New test case for quoted
+       CLASS definitions in DIALOG resources.
+
 2002-02-18  Timothy Daly  <remote_bob@yahoo.com>
 
        * binutils-all/readelf.r: Change expected output to match new,
diff --git a/binutils/testsuite/binutils-all/windres/quoteclass.rc b/binutils/testsuite/binutils-all/windres/quoteclass.rc
new file mode 100644 (file)
index 0000000..c1f98e1
--- /dev/null
@@ -0,0 +1,8 @@
+// parse-only
+
+101 DIALOG DISCARDABLE  0, 0, 186, 95
+CLASS "myclass"
+BEGIN
+    DEFPUSHBUTTON   "OK",1,129,7,50,14
+END
+