Package: xaw3dg
Version: 1.5+E-9
Severity: wishlist

The attached patch adds some more prototypes to the header files
and modifies the code to compile cleanly with them. There are many
more prototypes missing, but those were those that annoyed me because
they are triggered by xfm.

diff -r -u xaw3d.orig/lib/Xaw3d/Form.c xaw3d-1.5+E/lib/Xaw3d/Form.c
--- xaw3d.orig/lib/Xaw3d/Form.c 1998-05-14 21:03:23.000000000 +0200
+++ xaw3d-1.5+E/lib/Xaw3d/Form.c        2005-11-24 14:55:30.000000000 +0100
@@ -96,7 +96,11 @@
 static Boolean SetValues(), ConstraintSetValues();
 static XtGeometryResult GeometryManager(), PreferredGeometry();
 static void ChangeManaged();
+#if NeedFunctionPrototypes
+static Boolean Layout(FormWidget,Dimension,Dimension,Boolean);
+#else
 static Boolean Layout();
+#endif
 
 static void LayoutChild(), ResizeChildren();
 
diff -r -u xaw3d.orig/lib/Xaw3d/FormP.h xaw3d-1.5+E/lib/Xaw3d/FormP.h
--- xaw3d.orig/lib/Xaw3d/FormP.h        1996-10-15 16:41:19.000000000 +0200
+++ xaw3d-1.5+E/lib/Xaw3d/FormP.h       2005-11-24 14:54:54.000000000 +0100
@@ -58,10 +58,18 @@
 #define XtREdgeType "EdgeType"
 
 typedef enum {LayoutPending, LayoutInProgress, LayoutDone} LayoutState;
+#if NeedFunctionPrototypes
+#define XtInheritLayout ((Boolean 
(*)(FormWidget,Dimension,Dimension,Boolean))_XtInherit)
+#else
 #define XtInheritLayout ((Boolean (*)())_XtInherit)
+#endif
 
 typedef struct {
+#if NeedFunctionPrototypes
+    Boolean    (*layout)(FormWidget, Dimension, Dimension, Boolean);
+#else
     Boolean    (*layout)(/* FormWidget, Dimension, Dimension */);
+#endif
 } FormClassPart;
 
 /*
diff -r -u xaw3d.orig/lib/Xaw3d/SimpleP.h xaw3d-1.5+E/lib/Xaw3d/SimpleP.h
--- xaw3d.orig/lib/Xaw3d/SimpleP.h      2000-11-27 14:19:36.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/SimpleP.h     2005-11-24 14:44:44.000000000 +0100
@@ -56,10 +56,10 @@
 #include <X11/Xaw3d/Simple.h>
 
 typedef struct {
-    Boolean    (*change_sensitive)(/* widget */);
+    Boolean    (*change_sensitive)(Widget /* widget */);
 } SimpleClassPart;
 
-#define XtInheritChangeSensitive ((Boolean (*)())_XtInherit)
+#define XtInheritChangeSensitive ((Boolean (*)(Widget))_XtInherit)
 
 typedef struct _SimpleClassRec {
     CoreClassPart      core_class;
diff -r -u xaw3d.orig/lib/Xaw3d/ThreeD.c xaw3d-1.5+E/lib/Xaw3d/ThreeD.c
--- xaw3d.orig/lib/Xaw3d/ThreeD.c       2003-02-11 12:41:56.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/ThreeD.c      2005-11-24 14:42:38.000000000 +0100
@@ -80,7 +80,12 @@
 #undef offset
 
 static void ClassInitialize(), ClassPartInitialize(), Initialize(), Destroy();
-static void Redisplay(), Realize(), _Xaw3dDrawShadows();
+static void Redisplay(), Realize();
+static void _Xaw3dDrawShadows(
+#if NeedFunctionPrototypes
+    Widget,XEvent *,Region,XtRelief,Boolean
+#endif
+);
 static Boolean SetValues();
 
 ThreeDClassRec threeDClassRec = {
diff -r -u xaw3d.orig/lib/Xaw3d/ThreeDP.h xaw3d-1.5+E/lib/Xaw3d/ThreeDP.h
--- xaw3d.orig/lib/Xaw3d/ThreeDP.h      2000-11-27 14:19:34.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/ThreeDP.h     2005-11-24 14:38:55.000000000 +0100
@@ -57,11 +57,21 @@
     ThreeDPart threeD;
   } ThreeDRec;
 
+typedef void (*Xaw3dShadowDrawProc)(
+#if NeedFunctionPrototypes
+    Widget /*gw*/,
+    XEvent * /*event*/,
+    Region /*region*/,
+    XtRelief /*relief*/,
+    Boolean /*out*/
+#endif
+);
+
 typedef struct {
-    void (*shadowdraw)();
+    Xaw3dShadowDrawProc shadowdraw;
   } ThreeDClassPart;
 
-#define XtInheritXaw3dShadowDraw ((void (*)())_XtInherit)
+#define XtInheritXaw3dShadowDraw ((Xaw3dShadowDrawProc)_XtInherit)
 
 /* Full class record declaration. */
 typedef struct _ThreeDClassRec {
diff -r -u xaw3d.orig/lib/Xaw3d/Viewport.c xaw3d-1.5+E/lib/Xaw3d/Viewport.c
--- xaw3d.orig/lib/Xaw3d/Viewport.c     2001-03-08 04:05:26.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/Viewport.c    2005-11-24 14:59:14.000000000 +0100
@@ -80,7 +80,12 @@
 
 static void Initialize(), ConstraintInitialize(),
     Realize(), Resize(), ChangeManaged();
-static Boolean SetValues(), Layout();
+static Boolean SetValues();
+static Boolean Layout(
+#if NeedFunctionPrototypes
+FormWidget,Dimension,Dimension,Boolean
+#endif
+);
 static XtGeometryResult GeometryManager(), PreferredGeometry();
 
 #define superclass     (&formClassRec)
@@ -414,7 +419,7 @@
            }
            GetGeometry( widget, child->core.width, child->core.height );
            (*((ViewportWidgetClass)w->core.widget_class)->form_class.layout)
-               ( (FormWidget)w, w->core.width, w->core.height );
+               ( (FormWidget)w, w->core.width, w->core.height, False );
            /* %%% do we need to hide this child from Form?  */
        }
     }
@@ -858,9 +863,10 @@
 
 
 /* ARGSUSED */
-static Boolean Layout(w, width, height)
+static Boolean Layout(w, width, height, force_relayout)
     FormWidget w;
     Dimension width, height;
+    Boolean force_relayout;
 {
     ComputeLayout( (Widget)w, /*query=*/True, /*destroy=*/True );
     w->form.preferred_width = w->core.width;
diff -r -u xaw3d.orig/lib/Xaw3d/XawInit.h xaw3d-1.5+E/lib/Xaw3d/XawInit.h
--- xaw3d.orig/lib/Xaw3d/XawInit.h      1996-10-15 16:41:26.000000000 +0200
+++ xaw3d-1.5+E/lib/Xaw3d/XawInit.h     2005-11-24 14:22:45.000000000 +0100
@@ -26,6 +26,6 @@
 
 _XFUNCPROTOBEGIN
 
-extern void XawInitializeWidgetSet();  /* called from ClassInit procs */
+extern void XawInitializeWidgetSet(void);      /* called from ClassInit procs 
*/
 
 _XFUNCPROTOEND


Hochachtungsvoll,
        Bernhard R. Link
diff -r -u xaw3d.orig/lib/Xaw3d/Form.c xaw3d-1.5+E/lib/Xaw3d/Form.c
--- xaw3d.orig/lib/Xaw3d/Form.c 1998-05-14 21:03:23.000000000 +0200
+++ xaw3d-1.5+E/lib/Xaw3d/Form.c        2005-11-24 14:55:30.000000000 +0100
@@ -96,7 +96,11 @@
 static Boolean SetValues(), ConstraintSetValues();
 static XtGeometryResult GeometryManager(), PreferredGeometry();
 static void ChangeManaged();
+#if NeedFunctionPrototypes
+static Boolean Layout(FormWidget,Dimension,Dimension,Boolean);
+#else
 static Boolean Layout();
+#endif
 
 static void LayoutChild(), ResizeChildren();
 
diff -r -u xaw3d.orig/lib/Xaw3d/FormP.h xaw3d-1.5+E/lib/Xaw3d/FormP.h
--- xaw3d.orig/lib/Xaw3d/FormP.h        1996-10-15 16:41:19.000000000 +0200
+++ xaw3d-1.5+E/lib/Xaw3d/FormP.h       2005-11-24 14:54:54.000000000 +0100
@@ -58,10 +58,18 @@
 #define XtREdgeType "EdgeType"
 
 typedef enum {LayoutPending, LayoutInProgress, LayoutDone} LayoutState;
+#if NeedFunctionPrototypes
+#define XtInheritLayout ((Boolean 
(*)(FormWidget,Dimension,Dimension,Boolean))_XtInherit)
+#else
 #define XtInheritLayout ((Boolean (*)())_XtInherit)
+#endif
 
 typedef struct {
+#if NeedFunctionPrototypes
+    Boolean    (*layout)(FormWidget, Dimension, Dimension, Boolean);
+#else
     Boolean    (*layout)(/* FormWidget, Dimension, Dimension */);
+#endif
 } FormClassPart;
 
 /*
diff -r -u xaw3d.orig/lib/Xaw3d/SimpleP.h xaw3d-1.5+E/lib/Xaw3d/SimpleP.h
--- xaw3d.orig/lib/Xaw3d/SimpleP.h      2000-11-27 14:19:36.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/SimpleP.h     2005-11-24 14:44:44.000000000 +0100
@@ -56,10 +56,10 @@
 #include <X11/Xaw3d/Simple.h>
 
 typedef struct {
-    Boolean    (*change_sensitive)(/* widget */);
+    Boolean    (*change_sensitive)(Widget /* widget */);
 } SimpleClassPart;
 
-#define XtInheritChangeSensitive ((Boolean (*)())_XtInherit)
+#define XtInheritChangeSensitive ((Boolean (*)(Widget))_XtInherit)
 
 typedef struct _SimpleClassRec {
     CoreClassPart      core_class;
diff -r -u xaw3d.orig/lib/Xaw3d/ThreeD.c xaw3d-1.5+E/lib/Xaw3d/ThreeD.c
--- xaw3d.orig/lib/Xaw3d/ThreeD.c       2003-02-11 12:41:56.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/ThreeD.c      2005-11-24 14:42:38.000000000 +0100
@@ -80,7 +80,12 @@
 #undef offset
 
 static void ClassInitialize(), ClassPartInitialize(), Initialize(), Destroy();
-static void Redisplay(), Realize(), _Xaw3dDrawShadows();
+static void Redisplay(), Realize();
+static void _Xaw3dDrawShadows(
+#if NeedFunctionPrototypes
+    Widget,XEvent *,Region,XtRelief,Boolean
+#endif
+);
 static Boolean SetValues();
 
 ThreeDClassRec threeDClassRec = {
diff -r -u xaw3d.orig/lib/Xaw3d/ThreeDP.h xaw3d-1.5+E/lib/Xaw3d/ThreeDP.h
--- xaw3d.orig/lib/Xaw3d/ThreeDP.h      2000-11-27 14:19:34.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/ThreeDP.h     2005-11-24 14:38:55.000000000 +0100
@@ -57,11 +57,21 @@
     ThreeDPart threeD;
   } ThreeDRec;
 
+typedef void (*Xaw3dShadowDrawProc)(
+#if NeedFunctionPrototypes
+    Widget /*gw*/,
+    XEvent * /*event*/,
+    Region /*region*/,
+    XtRelief /*relief*/,
+    Boolean /*out*/
+#endif
+);
+
 typedef struct {
-    void (*shadowdraw)();
+    Xaw3dShadowDrawProc shadowdraw;
   } ThreeDClassPart;
 
-#define XtInheritXaw3dShadowDraw ((void (*)())_XtInherit)
+#define XtInheritXaw3dShadowDraw ((Xaw3dShadowDrawProc)_XtInherit)
 
 /* Full class record declaration. */
 typedef struct _ThreeDClassRec {
diff -r -u xaw3d.orig/lib/Xaw3d/Viewport.c xaw3d-1.5+E/lib/Xaw3d/Viewport.c
--- xaw3d.orig/lib/Xaw3d/Viewport.c     2001-03-08 04:05:26.000000000 +0100
+++ xaw3d-1.5+E/lib/Xaw3d/Viewport.c    2005-11-24 14:59:14.000000000 +0100
@@ -80,7 +80,12 @@
 
 static void Initialize(), ConstraintInitialize(),
     Realize(), Resize(), ChangeManaged();
-static Boolean SetValues(), Layout();
+static Boolean SetValues();
+static Boolean Layout(
+#if NeedFunctionPrototypes
+FormWidget,Dimension,Dimension,Boolean
+#endif
+);
 static XtGeometryResult GeometryManager(), PreferredGeometry();
 
 #define superclass     (&formClassRec)
@@ -414,7 +419,7 @@
            }
            GetGeometry( widget, child->core.width, child->core.height );
            (*((ViewportWidgetClass)w->core.widget_class)->form_class.layout)
-               ( (FormWidget)w, w->core.width, w->core.height );
+               ( (FormWidget)w, w->core.width, w->core.height, False );
            /* %%% do we need to hide this child from Form?  */
        }
     }
@@ -858,9 +863,10 @@
 
 
 /* ARGSUSED */
-static Boolean Layout(w, width, height)
+static Boolean Layout(w, width, height, force_relayout)
     FormWidget w;
     Dimension width, height;
+    Boolean force_relayout;
 {
     ComputeLayout( (Widget)w, /*query=*/True, /*destroy=*/True );
     w->form.preferred_width = w->core.width;
diff -r -u xaw3d.orig/lib/Xaw3d/XawInit.h xaw3d-1.5+E/lib/Xaw3d/XawInit.h
--- xaw3d.orig/lib/Xaw3d/XawInit.h      1996-10-15 16:41:26.000000000 +0200
+++ xaw3d-1.5+E/lib/Xaw3d/XawInit.h     2005-11-24 14:22:45.000000000 +0100
@@ -26,6 +26,6 @@
 
 _XFUNCPROTOBEGIN
 
-extern void XawInitializeWidgetSet();  /* called from ClassInit procs */
+extern void XawInitializeWidgetSet(void);      /* called from ClassInit procs 
*/
 
 _XFUNCPROTOEND

Reply via email to