]> code.delx.au - gnu-emacs/blobdiff - lwlib/lwlib-utils.c
(help-map): Bind C-h d to apropos-documentation.
[gnu-emacs] / lwlib / lwlib-utils.c
index 9e535c1996d488c745659b2547935f79e0d295b1..df9cba52f630b30ff222a6e275969afb4072d0ae 100644 (file)
@@ -3,24 +3,39 @@
 
 This file is part of the Lucid Widget Library.
 
 
 This file is part of the Lucid Widget Library.
 
-The Lucid Widget Library is free software; you can redistribute it and/or 
+The Lucid Widget Library is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 1, or (at your option)
 any later version.
 
 The Lucid Widget Library is distributed in the hope that it will be useful,
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 1, or (at your option)
 any later version.
 
 The Lucid Widget Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of 
+but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 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
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 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., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/* Definitions of these in config.h can cause
+   declaration conflicts later on between declarations for index
+   and declarations for strchr.  This file doesn't use
+   index and rindex, so cancel them.  */
+#undef index
+#undef rindex
+
+#include "../src/lisp.h"
 
 #include <X11/Xatom.h>
 #include <X11/IntrinsicP.h>
 #include <X11/ObjectP.h>
 #include "lwlib-utils.h"
 
 #include <X11/Xatom.h>
 #include <X11/IntrinsicP.h>
 #include <X11/ObjectP.h>
 #include "lwlib-utils.h"
+#include "lwlib.h"
 
 /* Redisplay the contents of the widget, without first clearing it. */
 void
 
 /* Redisplay the contents of the widget, without first clearing it. */
 void
@@ -45,7 +60,7 @@ XtNoClearRefreshWidget (widget)
 }
 
 
 }
 
 
-/* 
+/*
  * Apply a function to all the subwidgets of a given widget recursively.
 */
 void
  * Apply a function to all the subwidgets of a given widget recursively.
 */
 void
@@ -63,7 +78,8 @@ XtApplyToWidgets (w, proc, arg)
       int nkids = cw->composite.num_children;
       Widget *kids = (Widget *) malloc (sizeof (Widget) * nkids);
       int i;
       int nkids = cw->composite.num_children;
       Widget *kids = (Widget *) malloc (sizeof (Widget) * nkids);
       int i;
-      lwlib_bcopy (cw->composite.children, kids, sizeof (Widget) * nkids);
+      lwlib_bcopy ((char *) cw->composite.children, (char *) kids,
+                  sizeof (Widget) * nkids);
       for (i = 0; i < nkids; i++)
 /* This prevent us from using gadgets, why is it here? */
 /*     if (XtIsWidget (kids [i])) */
       for (i = 0; i < nkids; i++)
 /* This prevent us from using gadgets, why is it here? */
 /*     if (XtIsWidget (kids [i])) */
@@ -161,8 +177,11 @@ XtSafelyDestroyWidget (widget)
     }
   else
     XtDestroyWidget (widget);
     }
   else
     XtDestroyWidget (widget);
-  
+
 #else
   abort ();
 #endif
 }
 #else
   abort ();
 #endif
 }
+
+/* arch-tag: f21f0a1f-2a4e-44e1-8715-7f234fe2d159
+   (do not change this comment) */