[PATCH libXaw3d 17/21] Porthole: Fix old-style function definitions

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Thu Aug 25 22:38:19 PDT 2011


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 src/Porthole.c |   52 ++++++++++++++++++++++------------------------------
 1 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/src/Porthole.c b/src/Porthole.c
index 904e0f2..3d05089 100644
--- a/src/Porthole.c
+++ b/src/Porthole.c
@@ -49,11 +49,11 @@ static XtResource resources[] = {
 /*
  * widget class methods used below
  */
-static void Realize();			/* set gravity and upcall */
-static void Resize();			/* report new size */
-static XtGeometryResult GeometryManager();  /* deal with child requests */
-static void ChangeManaged();		/* somebody added a new widget */
-static XtGeometryResult QueryGeometry();  /* say how big would like to be */
+static void Realize(Widget, Mask *, XSetWindowAttributes *);
+static void Resize(Widget);
+static XtGeometryResult GeometryManager(Widget, XtWidgetGeometry *, XtWidgetGeometry *);
+static void ChangeManaged(Widget);
+static XtGeometryResult QueryGeometry(Widget, XtWidgetGeometry *, XtWidgetGeometry *);
 
 PortholeClassRec portholeClassRec = {
   { /* core fields */
@@ -111,8 +111,8 @@ WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec;
  *                                                                           *
  *****************************************************************************/
 
-static Widget find_child (pw)
-    PortholeWidget pw;
+static Widget
+find_child (PortholeWidget pw)
 {
     Widget *children;
     int i;
@@ -129,9 +129,8 @@ static Widget find_child (pw)
     return (Widget) NULL;
 }
 
-static void SendReport (pw, changed)
-    PortholeWidget pw;
-    unsigned int changed;
+static void
+SendReport (PortholeWidget pw, unsigned int changed)
 {
     Widget child = find_child (pw);
 
@@ -151,12 +150,9 @@ static void SendReport (pw, changed)
 }
 
 
-static void layout_child (pw, child, geomp, xp, yp, widthp, heightp)
-    PortholeWidget pw;
-    Widget child;
-    XtWidgetGeometry *geomp;
-    Position *xp, *yp;
-    Dimension *widthp, *heightp;
+static void
+layout_child (PortholeWidget pw, Widget child, XtWidgetGeometry *geomp,
+              Position *xp, Position *yp, Dimension *widthp, Dimension *heightp)
 {
     Position minx, miny;
 
@@ -201,10 +197,8 @@ static void layout_child (pw, child, geomp, xp, yp, widthp, heightp)
  *****************************************************************************/
 
 
-static void Realize (gw, valueMask, attributes)
-    Widget gw;
-    Mask *valueMask;
-    XSetWindowAttributes *attributes;
+static void
+Realize (Widget gw, Mask *valueMask, XSetWindowAttributes *attributes)
 {
     attributes->bit_gravity = NorthWestGravity;
     *valueMask |= CWBitGravity;
@@ -216,8 +210,8 @@ static void Realize (gw, valueMask, attributes)
 }
 
 
-static void Resize (gw)
-    Widget gw;
+static void
+Resize (Widget gw)
 {
     PortholeWidget pw = (PortholeWidget) gw;
     Widget child = find_child (pw);
@@ -239,9 +233,8 @@ static void Resize (gw)
 }
 
 
-static XtGeometryResult QueryGeometry (gw, intended, preferred)
-    Widget gw;
-    XtWidgetGeometry *intended, *preferred;
+static XtGeometryResult
+QueryGeometry (Widget gw, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
 {
     PortholeWidget pw = (PortholeWidget) gw;
     Widget child = find_child (pw);
@@ -267,9 +260,8 @@ static XtGeometryResult QueryGeometry (gw, intended, preferred)
 }
 
 
-static XtGeometryResult GeometryManager (w, req, reply)
-    Widget w;
-    XtWidgetGeometry *req, *reply;
+static XtGeometryResult
+GeometryManager (Widget w, XtWidgetGeometry *req, XtWidgetGeometry *reply)
 {
     PortholeWidget pw = (PortholeWidget) w->core.parent;
     Widget child = find_child (pw);
@@ -331,8 +323,8 @@ static XtGeometryResult GeometryManager (w, req, reply)
 }
 
 
-static void ChangeManaged (gw)
-    Widget gw;
+static void
+ChangeManaged (Widget gw)
 {
     PortholeWidget pw = (PortholeWidget) gw;
     Widget child = find_child (pw);	/* ignore extra children */
-- 
1.7.5.1



More information about the xorg-devel mailing list