diff --git a/commands/CmdAB.c b/commands/CmdAB.c index 5dfff66f..d2a7aaa9 100644 --- a/commands/CmdAB.c +++ b/commands/CmdAB.c @@ -70,9 +70,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /*ARGSUSED*/ void -CmdAddPath( w, cmd ) - MagWindow *w; - TxCommand *cmd; +CmdAddPath( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 2) { TxError("Usage: %s appended_search_path\n", cmd->tx_argv[0]); @@ -130,9 +130,9 @@ typedef struct LA1 #define ARRAY_DEFAULT 6 void -CmdArray(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdArray( + MagWindow *w, + TxCommand *cmd) { static char *cmdArrayOption[] = { "count [[xlo] xhi [ylo] yhi] array subcells", @@ -480,11 +480,11 @@ freelist: */ int -selGetArrayFunc(selUse, use, trans, arg) - CellUse *selUse; - CellUse *use; - Transform *trans; - LinkedArray **arg; +selGetArrayFunc( + CellUse *selUse, + CellUse *use, + Transform *trans, + LinkedArray **arg) { /* Check "use" for array information and pass this to arrayInfo */ @@ -593,9 +593,9 @@ selGetArrayFunc(selUse, use, trans, arg) #define BOX_DEFAULT 13 void -CmdBox(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdBox( + MagWindow *w, + TxCommand *cmd) { static char *cmdBoxOption[] = { "width [value] set or return box width", diff --git a/commands/CmdAuto.c b/commands/CmdAuto.c index b1a2994b..94e987b3 100644 --- a/commands/CmdAuto.c +++ b/commands/CmdAuto.c @@ -48,9 +48,9 @@ */ void -CmdAutoExtToSim(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdAutoExtToSim( + MagWindow *w, + TxCommand *cmd) { int result; @@ -83,9 +83,9 @@ CmdAutoExtToSim(w, cmd) */ void -CmdAutoExtToSpice(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdAutoExtToSpice( + MagWindow *w, + TxCommand *cmd) { int result; @@ -119,9 +119,9 @@ CmdAutoExtToSpice(w, cmd) */ void -CmdAutoRoute(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdAutoRoute( + MagWindow *w, + TxCommand *cmd) { int result; @@ -154,9 +154,9 @@ CmdAutoRoute(w, cmd) */ void -CmdAutoPlot(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdAutoPlot( + MagWindow *w, + TxCommand *cmd) { int result; @@ -189,9 +189,9 @@ CmdAutoPlot(w, cmd) */ void -CmdAutoLef(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdAutoLef( + MagWindow *w, + TxCommand *cmd) { int result; diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 77a083d0..885a9203 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -125,9 +125,9 @@ bool cmdDumpParseArgs(); #define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */ void -CmdCalma(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCalma( + MagWindow *w, + TxCommand *cmd) { int option, ext, value; char **msg, *namep, *dotptr; @@ -1101,9 +1101,9 @@ outputCalma: /* ARGSUSED */ void -CmdCellname(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCellname( + MagWindow *w, + TxCommand *cmd) { bool is_cellname; bool dolist = FALSE; @@ -1710,9 +1710,9 @@ badusage: #define CIF_WARN_HELP CIF_WARN_END /* undefined by CIF module */ void -CmdCif(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCif( + MagWindow *w, + TxCommand *cmd) { int option, yesno; char **msg, *namep; @@ -2263,9 +2263,9 @@ CmdCif(w, cmd) */ void -CmdClockwise(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdClockwise( + MagWindow *w, + TxCommand *cmd) { Transform trans, t2; int degrees, locargc; @@ -2378,9 +2378,9 @@ typedef struct CCS } CCStruct; void -CmdContact(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdContact( + MagWindow *w, + TxCommand *cmd) { TileType type, rtype, ctype; TileTypeBitMask *rmask, smask; @@ -2516,9 +2516,9 @@ CmdContact(w, cmd) */ int -cmdContactFunc(tile, ccs) - Tile *tile; - CCStruct *ccs; +cmdContactFunc( + Tile *tile, + CCStruct *ccs) { TileType stype; TileTypeBitMask smask; @@ -2538,9 +2538,9 @@ cmdContactFunc(tile, ccs) } int -cmdContactFunc2(tile, ccs) - Tile *tile; - CCStruct *ccs; +cmdContactFunc2( + Tile *tile, + CCStruct *ccs) { LinkedRect *newlr; Rect area; @@ -2560,9 +2560,9 @@ cmdContactFunc2(tile, ccs) */ int -cmdContactEraseFunc(tile, lr) - Tile *tile; - LinkedRect **lr; +cmdContactEraseFunc( + Tile *tile, + LinkedRect **lr) { LinkedRect *newlr; Rect area; @@ -2598,9 +2598,9 @@ cmdContactEraseFunc(tile, lr) */ void -CmdCopy(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCopy( + MagWindow *w, + TxCommand *cmd) { Transform t; Rect rootBox, newBox; @@ -2808,9 +2808,9 @@ typedef struct nmcornerpath } NMCornerPath; void -CmdCorner(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Describes the command that was invoked. */ +CmdCorner( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Describes the command that was invoked. */ { TileTypeBitMask maskBits; Rect editBox; @@ -3005,9 +3005,9 @@ CmdCorner(w, cmd) * ---------------------------------------------------------------------------- */ int -cmdCornerFunc(tile, cxp) - Tile *tile; /* Tile to fill with. */ - TreeContext *cxp; /* Describes state of search. */ +cmdCornerFunc( + Tile *tile, /* Tile to fill with. */ + TreeContext *cxp) /* Describes state of search. */ { Rect r1, r2, r3; struct cmdCornerArea *cca; @@ -3140,7 +3140,8 @@ cmdCornerFunc(tile, cxp) */ void -AddNewPoint(CIFPath **pathhead) +AddNewPoint( + CIFPath **pathhead) { CIFPath *newpoint; @@ -3170,9 +3171,9 @@ AddNewPoint(CIFPath **pathhead) * ---------------------------------------------------------------------------- */ int -cmdBevelFunc(tile, cxp) - Tile *tile; /* Tile to fill with. */ - TreeContext *cxp; /* Describes state of search. */ +cmdBevelFunc( + Tile *tile, /* Tile to fill with. */ + TreeContext *cxp) /* Describes state of search. */ { Rect r1, r2, r3; CIFPathList *cpl; @@ -3680,9 +3681,9 @@ cmdBevelFunc(tile, cxp) * ---------------------------------------------------------------------------- */ void -CmdCrash(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCrash( + MagWindow *w, + TxCommand *cmd) { int option = -1; char *filename = NULL; @@ -3730,9 +3731,9 @@ CmdCrash(w, cmd) * ---------------------------------------------------------------------------- */ void -CmdCrosshair(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCrosshair( + MagWindow *w, + TxCommand *cmd) { Point pos; @@ -3783,9 +3784,9 @@ CmdCrosshair(w, cmd) */ void -CmdDelete(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdDelete( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) goto badusage; if (!ToolGetEditBox((Rect *)NULL)) return; @@ -3826,9 +3827,9 @@ CmdDelete(w, cmd) static bool cmdFoundNewDown; void -CmdDown(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdDown( + MagWindow *w, + TxCommand *cmd) { CellUse *use = NULL; Rect area, pointArea; @@ -3908,13 +3909,13 @@ CmdDown(w, cmd) /* ARGSUSED */ int -cmdDownEnumFunc(selUse, use, transform, area) - CellUse *selUse; /* Use from selection (not used). */ - CellUse *use; /* Use from layout that corresponds to +cmdDownEnumFunc( + CellUse *selUse, /* Use from selection (not used). */ + CellUse *use, /* Use from layout that corresponds to * selUse (could be an array!). */ - Transform *transform; /* Transform from use->cu_def to root coords. */ - Rect *area; /* We're looking for a use containing this + Transform *transform, /* Transform from use->cu_def to root coords. */ + Rect *area) /* We're looking for a use containing this * area, in root coords. */ { @@ -3982,9 +3983,9 @@ cmdDownEnumFunc(selUse, use, transform, area) #define WHY 18 void -CmdDrc(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdDrc( + MagWindow *w, + TxCommand *cmd) { FILE * fp; static int drc_nth = 1; @@ -4544,9 +4545,10 @@ CmdDrc(w, cmd) * ---------------------------------------------------------------------------- */ -int cmdDropPaintCell(tile, cxp) - Tile *tile; - TreeContext *cxp; +int +cmdDropPaintCell( + Tile *tile, + TreeContext *cxp) { CellDef *cellDef = cxp->tc_scx->scx_use->cu_def; TileTypeBitMask *lMask = (TileTypeBitMask *)cxp->tc_filter->tf_arg; @@ -4585,7 +4587,9 @@ int cmdDropPaintCell(tile, cxp) */ int -cmdDropFunc(Tile *tile, ClientData clientData) +cmdDropFunc( + Tile *tile, + ClientData clientData) { TileTypeBitMask tMask, *lMask = (TileTypeBitMask *)clientData; SearchContext scx; @@ -4619,10 +4623,10 @@ cmdDropFunc(Tile *tile, ClientData clientData) */ int -cmdDropPaintFunc(rect, type, mask) - Rect *rect; /* Not used. */ - TileType type; /* Type of this piece of paint. */ - TileTypeBitMask *mask; /* Place to OR in type's bit. */ +cmdDropPaintFunc( + Rect *rect, /* Not used. */ + TileType type, /* Type of this piece of paint. */ + TileTypeBitMask *mask) /* Place to OR in type's bit. */ { if (type & TT_DIAGONAL) type = (type & TT_SIDE) ? (type & TT_RIGHTMASK) >> 14 : @@ -4680,9 +4684,9 @@ cmdDropPaintFunc(rect, type, mask) */ void -CmdDrop(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdDrop( + MagWindow *w, + TxCommand *cmd) { TileType i; TileTypeBitMask lMask, tMask; @@ -4765,9 +4769,9 @@ CmdDrop(w, cmd) */ void -CmdDump(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Describes command arguments. */ +CmdDump( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Describes command arguments. */ { SearchContext scx; CellUse dummy; @@ -4803,12 +4807,12 @@ CmdDump(w, cmd) /*ARGSUSED*/ bool -cmdDumpParseArgs(cmdName, w, cmd, dummy, scx) - char *cmdName; /* Either "dump" or "getcell" */ - MagWindow *w; /* Window in which command was invoked (UNUSED) */ - TxCommand *cmd; /* Arguments to command */ - CellUse *dummy; /* Filled in to point to cell mentioned in command */ - SearchContext *scx; /* Filled in with the transform from the child cell's +cmdDumpParseArgs( + char *cmdName, /* Either "dump" or "getcell" */ + MagWindow *w, /* Window in which command was invoked (UNUSED) */ + TxCommand *cmd, /* Arguments to command */ + CellUse *dummy, /* Filled in to point to cell mentioned in command */ + SearchContext *scx) /* Filled in with the transform from the child cell's * def to ROOT coordinates, the bounding box of the * child cell in child cell coordinates, and with * scx_use = dummy, where dummy->cu_def is the child @@ -5304,11 +5308,11 @@ usage: /* ARGSUSED */ int -cmdDumpFunc(rect, name, label, point) - Rect *rect; /* Root coordinates of the label. */ - char *name; /* Label name (not used). */ - Label *label; /* Pointer to label (not used). */ - Point *point; /* Place to store label's lower-left. */ +cmdDumpFunc( + Rect *rect, /* Root coordinates of the label. */ + char *name, /* Label name (not used). */ + Label *label, /* Pointer to label (not used). */ + Point *point) /* Place to store label's lower-left. */ { *point = rect->r_ll; return 1; diff --git a/commands/CmdE.c b/commands/CmdE.c index dab3ab70..12ad167f 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -79,9 +79,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ static bool cmdFoundNewEdit; void -CmdEdit(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdEdit( + MagWindow *w, + TxCommand *cmd) { Rect area, pointArea; CellUse *usave, *use = NULL; @@ -197,9 +197,9 @@ CmdEdit(w, cmd) */ int -cmdEditRedisplayFunc(w, area) - MagWindow *w; /* Window containing edit cell. */ - Rect *area; /* Area to be redisplayed. */ +cmdEditRedisplayFunc( + MagWindow *w, /* Window containing edit cell. */ + Rect *area) /* Area to be redisplayed. */ { static Rect origin = {{-1, -1}, {1, 1}}; Rect tmp; @@ -226,13 +226,13 @@ cmdEditRedisplayFunc(w, area) */ int -cmdEditEnumFunc(selUse, use, transform, area) - CellUse *selUse; /* Use from selection (not used). */ - CellUse *use; /* Use from layout that corresponds to +cmdEditEnumFunc( + CellUse *selUse, /* Use from selection (not used). */ + CellUse *use, /* Use from layout that corresponds to * selUse (could be an array!). */ - Transform *transform; /* Transform from use->cu_def to root coords. */ - Rect *area; /* We're looking for a use containing this + Transform *transform, /* Transform from use->cu_def to root coords. */ + Rect *area) /* We're looking for a use containing this * area, in root coords. */ { @@ -305,9 +305,9 @@ cmdEditEnumFunc(selUse, use, transform, area) #define OPTION_FLAGS 3 void -CmdElement(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdElement( + MagWindow *w, + TxCommand *cmd) { int option, type; @@ -627,9 +627,9 @@ static CellUse *cmdEraseCells[MAXCELLS]; static int cmdEraseCount; void -CmdErase(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdErase( + MagWindow *w, + TxCommand *cmd) { Rect editRect, areaReturn; TileTypeBitMask mask, errorLayersForErasure, activeLayersForErasure; @@ -759,9 +759,9 @@ CmdErase(w, cmd) } int -cmdEraseCellsFunc(scx, cdarg) -SearchContext *scx; /* Indicates cell found. */ -ClientData cdarg; /* Not used. */ +cmdEraseCellsFunc( + SearchContext *scx, /* Indicates cell found. */ + ClientData cdarg) /* Not used. */ { /* All this procedure does is to remember cells that are * found, up to MAXCELLS of them. @@ -797,9 +797,9 @@ ClientData cdarg; /* Not used. */ */ void -CmdExpand(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdExpand( + MagWindow *w, + TxCommand *cmd) { int windowMask, boxMask, d; Rect rootRect; @@ -869,9 +869,9 @@ CmdExpand(w, cmd) */ int -cmdExpandFunc(use, windowMask) - CellUse *use; /* Use that was just expanded. */ - int windowMask; /* Window where it was expanded. */ +cmdExpandFunc( + CellUse *use, /* Use that was just expanded. */ + int windowMask) /* Window where it was expanded. */ { if (use->cu_parent == NULL) return 0; DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask, @@ -941,9 +941,9 @@ cmdExpandFunc(use, windowMask) #define UNIQNOTOPPORTS 3 void -CmdExtract(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdExtract( + MagWindow *w, + TxCommand *cmd) { char **msg, *namep, *arg; int option, warn, len, n, all; diff --git a/commands/CmdFI.c b/commands/CmdFI.c index eb1c52ea..693e8049 100644 --- a/commands/CmdFI.c +++ b/commands/CmdFI.c @@ -100,9 +100,9 @@ struct cmdFPArg */ int -feedPolyFunc(tile, arg) - Tile *tile; - struct cmdFPArg *arg; +feedPolyFunc( + Tile *tile, + struct cmdFPArg *arg) { Rect area; TiToRect(tile, &area); @@ -146,9 +146,9 @@ feedPolyFunc(tile, arg) #define WHY 6 void -CmdFeedback(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdFeedback( + MagWindow *w, + TxCommand *cmd) { static char *cmdFeedbackOptions[] = { @@ -505,9 +505,9 @@ Rect cmdFillRootBox; /* Root coords of box. */ struct cmdFillArea *cmdFillList; /* List of areas to fill. */ void -CmdFill(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Describes the command that was invoked. */ +CmdFill( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Describes the command that was invoked. */ { TileTypeBitMask maskBits; Rect editBox; @@ -603,9 +603,9 @@ CmdFill(w, cmd) */ int -cmdFillFunc(tile, cxp) - Tile *tile; /* Tile to fill with. */ - TreeContext *cxp; /* Describes state of search. */ +cmdFillFunc( + Tile *tile, /* Tile to fill with. */ + TreeContext *cxp) /* Describes state of search. */ { Rect r1, r2; struct cmdFillArea *cfa; @@ -658,9 +658,9 @@ cmdFillFunc(tile, cxp) */ void -CmdFindBox(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdFindBox( + MagWindow *w, + TxCommand *cmd) { CellDef *boxDef; Rect box; @@ -751,11 +751,12 @@ typedef struct _labsearchrec } LabSearchRec; -int cmdFindLabelFunc(rect, name, label, cdarg) - Rect *rect; - char *name; - Label *label; - LabSearchRec *cdarg; +int +cmdFindLabelFunc( + Rect *rect, + char *name, + Label *label, + LabSearchRec *cdarg) { if (cdarg->lsr_occur == 0) { @@ -790,9 +791,9 @@ int cmdFindLabelFunc(rect, name, label, cdarg) */ void -CmdFindLabel(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdFindLabel( + MagWindow *w, + TxCommand *cmd) { CellDef *boxDef; CellUse *labUse; @@ -889,11 +890,11 @@ usage: */ int -dbListLabels(scx, label, tpath, cdarg) - SearchContext *scx; - Label *label; /* Pointer to label structure */ - TerminalPath *tpath; /* Full pathname of terminal */ - ClientData cdarg; /* (unused) */ +dbListLabels( + SearchContext *scx, + Label *label, /* Pointer to label structure */ + TerminalPath *tpath, /* Full pathname of terminal */ + ClientData cdarg) /* (unused) */ { char *n = tpath->tp_next; char c = *n; @@ -934,9 +935,9 @@ dbListLabels(scx, label, tpath, cdarg) */ void -CmdFlush(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdFlush( + MagWindow *w, + TxCommand *cmd) { CellDef *def; int action; @@ -1022,9 +1023,9 @@ CmdFlush(w, cmd) */ void -CmdGetcell(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Describes command arguments. */ +CmdGetcell( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Describes command arguments. */ { CellUse dummy, *newUse; Transform editTrans; @@ -1107,9 +1108,9 @@ CmdGetcell(w, cmd) */ void -CmdGetnode(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdGetnode( + MagWindow *w, + TxCommand *cmd) { #define TBLSIZE 50 #define STRINGS 0 @@ -1258,9 +1259,9 @@ badusage: #define GRID_WHAT 7 void -CmdGrid(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdGrid( + MagWindow *w, + TxCommand *cmd) { int option, locargc; int xSpacing, ySpacing, xOrig, yOrig, multiple; @@ -1426,9 +1427,9 @@ CmdGrid(w, cmd) #ifdef USE_READLINE void -CmdHistory(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdHistory( + MagWindow *w, + TxCommand *cmd) { int i; HIST_ENTRY *he; @@ -1507,9 +1508,9 @@ CmdHistory(w, cmd) */ void -CmdIdentify(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdIdentify( + MagWindow *w, + TxCommand *cmd) { extern int cmdIdFunc(); /* Forward reference. */ @@ -1536,13 +1537,13 @@ CmdIdentify(w, cmd) /* ARGSUSED */ int -cmdIdFunc(selUse, use, transform, newId) - CellUse *selUse; /* Use from selection cell. */ - CellUse *use; /* Use from layout that corresponds to +cmdIdFunc( + CellUse *selUse, /* Use from selection cell. */ + CellUse *use, /* Use from layout that corresponds to * selUse. */ - Transform *transform; /* Not used. */ - char *newId; /* New id for cell use. */ + Transform *transform, /* Not used. */ + char *newId) /* New id for cell use. */ { if (EditCellUse == NULL) { @@ -1583,12 +1584,12 @@ cmdIdFunc(selUse, use, transform, newId) } TileType -CmdFindNetProc(nodename, use, rect, warn_not_found, isvalid) - char *nodename; - CellUse *use; - Rect *rect; - bool warn_not_found; - bool *isvalid; +CmdFindNetProc( + char *nodename, + CellUse *use, + Rect *rect, + bool warn_not_found, + bool *isvalid) { char *s,*s2; SearchContext scx, scx2; @@ -1775,9 +1776,9 @@ checklocal: */ void -CmdGoto(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdGoto( + MagWindow *w, + TxCommand *cmd) { char *s, *nodename = cmd->tx_argv[1]; Rect rect; @@ -1833,9 +1834,9 @@ CmdGoto(w, cmd) */ int -findTile(tile, rtype) - Tile *tile; - TileType *rtype; +findTile( + Tile *tile, + TileType *rtype) { TileType ttype; @@ -1858,11 +1859,11 @@ findTile(tile, rtype) */ void -FlatCopyAllLabels(scx, mask, xMask, targetUse) - SearchContext *scx; - TileTypeBitMask *mask; - int xMask; - CellUse *targetUse; +FlatCopyAllLabels( + SearchContext *scx, + TileTypeBitMask *mask, + int xMask, + CellUse *targetUse) { int flatCopyAllLabels(); char pathstring[FLATTERMSIZE]; @@ -1877,11 +1878,11 @@ FlatCopyAllLabels(scx, mask, xMask, targetUse) } int -flatCopyAllLabels(scx, lab, tpath, targetUse) - SearchContext *scx; - Label *lab; - TerminalPath *tpath; - CellUse *targetUse; +flatCopyAllLabels( + SearchContext *scx, + Label *lab, + TerminalPath *tpath, + CellUse *targetUse) { Rect labTargetRect; int targetPos; @@ -1960,9 +1961,9 @@ flatCopyAllLabels(scx, lab, tpath, targetUse) */ void -CmdFlatten(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdFlatten( + MagWindow *w, + TxCommand *cmd) { int i, xMask, optargs; bool dolabels, dobox, toplabels, invert, doports, doinplace; diff --git a/commands/CmdLQ.c b/commands/CmdLQ.c index 3b3440cb..bb7faf16 100644 --- a/commands/CmdLQ.c +++ b/commands/CmdLQ.c @@ -84,18 +84,18 @@ extern bool FileLocking; */ void -CmdLabelProc(text, font, size, rotate, offx, offy, pos, sticky, type) - char *text; /* Text for label. */ - int font; /* Known font to use, or -1 for X11 fonts */ - int size; /* Fixed size of font (invalid with X11 fonts) */ - int rotate; /* Rotation (invalid with X11 fonts) */ - int offx; /* Position offset X (invalid with X11 fonts) */ - int offy; /* Position offset Y (invalid with X11 fonts) */ - int pos; /* Justification of text relative to text. -1 +CmdLabelProc( + char *text, /* Text for label. */ + int font, /* Known font to use, or -1 for X11 fonts */ + int size, /* Fixed size of font (invalid with X11 fonts) */ + int rotate, /* Rotation (invalid with X11 fonts) */ + int offx, /* Position offset X (invalid with X11 fonts) */ + int offy, /* Position offset Y (invalid with X11 fonts) */ + int pos, /* Justification of text relative to text. -1 * means "pick a nice one for me." */ - bool sticky; /* 1 if label should not be moved off chosen layer */ - TileType type; /* Type of material label is to be attached + bool sticky, /* 1 if label should not be moved off chosen layer */ + TileType type) /* Type of material label is to be attached * to. -1 means "pick a reasonable layer". */ { @@ -182,9 +182,9 @@ CmdLabelProc(text, font, size, rotate, offx, offy, pos, sticky, type) void -CmdLabel(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdLabel( + MagWindow *w, + TxCommand *cmd) { TileType type = (TileType)(-1); int pos = -1, font = -1, size = 0, rotate = 0, offx = 0, offy = 0; @@ -388,9 +388,9 @@ CmdLabel(w, cmd) */ void -CmdLoad(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdLoad( + MagWindow *w, + TxCommand *cmd) { int n = 1; int d = 1; @@ -550,9 +550,9 @@ CmdLoad(w, cmd) */ int -keepGoing(use, clientdata) - CellUse *use; - ClientData clientdata; +keepGoing( + CellUse *use, + ClientData clientdata) { return 0; /* keep the search going */ } @@ -594,9 +594,9 @@ keepGoing(use, clientdata) */ void -CmdLocking(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdLocking( + MagWindow *w, + TxCommand *cmd) { int option; @@ -668,9 +668,9 @@ CmdLocking(w, cmd) */ void -CmdMove(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdMove( + MagWindow *w, + TxCommand *cmd) { Transform t; Rect rootBox, newBox; @@ -891,9 +891,9 @@ moveToPoint: */ void -CmdPaint(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPaint( + MagWindow *w, + TxCommand *cmd) { Rect editRect; TileTypeBitMask mask; @@ -984,11 +984,11 @@ CmdPaint(w, cmd) */ void -CmdPaintEraseButton(w, refPoint, isPaint, isScreen) - MagWindow *w; - Point *refPoint; /* Screen location at which button was raised */ - bool isPaint; /* True for paint, False for erase. */ - bool isScreen; /* True for screen coordinates, False for root */ +CmdPaintEraseButton( + MagWindow *w, + Point *refPoint, /* Screen location at which button was raised */ + bool isPaint, /* True for paint, False for erase. */ + bool isScreen) /* True for screen coordinates, False for root */ { Rect rootRect, editRect, areaReturn; TileTypeBitMask mask; @@ -1085,9 +1085,9 @@ CmdPaintEraseButton(w, refPoint, isPaint, isScreen) #define PATHHELP 3 void -CmdPath(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPath( + MagWindow *w, + TxCommand *cmd) { char **pathptr; char *srcptr; @@ -1210,9 +1210,9 @@ usage: */ void -CmdPolygon(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPolygon( + MagWindow *w, + TxCommand *cmd) { TileType type; int points, i, j, pNum; @@ -1283,11 +1283,11 @@ CmdPolygon(w, cmd) /*----------------------------------------------------------------------*/ int -cmdPortLabelFunc1(scx, label, tpath, cdata) - SearchContext *scx; - Label *label; - TerminalPath *tpath; - ClientData cdata; +cmdPortLabelFunc1( + SearchContext *scx, + Label *label, + TerminalPath *tpath, + ClientData cdata) { Label **rlab = (Label **)cdata; @@ -1305,11 +1305,11 @@ cmdPortLabelFunc1(scx, label, tpath, cdata) } int -cmdPortLabelFunc2(scx, label, tpath, cdata) - SearchContext *scx; - Label *label; - TerminalPath *tpath; - ClientData cdata; +cmdPortLabelFunc2( + SearchContext *scx, + Label *label, + TerminalPath *tpath, + ClientData cdata) { Label **rlab = (Label **)cdata; @@ -1338,11 +1338,11 @@ cmdPortLabelFunc2(scx, label, tpath, cdata) /*----------------------------------------------------------------------*/ Label * -portFindLabel(editDef, port, unique, nonEdit) - CellDef *editDef; - bool unique; - bool port; // If TRUE, only look for labels that are ports - bool *nonEdit; // TRUE if label is not in the edit cell +portFindLabel( + CellDef *editDef, + bool port, // If TRUE, only look for labels that are ports + bool unique, + bool *nonEdit) // TRUE if label is not in the edit cell { int found, wrongkind; Label *lab, *sl; @@ -1441,7 +1441,9 @@ portFindLabel(editDef, port, unique, nonEdit) */ int -complabel(const void *one, const void *two) +complabel( + const void *one, + const void *two) { /* Natural sort order routine from DBcellname.c * replaces strcasecmp(). @@ -1516,9 +1518,9 @@ complabel(const void *one, const void *two) #define PORT_HELP 15 void -CmdPort(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPort( + MagWindow *w, + TxCommand *cmd) { char **msg; int argstart; @@ -2311,10 +2313,10 @@ parsepositions: */ void -CmdDoProperty(def, cmd, argstart) - CellDef *def; - TxCommand *cmd; - int argstart; +CmdDoProperty( + CellDef *def, + TxCommand *cmd, + int argstart) { int printPropertiesFunc(); char *value; @@ -2389,9 +2391,9 @@ CmdDoProperty(def, cmd, argstart) */ void -CmdProperty(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdProperty( + MagWindow *w, + TxCommand *cmd) { CellDef *def; @@ -2414,9 +2416,10 @@ CmdProperty(w, cmd) */ int -printPropertiesFunc(name, value) - char *name; - ClientData value; +printPropertiesFunc( + const char *name, + ClientData value, + ClientData cdata) /* not used */ { #ifdef MAGIC_WRAPPER char *keyvalue; @@ -2466,9 +2469,9 @@ printPropertiesFunc(name, value) #define NLIST_TERMINAL 3 void -CmdNetlist(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdNetlist( + MagWindow *w, + TxCommand *cmd) { int option; char **msg, *lastargv; @@ -2549,9 +2552,9 @@ CmdNetlist(w, cmd) */ void -CmdOrient(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdOrient( + MagWindow *w, + TxCommand *cmd) { Transform trans, t2; int orientidx, locargc; diff --git a/commands/CmdRS.c b/commands/CmdRS.c index 41a66744..cb96fdcd 100644 --- a/commands/CmdRS.c +++ b/commands/CmdRS.c @@ -88,9 +88,9 @@ Label *DefaultLabel; */ void -CmdRandom(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdRandom( + MagWindow *w, + TxCommand *cmd) { int value; @@ -141,9 +141,9 @@ CmdRandom(w, cmd) */ void -CmdRsim(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdRsim( + MagWindow *w, + TxCommand *cmd) { if ((cmd->tx_argc == 1) && (!SimRsimRunning)) { @@ -194,9 +194,9 @@ CmdRsim(w, cmd) */ void -CmdSave(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSave( + MagWindow *w, + TxCommand *cmd) { CellDef *locDef; @@ -266,9 +266,9 @@ CmdSave(w, cmd) */ void -CmdScaleGrid(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdScaleGrid( + MagWindow *w, + TxCommand *cmd) { int scalen, scaled; char *argsep; @@ -422,9 +422,9 @@ scalegridusage: */ void -CmdSee(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSee( + MagWindow *w, + TxCommand *cmd) { int flags; bool off; @@ -579,11 +579,11 @@ CmdSee(w, cmd) /* ARGSUSED */ void -cmdSelectArea(layers, less, option, globmatch) - char *layers; /* Which layers are to be selected. */ - bool less; - int option; /* Option from defined list above */ - char *globmatch; /* Optional match string for labels */ +cmdSelectArea( + char *layers, /* Which layers are to be selected. */ + bool less, + int option, /* Option from defined list above */ + char *globmatch) /* Optional match string for labels */ { SearchContext scx; TileTypeBitMask mask; @@ -665,8 +665,8 @@ cmdSelectArea(layers, less, option, globmatch) */ void -cmdIntersectArea(layer) - char *layer; /* The layer to intersect with */ +cmdIntersectArea( + char *layer) /* The layer to intersect with */ { TileType ttype; SearchContext scx; @@ -746,9 +746,9 @@ cmdIntersectArea(layer) */ void -CmdSelect(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSelect( + MagWindow *w, + TxCommand *cmd) { TileTypeBitMask mask; SearchContext scx; @@ -1681,11 +1681,11 @@ Okay: */ int -cmdLabelTextFunc(label, cellUse, transform, text) - Label *label; - CellUse *cellUse; - Transform *transform; - char *text; +cmdLabelTextFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + char *text) { Label *newlab; CellDef *cellDef = cellUse->cu_def; @@ -1721,11 +1721,11 @@ cmdLabelTextFunc(label, cellUse, transform, text) } int -cmdLabelRotateFunc(label, cellUse, transform, value) - Label *label; - CellUse *cellUse; - Transform *transform; - int *value; +cmdLabelRotateFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + int *value) { CellDef *cellDef = cellUse->cu_def; #ifdef MAGIC_WRAPPER @@ -1758,11 +1758,11 @@ cmdLabelRotateFunc(label, cellUse, transform, value) } int -cmdLabelSizeFunc(label, cellUse, transform, value) - Label *label; - CellUse *cellUse; - Transform *transform; - int *value; +cmdLabelSizeFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + int *value) { CellDef *cellDef = cellUse->cu_def; #ifdef MAGIC_WRAPPER @@ -1794,11 +1794,11 @@ cmdLabelSizeFunc(label, cellUse, transform, value) } int -cmdLabelJustFunc(label, cellUse, transform, value) - Label *label; - CellUse *cellUse; - Transform *transform; - int *value; +cmdLabelJustFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + int *value) { CellDef *cellDef = cellUse->cu_def; #ifdef MAGIC_WRAPPER @@ -1830,11 +1830,11 @@ cmdLabelJustFunc(label, cellUse, transform, value) } int -cmdLabelLayerFunc(label, cellUse, transform, value) - Label *label; - CellUse *cellUse; - Transform *transform; - int *value; +cmdLabelLayerFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + int *value) { CellDef *cellDef = cellUse->cu_def; TileType ttype; @@ -1868,11 +1868,11 @@ cmdLabelLayerFunc(label, cellUse, transform, value) } int -cmdLabelStickyFunc(label, cellUse, transform, value) - Label *label; - CellUse *cellUse; - Transform *transform; - int *value; +cmdLabelStickyFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + int *value) { CellDef *cellDef = cellUse->cu_def; int newvalue; @@ -1909,11 +1909,11 @@ cmdLabelStickyFunc(label, cellUse, transform, value) } int -cmdLabelOffsetFunc(label, cellUse, transform, point) - Label *label; - CellUse *cellUse; - Transform *transform; - Point *point; +cmdLabelOffsetFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + Point *point) { CellDef *cellDef = cellUse->cu_def; #ifdef MAGIC_WRAPPER @@ -1950,11 +1950,11 @@ cmdLabelOffsetFunc(label, cellUse, transform, point) } int -cmdLabelRectFunc(label, cellUse, transform, rect) - Label *label; - CellUse *cellUse; - Transform *transform; - Rect *rect; +cmdLabelRectFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + Rect *rect) { CellDef *cellDef = cellUse->cu_def; #ifdef MAGIC_WRAPPER @@ -1996,11 +1996,11 @@ cmdLabelRectFunc(label, cellUse, transform, rect) } int -cmdLabelFontFunc(label, cellUse, transform, font) - Label *label; - CellUse *cellUse; - Transform *transform; - int *font; +cmdLabelFontFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + int *font) { CellDef *cellDef = cellUse->cu_def; #ifdef MAGIC_WRAPPER @@ -2088,9 +2088,9 @@ cmdLabelFontFunc(label, cellUse, transform, font) #define SETLABEL_HELP 10 void -CmdSetLabel(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSetLabel( + MagWindow *w, + TxCommand *cmd) { int pos = -1, font = -1, size = 0, rotate = 0, flags = 0; int locargc, argstart = 1; @@ -2566,9 +2566,9 @@ CmdSetLabel(w, cmd) */ void -CmdSideways(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSideways( + MagWindow *w, + TxCommand *cmd) { Transform trans; Rect rootBox, bbox; @@ -2628,9 +2628,9 @@ CmdSideways(w, cmd) */ void -CmdShell(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdShell( + MagWindow *w, + TxCommand *cmd) { int i, cmdlength; char *command; @@ -2676,9 +2676,9 @@ int (*CmdStretchCmd)() = NULL; /* ARGSUSED */ void -CmdSgraph(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSgraph( + MagWindow *w, + TxCommand *cmd) { if (CmdStretchCmd != NULL) { @@ -2711,9 +2711,9 @@ CmdSgraph(w, cmd) */ void -CmdStartRsim(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdStartRsim( + MagWindow *w, + TxCommand *cmd) { static char rsimstr[] = "rsim"; @@ -2758,9 +2758,9 @@ CmdStartRsim(w, cmd) */ void -CmdSimCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSimCmd( + MagWindow *w, + TxCommand *cmd) { static char cmdbuf[200]; char *strptr; @@ -2845,9 +2845,9 @@ CmdSimCmd(w, cmd) #define SNAP_LIST 6 void -CmdSnap(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSnap( + MagWindow *w, + TxCommand *cmd) { static char *names[] = { "off", "internal", "lambda", "grid", "user", "on", "list", 0 }; @@ -2911,9 +2911,9 @@ printit: */ void -CmdSplit(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSplit( + MagWindow *w, + TxCommand *cmd) { Rect editRect, expRect; TileTypeBitMask mask1, mask2, *cmask; @@ -3011,9 +3011,9 @@ CmdSplit(w, cmd) */ void -CmdSplitErase(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdSplitErase( + MagWindow *w, + TxCommand *cmd) { Rect editRect, expRect; TileTypeBitMask mask; @@ -3109,9 +3109,9 @@ CmdSplitErase(w, cmd) */ void -CmdStretch(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdStretch( + MagWindow *w, + TxCommand *cmd) { Transform t; Rect rootBox, newBox; diff --git a/commands/CmdSubrs.c b/commands/CmdSubrs.c index 9932b6f9..f53294ae 100644 --- a/commands/CmdSubrs.c +++ b/commands/CmdSubrs.c @@ -100,11 +100,12 @@ TileTypeBitMask CmdYMAllButSpace; */ int -cmdScaleCoord(w, arg, is_relative, is_x, scale) - MagWindow *w; - char *arg; - bool is_relative, is_x; - int scale; +cmdScaleCoord( + MagWindow *w, + char *arg, + bool is_relative, + bool is_x, + int scale) { char *endptr; double dval = 0; @@ -230,10 +231,11 @@ cmdScaleCoord(w, arg, is_relative, is_x, scale) */ int -cmdParseCoord(w, arg, is_relative, is_x) - MagWindow *w; - char *arg; - bool is_relative, is_x; +cmdParseCoord( + MagWindow *w, + char *arg, + bool is_relative, + bool is_x) { return cmdScaleCoord(w, arg, is_relative, is_x, 1); } @@ -257,7 +259,7 @@ cmdParseCoord(w, arg, is_relative, is_x) */ void -CmdInit() +CmdInit(void) { TTMaskZero(&CmdYMLabel); TTMaskSetType(&CmdYMLabel, L_LABEL); @@ -291,9 +293,9 @@ CmdInit() */ void -cmdFlushCell(def, force_deref) - CellDef *def; - bool force_deref; +cmdFlushCell( + CellDef *def, + bool force_deref) { CellUse *parentUse; @@ -373,9 +375,9 @@ cmdFlushCell(def, force_deref) */ bool -CmdParseLayers(s, mask) - char *s; - TileTypeBitMask *mask; +CmdParseLayers( + char *s, + TileTypeBitMask *mask) { TileTypeBitMask newmask, tempmask; char *dp, c; @@ -547,8 +549,8 @@ printTypes: */ TileType -cmdMaskToType(mask) - TileTypeBitMask *mask; +cmdMaskToType( + TileTypeBitMask *mask) { TileType type, t; @@ -593,16 +595,16 @@ cmdMaskToType(mask) */ void -cmdSaveCell(cellDef, newName, noninteractive, tryRename) - CellDef *cellDef; /* Pointer to def of cell to be saved */ - char *newName; /* Pointer to name of file in which cell is to be +cmdSaveCell( + CellDef *cellDef, /* Pointer to def of cell to be saved */ + char *newName, /* Pointer to name of file in which cell is to be * saved. May be NULL, in which case the name from * the CellDef is taken. */ - bool noninteractive;/* If true, try hard but don't ask the user + bool noninteractive,/* If true, try hard but don't ask the user * questions. */ - bool tryRename; /* We should rename the cell to the name of the + bool tryRename) /* We should rename the cell to the name of the * place where it was saved. */ { @@ -712,11 +714,11 @@ cleanup: */ char * -cmdCheckNewName(def, newName, tryRename, noninteractive) - CellDef *def; - char *newName; - bool tryRename; - bool noninteractive; +cmdCheckNewName( + CellDef *def, + char *newName, + bool tryRename, + bool noninteractive) { static char *yesno[] = { "no", "yes", 0 }; char *filename; @@ -803,10 +805,10 @@ again: */ static char * -nameEllipsis(name, maxlen, prefix) - char *name; - int maxlen; - char **prefix; +nameEllipsis( + char *name, + int maxlen, + char **prefix) { int l = strlen(name); @@ -846,9 +848,9 @@ nameEllipsis(name, maxlen, prefix) */ int -cmdSaveWindSet(window, def) - MagWindow *window; - CellDef *def; +cmdSaveWindSet( + MagWindow *window, + CellDef *def) { char caption[200]; CellDef *rootDef; @@ -900,9 +902,9 @@ static CellDef *newRootDef; /* Pointer to root def of window in which */ void -CmdSetWindCaption(newEditUse, rootDef) - CellUse *newEditUse; /* Pointer to new edit cell use */ - CellDef *rootDef; /* Root cell def of the window in which the +CmdSetWindCaption( + CellUse *newEditUse, /* Pointer to new edit cell use */ + CellDef *rootDef) /* Root cell def of the window in which the * edit cell was selected. */ { @@ -941,8 +943,8 @@ CmdSetWindCaption(newEditUse, rootDef) */ int -cmdWindSet(window) - MagWindow *window; +cmdWindSet( + MagWindow *window) { char caption[200]; CellDef *wDef; @@ -998,9 +1000,9 @@ cmdWindSet(window) */ MagWindow * -CmdGetRootPoint(point, rect) - Point *point; - Rect *rect; +CmdGetRootPoint( + Point *point, + Rect *rect) { MagWindow *window; @@ -1033,9 +1035,9 @@ CmdGetRootPoint(point, rect) */ MagWindow * -CmdGetEditPoint(point, rect) - Point *point; - Rect *rect; +CmdGetEditPoint( + Point *point, + Rect *rect) { MagWindow *window; Rect rootRect; @@ -1070,7 +1072,7 @@ CmdGetEditPoint(point, rect) */ bool -CmdWarnWrite() +CmdWarnWrite(void) { int count, code; int cmdWarnWriteFunc(); @@ -1092,9 +1094,9 @@ CmdWarnWrite() } int -cmdWarnWriteFunc(cellDef, pcount) - CellDef *cellDef; - int *pcount; +cmdWarnWriteFunc( + CellDef *cellDef, + int *pcount) { if ((cellDef->cd_flags & CDINTERNAL) == 0) (*pcount)++; @@ -1118,10 +1120,10 @@ cmdWarnWriteFunc(cellDef, pcount) */ void -cmdExpandOneLevel(cu, bitmask, expand) - CellUse *cu; - int bitmask; - bool expand; +cmdExpandOneLevel( + CellUse *cu, + int bitmask, + bool expand) { extern int cmdExpand1func(); @@ -1134,9 +1136,9 @@ cmdExpandOneLevel(cu, bitmask, expand) } int -cmdExpand1func(cu, bitmask) - CellUse *cu; - ClientData bitmask; +cmdExpand1func( + CellUse *cu, + ClientData bitmask) { DBExpand(cu, (int) bitmask, FALSE); return 0; @@ -1166,8 +1168,8 @@ Transform *cmdSelTrans; /* Shared between CmdGetSelectedCell and */ CellUse * -CmdGetSelectedCell(pTrans) - Transform *pTrans; /* If non-NULL, transform from selected +CmdGetSelectedCell( + Transform *pTrans) /* If non-NULL, transform from selected * cell to root coords is stored here. */ { @@ -1182,11 +1184,11 @@ CmdGetSelectedCell(pTrans) /* ARGSUSED */ int -cmdGetSelFunc(selUse, realUse, transform, pResult) - CellUse *selUse; /* Not used. */ - CellUse *realUse; /* The first selected use. */ - Transform *transform; /* Transform from coords of realUse to root. */ - CellUse **pResult; /* Store realUse here. */ +cmdGetSelFunc( + CellUse *selUse, /* Not used. */ + CellUse *realUse, /* The first selected use. */ + Transform *transform, /* Transform from coords of realUse to root. */ + CellUse **pResult) /* Store realUse here. */ { *pResult = realUse; if (cmdSelTrans != NULL) @@ -1214,10 +1216,10 @@ cmdGetSelFunc(selUse, realUse, transform, pResult) */ bool -CmdIllegalChars(string, illegal, msg) - char *string; /* String to check for illegal chars. */ - char *illegal; /* String containing illegal chars. */ - char *msg; /* String identifying what string is +CmdIllegalChars( + char *string, /* String to check for illegal chars. */ + char *illegal, /* String containing illegal chars. */ + char *msg) /* String identifying what string is * supposed to represent, for ease in * printing error messages. */ diff --git a/commands/CmdTZ.c b/commands/CmdTZ.c index 8f8681ef..c77afa7f 100644 --- a/commands/CmdTZ.c +++ b/commands/CmdTZ.c @@ -62,8 +62,8 @@ extern void DisplayWindow(); /* Trivial function that returns 1 if called */ int -existFunc(tile) - Tile *tile; +existFunc( + Tile *tile) { return 1; } @@ -82,9 +82,9 @@ existFunc(tile) */ int -checkForPaintFunc(cellDef, arg) - CellDef *cellDef; - ClientData arg; +checkForPaintFunc( + CellDef *cellDef, + ClientData arg) { int numPlanes = *((int *)arg); int pNum, result; @@ -121,7 +121,7 @@ checkForPaintFunc(cellDef, arg) */ bool -CmdCheckForPaintFunc() +CmdCheckForPaintFunc(void) { if (DBCellSrDefs(0, checkForPaintFunc, (ClientData)&DBNumPlanes)) return TRUE; @@ -165,9 +165,9 @@ CmdCheckForPaintFunc() #define TECH_REVERT 11 void -CmdTech(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Info about command options. */ +CmdTech( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Info about command options. */ { int option, action, i, locargc; char **msg; @@ -655,9 +655,9 @@ usage2: */ void -CmdTool(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Info about command options. */ +CmdTool( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Info about command options. */ { if (cmd->tx_argc == 1) { @@ -697,9 +697,9 @@ CmdTool(w, cmd) */ void -CmdUnexpand(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdUnexpand( + MagWindow *w, + TxCommand *cmd) { int windowMask, boxMask; Rect rootRect; @@ -735,9 +735,9 @@ CmdUnexpand(w, cmd) */ int -cmdUnexpandFunc(use, windowMask) - CellUse *use; /* Use that was just unexpanded. */ - int windowMask; /* Window where it was unexpanded. */ +cmdUnexpandFunc( + CellUse *use, /* Use that was just unexpanded. */ + int windowMask) /* Window where it was unexpanded. */ { if (use->cu_parent == NULL) return 0; DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask, @@ -766,9 +766,9 @@ cmdUnexpandFunc(use, windowMask) */ void -CmdUpsidedown(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdUpsidedown( + MagWindow *w, + TxCommand *cmd) { Transform trans; Rect rootBox, bbox; @@ -830,9 +830,10 @@ struct linked_id { }; -int cmdWhatPrintCell(tile, cxp) - Tile *tile; - TreeContext *cxp; +int +cmdWhatPrintCell( + Tile *tile, + TreeContext *cxp) { struct linked_id **lid = (struct linked_id **)cxp->tc_filter->tf_arg; struct linked_id *curlid = *lid; @@ -884,7 +885,9 @@ static LabelStore *labelBlockTop, *labelEntry; */ int -cmdFindWhatTileFunc(Tile *tile, ClientData clientData) +cmdFindWhatTileFunc( + Tile *tile, + ClientData clientData) { struct linked_id **lid = (struct linked_id **)clientData; SearchContext scx; @@ -930,9 +933,9 @@ cmdFindWhatTileFunc(Tile *tile, ClientData clientData) */ void -CmdWhat(w, cmd) - MagWindow *w; /* Window in which command was invoked. */ - TxCommand *cmd; /* Information about the command. */ +CmdWhat( + MagWindow *w, /* Window in which command was invoked. */ + TxCommand *cmd) /* Information about the command. */ { int i, locargc; bool foundAny, editNull = FALSE; @@ -1199,10 +1202,10 @@ CmdWhat(w, cmd) /*ARGSUSED*/ int -cmdWhatPaintFunc(rect, type, mask) - Rect *rect; /* Not used. */ - TileType type; /* Type of this piece of paint. */ - TileTypeBitMask *mask; /* Place to OR in type's bit. */ +cmdWhatPaintFunc( + Rect *rect, /* Not used. */ + TileType type, /* Type of this piece of paint. */ + TileTypeBitMask *mask) /* Place to OR in type's bit. */ { if (type & TT_DIAGONAL) type = (type & TT_SIDE) ? (type & TT_RIGHTMASK) >> 14 : @@ -1217,11 +1220,11 @@ cmdWhatPaintFunc(rect, type, mask) /*ARGSUSED*/ int -cmdWhatLabelPreFunc(label, cellUse, transform, foundAny) - Label *label; /* Label that's selected. */ - CellUse *cellUse; /* Cell use containing label. */ - Transform *transform; /* Not used. */ - bool *foundAny; /* Use to print extra stuff for the first +cmdWhatLabelPreFunc( + Label *label, /* Label that's selected. */ + CellUse *cellUse, /* Cell use containing label. */ + Transform *transform, /* Not used. */ + bool *foundAny) /* Use to print extra stuff for the first * label found. */ { @@ -1261,9 +1264,9 @@ cmdWhatLabelPreFunc(label, cellUse, transform, foundAny) int -cmdWhatLabelFunc(entry, foundAny) - LabelStore *entry; /* stored pointers to label info*/ - bool *foundAny; /* Use to print extra stuff for the first +cmdWhatLabelFunc( + LabelStore *entry, /* stored pointers to label info*/ + bool *foundAny) /* Use to print extra stuff for the first * label found. */ { @@ -1313,9 +1316,9 @@ cmdWhatLabelFunc(entry, foundAny) /* they are sorted by label name, then cell name, then attached material */ /* that way all of identical names are grouped together */ int -orderLabelFunc(one, two) - LabelStore *one; /* one of the labels being compared */ - LabelStore *two; /* the other label to compare with */ +orderLabelFunc( + LabelStore *one, /* one of the labels being compared */ + LabelStore *two) /* the other label to compare with */ { int i; @@ -1335,11 +1338,11 @@ orderLabelFunc(one, two) /*ARGSUSED*/ int -cmdWhatCellFunc(selUse, realUse, transform, foundAny) - CellUse *selUse; /* Not used. */ - CellUse *realUse; /* Selected cell use. */ - Transform *transform; /* Not used. */ - bool *foundAny; /* Used to print extra stuff for the first +cmdWhatCellFunc( + CellUse *selUse, /* Not used. */ + CellUse *realUse, /* Selected cell use. */ + Transform *transform, /* Not used. */ + bool *foundAny) /* Used to print extra stuff for the first * use found. */ { @@ -1361,11 +1364,11 @@ cmdWhatCellFunc(selUse, realUse, transform, foundAny) /* Same search function as above, but appends use names to a Tcl list */ int -cmdWhatCellListFunc(selUse, realUse, transform, newobj) - CellUse *selUse; /* Not used. */ - CellUse *realUse; /* Selected cell use. */ - Transform *transform; /* Not used. */ - Tcl_Obj *newobj; /* Tcl list object holding use names */ +cmdWhatCellListFunc( + CellUse *selUse, /* Not used. */ + CellUse *realUse, /* Selected cell use. */ + Transform *transform, /* Not used. */ + Tcl_Obj *newobj) /* Tcl list object holding use names */ { Tcl_Obj *tuple; /* Forward reference */ @@ -1416,9 +1419,9 @@ cmdWhatCellListFunc(selUse, realUse, transform, newobj) #define SEGMENT 11 void -CmdWire(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdWire( + MagWindow *w, + TxCommand *cmd) { int option, locargc; char **msg, *lastargv; @@ -1854,9 +1857,9 @@ CmdWire(w, cmd) #define OPT_WRITEALL_MODIFIED 1 void -CmdWriteall(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdWriteall( + MagWindow *w, + TxCommand *cmd) { int cmdWriteallFunc(); int option = -1; @@ -1911,11 +1914,11 @@ CmdWriteall(w, cmd) /*ARGSUSED*/ int -cmdWriteallFunc(def, cmd) - CellDef *def; /* Pointer to CellDef to be saved. This def might +cmdWriteallFunc( + CellDef *def, /* Pointer to CellDef to be saved. This def might * be an internal buffer; if so, we ignore it. */ - TxCommand *cmd; /* Client data passed to DBCellSrDefs, a pointer + TxCommand *cmd) /* Client data passed to DBCellSrDefs, a pointer * to the command structure. If cmd->tx_argc == 1, * then prompt for each action. If cmd->tx_argc * == 2, then write all cells without asking. If @@ -2014,9 +2017,9 @@ cmdWriteallFunc(def, cmd) */ void -CmdXload(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdXload( + MagWindow *w, + TxCommand *cmd) { windCheckOnlyWindow(&w, DBWclientID); if (w == (MagWindow *) NULL) @@ -2062,9 +2065,9 @@ CmdXload(w, cmd) */ void -CmdXor(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdXor( + MagWindow *w, + TxCommand *cmd) { int rval, xMask; bool dolabels; diff --git a/commands/CmdWizard.c b/commands/CmdWizard.c index b66d8828..337f6f85 100644 --- a/commands/CmdWizard.c +++ b/commands/CmdWizard.c @@ -79,9 +79,9 @@ void cmdStatsHier(CellDef *, int, CellDef *); */ void -CmdCoord(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdCoord( + MagWindow *w, + TxCommand *cmd) { MagWindow *pointW = (MagWindow *) NULL; Rect editRect, rootRect; @@ -181,9 +181,9 @@ CmdCoord(w, cmd) #ifndef NO_EXT void -CmdExtractTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdExtractTest( + MagWindow *w, + TxCommand *cmd) { ExtractTest(w, cmd); } @@ -212,9 +212,9 @@ CmdExtractTest(w, cmd) */ void -showTech(outf, verbose) - FILE *outf; /* File to which information is to be output */ - bool verbose; /* If TRUE, output detailed erase table */ +showTech( + FILE *outf, /* File to which information is to be output */ + bool verbose) /* If TRUE, output detailed erase table */ { int i, j; int pNum; @@ -359,9 +359,9 @@ showTech(outf, verbose) } void -CmdShowtech(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdShowtech( + MagWindow *w, + TxCommand *cmd) { FILE *outf; bool verbose; @@ -427,9 +427,9 @@ CmdShowtech(w, cmd) */ void -CmdTilestats(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdTilestats( + MagWindow *w, + TxCommand *cmd) { CellUse *selectedUse; FILE *outf = stdout; @@ -511,9 +511,9 @@ int totalTiles[TT_MAXTYPES]; */ int -cmdStatsFunc(def, outf) - CellDef *def; - FILE *outf; +cmdStatsFunc( + CellDef *def, + FILE *outf) { int cmdStatsCount(), cmdStatsOutput(); struct countClient cc; @@ -564,9 +564,9 @@ cmdStatsFunc(def, outf) */ int -cmdStatsCount(def, cc) - CellDef *def; - struct countClient *cc; +cmdStatsCount( + CellDef *def, + struct countClient *cc) { int cmdStatsCountTile(); int pNum; @@ -595,9 +595,9 @@ cmdStatsCount(def, cc) } int -cmdStatsCountTile(tile, ci) - Tile *tile; - struct cellInfo *ci; +cmdStatsCountTile( + Tile *tile, + struct cellInfo *ci) { TileType type = TiGetType(tile); @@ -638,9 +638,10 @@ cmdStatsCountTile(tile, ci) */ void -cmdStatsHier(parent, nuses, child) - CellDef *parent, *child; - int nuses; +cmdStatsHier( + CellDef *parent, + int nuses, + CellDef *child) { struct cellInfo *pi, *ci; TileType t; @@ -685,9 +686,9 @@ cmdStatsHier(parent, nuses, child) */ int -cmdStatsOutput(def, cc) - CellDef *def; - struct countClient *cc; +cmdStatsOutput( + CellDef *def, + struct countClient *cc) { TileType t; struct cellInfo *ci; @@ -750,9 +751,9 @@ cmdStatsOutput(def, cc) */ void -CmdPsearch(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPsearch( + MagWindow *w, + TxCommand *cmd) { char *RunStats(); static struct tms tlast, tdelta; @@ -816,10 +817,11 @@ CmdPsearch(w, cmd) } void -cmdPsearchStats(str, tl, td, count) - char *str; - struct tms *tl, *td; - int count; +cmdPsearchStats( + char *str, + struct tms *tl, + struct tms *td, + int count) { char *RunStats(); char *rstatp; @@ -861,9 +863,9 @@ int numTilesFound; bool cmdTsearchDebug = FALSE; void -CmdTsearch(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdTsearch( + MagWindow *w, + TxCommand *cmd) { int cmdTsrFunc(); char *RunStats(), *rstatp; @@ -973,8 +975,8 @@ CmdTsearch(w, cmd) } int -cmdTsrFunc(tp) - Tile *tp; +cmdTsrFunc( + Tile *tp) { if (cmdTsearchDebug) TxPrintf("%lx\n", (intmax_t) tp); @@ -1000,9 +1002,9 @@ cmdTsrFunc(tp) */ void -CmdWatch(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdWatch( + MagWindow *w, + TxCommand *cmd) { DBWclientRec *crec; int pNum;