diff --git a/plow/PlowCmd.c b/plow/PlowCmd.c index 3febd5d3..f25f07df 100644 --- a/plow/PlowCmd.c +++ b/plow/PlowCmd.c @@ -81,9 +81,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define PLOWPLOW 9 /* Implicit when direction specified */ void -CmdPlow(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPlow( + MagWindow *w, + TxCommand *cmd) { int xdelta, ydelta, absX, absY; int option, dir, distance; @@ -334,9 +334,9 @@ usage2: */ void -CmdStraighten(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdStraighten( + MagWindow *w, + TxCommand *cmd) { Rect editBox; int dir; @@ -394,9 +394,9 @@ usage: */ void -CmdPlowTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPlowTest( + MagWindow *w, + TxCommand *cmd) { PlowTest(w, cmd); } diff --git a/plow/PlowJogs.c b/plow/PlowJogs.c index 6f0cc011..287c4869 100644 --- a/plow/PlowJogs.c +++ b/plow/PlowJogs.c @@ -97,9 +97,9 @@ extern void plowProcessJog(); */ void -plowCleanupJogs(area, changedArea) - Rect *area; - Rect *changedArea; +plowCleanupJogs( + Rect *area, + Rect *changedArea) { Edge edge; @@ -167,9 +167,9 @@ plowCleanupJogs(area, changedArea) */ void -plowProcessJog(edge, area) - Edge *edge; - Rect *area; +plowProcessJog( + Edge *edge, + Rect *area) { Rect r; @@ -218,8 +218,8 @@ plowProcessJog(edge, area) */ int -plowJogPropagateLeft(edge) - Edge *edge; +plowJogPropagateLeft( + Edge *edge) { if (DebugIsSet(plowDebugID, plowDebJogs)) plowDebugEdge(edge, (RuleTableEntry *) NULL, "plowJogPropagateLeft"); @@ -254,9 +254,9 @@ plowJogPropagateLeft(edge) */ int -plowProcessJogFunc(edge, area) - Edge *edge; /* Edge found by shadow search */ - Rect *area; /* Area in which jogs are being eliminated */ +plowProcessJogFunc( + Edge *edge, /* Edge found by shadow search */ + Rect *area) /* Area in which jogs are being eliminated */ { LinkedRect *lr; Rect r, lhs; @@ -418,8 +418,8 @@ plowProcessJogFunc(edge, area) */ int -plowJogTopProc(outline) - Outline *outline; +plowJogTopProc( + Outline *outline) { /* Stop if we're no longer adjacent to space */ if (TiGetTypeExact(outline->o_outside) != TT_SPACE) @@ -465,8 +465,8 @@ plowJogTopProc(outline) } int -plowJogBotProc(outline) - Outline *outline; +plowJogBotProc( + Outline *outline) { /* Stop if we're no longer adjacent to space */ if (TiGetTypeExact(outline->o_inside) != TT_SPACE) @@ -534,9 +534,9 @@ plowJogBotProc(outline) */ int -plowJogDragLHS(edge, newx) - Edge *edge; /* Edge potentially on the LHS of the jog */ - int newx; /* Move the edge to this position */ +plowJogDragLHS( + Edge *edge, /* Edge potentially on the LHS of the jog */ + int newx) /* Move the edge to this position */ { LinkedRect *lr; @@ -583,8 +583,8 @@ plowJogDragLHS(edge, newx) */ int -plowJogMoveFunc(edge) - Edge *edge; +plowJogMoveFunc( + Edge *edge) { Edge *origEdge = jogEdge; diff --git a/plow/PlowMain.c b/plow/PlowMain.c index 2f73f591..1abd130b 100644 --- a/plow/PlowMain.c +++ b/plow/PlowMain.c @@ -186,11 +186,11 @@ extern void plowYankCreate(); */ void -PlowSetBound(def, area, rootDef, rootArea) - CellDef *def; /* Def in which bounding area applies */ - Rect *area; /* Area in 'def' coordinates */ - CellDef *rootDef; /* Display bounding area in windows with this root */ - Rect *rootArea; /* Area in 'rootDef' coordinates */ +PlowSetBound( + CellDef *def, /* Def in which bounding area applies */ + Rect *area, /* Area in 'def' coordinates */ + CellDef *rootDef, /* Display bounding area in windows with this root */ + Rect *rootArea) /* Area in 'rootDef' coordinates */ { static bool firstTime = TRUE; PlowBoundary *pb; @@ -267,9 +267,9 @@ PlowClearBound() */ void -PlowRedrawBound(window, plane) - MagWindow *window; /* Window in which to redraw. */ - Plane *plane; /* Non-space tiles on this plane indicate +PlowRedrawBound( + MagWindow *window, /* Window in which to redraw. */ + Plane *plane) /* Non-space tiles on this plane indicate * areas where highlights need to be * redisplayed. */ @@ -305,7 +305,10 @@ PlowRedrawBound(window, plane) } int -plowBoundAlways1(Tile *tile, TileType dinfo, ClientData clientdata) +plowBoundAlways1( + Tile *tile, + TileType dinfo, + ClientData clientdata) { return 1; } @@ -329,10 +332,10 @@ plowBoundAlways1(Tile *tile, TileType dinfo, ClientData clientdata) */ void -PlowStraighten(def, area, direction) - CellDef *def; /* Def whose jogs we should straighten */ - Rect *area; /* Area in which jogs are to be straightened */ - int direction; /* Pull all jogs in this direction to straighten them */ +PlowStraighten( + CellDef *def, /* Def whose jogs we should straighten */ + Rect *area, /* Area in which jogs are to be straightened */ + int direction) /* Pull all jogs in this direction to straighten them */ { Rect changedArea, changedUserArea, yankArea; bool saveCheckBoundary; @@ -435,10 +438,10 @@ PlowStraighten(def, area, direction) */ bool -PlowSelection(def, pdistance, direction) - CellDef *def; /* Cell being plowed */ - int *pdistance; /* Distance to plow */ - int direction; /* One of GEO_NORTH, GEO_SOUTH, GEO_WEST, or GEO_EAST */ +PlowSelection( + CellDef *def, /* Cell being plowed */ + int *pdistance, /* Distance to plow */ + int direction) /* One of GEO_NORTH, GEO_SOUTH, GEO_WEST, or GEO_EAST */ { Rect changedArea; bool firstTime; @@ -555,10 +558,10 @@ Plow( */ void -plowUpdate(def, direction, pChangedArea) - CellDef *def; - int direction; - Rect *pChangedArea; +plowUpdate( + CellDef *def, + int direction, + Rect *pChangedArea) { Rect changedUserArea; TileTypeBitMask *m; @@ -825,10 +828,10 @@ plowPropagateRect( */ bool -plowPropagateSel(def, pdistance, changedArea) - CellDef *def; /* Def being plowed */ - int *pdistance; /* Distance to plow */ - Rect *changedArea; /* Set to bounding box around area modified */ +plowPropagateSel( + CellDef *def, /* Def being plowed */ + int *pdistance, /* Distance to plow */ + Rect *changedArea) /* Set to bounding box around area modified */ { #ifndef NO_RUSAGE struct rusage t1, t2; @@ -988,10 +991,10 @@ plowPropagateSel(def, pdistance, changedArea) */ int -plowSelPaintBox(rect, type, pSelBox) - Rect *rect; - TileType type; - Rect *pSelBox; +plowSelPaintBox( + Rect *rect, + TileType type, + Rect *pSelBox) { Rect editRect; @@ -1001,11 +1004,11 @@ plowSelPaintBox(rect, type, pSelBox) } int -plowSelCellBox(selUse, realUse, transform, pSelBox) - CellUse *selUse; - CellUse *realUse; - Transform *transform; - Rect *pSelBox; +plowSelCellBox( + CellUse *selUse, + CellUse *realUse, + Transform *transform, + Rect *pSelBox) { GeoInclude(&realUse->cu_bbox, pSelBox); return (0); @@ -1030,10 +1033,10 @@ plowSelCellBox(selUse, realUse, transform, pSelBox) */ int -plowSelPaintPlow(rect, type, distance) - Rect *rect; - TileType type; - int distance; +plowSelPaintPlow( + Rect *rect, + TileType type, + int distance) { int plowSelPaintAdd(); Rect editRect, plowRect, plowLHS, plowRHS; @@ -1067,8 +1070,8 @@ plowSelPaintPlow(rect, type, distance) } int -plowSelPaintAdd(edge) - Edge *edge; +plowSelPaintAdd( + Edge *edge) { int saveFlags = edge->e_flags; @@ -1098,11 +1101,11 @@ plowSelPaintAdd(edge) */ int -plowSelCellPlow(selUse, realUse, transform, distance) - CellUse *selUse; /* Cell in selection */ - CellUse *realUse; /* Corresponding cell in def being plowed */ - Transform *transform; /* UNUSED */ - int distance; /* Plow distance */ +plowSelCellPlow( + CellUse *selUse, /* Cell in selection */ + CellUse *realUse, /* Corresponding cell in def being plowed */ + Transform *transform, /* UNUSED */ + int distance) /* Plow distance */ { int plowFindSelCell(); ClientData save; @@ -1117,9 +1120,9 @@ plowSelCellPlow(selUse, realUse, transform, distance) } int -plowFindSelCell(yankUse, editUse) - CellUse *yankUse; /* Cell in the plow yank buffer */ - CellUse *editUse; /* Cell from the original cell def */ +plowFindSelCell( + CellUse *yankUse, /* Cell in the plow yank buffer */ + CellUse *editUse) /* Cell from the original cell def */ { Edge edge; @@ -1180,8 +1183,8 @@ plowFindSelCell(yankUse, editUse) */ void -PlowExtendJogHorizon(edge) - Edge *edge; /* Edge being moved */ +PlowExtendJogHorizon( + Edge *edge) /* Edge being moved */ { int horizonTop, horizonBot, eTop, eBot; Tile *tpR, *tpL; @@ -1319,8 +1322,8 @@ restartbot: */ void -plowSetTrans(direction) - int direction; +plowSetTrans( + int direction) { plowDirection = direction; switch (direction) @@ -1361,10 +1364,10 @@ plowSetTrans(direction) */ bool -plowPastBoundary(def, edge, pmove) - CellDef *def; /* Def being plowed */ - Edge *edge; /* Edge being moved */ - int *pmove; /* Updated to be the maximum distance by +plowPastBoundary( + CellDef *def, /* Def being plowed */ + Edge *edge, /* Edge being moved */ + int *pmove) /* Updated to be the maximum distance by * which something moves in an illegal area. */ { @@ -1422,9 +1425,9 @@ plowPastBoundary(def, edge, pmove) */ int -plowInitialPaint(edge, xnew) - Edge *edge; - int xnew; +plowInitialPaint( + Edge *edge, + int xnew) { edge->e_newx = xnew; edge->e_flags = E_ISINITIAL; @@ -1450,9 +1453,9 @@ plowInitialPaint(edge, xnew) */ int -plowInitialCell(use, plowRect) - CellUse *use; - Rect *plowRect; +plowInitialCell( + CellUse *use, + Rect *plowRect) { int xmove; Edge edge; @@ -1518,9 +1521,9 @@ plowInitialCell(use, plowRect) */ void -plowProcessEdge(edge, changedArea) - Edge *edge; /* Edge to be processed (in plowYankDef) */ - Rect *changedArea; /* Include any additional area changed in this area */ +plowProcessEdge( + Edge *edge, /* Edge to be processed (in plowYankDef) */ + Rect *changedArea) /* Include any additional area changed in this area */ { int amountToMove = edge->e_newx - edge->e_x; RuleTableEntry *rte; @@ -1649,8 +1652,8 @@ worktodo: */ int -plowApplySearchRules(edge) - Edge *edge; +plowApplySearchRules( + Edge *edge) { PlowRule *widthRules, *rules; RuleTableEntry *rte; @@ -1742,10 +1745,10 @@ plowApplySearchRules(edge) */ PlowRule * -plowBuildWidthRules(edge, bbox, phalo) - Edge *edge; /* Edge being moved */ - Rect *bbox; /* Bounding box of def being plowed */ - int *phalo; /* Update *phalo to be the max of its initial value +plowBuildWidthRules( + Edge *edge, /* Edge being moved */ + Rect *bbox, /* Bounding box of def being plowed */ + int *phalo) /* Update *phalo to be the max of its initial value * and each of the widths we compute for the rules * we return. */ @@ -1829,8 +1832,8 @@ retry: */ void -plowMoveEdge(edge) - Edge *edge; /* Edge to be moved */ +plowMoveEdge( + Edge *edge) /* Edge to be moved */ { Plane *plane = plowYankDef->cd_planes[edge->e_pNum]; Tile *delayed = NULL; /* delayed free to extend lifetime */ @@ -1948,9 +1951,9 @@ plowMoveEdge(edge) */ Tile * -plowSplitY(tp, y) - Tile *tp; - int y; +plowSplitY( + Tile *tp, + int y) { Tile *newTile; @@ -1986,7 +1989,10 @@ plowSplitY(tp, y) */ void -plowMergeTop(Tile **delay1, Tile *tp, Plane *plane) +plowMergeTop( + Tile **delay1, + Tile *tp, + Plane *plane) { Tile *tpRT = RT(tp); @@ -1999,7 +2005,10 @@ plowMergeTop(Tile **delay1, Tile *tp, Plane *plane) } void -plowMergeBottom(Tile **delay1, Tile *tp, Plane *plane) +plowMergeBottom( + Tile **delay1, + Tile *tp, + Plane *plane) { Tile *tpLB = LB(tp); @@ -2259,9 +2268,12 @@ plowYankCreate() #ifndef NO_RUSAGE void -plowShowTime(t1, t2, nqueued, nprocessed, nmoved) - struct rusage *t1, *t2; - int nqueued, nprocessed, nmoved; +plowShowTime( + struct rusage *t1, + struct rusage *t2, + int nqueued, + int nprocessed, + int nmoved) { double secs, usecs; diff --git a/plow/PlowQueue.c b/plow/PlowQueue.c index 8af79a12..45fb4584 100644 --- a/plow/PlowQueue.c +++ b/plow/PlowQueue.c @@ -72,9 +72,9 @@ int plowTooFar; /* # times we reduced plow size */ */ void -plowQueueInit(bbox, dist) - Rect *bbox; /* Bounding box for the cell being plowed */ - int dist; /* Distance the plow moves */ +plowQueueInit( + Rect *bbox, /* Bounding box for the cell being plowed */ + int dist) /* Distance the plow moves */ { Edge **pptr, **pend; int pNum; @@ -151,8 +151,8 @@ plowQueueDone() && (e1)->e_rtype == (e2)->e_rtype) int -plowQueueAdd(eadd) - Edge *eadd; /* Edge added to queue. We assume that +plowQueueAdd( + Edge *eadd) /* Edge added to queue. We assume that * e_ltype and e_rtype have been set to * the types on the LHS and RHS of this * edge, respectively. @@ -455,8 +455,8 @@ done: */ bool -plowQueueLeftmost(edge) - Edge *edge; +plowQueueLeftmost( + Edge *edge) { Edge *enew, **pp, **plast; int pNum; @@ -530,8 +530,8 @@ plowQueueLeftmost(edge) */ bool -plowQueueRightmost(edge) - Edge *edge; +plowQueueRightmost( + Edge *edge) { Edge *enew, **pp, **plast; int pNum; diff --git a/plow/PlowRandom.c b/plow/PlowRandom.c index 6c84c698..cb0b0a4c 100644 --- a/plow/PlowRandom.c +++ b/plow/PlowRandom.c @@ -82,8 +82,8 @@ void plowGenRect(); */ void -PlowRandomTest(def) - CellDef *def; +PlowRandomTest( + CellDef *def) { #ifdef notdef static char *tempgood = "/tmp/PlowGoodaXXXXX"; @@ -189,7 +189,10 @@ PlowRandomTest(def) */ int -plowFindFirstError(Tile *tile, TileType dinfo, ClientData clientdata) +plowFindFirstError( + Tile *tile, + TileType dinfo, + ClientData clientdata) { return (1); } @@ -215,9 +218,9 @@ plowFindFirstError(Tile *tile, TileType dinfo, ClientData clientdata) */ void -plowGenRect(bbox, r) - Rect *bbox; /* Bounding box of the cell being plowed */ - Rect *r; /* Fill in this rectangle */ +plowGenRect( + Rect *bbox, /* Bounding box of the cell being plowed */ + Rect *r) /* Fill in this rectangle */ { int temp; @@ -259,8 +262,9 @@ plowGenRect(bbox, r) */ int -plowGenRandom(lo, hi) - int lo, hi; /* Inclusive bounds for the integer we'll generate */ +plowGenRandom( + int lo, + int hi) { int range = hi - lo + 1; #if defined(SYSV) || defined(EMSCRIPTEN) @@ -290,9 +294,9 @@ plowGenRandom(lo, hi) */ bool -plowFileDiff(file1, file2) - char *file1; - char *file2; +plowFileDiff( + char *file1, + char *file2) { char b1[BUFSIZ], b2[BUFSIZ]; int f1 = -1, f2 = -1; diff --git a/plow/PlowRules1.c b/plow/PlowRules1.c index b9419f6f..650bae4a 100644 --- a/plow/PlowRules1.c +++ b/plow/PlowRules1.c @@ -77,8 +77,8 @@ bool plowSliverApplyRules(); */ void -prClearUmbra(edge) - Edge *edge; /* Edge being moved */ +prClearUmbra( + Edge *edge) /* Edge being moved */ { TileTypeBitMask rhsTypes; struct applyRule ar; @@ -123,9 +123,9 @@ prClearUmbra(edge) */ void -prUmbra(edge, rules) - Edge *edge; /* Edge being moved */ - PlowRule *rules; /* List of rules */ +prUmbra( + Edge *edge, /* Edge being moved */ + PlowRule *rules) /* List of rules */ { PlowRule *pr; struct applyRule ar; @@ -215,9 +215,9 @@ prUmbra(edge, rules) */ void -prPenumbraTop(edge, rules) - Edge *edge; /* Edge being moved */ - PlowRule *rules; /* Rules to apply (must be non-NULL) */ +prPenumbraTop( + Edge *edge, /* Edge being moved */ + PlowRule *rules) /* Rules to apply (must be non-NULL) */ { PlowRule *pr; struct applyRule ar; @@ -238,9 +238,9 @@ prPenumbraTop(edge, rules) } int -prPenumbraBot(edge, rules) - Edge *edge; /* Edge being moved */ - PlowRule *rules; /* Rules to apply (must be non-NULL) */ +prPenumbraBot( + Edge *edge, /* Edge being moved */ + PlowRule *rules) /* Rules to apply (must be non-NULL) */ { TileTypeBitMask insideTypes; PlowRule *pr; @@ -301,9 +301,9 @@ prPenumbraBot(edge, rules) */ int -plowPenumbraTopProc(outline, ar) - Outline *outline; /* Segment along penumbra border */ - struct applyRule *ar; /* Info needed for shadow search */ +plowPenumbraTopProc( + Outline *outline, /* Segment along penumbra border */ + struct applyRule *ar) /* Info needed for shadow search */ { Edge *movingEdge = ar->ar_moving; PlowRule *pr = ar->ar_rule; @@ -355,9 +355,9 @@ plowPenumbraTopProc(outline, ar) } int -plowPenumbraBotProc(outline, ar) - Outline *outline; /* Segment along penumbra border */ - struct applyRule *ar; /* Info needed for shadow search */ +plowPenumbraBotProc( + Outline *outline, /* Segment along penumbra border */ + struct applyRule *ar) /* Info needed for shadow search */ { Edge *movingEdge = ar->ar_moving; PlowRule *pr = ar->ar_rule; @@ -425,9 +425,9 @@ plowPenumbraBotProc(outline, ar) */ int -plowPenumbraRule(impactedEdge, ar) - Edge *impactedEdge; /* Edge found by shadow search */ - struct applyRule *ar; /* Edge causing the shadow search, and +plowPenumbraRule( + Edge *impactedEdge, /* Edge found by shadow search */ + struct applyRule *ar) /* Edge causing the shadow search, and * the design rule to apply. */ { @@ -478,9 +478,9 @@ plowPenumbraRule(impactedEdge, ar) */ int -prSliverTop(edge, rules) - Edge *edge; - PlowRule *rules; +prSliverTop( + Edge *edge, + PlowRule *rules) { PlowRule *pr; struct applyRule ar; @@ -532,9 +532,9 @@ prSliverTop(edge, rules) } int -prSliverBot(edge, rules) - Edge *edge; - PlowRule *rules; +prSliverBot( + Edge *edge, + PlowRule *rules) { TileTypeBitMask insideTypes; PlowRule *pr; @@ -619,9 +619,9 @@ prSliverBot(edge, rules) */ int -plowSliverTopMove(outline, ar) - Outline *outline; /* Segment of outline being followed */ - struct applyRule *ar; +plowSliverTopMove( + Outline *outline, /* Segment of outline being followed */ + struct applyRule *ar) { int howfar = ar->ar_moving->e_newx - ar->ar_moving->e_x; Edge edge; @@ -649,13 +649,13 @@ plowSliverTopMove(outline, ar) } int -plowSliverBotMove(outline, ar) - Outline *outline; /* Segment of outline being followed. +plowSliverBotMove( + Outline *outline, /* Segment of outline being followed. * The sense of "inside" and "outside" * is reversed from that when handling * the top half of the penumbra. */ - struct applyRule *ar; + struct applyRule *ar) { int howfar = ar->ar_moving->e_newx - ar->ar_moving->e_x; Edge edge; @@ -712,9 +712,9 @@ plowSliverBotMove(outline, ar) */ int -plowSliverTopExtent(outline, ar) - Outline *outline; /* Segment of outline being followed */ - struct applyRule *ar; +plowSliverTopExtent( + Outline *outline, /* Segment of outline being followed */ + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int newx, xmove, ret = 0; @@ -818,9 +818,9 @@ plowSliverTopExtent(outline, ar) } int -plowSliverBotExtent(outline, ar) - Outline *outline; /* Segment of outline being followed */ - struct applyRule *ar; +plowSliverBotExtent( + Outline *outline, /* Segment of outline being followed */ + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int newx, xmove, ret = 0; @@ -956,10 +956,10 @@ plowSliverBotExtent(outline, ar) */ bool -plowSliverApplyRules(ar, far, farDist) - struct applyRule *ar; - TileType far; - int farDist; +plowSliverApplyRules( + struct applyRule *ar, + TileType far, + int farDist) { TileType near = ar->ar_moving->e_ltype; PlowRule *pr; @@ -1002,9 +1002,9 @@ plowSliverApplyRules(ar, far, farDist) */ int -plowApplyRule(impactedEdge, ar) - Edge *impactedEdge; /* Edge found by shadow search */ - struct applyRule *ar; /* Edge causing the shadow search, and +plowApplyRule( + Edge *impactedEdge, /* Edge found by shadow search */ + struct applyRule *ar) /* Edge causing the shadow search, and * the design rule to apply. */ { diff --git a/plow/PlowRules2.c b/plow/PlowRules2.c index 9c6595cf..4c32a455 100644 --- a/plow/PlowRules2.c +++ b/plow/PlowRules2.c @@ -66,8 +66,8 @@ int plowDragEdgeProc(); */ void -prFixedLHS(edge) - Edge *edge; /* Edge being moved */ +prFixedLHS( + Edge *edge) /* Edge being moved */ { int distance = edge->e_newx - edge->e_x; Tile *tpL; @@ -99,8 +99,8 @@ restart: } int -prFixedRHS(edge) - Edge *edge; /* Edge being moved */ +prFixedRHS( + Edge *edge) /* Edge being moved */ { int distance = edge->e_newx - edge->e_x; Tile *tpR, *tp; @@ -207,8 +207,8 @@ restart: */ void -prFixedPenumbraTop(edge) - Edge *edge; /* Edge being moved */ +prFixedPenumbraTop( + Edge *edge) /* Edge being moved */ { struct applyRule ar; PlowRule *pr; @@ -237,8 +237,8 @@ prFixedPenumbraTop(edge) } int -prFixedPenumbraBot(edge) - Edge *edge; /* Edge being moved */ +prFixedPenumbraBot( + Edge *edge) /* Edge being moved */ { struct applyRule ar; PlowRule *pr; @@ -289,8 +289,8 @@ prFixedPenumbraBot(edge) */ void -prFixedDragStubs(edge) - Edge *edge; /* Edge being moved; RHS is fixed-width */ +prFixedDragStubs( + Edge *edge) /* Edge being moved; RHS is fixed-width */ { int distance = edge->e_newx - edge->e_x; Tile *tpL; @@ -343,12 +343,12 @@ restart: */ int -plowDragEdgeProc(lhsEdge, movingEdge) - Edge *lhsEdge; /* Edge on LHS; the caller has already +plowDragEdgeProc( + Edge *lhsEdge, /* Edge on LHS; the caller has already * determined that this edge has not * already moved far enough. */ - Edge *movingEdge; /* RHS of this edge is fixed-width */ + Edge *movingEdge) /* RHS of this edge is fixed-width */ { PlowRule *pr; int xsep, width; @@ -412,8 +412,8 @@ plowDragEdgeProc(lhsEdge, movingEdge) */ void -prContactLHS(edge) - Edge *edge; /* Edge being moved (LHS is contact) */ +prContactLHS( + Edge *edge) /* Edge being moved (LHS is contact) */ { int pNum; PlaneMask connPlanes = DBConnPlanes[edge->e_ltype]; @@ -429,8 +429,8 @@ prContactLHS(edge) } int -prContactRHS(edge) - Edge *edge; /* Edge being moved (RHS is contact) */ +prContactRHS( + Edge *edge) /* Edge being moved (RHS is contact) */ { int pNum; PlaneMask connPlanes = DBConnPlanes[edge->e_rtype]; @@ -467,8 +467,8 @@ prContactRHS(edge) */ void -prCoverTop(edge) - Edge *edge; /* Edge being moved */ +prCoverTop( + Edge *edge) /* Edge being moved */ { TileType ltype, rtype; PlowRule *pr; @@ -505,8 +505,8 @@ prCoverTop(edge) } int -prCoverBot(edge) - Edge *edge; /* Edge being moved */ +prCoverBot( + Edge *edge) /* Edge being moved */ { TileType ltype, rtype; PlowRule *pr; @@ -562,8 +562,8 @@ prCoverBot(edge) */ void -prIllegalTop(edge) - Edge *edge; +prIllegalTop( + Edge *edge) { TileTypeBitMask insideTypes; struct applyRule ar; @@ -592,8 +592,8 @@ prIllegalTop(edge) } int -prIllegalBot(edge) - Edge *edge; +prIllegalBot( + Edge *edge) { TileTypeBitMask insideTypes; struct applyRule ar; @@ -642,9 +642,9 @@ prIllegalBot(edge) */ int -plowCoverTopProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowCoverTopProc( + Outline *outline, + struct applyRule *ar) { Edge edge; int ret = 0; @@ -678,9 +678,9 @@ plowCoverTopProc(outline, ar) } int -plowCoverBotProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowCoverBotProc( + Outline *outline, + struct applyRule *ar) { Edge edge; int ret = 0; @@ -741,9 +741,9 @@ plowCoverBotProc(outline, ar) */ int -plowIllegalTopProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowIllegalTopProc( + Outline *outline, + struct applyRule *ar) { TileType badType = TiGetTypeExact(outline->o_inside), leftType; Edge *movingEdge = ar->ar_moving; @@ -786,9 +786,9 @@ found_bad: } int -plowIllegalBotProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowIllegalBotProc( + Outline *outline, + struct applyRule *ar) { TileType badType = TiGetTypeExact(outline->o_outside), leftType; Edge *movingEdge = ar->ar_moving; @@ -853,8 +853,8 @@ found_bad: */ void -prFindCells(edge) - Edge *edge; /* Edge being moved */ +prFindCells( + Edge *edge) /* Edge being moved */ { BPlane *cellPlane = plowYankDef->cd_cellPlane; struct applyRule ar; @@ -890,8 +890,8 @@ prFindCells(edge) */ void -prCell(edge) - Edge *edge; /* Cell edge being moved */ +prCell( + Edge *edge) /* Cell edge being moved */ { Rect cellArea, shadowArea; CellUse *use = edge->e_use; @@ -962,10 +962,10 @@ prCell(edge) */ int -plowCellDragPaint(tile, dinfo, ar) - Tile *tile; - TileType dinfo; /* (unused) */ - struct applyRule *ar; +plowCellDragPaint( + Tile *tile, + TileType dinfo, /* (unused) */ + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int distance = movingEdge->e_newx - movingEdge->e_x; @@ -1016,9 +1016,9 @@ plowCellDragPaint(tile, dinfo, ar) */ int -plowCellPushPaint(impactedEdge, ar) - Edge *impactedEdge; /* Edge found by shadow search */ - struct applyRule *ar; /* Describes edge being moved and search area */ +plowCellPushPaint( + Edge *impactedEdge, /* Edge found by shadow search */ + struct applyRule *ar) /* Describes edge being moved and search area */ { Edge *movingEdge = ar->ar_moving; int xsep, newx; @@ -1057,9 +1057,9 @@ plowCellPushPaint(impactedEdge, ar) */ int -plowFoundCell(use, ar) - CellUse *use; - struct applyRule *ar; +plowFoundCell( + CellUse *use, + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int xmove, xsep; diff --git a/plow/PlowRules3.c b/plow/PlowRules3.c index 74f3052f..77a99620 100644 --- a/plow/PlowRules3.c +++ b/plow/PlowRules3.c @@ -37,8 +37,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern int plowApplyRule(); /* Forward declarations */ +struct inarg; int plowInSliverProc(); -int scanDown(), scanUp(); +int scanDown(struct inarg *inarg, TileType type, bool canMoveInargEdge), scanUp(struct inarg *inarg, TileType type, bool canMoveInargEdge); int scanDownError(), scanUpError(); /* Argument passed to above filter functions */ @@ -47,7 +48,8 @@ struct inarg Rect ina_area; /* Area to search for violations */ Edge *ina_moving; /* Edge causing this search */ TileType ina_t0; /* See comments in the procedures */ - int (*ina_proc)(); /* Apply to look for rule violations */ + int (*ina_proc)(struct inarg *, TileType, bool); + /* Apply to look for rule violations */ /* Used while appling design rules */ PlowRule *ina_rule; /* Plowing design rule being applied */ @@ -74,8 +76,8 @@ struct inarg */ void -prInSliver(edge) - Edge *edge; /* Edge being moved */ +prInSliver( + Edge *edge) /* Edge being moved */ { struct inarg inarg; Rect edgeBorder; @@ -111,10 +113,10 @@ prInSliver(edge) } int -plowInSliverProc(tile, dinfo, inarg) - Tile *tile; - TileType dinfo; /* (unused) */ - struct inarg *inarg; +plowInSliverProc( + Tile *tile, + TileType dinfo, /* (unused) */ + struct inarg *inarg) { Edge *movingEdge = inarg->ina_moving; #ifdef notdef @@ -199,10 +201,10 @@ plowInSliverProc(tile, dinfo, inarg) } int -scanDown(inarg, type, canMoveInargEdge) - struct inarg *inarg; - TileType type; - bool canMoveInargEdge; +scanDown( + struct inarg *inarg, + TileType type, + bool canMoveInargEdge) { TileType ltype = inarg->ina_moving->e_ltype; Edge *movingEdge = inarg->ina_moving; @@ -256,9 +258,9 @@ scanDown(inarg, type, canMoveInargEdge) } int -scanDownError(tile, inarg) - Tile *tile; - struct inarg *inarg; +scanDownError( + Tile *tile, + struct inarg *inarg) { Rect atomRect; int incursion; @@ -294,10 +296,10 @@ scanDownError(tile, inarg) } int -scanUp(inarg, type, canMoveInargEdge) - struct inarg *inarg; - TileType type; - bool canMoveInargEdge; +scanUp( + struct inarg *inarg, + TileType type, + bool canMoveInargEdge) { TileType ltype = inarg->ina_moving->e_ltype; Edge *movingEdge = inarg->ina_moving; @@ -351,9 +353,9 @@ scanUp(inarg, type, canMoveInargEdge) } int -scanUpError(tile, inarg) - Tile *tile; - struct inarg *inarg; +scanUpError( + Tile *tile, + struct inarg *inarg) { Rect atomRect; int incursion; @@ -390,12 +392,12 @@ scanUpError(tile, inarg) } int -plowSrFinalArea(plane, area, okTypes, proc, cdata) - Plane *plane; - Rect *area; - TileTypeBitMask *okTypes; - int (*proc)(); - ClientData cdata; +plowSrFinalArea( + Plane *plane, + Rect *area, + TileTypeBitMask *okTypes, + int (*proc)(), + ClientData cdata) { return (DBSrPaintArea((Tile *) NULL, plane, area, okTypes, proc, cdata)); } diff --git a/plow/PlowSearch.c b/plow/PlowSearch.c index aa51335e..a813decf 100644 --- a/plow/PlowSearch.c +++ b/plow/PlowSearch.c @@ -279,10 +279,10 @@ plowSrShadow( */ int -plowShadowRHS(tp, s, bottomLeft) - Tile *tp; /* Tile whose RHS is to be followed */ - struct shadow *s; /* Shadow search argument */ - int bottomLeft; /* Bottom of 'tp', clipped to area */ +plowShadowRHS( + Tile *tp, /* Tile whose RHS is to be followed */ + struct shadow *s, /* Shadow search argument */ + int bottomLeft) /* Bottom of 'tp', clipped to area */ { Tile *tpR; int bottom, left; @@ -434,10 +434,10 @@ plowSrShadowInitial( */ int -plowShadowInitialRHS(tp, s, bottomLeft) - Tile *tp; /* Tile whose RHS is to be followed */ - struct shadow *s; /* Shadow search argument */ - int bottomLeft; /* Bottom of 'tp', clipped to area */ +plowShadowInitialRHS( + Tile *tp, /* Tile whose RHS is to be followed */ + struct shadow *s, /* Shadow search argument */ + int bottomLeft) /* Bottom of 'tp', clipped to area */ { Tile *tpR; int bottom, left; @@ -591,10 +591,10 @@ plowSrShadowBack( */ int -plowShadowLHS(tp, s, topRight) - Tile *tp; /* Tile whose LHS is to be followed */ - struct shadow *s; /* Shadow search argument */ - int topRight; /* Top of 'tp', clipped to area */ +plowShadowLHS( + Tile *tp, /* Tile whose LHS is to be followed */ + struct shadow *s, /* Shadow search argument */ + int topRight) /* Top of 'tp', clipped to area */ { Tile *tpL; int top, right; @@ -674,14 +674,14 @@ plowShadowLHS(tp, s, topRight) */ int -plowAtomize(pNum, rect, proc, cdata) - int pNum; /* Plane from plowYankDef to search */ - Rect *rect; /* LHS is the geometrical edge we search; each +plowAtomize( + int pNum, /* Plane from plowYankDef to search */ + Rect *rect, /* LHS is the geometrical edge we search; each * Edge found will have an e_newx coordinate * equal to the RHS of this rect. */ - int (*proc)(); /* Procedure to apply to each Edge */ - ClientData cdata; /* Additional argument to (*proc)() */ + int (*proc)(), /* Procedure to apply to each Edge */ + ClientData cdata) /* Additional argument to (*proc)() */ { Tile *tpL, *tpR; Plane *plane = plowYankDef->cd_planes[pNum]; @@ -889,8 +889,8 @@ plowSrOutline( */ void -plowSrOutlineInit(outline) - Outline *outline; +plowSrOutlineInit( + Outline *outline) { Plane *plane = plowYankDef->cd_planes[outline->o_pNum]; Tile *in, *out; @@ -1054,8 +1054,8 @@ plowSrOutlineInit(outline) */ void -plowSrOutlineNext(outline) - Outline *outline; +plowSrOutlineNext( + Outline *outline) { Tile *tpL, *tpR; diff --git a/plow/PlowTech.c b/plow/PlowTech.c index 6a9ceaa4..c6c7f3d9 100644 --- a/plow/PlowTech.c +++ b/plow/PlowTech.c @@ -177,10 +177,10 @@ PlowDRCInit() /*ARGSUSED*/ bool -PlowDRCLine(sectionName, argc, argv) - char *sectionName; /* Unused */ - int argc; - char *argv[]; +PlowDRCLine( + char *sectionName, /* Unused */ + int argc, + char *argv[]) { int which; static const struct @@ -233,9 +233,9 @@ PlowDRCLine(sectionName, argc, argv) */ int -plowWidthRule(argc, argv) - int argc; - char *argv[]; +plowWidthRule( + int argc, + char *argv[]) { char *layers = argv[1]; int distance = atoi(argv[2]); @@ -314,9 +314,9 @@ plowWidthRule(argc, argv) */ int -plowSpacingRule(argc, argv) - int argc; - char *argv[]; +plowSpacingRule( + int argc, + char *argv[]) { char *layers1 = argv[1], *layers2 = argv[2]; int distance = atoi(argv[3]); @@ -458,9 +458,9 @@ plowSpacingRule(argc, argv) */ int -plowEdgeRule(argc, argv) - int argc; - char *argv[]; +plowEdgeRule( + int argc, + char *argv[]) { char *layers1 = argv[1], *layers2 = argv[2]; int distance = atoi(argv[3]); @@ -693,8 +693,8 @@ PlowDRCFinal() */ PlowRule * -plowTechOptimizeRule(ruleList) - PlowRule *ruleList; +plowTechOptimizeRule( + PlowRule *ruleList) { PlowRule *pCand, *pCandLast, *pr; TileTypeBitMask tmpMask; @@ -819,10 +819,10 @@ PlowTechInit() */ bool -PlowTechLine(sectionName, argc, argv) - char *sectionName; /* Unused */ - int argc; - char *argv[]; +PlowTechLine( + char *sectionName, /* Unused */ + int argc, + char *argv[]) { TileTypeBitMask types; @@ -945,7 +945,10 @@ void plowScaleDown(PlowRule *pr, int scalefactor) */ void -DRCPlowScale(int scaled, int scalen, bool adjustmax) +DRCPlowScale( + int scaled, + int scalen, + bool adjustmax) { PlowRule *pr; TileType i, j; @@ -997,9 +1000,9 @@ DRCPlowScale(int scaled, int scalen, bool adjustmax) */ void -plowTechPrintRule(pr, f) - PlowRule *pr; - FILE *f; +plowTechPrintRule( + PlowRule *pr, + FILE *f) { fprintf(f, "\tDISTANCE=%d, PLANE=%s, FLAGS=", pr->pr_dist, DBPlaneLongName(pr->pr_pNum)); @@ -1015,10 +1018,10 @@ plowTechPrintRule(pr, f) } void -plowTechShowTable(table, header, f) - PlowRule *table[TT_MAXTYPES][TT_MAXTYPES]; - char *header; - FILE *f; +plowTechShowTable( + PlowRule *table[TT_MAXTYPES][TT_MAXTYPES], + char *header, + FILE *f) { PlowRule *pr; TileType i, j; @@ -1036,8 +1039,8 @@ plowTechShowTable(table, header, f) } void -plowTechShow(f) - FILE *f; +plowTechShow( + FILE *f) { plowTechShowTable(plowWidthRulesTbl, "Width Rules", f); plowTechShowTable(plowSpacingRulesTbl, "Spacing Rules", f); diff --git a/plow/PlowTest.c b/plow/PlowTest.c index 0e627e7c..1285157b 100644 --- a/plow/PlowTest.c +++ b/plow/PlowTest.c @@ -130,9 +130,9 @@ const struct }; void -PlowTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +PlowTest( + MagWindow *w, + TxCommand *cmd) { pCmd plowCmd, plowGetCommand(); Rect editArea, dummyRect, rootBox, area2; @@ -414,8 +414,8 @@ PlowTest(w, cmd) */ pCmd -plowGetCommand(cmd) - TxCommand *cmd; +plowGetCommand( + TxCommand *cmd) { int plowIndex; @@ -497,9 +497,9 @@ plowDebugInit() */ int -plowShowShadow(edge, def) - Edge *edge; - CellDef *def; +plowShowShadow( + Edge *edge, + CellDef *def) { char mesg[512]; int scaleFactor = 10; @@ -537,9 +537,9 @@ plowShowShadow(edge, def) */ void -plowTestJog(def, area) - CellDef *def; - Rect *area; +plowTestJog( + CellDef *def, + Rect *area) { extern CellUse *plowYankUse; extern Rect plowYankedArea; @@ -613,10 +613,10 @@ plowTestJog(def, area) */ void -plowDebugEdge(edge, rtePtr, mesg) - Edge *edge; - RuleTableEntry *rtePtr; - char *mesg; +plowDebugEdge( + Edge *edge, + RuleTableEntry *rtePtr, + char *mesg) { int scaleFactor = 10; Rect edgeArea; @@ -721,9 +721,9 @@ again: */ int -plowShowOutline(outline, clipArea) - Outline *outline; - Rect *clipArea; +plowShowOutline( + Outline *outline, + Rect *clipArea) { static char *dirNames[] = { "center", "north", "northeast", "east", @@ -815,8 +815,8 @@ plowShowOutline(outline, clipArea) */ void -plowDisplay(dodef) - bool dodef; +plowDisplay( + bool dodef) { if (dodef) DBWAreaChanged(plowDummyUse->cu_def, &TiPlaneRect,