diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-08-28 01:49:29 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2011-08-31 20:59:44 -0500 |
commit | be8752352f6f2126245f2174c9482bc2f00c9c87 (patch) | |
tree | 2a01d2d9c02870a9587c85012db5d613ad7dafda /src | |
parent | 8f559235a71fed14b80652516ee649f413d6e483 (diff) |
Tree: Fix old-style function definitions
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'src')
-rw-r--r-- | src/Tree.c | 137 |
1 files changed, 56 insertions, 81 deletions
@@ -59,22 +59,22 @@ in this Software without prior written authorization from the X Consortium. /* widget class method */ -static void ClassInitialize(); -static void Initialize(); -static void ConstraintInitialize(); -static void ConstraintDestroy(); -static Boolean ConstraintSetValues(); -static void Destroy(); -static Boolean SetValues(); -static XtGeometryResult GeometryManager(); -static void ChangeManaged(); -static void Redisplay(); -static XtGeometryResult QueryGeometry(); +static void ClassInitialize(void); +static void Initialize(Widget, Widget, ArgList, Cardinal *); +static void ConstraintInitialize(Widget, Widget, ArgList, Cardinal *); +static void ConstraintDestroy(Widget); +static Boolean ConstraintSetValues(Widget, Widget, Widget, ArgList, Cardinal *); +static void Destroy(Widget); +static Boolean SetValues(Widget, Widget, Widget, ArgList, Cardinal *); +static XtGeometryResult GeometryManager(Widget, XtWidgetGeometry *, XtWidgetGeometry *); +static void ChangeManaged(Widget); +static void Redisplay(Widget, XEvent *, Region); +static XtGeometryResult QueryGeometry(Widget, XtWidgetGeometry *, XtWidgetGeometry *); /* utility routines */ -static void insert_node(); -static void delete_node(); -static void layout_tree(); +static void insert_node(Widget, Widget); +static void delete_node(Widget, Widget); +static void layout_tree(TreeWidget, Boolean); /* @@ -179,10 +179,8 @@ WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec; * * *****************************************************************************/ -static void initialize_dimensions (listp, sizep, n) - Dimension **listp; - int *sizep; - int n; +static void +initialize_dimensions (Dimension **listp, int *sizep, int n) { int i; Dimension *l; @@ -206,8 +204,8 @@ static void initialize_dimensions (listp, sizep, n) return; } -static GC get_tree_gc (w) - TreeWidget w; +static GC +get_tree_gc (TreeWidget w) { XtGCMask valuemask = GCBackground | GCForeground; XGCValues values; @@ -222,8 +220,8 @@ static GC get_tree_gc (w) return XtGetGC ((Widget) w, valuemask, &values); } -static void insert_node (parent, node) - Widget parent, node; +static void +insert_node (Widget parent, Widget node) { TreeConstraints pc; TreeConstraints nc = TREE_CONSTRAINT(node); @@ -256,8 +254,8 @@ static void insert_node (parent, node) pc->tree.n_children++; } -static void delete_node (parent, node) - Widget parent, node; +static void +delete_node (Widget parent, Widget node) { TreeConstraints pc; int pos, i; @@ -292,9 +290,8 @@ static void delete_node (parent, node) pc->tree.children[pc->tree.n_children]=0; } -static void check_gravity (tw, grav) - TreeWidget tw; - XtGravity grav; +static void +check_gravity (TreeWidget tw, XtGravity grav) { switch (tw->tree.gravity) { case WestGravity: case NorthGravity: case EastGravity: case SouthGravity: @@ -312,7 +309,8 @@ static void check_gravity (tw, grav) * * *****************************************************************************/ -static void ClassInitialize () +static void +ClassInitialize (void) { XawInitializeWidgetSet(); XtAddConverter (XtRString, XtRGravity, XmuCvtStringToGravity, @@ -321,10 +319,8 @@ static void ClassInitialize () /*ARGSUSED*/ -static void Initialize (grequest, gnew, args, num_args) - Widget grequest, gnew; - ArgList args; - Cardinal *num_args; +static void +Initialize (Widget grequest, Widget gnew, ArgList args, Cardinal *num_args) { TreeWidget request = (TreeWidget) grequest, new = (TreeWidget) gnew; Arg arglist[2]; @@ -379,10 +375,8 @@ static void Initialize (grequest, gnew, args, num_args) /* ARGSUSED */ -static void ConstraintInitialize (request, new, args, num_args) - Widget request, new; - ArgList args; - Cardinal *num_args; +static void +ConstraintInitialize (Widget request, Widget new, ArgList args, Cardinal *num_args) { TreeConstraints tc = TREE_CONSTRAINT(new); TreeWidget tw = (TreeWidget) new->core.parent; @@ -411,10 +405,8 @@ static void ConstraintInitialize (request, new, args, num_args) /* ARGSUSED */ -static Boolean SetValues (gcurrent, grequest, gnew, args, num_args) - Widget gcurrent, grequest, gnew; - ArgList args; - Cardinal *num_args; +static Boolean +SetValues (Widget gcurrent, Widget grequest, Widget gnew, ArgList args, Cardinal *num_args) { TreeWidget current = (TreeWidget) gcurrent, new = (TreeWidget) gnew; Boolean redraw = FALSE; @@ -459,10 +451,8 @@ static Boolean SetValues (gcurrent, grequest, gnew, args, num_args) /* ARGSUSED */ -static Boolean ConstraintSetValues (current, request, new, args, num_args) - Widget current, request, new; - ArgList args; - Cardinal *num_args; +static Boolean +ConstraintSetValues (Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args) { TreeConstraints newc = TREE_CONSTRAINT(new); TreeConstraints curc = TREE_CONSTRAINT(current); @@ -490,8 +480,8 @@ static Boolean ConstraintSetValues (current, request, new, args, num_args) } -static void ConstraintDestroy (w) - Widget w; +static void +ConstraintDestroy (Widget w) { TreeConstraints tc = TREE_CONSTRAINT(w); TreeWidget tw = (TreeWidget) XtParent(w); @@ -517,10 +507,8 @@ static void ConstraintDestroy (w) } /* ARGSUSED */ -static XtGeometryResult GeometryManager (w, request, reply) - Widget w; - XtWidgetGeometry *request; - XtWidgetGeometry *reply; +static XtGeometryResult +GeometryManager (Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply) { TreeWidget tw = (TreeWidget) w->core.parent; @@ -547,15 +535,15 @@ static XtGeometryResult GeometryManager (w, request, reply) return (XtGeometryYes); } -static void ChangeManaged (gw) - Widget gw; +static void +ChangeManaged (Widget gw) { layout_tree ((TreeWidget) gw, FALSE); } -static void Destroy (gw) - Widget gw; +static void +Destroy (Widget gw) { TreeWidget w = (TreeWidget) gw; @@ -565,10 +553,8 @@ static void Destroy (gw) /* ARGSUSED */ -static void Redisplay (gw, event, region) - Widget gw; - XEvent *event; - Region region; +static void +Redisplay (Widget gw, XEvent *event, Region region) { TreeWidget tw = (TreeWidget) gw; @@ -662,9 +648,8 @@ static void Redisplay (gw, event, region) } } -static XtGeometryResult QueryGeometry (w, intended, preferred) - Widget w; - XtWidgetGeometry *intended, *preferred; +static XtGeometryResult +QueryGeometry (Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *preferred) { TreeWidget tw = (TreeWidget) w; @@ -696,10 +681,8 @@ static XtGeometryResult QueryGeometry (w, intended, preferred) * * *****************************************************************************/ -static void compute_bounding_box_subtree (tree, w, depth) - TreeWidget tree; - Widget w; - int depth; +static void +compute_bounding_box_subtree (TreeWidget tree, Widget w, int depth) { TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */ int i; @@ -769,10 +752,8 @@ static void compute_bounding_box_subtree (tree, w, depth) } -static void set_positions (tw, w, level) - TreeWidget tw; - Widget w; - int level; +static void +set_positions (TreeWidget tw, Widget w, int level) { int i; @@ -810,11 +791,8 @@ static void set_positions (tw, w, level) } -static void arrange_subtree (tree, w, depth, x, y) - TreeWidget tree; - Widget w; - int depth; - Position x, y; +static void +arrange_subtree (TreeWidget tree, Widget w, int depth, Position x, Position y) { TreeConstraints tc = TREE_CONSTRAINT(w); /* info attached to all kids */ TreeConstraints firstcc, lastcc; @@ -917,10 +895,8 @@ static void arrange_subtree (tree, w, depth, x, y) } } -static void set_tree_size (tw, insetvalues, width, height) - TreeWidget tw; - Boolean insetvalues; - Dimension width, height; +static void +set_tree_size (TreeWidget tw, Boolean insetvalues, Dimension width, Dimension height) { if (insetvalues) { tw->core.width = width; @@ -941,9 +917,8 @@ static void set_tree_size (tw, insetvalues, width, height) return; } -static void layout_tree (tw, insetvalues) - TreeWidget tw; - Boolean insetvalues; +static void +layout_tree (TreeWidget tw, Boolean insetvalues) { int i; Dimension *dp; |