Add more quotes.
[bpt/emacs.git] / lwlib / lwlib-Xaw.c
index 9a659bb..f2feb32 100644 (file)
@@ -15,7 +15,12 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <stdio.h>
 
@@ -220,7 +225,7 @@ xaw_pop_instance (instance, up)
             life easier?
           */
          {
-           int x, y, w, h;
+           unsigned int x, y, w, h;
            Widget topmost = instance->parent;
            Arg args[2];
 
@@ -500,16 +505,22 @@ wm_delete_window (shell, closure, call_data)
      XtPointer call_data;
 {
   LWLIB_ID id;
+  Cardinal nkids;
+  int i;
   Widget *kids = 0;
   Widget widget;
   if (! XtIsSubclass (shell, shellWidgetClass))
     abort ();
+  XtVaGetValues (shell, XtNnumChildren, &nkids, 0);
   XtVaGetValues (shell, XtNchildren, &kids, 0);
   if (!kids || !*kids)
     abort ();
-  widget = kids [0];
-  if (! XtIsSubclass (widget, dialogWidgetClass))
-    abort ();
+  for (i = 0; i < nkids; i++)
+    {
+      widget = kids[i];
+      if (XtIsSubclass (widget, dialogWidgetClass))
+       break;
+    }
   id = lw_get_widget_id (widget);
   if (! id) abort ();