diff src/EmacsManager.c @ 4528:726060ee587c g++-warning-removal-2008-10-28

First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
author Stephen J. Turnbull <stephen@xemacs.org>
date Wed, 29 Oct 2008 04:06:33 +0900
parents fc7067b7f407
children 308d34e9f07d
line wrap: on
line diff
--- a/src/EmacsManager.c	Wed Oct 29 04:02:05 2008 +0900
+++ b/src/EmacsManager.c	Wed Oct 29 04:06:33 2008 +0900
@@ -32,6 +32,7 @@
 #include <Xm/RowColumn.h>
 #endif /* LWLIB_MENUBARS_MOTIF */
 #include "compiler.h"
+#include "../lwlib/xt-wrappers.h"
 
 /* For I, Emacs, am a kind god.  Unlike the goddess Athena and the
    Titan Motif, I require no ritual sacrifices to placate the lesser
@@ -39,15 +40,14 @@
 
 static XtResource resources[] = {
 #define offset(field) XtOffset(EmacsManagerWidget, emacs_manager.field)
-  { XtNresizeCallback, XtCCallback,
-    XtRCallback, sizeof (XtCallbackList),
-    offset(resize_callback), XtRImmediate, (XtPointer) 0 },
-  { XtNqueryGeometryCallback, XtCCallback,
-    XtRCallback, sizeof (XtCallbackList),
-    offset(query_geometry_callback), XtRImmediate, (XtPointer) 0 },
-  { XtNuserData, XtCUserData,
-    XtRPointer, sizeof (XtPointer),
-    offset(user_data), XtRImmediate, (XtPointer) 0 },
+#define res(name,_class,intrepr,size,member,extrepr,value) \
+  Xt_RESOURCE (name, _class, intrepr, size, offset(member), extrepr, value)
+  res (XtNresizeCallback, XtCCallback, XtRCallback, XtCallbackList,
+       resize_callback, XtRImmediate, 0),
+  res (XtNqueryGeometryCallback, XtCCallback, XtRCallback, XtCallbackList,
+       query_geometry_callback, XtRImmediate, 0),
+  res (XtNuserData, XtCUserData, XtRPointer, XtPointer,
+       user_data, XtRImmediate, 0),
 };
 
 /****************************************************************
@@ -75,7 +75,7 @@
 #else
     /* superclass         */    (WidgetClass) &compositeClassRec,
 #endif
-    /* class_name         */    "EmacsManager",
+    /* class_name         */    (String) "EmacsManager",
     /* widget_size        */    sizeof (EmacsManagerRec),
     /* class_initialize   */    ClassInitialize,
     /* class_part_init    */	NULL,