K&R commands/*.c: bulk function implementation conversion

Argument order and type declaration mismatches:

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

This warrants inspection at call site CmdLQ.c:1712 as both types are bool
is it not so straightforward to check.

It looks like when PORT_MAKE is the option 'port make [index] [dir...]'
  port=FALSE is this the correct intention ?  This looks ok in that
 we're searching for labels to make (upgrade) into ports.
Where as all other 'port ....' commands are operating on items that are
 already ports, and ignoring labels.
So the K&R argument name order is also how the call-sites are using it.

void
cmdStatsHier(parent, nuses, child)
    CellDef *parent, *child;
    int nuses;

This was checked and found ok as callback to ../database/DBcount.c
DBTreeCountPaint(... hiercount, ...)

Due to this not-obvious K&R style also being used in the documentation
this was changed as well (in another commit0.

K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
Darryl L. Miles 2024-10-04 12:03:23 +01:00 committed by Tim Edwards
parent 8a4464f443
commit b3d4ab7980
10 changed files with 586 additions and 571 deletions

View File

@ -70,9 +70,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
/*ARGSUSED*/ /*ARGSUSED*/
void void
CmdAddPath( w, cmd ) CmdAddPath(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
if (cmd->tx_argc != 2) { if (cmd->tx_argc != 2) {
TxError("Usage: %s appended_search_path\n", cmd->tx_argv[0]); TxError("Usage: %s appended_search_path\n", cmd->tx_argv[0]);
@ -130,9 +130,9 @@ typedef struct LA1
#define ARRAY_DEFAULT 6 #define ARRAY_DEFAULT 6
void void
CmdArray(w, cmd) CmdArray(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
static char *cmdArrayOption[] = { static char *cmdArrayOption[] = {
"count [[xlo] xhi [ylo] yhi] array subcells", "count [[xlo] xhi [ylo] yhi] array subcells",
@ -480,11 +480,11 @@ freelist:
*/ */
int int
selGetArrayFunc(selUse, use, trans, arg) selGetArrayFunc(
CellUse *selUse; CellUse *selUse,
CellUse *use; CellUse *use,
Transform *trans; Transform *trans,
LinkedArray **arg; LinkedArray **arg)
{ {
/* Check "use" for array information and pass this to arrayInfo */ /* Check "use" for array information and pass this to arrayInfo */
@ -593,9 +593,9 @@ selGetArrayFunc(selUse, use, trans, arg)
#define BOX_DEFAULT 13 #define BOX_DEFAULT 13
void void
CmdBox(w, cmd) CmdBox(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
static char *cmdBoxOption[] = { static char *cmdBoxOption[] = {
"width [value] set or return box width", "width [value] set or return box width",

View File

@ -48,9 +48,9 @@
*/ */
void void
CmdAutoExtToSim(w, cmd) CmdAutoExtToSim(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int result; int result;
@ -83,9 +83,9 @@ CmdAutoExtToSim(w, cmd)
*/ */
void void
CmdAutoExtToSpice(w, cmd) CmdAutoExtToSpice(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int result; int result;
@ -119,9 +119,9 @@ CmdAutoExtToSpice(w, cmd)
*/ */
void void
CmdAutoRoute(w, cmd) CmdAutoRoute(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int result; int result;
@ -154,9 +154,9 @@ CmdAutoRoute(w, cmd)
*/ */
void void
CmdAutoPlot(w, cmd) CmdAutoPlot(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int result; int result;
@ -189,9 +189,9 @@ CmdAutoPlot(w, cmd)
*/ */
void void
CmdAutoLef(w, cmd) CmdAutoLef(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int result; int result;

View File

@ -125,9 +125,9 @@ bool cmdDumpParseArgs();
#define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */ #define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */
void void
CmdCalma(w, cmd) CmdCalma(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option, ext, value; int option, ext, value;
char **msg, *namep, *dotptr; char **msg, *namep, *dotptr;
@ -1101,9 +1101,9 @@ outputCalma:
/* ARGSUSED */ /* ARGSUSED */
void void
CmdCellname(w, cmd) CmdCellname(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
bool is_cellname; bool is_cellname;
bool dolist = FALSE; bool dolist = FALSE;
@ -1710,9 +1710,9 @@ badusage:
#define CIF_WARN_HELP CIF_WARN_END /* undefined by CIF module */ #define CIF_WARN_HELP CIF_WARN_END /* undefined by CIF module */
void void
CmdCif(w, cmd) CmdCif(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option, yesno; int option, yesno;
char **msg, *namep; char **msg, *namep;
@ -2263,9 +2263,9 @@ CmdCif(w, cmd)
*/ */
void void
CmdClockwise(w, cmd) CmdClockwise(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform trans, t2; Transform trans, t2;
int degrees, locargc; int degrees, locargc;
@ -2378,9 +2378,9 @@ typedef struct CCS
} CCStruct; } CCStruct;
void void
CmdContact(w, cmd) CmdContact(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
TileType type, rtype, ctype; TileType type, rtype, ctype;
TileTypeBitMask *rmask, smask; TileTypeBitMask *rmask, smask;
@ -2516,9 +2516,9 @@ CmdContact(w, cmd)
*/ */
int int
cmdContactFunc(tile, ccs) cmdContactFunc(
Tile *tile; Tile *tile,
CCStruct *ccs; CCStruct *ccs)
{ {
TileType stype; TileType stype;
TileTypeBitMask smask; TileTypeBitMask smask;
@ -2538,9 +2538,9 @@ cmdContactFunc(tile, ccs)
} }
int int
cmdContactFunc2(tile, ccs) cmdContactFunc2(
Tile *tile; Tile *tile,
CCStruct *ccs; CCStruct *ccs)
{ {
LinkedRect *newlr; LinkedRect *newlr;
Rect area; Rect area;
@ -2560,9 +2560,9 @@ cmdContactFunc2(tile, ccs)
*/ */
int int
cmdContactEraseFunc(tile, lr) cmdContactEraseFunc(
Tile *tile; Tile *tile,
LinkedRect **lr; LinkedRect **lr)
{ {
LinkedRect *newlr; LinkedRect *newlr;
Rect area; Rect area;
@ -2598,9 +2598,9 @@ cmdContactEraseFunc(tile, lr)
*/ */
void void
CmdCopy(w, cmd) CmdCopy(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform t; Transform t;
Rect rootBox, newBox; Rect rootBox, newBox;
@ -2808,9 +2808,9 @@ typedef struct nmcornerpath
} NMCornerPath; } NMCornerPath;
void void
CmdCorner(w, cmd) CmdCorner(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Describes the command that was invoked. */ TxCommand *cmd) /* Describes the command that was invoked. */
{ {
TileTypeBitMask maskBits; TileTypeBitMask maskBits;
Rect editBox; Rect editBox;
@ -3005,9 +3005,9 @@ CmdCorner(w, cmd)
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
int int
cmdCornerFunc(tile, cxp) cmdCornerFunc(
Tile *tile; /* Tile to fill with. */ Tile *tile, /* Tile to fill with. */
TreeContext *cxp; /* Describes state of search. */ TreeContext *cxp) /* Describes state of search. */
{ {
Rect r1, r2, r3; Rect r1, r2, r3;
struct cmdCornerArea *cca; struct cmdCornerArea *cca;
@ -3140,7 +3140,8 @@ cmdCornerFunc(tile, cxp)
*/ */
void void
AddNewPoint(CIFPath **pathhead) AddNewPoint(
CIFPath **pathhead)
{ {
CIFPath *newpoint; CIFPath *newpoint;
@ -3170,9 +3171,9 @@ AddNewPoint(CIFPath **pathhead)
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
int int
cmdBevelFunc(tile, cxp) cmdBevelFunc(
Tile *tile; /* Tile to fill with. */ Tile *tile, /* Tile to fill with. */
TreeContext *cxp; /* Describes state of search. */ TreeContext *cxp) /* Describes state of search. */
{ {
Rect r1, r2, r3; Rect r1, r2, r3;
CIFPathList *cpl; CIFPathList *cpl;
@ -3680,9 +3681,9 @@ cmdBevelFunc(tile, cxp)
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
void void
CmdCrash(w, cmd) CmdCrash(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option = -1; int option = -1;
char *filename = NULL; char *filename = NULL;
@ -3730,9 +3731,9 @@ CmdCrash(w, cmd)
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
void void
CmdCrosshair(w, cmd) CmdCrosshair(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Point pos; Point pos;
@ -3783,9 +3784,9 @@ CmdCrosshair(w, cmd)
*/ */
void void
CmdDelete(w, cmd) CmdDelete(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
if (cmd->tx_argc != 1) goto badusage; if (cmd->tx_argc != 1) goto badusage;
if (!ToolGetEditBox((Rect *)NULL)) return; if (!ToolGetEditBox((Rect *)NULL)) return;
@ -3826,9 +3827,9 @@ CmdDelete(w, cmd)
static bool cmdFoundNewDown; static bool cmdFoundNewDown;
void void
CmdDown(w, cmd) CmdDown(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellUse *use = NULL; CellUse *use = NULL;
Rect area, pointArea; Rect area, pointArea;
@ -3908,13 +3909,13 @@ CmdDown(w, cmd)
/* ARGSUSED */ /* ARGSUSED */
int int
cmdDownEnumFunc(selUse, use, transform, area) cmdDownEnumFunc(
CellUse *selUse; /* Use from selection (not used). */ CellUse *selUse, /* Use from selection (not used). */
CellUse *use; /* Use from layout that corresponds to CellUse *use, /* Use from layout that corresponds to
* selUse (could be an array!). * selUse (could be an array!).
*/ */
Transform *transform; /* Transform from use->cu_def to root coords. */ Transform *transform, /* Transform from use->cu_def to root coords. */
Rect *area; /* We're looking for a use containing this Rect *area) /* We're looking for a use containing this
* area, in root coords. * area, in root coords.
*/ */
{ {
@ -3982,9 +3983,9 @@ cmdDownEnumFunc(selUse, use, transform, area)
#define WHY 18 #define WHY 18
void void
CmdDrc(w, cmd) CmdDrc(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
FILE * fp; FILE * fp;
static int drc_nth = 1; static int drc_nth = 1;
@ -4544,9 +4545,10 @@ CmdDrc(w, cmd)
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
int cmdDropPaintCell(tile, cxp) int
Tile *tile; cmdDropPaintCell(
TreeContext *cxp; Tile *tile,
TreeContext *cxp)
{ {
CellDef *cellDef = cxp->tc_scx->scx_use->cu_def; CellDef *cellDef = cxp->tc_scx->scx_use->cu_def;
TileTypeBitMask *lMask = (TileTypeBitMask *)cxp->tc_filter->tf_arg; TileTypeBitMask *lMask = (TileTypeBitMask *)cxp->tc_filter->tf_arg;
@ -4585,7 +4587,9 @@ int cmdDropPaintCell(tile, cxp)
*/ */
int int
cmdDropFunc(Tile *tile, ClientData clientData) cmdDropFunc(
Tile *tile,
ClientData clientData)
{ {
TileTypeBitMask tMask, *lMask = (TileTypeBitMask *)clientData; TileTypeBitMask tMask, *lMask = (TileTypeBitMask *)clientData;
SearchContext scx; SearchContext scx;
@ -4619,10 +4623,10 @@ cmdDropFunc(Tile *tile, ClientData clientData)
*/ */
int int
cmdDropPaintFunc(rect, type, mask) cmdDropPaintFunc(
Rect *rect; /* Not used. */ Rect *rect, /* Not used. */
TileType type; /* Type of this piece of paint. */ TileType type, /* Type of this piece of paint. */
TileTypeBitMask *mask; /* Place to OR in type's bit. */ TileTypeBitMask *mask) /* Place to OR in type's bit. */
{ {
if (type & TT_DIAGONAL) if (type & TT_DIAGONAL)
type = (type & TT_SIDE) ? (type & TT_RIGHTMASK) >> 14 : type = (type & TT_SIDE) ? (type & TT_RIGHTMASK) >> 14 :
@ -4680,9 +4684,9 @@ cmdDropPaintFunc(rect, type, mask)
*/ */
void void
CmdDrop(w, cmd) CmdDrop(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
TileType i; TileType i;
TileTypeBitMask lMask, tMask; TileTypeBitMask lMask, tMask;
@ -4765,9 +4769,9 @@ CmdDrop(w, cmd)
*/ */
void void
CmdDump(w, cmd) CmdDump(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Describes command arguments. */ TxCommand *cmd) /* Describes command arguments. */
{ {
SearchContext scx; SearchContext scx;
CellUse dummy; CellUse dummy;
@ -4803,12 +4807,12 @@ CmdDump(w, cmd)
/*ARGSUSED*/ /*ARGSUSED*/
bool bool
cmdDumpParseArgs(cmdName, w, cmd, dummy, scx) cmdDumpParseArgs(
char *cmdName; /* Either "dump" or "getcell" */ char *cmdName, /* Either "dump" or "getcell" */
MagWindow *w; /* Window in which command was invoked (UNUSED) */ MagWindow *w, /* Window in which command was invoked (UNUSED) */
TxCommand *cmd; /* Arguments to command */ TxCommand *cmd, /* Arguments to command */
CellUse *dummy; /* Filled in to point to cell mentioned in command */ CellUse *dummy, /* Filled in to point to cell mentioned in command */
SearchContext *scx; /* Filled in with the transform from the child cell's SearchContext *scx) /* Filled in with the transform from the child cell's
* def to ROOT coordinates, the bounding box of the * def to ROOT coordinates, the bounding box of the
* child cell in child cell coordinates, and with * child cell in child cell coordinates, and with
* scx_use = dummy, where dummy->cu_def is the child * scx_use = dummy, where dummy->cu_def is the child
@ -5304,11 +5308,11 @@ usage:
/* ARGSUSED */ /* ARGSUSED */
int int
cmdDumpFunc(rect, name, label, point) cmdDumpFunc(
Rect *rect; /* Root coordinates of the label. */ Rect *rect, /* Root coordinates of the label. */
char *name; /* Label name (not used). */ char *name, /* Label name (not used). */
Label *label; /* Pointer to label (not used). */ Label *label, /* Pointer to label (not used). */
Point *point; /* Place to store label's lower-left. */ Point *point) /* Place to store label's lower-left. */
{ {
*point = rect->r_ll; *point = rect->r_ll;
return 1; return 1;

View File

@ -79,9 +79,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
static bool cmdFoundNewEdit; static bool cmdFoundNewEdit;
void void
CmdEdit(w, cmd) CmdEdit(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Rect area, pointArea; Rect area, pointArea;
CellUse *usave, *use = NULL; CellUse *usave, *use = NULL;
@ -197,9 +197,9 @@ CmdEdit(w, cmd)
*/ */
int int
cmdEditRedisplayFunc(w, area) cmdEditRedisplayFunc(
MagWindow *w; /* Window containing edit cell. */ MagWindow *w, /* Window containing edit cell. */
Rect *area; /* Area to be redisplayed. */ Rect *area) /* Area to be redisplayed. */
{ {
static Rect origin = {{-1, -1}, {1, 1}}; static Rect origin = {{-1, -1}, {1, 1}};
Rect tmp; Rect tmp;
@ -226,13 +226,13 @@ cmdEditRedisplayFunc(w, area)
*/ */
int int
cmdEditEnumFunc(selUse, use, transform, area) cmdEditEnumFunc(
CellUse *selUse; /* Use from selection (not used). */ CellUse *selUse, /* Use from selection (not used). */
CellUse *use; /* Use from layout that corresponds to CellUse *use, /* Use from layout that corresponds to
* selUse (could be an array!). * selUse (could be an array!).
*/ */
Transform *transform; /* Transform from use->cu_def to root coords. */ Transform *transform, /* Transform from use->cu_def to root coords. */
Rect *area; /* We're looking for a use containing this Rect *area) /* We're looking for a use containing this
* area, in root coords. * area, in root coords.
*/ */
{ {
@ -305,9 +305,9 @@ cmdEditEnumFunc(selUse, use, transform, area)
#define OPTION_FLAGS 3 #define OPTION_FLAGS 3
void void
CmdElement(w, cmd) CmdElement(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option, type; int option, type;
@ -627,9 +627,9 @@ static CellUse *cmdEraseCells[MAXCELLS];
static int cmdEraseCount; static int cmdEraseCount;
void void
CmdErase(w, cmd) CmdErase(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Rect editRect, areaReturn; Rect editRect, areaReturn;
TileTypeBitMask mask, errorLayersForErasure, activeLayersForErasure; TileTypeBitMask mask, errorLayersForErasure, activeLayersForErasure;
@ -759,9 +759,9 @@ CmdErase(w, cmd)
} }
int int
cmdEraseCellsFunc(scx, cdarg) cmdEraseCellsFunc(
SearchContext *scx; /* Indicates cell found. */ SearchContext *scx, /* Indicates cell found. */
ClientData cdarg; /* Not used. */ ClientData cdarg) /* Not used. */
{ {
/* All this procedure does is to remember cells that are /* All this procedure does is to remember cells that are
* found, up to MAXCELLS of them. * found, up to MAXCELLS of them.
@ -797,9 +797,9 @@ ClientData cdarg; /* Not used. */
*/ */
void void
CmdExpand(w, cmd) CmdExpand(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int windowMask, boxMask, d; int windowMask, boxMask, d;
Rect rootRect; Rect rootRect;
@ -869,9 +869,9 @@ CmdExpand(w, cmd)
*/ */
int int
cmdExpandFunc(use, windowMask) cmdExpandFunc(
CellUse *use; /* Use that was just expanded. */ CellUse *use, /* Use that was just expanded. */
int windowMask; /* Window where it was expanded. */ int windowMask) /* Window where it was expanded. */
{ {
if (use->cu_parent == NULL) return 0; if (use->cu_parent == NULL) return 0;
DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask, DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask,
@ -941,9 +941,9 @@ cmdExpandFunc(use, windowMask)
#define UNIQNOTOPPORTS 3 #define UNIQNOTOPPORTS 3
void void
CmdExtract(w, cmd) CmdExtract(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
char **msg, *namep, *arg; char **msg, *namep, *arg;
int option, warn, len, n, all; int option, warn, len, n, all;

View File

@ -100,9 +100,9 @@ struct cmdFPArg
*/ */
int int
feedPolyFunc(tile, arg) feedPolyFunc(
Tile *tile; Tile *tile,
struct cmdFPArg *arg; struct cmdFPArg *arg)
{ {
Rect area; Rect area;
TiToRect(tile, &area); TiToRect(tile, &area);
@ -146,9 +146,9 @@ feedPolyFunc(tile, arg)
#define WHY 6 #define WHY 6
void void
CmdFeedback(w, cmd) CmdFeedback(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
static char *cmdFeedbackOptions[] = static char *cmdFeedbackOptions[] =
{ {
@ -505,9 +505,9 @@ Rect cmdFillRootBox; /* Root coords of box. */
struct cmdFillArea *cmdFillList; /* List of areas to fill. */ struct cmdFillArea *cmdFillList; /* List of areas to fill. */
void void
CmdFill(w, cmd) CmdFill(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Describes the command that was invoked. */ TxCommand *cmd) /* Describes the command that was invoked. */
{ {
TileTypeBitMask maskBits; TileTypeBitMask maskBits;
Rect editBox; Rect editBox;
@ -603,9 +603,9 @@ CmdFill(w, cmd)
*/ */
int int
cmdFillFunc(tile, cxp) cmdFillFunc(
Tile *tile; /* Tile to fill with. */ Tile *tile, /* Tile to fill with. */
TreeContext *cxp; /* Describes state of search. */ TreeContext *cxp) /* Describes state of search. */
{ {
Rect r1, r2; Rect r1, r2;
struct cmdFillArea *cfa; struct cmdFillArea *cfa;
@ -658,9 +658,9 @@ cmdFillFunc(tile, cxp)
*/ */
void void
CmdFindBox(w, cmd) CmdFindBox(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellDef *boxDef; CellDef *boxDef;
Rect box; Rect box;
@ -751,11 +751,12 @@ typedef struct _labsearchrec
} LabSearchRec; } LabSearchRec;
int cmdFindLabelFunc(rect, name, label, cdarg) int
Rect *rect; cmdFindLabelFunc(
char *name; Rect *rect,
Label *label; char *name,
LabSearchRec *cdarg; Label *label,
LabSearchRec *cdarg)
{ {
if (cdarg->lsr_occur == 0) if (cdarg->lsr_occur == 0)
{ {
@ -790,9 +791,9 @@ int cmdFindLabelFunc(rect, name, label, cdarg)
*/ */
void void
CmdFindLabel(w, cmd) CmdFindLabel(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellDef *boxDef; CellDef *boxDef;
CellUse *labUse; CellUse *labUse;
@ -889,11 +890,11 @@ usage:
*/ */
int int
dbListLabels(scx, label, tpath, cdarg) dbListLabels(
SearchContext *scx; SearchContext *scx,
Label *label; /* Pointer to label structure */ Label *label, /* Pointer to label structure */
TerminalPath *tpath; /* Full pathname of terminal */ TerminalPath *tpath, /* Full pathname of terminal */
ClientData cdarg; /* (unused) */ ClientData cdarg) /* (unused) */
{ {
char *n = tpath->tp_next; char *n = tpath->tp_next;
char c = *n; char c = *n;
@ -934,9 +935,9 @@ dbListLabels(scx, label, tpath, cdarg)
*/ */
void void
CmdFlush(w, cmd) CmdFlush(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellDef *def; CellDef *def;
int action; int action;
@ -1022,9 +1023,9 @@ CmdFlush(w, cmd)
*/ */
void void
CmdGetcell(w, cmd) CmdGetcell(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Describes command arguments. */ TxCommand *cmd) /* Describes command arguments. */
{ {
CellUse dummy, *newUse; CellUse dummy, *newUse;
Transform editTrans; Transform editTrans;
@ -1107,9 +1108,9 @@ CmdGetcell(w, cmd)
*/ */
void void
CmdGetnode(w, cmd) CmdGetnode(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
#define TBLSIZE 50 #define TBLSIZE 50
#define STRINGS 0 #define STRINGS 0
@ -1258,9 +1259,9 @@ badusage:
#define GRID_WHAT 7 #define GRID_WHAT 7
void void
CmdGrid(w, cmd) CmdGrid(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option, locargc; int option, locargc;
int xSpacing, ySpacing, xOrig, yOrig, multiple; int xSpacing, ySpacing, xOrig, yOrig, multiple;
@ -1426,9 +1427,9 @@ CmdGrid(w, cmd)
#ifdef USE_READLINE #ifdef USE_READLINE
void void
CmdHistory(w, cmd) CmdHistory(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int i; int i;
HIST_ENTRY *he; HIST_ENTRY *he;
@ -1507,9 +1508,9 @@ CmdHistory(w, cmd)
*/ */
void void
CmdIdentify(w, cmd) CmdIdentify(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
extern int cmdIdFunc(); /* Forward reference. */ extern int cmdIdFunc(); /* Forward reference. */
@ -1536,13 +1537,13 @@ CmdIdentify(w, cmd)
/* ARGSUSED */ /* ARGSUSED */
int int
cmdIdFunc(selUse, use, transform, newId) cmdIdFunc(
CellUse *selUse; /* Use from selection cell. */ CellUse *selUse, /* Use from selection cell. */
CellUse *use; /* Use from layout that corresponds to CellUse *use, /* Use from layout that corresponds to
* selUse. * selUse.
*/ */
Transform *transform; /* Not used. */ Transform *transform, /* Not used. */
char *newId; /* New id for cell use. */ char *newId) /* New id for cell use. */
{ {
if (EditCellUse == NULL) if (EditCellUse == NULL)
{ {
@ -1583,12 +1584,12 @@ cmdIdFunc(selUse, use, transform, newId)
} }
TileType TileType
CmdFindNetProc(nodename, use, rect, warn_not_found, isvalid) CmdFindNetProc(
char *nodename; char *nodename,
CellUse *use; CellUse *use,
Rect *rect; Rect *rect,
bool warn_not_found; bool warn_not_found,
bool *isvalid; bool *isvalid)
{ {
char *s,*s2; char *s,*s2;
SearchContext scx, scx2; SearchContext scx, scx2;
@ -1775,9 +1776,9 @@ checklocal:
*/ */
void void
CmdGoto(w, cmd) CmdGoto(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
char *s, *nodename = cmd->tx_argv[1]; char *s, *nodename = cmd->tx_argv[1];
Rect rect; Rect rect;
@ -1833,9 +1834,9 @@ CmdGoto(w, cmd)
*/ */
int int
findTile(tile, rtype) findTile(
Tile *tile; Tile *tile,
TileType *rtype; TileType *rtype)
{ {
TileType ttype; TileType ttype;
@ -1858,11 +1859,11 @@ findTile(tile, rtype)
*/ */
void void
FlatCopyAllLabels(scx, mask, xMask, targetUse) FlatCopyAllLabels(
SearchContext *scx; SearchContext *scx,
TileTypeBitMask *mask; TileTypeBitMask *mask,
int xMask; int xMask,
CellUse *targetUse; CellUse *targetUse)
{ {
int flatCopyAllLabels(); int flatCopyAllLabels();
char pathstring[FLATTERMSIZE]; char pathstring[FLATTERMSIZE];
@ -1877,11 +1878,11 @@ FlatCopyAllLabels(scx, mask, xMask, targetUse)
} }
int int
flatCopyAllLabels(scx, lab, tpath, targetUse) flatCopyAllLabels(
SearchContext *scx; SearchContext *scx,
Label *lab; Label *lab,
TerminalPath *tpath; TerminalPath *tpath,
CellUse *targetUse; CellUse *targetUse)
{ {
Rect labTargetRect; Rect labTargetRect;
int targetPos; int targetPos;
@ -1960,9 +1961,9 @@ flatCopyAllLabels(scx, lab, tpath, targetUse)
*/ */
void void
CmdFlatten(w, cmd) CmdFlatten(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int i, xMask, optargs; int i, xMask, optargs;
bool dolabels, dobox, toplabels, invert, doports, doinplace; bool dolabels, dobox, toplabels, invert, doports, doinplace;

View File

@ -84,18 +84,18 @@ extern bool FileLocking;
*/ */
void void
CmdLabelProc(text, font, size, rotate, offx, offy, pos, sticky, type) CmdLabelProc(
char *text; /* Text for label. */ char *text, /* Text for label. */
int font; /* Known font to use, or -1 for X11 fonts */ int font, /* Known font to use, or -1 for X11 fonts */
int size; /* Fixed size of font (invalid with X11 fonts) */ int size, /* Fixed size of font (invalid with X11 fonts) */
int rotate; /* Rotation (invalid with X11 fonts) */ int rotate, /* Rotation (invalid with X11 fonts) */
int offx; /* Position offset X (invalid with X11 fonts) */ int offx, /* Position offset X (invalid with X11 fonts) */
int offy; /* Position offset Y (invalid with X11 fonts) */ int offy, /* Position offset Y (invalid with X11 fonts) */
int pos; /* Justification of text relative to text. -1 int pos, /* Justification of text relative to text. -1
* means "pick a nice one for me." * means "pick a nice one for me."
*/ */
bool sticky; /* 1 if label should not be moved off chosen layer */ bool sticky, /* 1 if label should not be moved off chosen layer */
TileType type; /* Type of material label is to be attached TileType type) /* Type of material label is to be attached
* to. -1 means "pick a reasonable layer". * to. -1 means "pick a reasonable layer".
*/ */
{ {
@ -182,9 +182,9 @@ CmdLabelProc(text, font, size, rotate, offx, offy, pos, sticky, type)
void void
CmdLabel(w, cmd) CmdLabel(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
TileType type = (TileType)(-1); TileType type = (TileType)(-1);
int pos = -1, font = -1, size = 0, rotate = 0, offx = 0, offy = 0; int pos = -1, font = -1, size = 0, rotate = 0, offx = 0, offy = 0;
@ -388,9 +388,9 @@ CmdLabel(w, cmd)
*/ */
void void
CmdLoad(w, cmd) CmdLoad(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int n = 1; int n = 1;
int d = 1; int d = 1;
@ -550,9 +550,9 @@ CmdLoad(w, cmd)
*/ */
int int
keepGoing(use, clientdata) keepGoing(
CellUse *use; CellUse *use,
ClientData clientdata; ClientData clientdata)
{ {
return 0; /* keep the search going */ return 0; /* keep the search going */
} }
@ -594,9 +594,9 @@ keepGoing(use, clientdata)
*/ */
void void
CmdLocking(w, cmd) CmdLocking(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option; int option;
@ -668,9 +668,9 @@ CmdLocking(w, cmd)
*/ */
void void
CmdMove(w, cmd) CmdMove(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform t; Transform t;
Rect rootBox, newBox; Rect rootBox, newBox;
@ -891,9 +891,9 @@ moveToPoint:
*/ */
void void
CmdPaint(w, cmd) CmdPaint(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Rect editRect; Rect editRect;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -984,11 +984,11 @@ CmdPaint(w, cmd)
*/ */
void void
CmdPaintEraseButton(w, refPoint, isPaint, isScreen) CmdPaintEraseButton(
MagWindow *w; MagWindow *w,
Point *refPoint; /* Screen location at which button was raised */ Point *refPoint, /* Screen location at which button was raised */
bool isPaint; /* True for paint, False for erase. */ bool isPaint, /* True for paint, False for erase. */
bool isScreen; /* True for screen coordinates, False for root */ bool isScreen) /* True for screen coordinates, False for root */
{ {
Rect rootRect, editRect, areaReturn; Rect rootRect, editRect, areaReturn;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -1085,9 +1085,9 @@ CmdPaintEraseButton(w, refPoint, isPaint, isScreen)
#define PATHHELP 3 #define PATHHELP 3
void void
CmdPath(w, cmd) CmdPath(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
char **pathptr; char **pathptr;
char *srcptr; char *srcptr;
@ -1210,9 +1210,9 @@ usage:
*/ */
void void
CmdPolygon(w, cmd) CmdPolygon(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
TileType type; TileType type;
int points, i, j, pNum; int points, i, j, pNum;
@ -1283,11 +1283,11 @@ CmdPolygon(w, cmd)
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
int int
cmdPortLabelFunc1(scx, label, tpath, cdata) cmdPortLabelFunc1(
SearchContext *scx; SearchContext *scx,
Label *label; Label *label,
TerminalPath *tpath; TerminalPath *tpath,
ClientData cdata; ClientData cdata)
{ {
Label **rlab = (Label **)cdata; Label **rlab = (Label **)cdata;
@ -1305,11 +1305,11 @@ cmdPortLabelFunc1(scx, label, tpath, cdata)
} }
int int
cmdPortLabelFunc2(scx, label, tpath, cdata) cmdPortLabelFunc2(
SearchContext *scx; SearchContext *scx,
Label *label; Label *label,
TerminalPath *tpath; TerminalPath *tpath,
ClientData cdata; ClientData cdata)
{ {
Label **rlab = (Label **)cdata; Label **rlab = (Label **)cdata;
@ -1338,11 +1338,11 @@ cmdPortLabelFunc2(scx, label, tpath, cdata)
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
Label * Label *
portFindLabel(editDef, port, unique, nonEdit) portFindLabel(
CellDef *editDef; CellDef *editDef,
bool unique; bool port, // If TRUE, only look for labels that are ports
bool port; // If TRUE, only look for labels that are ports bool unique,
bool *nonEdit; // TRUE if label is not in the edit cell bool *nonEdit) // TRUE if label is not in the edit cell
{ {
int found, wrongkind; int found, wrongkind;
Label *lab, *sl; Label *lab, *sl;
@ -1441,7 +1441,9 @@ portFindLabel(editDef, port, unique, nonEdit)
*/ */
int int
complabel(const void *one, const void *two) complabel(
const void *one,
const void *two)
{ {
/* Natural sort order routine from DBcellname.c /* Natural sort order routine from DBcellname.c
* replaces strcasecmp(). * replaces strcasecmp().
@ -1516,9 +1518,9 @@ complabel(const void *one, const void *two)
#define PORT_HELP 15 #define PORT_HELP 15
void void
CmdPort(w, cmd) CmdPort(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
char **msg; char **msg;
int argstart; int argstart;
@ -2311,10 +2313,10 @@ parsepositions:
*/ */
void void
CmdDoProperty(def, cmd, argstart) CmdDoProperty(
CellDef *def; CellDef *def,
TxCommand *cmd; TxCommand *cmd,
int argstart; int argstart)
{ {
int printPropertiesFunc(); int printPropertiesFunc();
char *value; char *value;
@ -2389,9 +2391,9 @@ CmdDoProperty(def, cmd, argstart)
*/ */
void void
CmdProperty(w, cmd) CmdProperty(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellDef *def; CellDef *def;
@ -2414,9 +2416,10 @@ CmdProperty(w, cmd)
*/ */
int int
printPropertiesFunc(name, value) printPropertiesFunc(
char *name; const char *name,
ClientData value; ClientData value,
ClientData cdata) /* not used */
{ {
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
char *keyvalue; char *keyvalue;
@ -2466,9 +2469,9 @@ printPropertiesFunc(name, value)
#define NLIST_TERMINAL 3 #define NLIST_TERMINAL 3
void void
CmdNetlist(w, cmd) CmdNetlist(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option; int option;
char **msg, *lastargv; char **msg, *lastargv;
@ -2549,9 +2552,9 @@ CmdNetlist(w, cmd)
*/ */
void void
CmdOrient(w, cmd) CmdOrient(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform trans, t2; Transform trans, t2;
int orientidx, locargc; int orientidx, locargc;

View File

@ -88,9 +88,9 @@ Label *DefaultLabel;
*/ */
void void
CmdRandom(w, cmd) CmdRandom(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int value; int value;
@ -141,9 +141,9 @@ CmdRandom(w, cmd)
*/ */
void void
CmdRsim(w, cmd) CmdRsim(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
if ((cmd->tx_argc == 1) && (!SimRsimRunning)) { if ((cmd->tx_argc == 1) && (!SimRsimRunning)) {
@ -194,9 +194,9 @@ CmdRsim(w, cmd)
*/ */
void void
CmdSave(w, cmd) CmdSave(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellDef *locDef; CellDef *locDef;
@ -266,9 +266,9 @@ CmdSave(w, cmd)
*/ */
void void
CmdScaleGrid(w, cmd) CmdScaleGrid(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int scalen, scaled; int scalen, scaled;
char *argsep; char *argsep;
@ -422,9 +422,9 @@ scalegridusage:
*/ */
void void
CmdSee(w, cmd) CmdSee(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int flags; int flags;
bool off; bool off;
@ -579,11 +579,11 @@ CmdSee(w, cmd)
/* ARGSUSED */ /* ARGSUSED */
void void
cmdSelectArea(layers, less, option, globmatch) cmdSelectArea(
char *layers; /* Which layers are to be selected. */ char *layers, /* Which layers are to be selected. */
bool less; bool less,
int option; /* Option from defined list above */ int option, /* Option from defined list above */
char *globmatch; /* Optional match string for labels */ char *globmatch) /* Optional match string for labels */
{ {
SearchContext scx; SearchContext scx;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -665,8 +665,8 @@ cmdSelectArea(layers, less, option, globmatch)
*/ */
void void
cmdIntersectArea(layer) cmdIntersectArea(
char *layer; /* The layer to intersect with */ char *layer) /* The layer to intersect with */
{ {
TileType ttype; TileType ttype;
SearchContext scx; SearchContext scx;
@ -746,9 +746,9 @@ cmdIntersectArea(layer)
*/ */
void void
CmdSelect(w, cmd) CmdSelect(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
TileTypeBitMask mask; TileTypeBitMask mask;
SearchContext scx; SearchContext scx;
@ -1681,11 +1681,11 @@ Okay:
*/ */
int int
cmdLabelTextFunc(label, cellUse, transform, text) cmdLabelTextFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
char *text; char *text)
{ {
Label *newlab; Label *newlab;
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
@ -1721,11 +1721,11 @@ cmdLabelTextFunc(label, cellUse, transform, text)
} }
int int
cmdLabelRotateFunc(label, cellUse, transform, value) cmdLabelRotateFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
int *value; int *value)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
@ -1758,11 +1758,11 @@ cmdLabelRotateFunc(label, cellUse, transform, value)
} }
int int
cmdLabelSizeFunc(label, cellUse, transform, value) cmdLabelSizeFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
int *value; int *value)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
@ -1794,11 +1794,11 @@ cmdLabelSizeFunc(label, cellUse, transform, value)
} }
int int
cmdLabelJustFunc(label, cellUse, transform, value) cmdLabelJustFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
int *value; int *value)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
@ -1830,11 +1830,11 @@ cmdLabelJustFunc(label, cellUse, transform, value)
} }
int int
cmdLabelLayerFunc(label, cellUse, transform, value) cmdLabelLayerFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
int *value; int *value)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
TileType ttype; TileType ttype;
@ -1868,11 +1868,11 @@ cmdLabelLayerFunc(label, cellUse, transform, value)
} }
int int
cmdLabelStickyFunc(label, cellUse, transform, value) cmdLabelStickyFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
int *value; int *value)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
int newvalue; int newvalue;
@ -1909,11 +1909,11 @@ cmdLabelStickyFunc(label, cellUse, transform, value)
} }
int int
cmdLabelOffsetFunc(label, cellUse, transform, point) cmdLabelOffsetFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
Point *point; Point *point)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
@ -1950,11 +1950,11 @@ cmdLabelOffsetFunc(label, cellUse, transform, point)
} }
int int
cmdLabelRectFunc(label, cellUse, transform, rect) cmdLabelRectFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
Rect *rect; Rect *rect)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
@ -1996,11 +1996,11 @@ cmdLabelRectFunc(label, cellUse, transform, rect)
} }
int int
cmdLabelFontFunc(label, cellUse, transform, font) cmdLabelFontFunc(
Label *label; Label *label,
CellUse *cellUse; CellUse *cellUse,
Transform *transform; Transform *transform,
int *font; int *font)
{ {
CellDef *cellDef = cellUse->cu_def; CellDef *cellDef = cellUse->cu_def;
#ifdef MAGIC_WRAPPER #ifdef MAGIC_WRAPPER
@ -2088,9 +2088,9 @@ cmdLabelFontFunc(label, cellUse, transform, font)
#define SETLABEL_HELP 10 #define SETLABEL_HELP 10
void void
CmdSetLabel(w, cmd) CmdSetLabel(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int pos = -1, font = -1, size = 0, rotate = 0, flags = 0; int pos = -1, font = -1, size = 0, rotate = 0, flags = 0;
int locargc, argstart = 1; int locargc, argstart = 1;
@ -2566,9 +2566,9 @@ CmdSetLabel(w, cmd)
*/ */
void void
CmdSideways(w, cmd) CmdSideways(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform trans; Transform trans;
Rect rootBox, bbox; Rect rootBox, bbox;
@ -2628,9 +2628,9 @@ CmdSideways(w, cmd)
*/ */
void void
CmdShell(w, cmd) CmdShell(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int i, cmdlength; int i, cmdlength;
char *command; char *command;
@ -2676,9 +2676,9 @@ int (*CmdStretchCmd)() = NULL;
/* ARGSUSED */ /* ARGSUSED */
void void
CmdSgraph(w, cmd) CmdSgraph(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
if (CmdStretchCmd != NULL) if (CmdStretchCmd != NULL)
{ {
@ -2711,9 +2711,9 @@ CmdSgraph(w, cmd)
*/ */
void void
CmdStartRsim(w, cmd) CmdStartRsim(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
static char rsimstr[] = "rsim"; static char rsimstr[] = "rsim";
@ -2758,9 +2758,9 @@ CmdStartRsim(w, cmd)
*/ */
void void
CmdSimCmd(w, cmd) CmdSimCmd(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
static char cmdbuf[200]; static char cmdbuf[200];
char *strptr; char *strptr;
@ -2845,9 +2845,9 @@ CmdSimCmd(w, cmd)
#define SNAP_LIST 6 #define SNAP_LIST 6
void void
CmdSnap(w, cmd) CmdSnap(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
static char *names[] = { "off", "internal", "lambda", "grid", "user", "on", static char *names[] = { "off", "internal", "lambda", "grid", "user", "on",
"list", 0 }; "list", 0 };
@ -2911,9 +2911,9 @@ printit:
*/ */
void void
CmdSplit(w, cmd) CmdSplit(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Rect editRect, expRect; Rect editRect, expRect;
TileTypeBitMask mask1, mask2, *cmask; TileTypeBitMask mask1, mask2, *cmask;
@ -3011,9 +3011,9 @@ CmdSplit(w, cmd)
*/ */
void void
CmdSplitErase(w, cmd) CmdSplitErase(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Rect editRect, expRect; Rect editRect, expRect;
TileTypeBitMask mask; TileTypeBitMask mask;
@ -3109,9 +3109,9 @@ CmdSplitErase(w, cmd)
*/ */
void void
CmdStretch(w, cmd) CmdStretch(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform t; Transform t;
Rect rootBox, newBox; Rect rootBox, newBox;

View File

@ -100,11 +100,12 @@ TileTypeBitMask CmdYMAllButSpace;
*/ */
int int
cmdScaleCoord(w, arg, is_relative, is_x, scale) cmdScaleCoord(
MagWindow *w; MagWindow *w,
char *arg; char *arg,
bool is_relative, is_x; bool is_relative,
int scale; bool is_x,
int scale)
{ {
char *endptr; char *endptr;
double dval = 0; double dval = 0;
@ -230,10 +231,11 @@ cmdScaleCoord(w, arg, is_relative, is_x, scale)
*/ */
int int
cmdParseCoord(w, arg, is_relative, is_x) cmdParseCoord(
MagWindow *w; MagWindow *w,
char *arg; char *arg,
bool is_relative, is_x; bool is_relative,
bool is_x)
{ {
return cmdScaleCoord(w, arg, is_relative, is_x, 1); return cmdScaleCoord(w, arg, is_relative, is_x, 1);
} }
@ -257,7 +259,7 @@ cmdParseCoord(w, arg, is_relative, is_x)
*/ */
void void
CmdInit() CmdInit(void)
{ {
TTMaskZero(&CmdYMLabel); TTMaskZero(&CmdYMLabel);
TTMaskSetType(&CmdYMLabel, L_LABEL); TTMaskSetType(&CmdYMLabel, L_LABEL);
@ -291,9 +293,9 @@ CmdInit()
*/ */
void void
cmdFlushCell(def, force_deref) cmdFlushCell(
CellDef *def; CellDef *def,
bool force_deref; bool force_deref)
{ {
CellUse *parentUse; CellUse *parentUse;
@ -373,9 +375,9 @@ cmdFlushCell(def, force_deref)
*/ */
bool bool
CmdParseLayers(s, mask) CmdParseLayers(
char *s; char *s,
TileTypeBitMask *mask; TileTypeBitMask *mask)
{ {
TileTypeBitMask newmask, tempmask; TileTypeBitMask newmask, tempmask;
char *dp, c; char *dp, c;
@ -547,8 +549,8 @@ printTypes:
*/ */
TileType TileType
cmdMaskToType(mask) cmdMaskToType(
TileTypeBitMask *mask; TileTypeBitMask *mask)
{ {
TileType type, t; TileType type, t;
@ -593,16 +595,16 @@ cmdMaskToType(mask)
*/ */
void void
cmdSaveCell(cellDef, newName, noninteractive, tryRename) cmdSaveCell(
CellDef *cellDef; /* Pointer to def of cell to be saved */ CellDef *cellDef, /* Pointer to def of cell to be saved */
char *newName; /* Pointer to name of file in which cell is to be char *newName, /* Pointer to name of file in which cell is to be
* saved. May be NULL, in which case the name from * saved. May be NULL, in which case the name from
* the CellDef is taken. * 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. * 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. * place where it was saved.
*/ */
{ {
@ -712,11 +714,11 @@ cleanup:
*/ */
char * char *
cmdCheckNewName(def, newName, tryRename, noninteractive) cmdCheckNewName(
CellDef *def; CellDef *def,
char *newName; char *newName,
bool tryRename; bool tryRename,
bool noninteractive; bool noninteractive)
{ {
static char *yesno[] = { "no", "yes", 0 }; static char *yesno[] = { "no", "yes", 0 };
char *filename; char *filename;
@ -803,10 +805,10 @@ again:
*/ */
static char * static char *
nameEllipsis(name, maxlen, prefix) nameEllipsis(
char *name; char *name,
int maxlen; int maxlen,
char **prefix; char **prefix)
{ {
int l = strlen(name); int l = strlen(name);
@ -846,9 +848,9 @@ nameEllipsis(name, maxlen, prefix)
*/ */
int int
cmdSaveWindSet(window, def) cmdSaveWindSet(
MagWindow *window; MagWindow *window,
CellDef *def; CellDef *def)
{ {
char caption[200]; char caption[200];
CellDef *rootDef; CellDef *rootDef;
@ -900,9 +902,9 @@ static CellDef *newRootDef; /* Pointer to root def of window in which
*/ */
void void
CmdSetWindCaption(newEditUse, rootDef) CmdSetWindCaption(
CellUse *newEditUse; /* Pointer to new edit cell use */ CellUse *newEditUse, /* Pointer to new edit cell use */
CellDef *rootDef; /* Root cell def of the window in which the CellDef *rootDef) /* Root cell def of the window in which the
* edit cell was selected. * edit cell was selected.
*/ */
{ {
@ -941,8 +943,8 @@ CmdSetWindCaption(newEditUse, rootDef)
*/ */
int int
cmdWindSet(window) cmdWindSet(
MagWindow *window; MagWindow *window)
{ {
char caption[200]; char caption[200];
CellDef *wDef; CellDef *wDef;
@ -998,9 +1000,9 @@ cmdWindSet(window)
*/ */
MagWindow * MagWindow *
CmdGetRootPoint(point, rect) CmdGetRootPoint(
Point *point; Point *point,
Rect *rect; Rect *rect)
{ {
MagWindow *window; MagWindow *window;
@ -1033,9 +1035,9 @@ CmdGetRootPoint(point, rect)
*/ */
MagWindow * MagWindow *
CmdGetEditPoint(point, rect) CmdGetEditPoint(
Point *point; Point *point,
Rect *rect; Rect *rect)
{ {
MagWindow *window; MagWindow *window;
Rect rootRect; Rect rootRect;
@ -1070,7 +1072,7 @@ CmdGetEditPoint(point, rect)
*/ */
bool bool
CmdWarnWrite() CmdWarnWrite(void)
{ {
int count, code; int count, code;
int cmdWarnWriteFunc(); int cmdWarnWriteFunc();
@ -1092,9 +1094,9 @@ CmdWarnWrite()
} }
int int
cmdWarnWriteFunc(cellDef, pcount) cmdWarnWriteFunc(
CellDef *cellDef; CellDef *cellDef,
int *pcount; int *pcount)
{ {
if ((cellDef->cd_flags & CDINTERNAL) == 0) if ((cellDef->cd_flags & CDINTERNAL) == 0)
(*pcount)++; (*pcount)++;
@ -1118,10 +1120,10 @@ cmdWarnWriteFunc(cellDef, pcount)
*/ */
void void
cmdExpandOneLevel(cu, bitmask, expand) cmdExpandOneLevel(
CellUse *cu; CellUse *cu,
int bitmask; int bitmask,
bool expand; bool expand)
{ {
extern int cmdExpand1func(); extern int cmdExpand1func();
@ -1134,9 +1136,9 @@ cmdExpandOneLevel(cu, bitmask, expand)
} }
int int
cmdExpand1func(cu, bitmask) cmdExpand1func(
CellUse *cu; CellUse *cu,
ClientData bitmask; ClientData bitmask)
{ {
DBExpand(cu, (int) bitmask, FALSE); DBExpand(cu, (int) bitmask, FALSE);
return 0; return 0;
@ -1166,8 +1168,8 @@ Transform *cmdSelTrans; /* Shared between CmdGetSelectedCell and
*/ */
CellUse * CellUse *
CmdGetSelectedCell(pTrans) CmdGetSelectedCell(
Transform *pTrans; /* If non-NULL, transform from selected Transform *pTrans) /* If non-NULL, transform from selected
* cell to root coords is stored here. * cell to root coords is stored here.
*/ */
{ {
@ -1182,11 +1184,11 @@ CmdGetSelectedCell(pTrans)
/* ARGSUSED */ /* ARGSUSED */
int int
cmdGetSelFunc(selUse, realUse, transform, pResult) cmdGetSelFunc(
CellUse *selUse; /* Not used. */ CellUse *selUse, /* Not used. */
CellUse *realUse; /* The first selected use. */ CellUse *realUse, /* The first selected use. */
Transform *transform; /* Transform from coords of realUse to root. */ Transform *transform, /* Transform from coords of realUse to root. */
CellUse **pResult; /* Store realUse here. */ CellUse **pResult) /* Store realUse here. */
{ {
*pResult = realUse; *pResult = realUse;
if (cmdSelTrans != NULL) if (cmdSelTrans != NULL)
@ -1214,10 +1216,10 @@ cmdGetSelFunc(selUse, realUse, transform, pResult)
*/ */
bool bool
CmdIllegalChars(string, illegal, msg) CmdIllegalChars(
char *string; /* String to check for illegal chars. */ char *string, /* String to check for illegal chars. */
char *illegal; /* String containing illegal chars. */ char *illegal, /* String containing illegal chars. */
char *msg; /* String identifying what string is char *msg) /* String identifying what string is
* supposed to represent, for ease in * supposed to represent, for ease in
* printing error messages. * printing error messages.
*/ */

View File

@ -62,8 +62,8 @@ extern void DisplayWindow();
/* Trivial function that returns 1 if called */ /* Trivial function that returns 1 if called */
int int
existFunc(tile) existFunc(
Tile *tile; Tile *tile)
{ {
return 1; return 1;
} }
@ -82,9 +82,9 @@ existFunc(tile)
*/ */
int int
checkForPaintFunc(cellDef, arg) checkForPaintFunc(
CellDef *cellDef; CellDef *cellDef,
ClientData arg; ClientData arg)
{ {
int numPlanes = *((int *)arg); int numPlanes = *((int *)arg);
int pNum, result; int pNum, result;
@ -121,7 +121,7 @@ checkForPaintFunc(cellDef, arg)
*/ */
bool bool
CmdCheckForPaintFunc() CmdCheckForPaintFunc(void)
{ {
if (DBCellSrDefs(0, checkForPaintFunc, (ClientData)&DBNumPlanes)) if (DBCellSrDefs(0, checkForPaintFunc, (ClientData)&DBNumPlanes))
return TRUE; return TRUE;
@ -165,9 +165,9 @@ CmdCheckForPaintFunc()
#define TECH_REVERT 11 #define TECH_REVERT 11
void void
CmdTech(w, cmd) CmdTech(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Info about command options. */ TxCommand *cmd) /* Info about command options. */
{ {
int option, action, i, locargc; int option, action, i, locargc;
char **msg; char **msg;
@ -655,9 +655,9 @@ usage2:
*/ */
void void
CmdTool(w, cmd) CmdTool(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Info about command options. */ TxCommand *cmd) /* Info about command options. */
{ {
if (cmd->tx_argc == 1) if (cmd->tx_argc == 1)
{ {
@ -697,9 +697,9 @@ CmdTool(w, cmd)
*/ */
void void
CmdUnexpand(w, cmd) CmdUnexpand(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int windowMask, boxMask; int windowMask, boxMask;
Rect rootRect; Rect rootRect;
@ -735,9 +735,9 @@ CmdUnexpand(w, cmd)
*/ */
int int
cmdUnexpandFunc(use, windowMask) cmdUnexpandFunc(
CellUse *use; /* Use that was just unexpanded. */ CellUse *use, /* Use that was just unexpanded. */
int windowMask; /* Window where it was unexpanded. */ int windowMask) /* Window where it was unexpanded. */
{ {
if (use->cu_parent == NULL) return 0; if (use->cu_parent == NULL) return 0;
DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask, DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask,
@ -766,9 +766,9 @@ cmdUnexpandFunc(use, windowMask)
*/ */
void void
CmdUpsidedown(w, cmd) CmdUpsidedown(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
Transform trans; Transform trans;
Rect rootBox, bbox; Rect rootBox, bbox;
@ -830,9 +830,10 @@ struct linked_id {
}; };
int cmdWhatPrintCell(tile, cxp) int
Tile *tile; cmdWhatPrintCell(
TreeContext *cxp; Tile *tile,
TreeContext *cxp)
{ {
struct linked_id **lid = (struct linked_id **)cxp->tc_filter->tf_arg; struct linked_id **lid = (struct linked_id **)cxp->tc_filter->tf_arg;
struct linked_id *curlid = *lid; struct linked_id *curlid = *lid;
@ -884,7 +885,9 @@ static LabelStore *labelBlockTop, *labelEntry;
*/ */
int int
cmdFindWhatTileFunc(Tile *tile, ClientData clientData) cmdFindWhatTileFunc(
Tile *tile,
ClientData clientData)
{ {
struct linked_id **lid = (struct linked_id **)clientData; struct linked_id **lid = (struct linked_id **)clientData;
SearchContext scx; SearchContext scx;
@ -930,9 +933,9 @@ cmdFindWhatTileFunc(Tile *tile, ClientData clientData)
*/ */
void void
CmdWhat(w, cmd) CmdWhat(
MagWindow *w; /* Window in which command was invoked. */ MagWindow *w, /* Window in which command was invoked. */
TxCommand *cmd; /* Information about the command. */ TxCommand *cmd) /* Information about the command. */
{ {
int i, locargc; int i, locargc;
bool foundAny, editNull = FALSE; bool foundAny, editNull = FALSE;
@ -1199,10 +1202,10 @@ CmdWhat(w, cmd)
/*ARGSUSED*/ /*ARGSUSED*/
int int
cmdWhatPaintFunc(rect, type, mask) cmdWhatPaintFunc(
Rect *rect; /* Not used. */ Rect *rect, /* Not used. */
TileType type; /* Type of this piece of paint. */ TileType type, /* Type of this piece of paint. */
TileTypeBitMask *mask; /* Place to OR in type's bit. */ TileTypeBitMask *mask) /* Place to OR in type's bit. */
{ {
if (type & TT_DIAGONAL) if (type & TT_DIAGONAL)
type = (type & TT_SIDE) ? (type & TT_RIGHTMASK) >> 14 : type = (type & TT_SIDE) ? (type & TT_RIGHTMASK) >> 14 :
@ -1217,11 +1220,11 @@ cmdWhatPaintFunc(rect, type, mask)
/*ARGSUSED*/ /*ARGSUSED*/
int int
cmdWhatLabelPreFunc(label, cellUse, transform, foundAny) cmdWhatLabelPreFunc(
Label *label; /* Label that's selected. */ Label *label, /* Label that's selected. */
CellUse *cellUse; /* Cell use containing label. */ CellUse *cellUse, /* Cell use containing label. */
Transform *transform; /* Not used. */ Transform *transform, /* Not used. */
bool *foundAny; /* Use to print extra stuff for the first bool *foundAny) /* Use to print extra stuff for the first
* label found. * label found.
*/ */
{ {
@ -1261,9 +1264,9 @@ cmdWhatLabelPreFunc(label, cellUse, transform, foundAny)
int int
cmdWhatLabelFunc(entry, foundAny) cmdWhatLabelFunc(
LabelStore *entry; /* stored pointers to label info*/ LabelStore *entry, /* stored pointers to label info*/
bool *foundAny; /* Use to print extra stuff for the first bool *foundAny) /* Use to print extra stuff for the first
* label found. * label found.
*/ */
{ {
@ -1313,9 +1316,9 @@ cmdWhatLabelFunc(entry, foundAny)
/* they are sorted by label name, then cell name, then attached material */ /* they are sorted by label name, then cell name, then attached material */
/* that way all of identical names are grouped together */ /* that way all of identical names are grouped together */
int int
orderLabelFunc(one, two) orderLabelFunc(
LabelStore *one; /* one of the labels being compared */ LabelStore *one, /* one of the labels being compared */
LabelStore *two; /* the other label to compare with */ LabelStore *two) /* the other label to compare with */
{ {
int i; int i;
@ -1335,11 +1338,11 @@ orderLabelFunc(one, two)
/*ARGSUSED*/ /*ARGSUSED*/
int int
cmdWhatCellFunc(selUse, realUse, transform, foundAny) cmdWhatCellFunc(
CellUse *selUse; /* Not used. */ CellUse *selUse, /* Not used. */
CellUse *realUse; /* Selected cell use. */ CellUse *realUse, /* Selected cell use. */
Transform *transform; /* Not used. */ Transform *transform, /* Not used. */
bool *foundAny; /* Used to print extra stuff for the first bool *foundAny) /* Used to print extra stuff for the first
* use found. * use found.
*/ */
{ {
@ -1361,11 +1364,11 @@ cmdWhatCellFunc(selUse, realUse, transform, foundAny)
/* Same search function as above, but appends use names to a Tcl list */ /* Same search function as above, but appends use names to a Tcl list */
int int
cmdWhatCellListFunc(selUse, realUse, transform, newobj) cmdWhatCellListFunc(
CellUse *selUse; /* Not used. */ CellUse *selUse, /* Not used. */
CellUse *realUse; /* Selected cell use. */ CellUse *realUse, /* Selected cell use. */
Transform *transform; /* Not used. */ Transform *transform, /* Not used. */
Tcl_Obj *newobj; /* Tcl list object holding use names */ Tcl_Obj *newobj) /* Tcl list object holding use names */
{ {
Tcl_Obj *tuple; Tcl_Obj *tuple;
/* Forward reference */ /* Forward reference */
@ -1416,9 +1419,9 @@ cmdWhatCellListFunc(selUse, realUse, transform, newobj)
#define SEGMENT 11 #define SEGMENT 11
void void
CmdWire(w, cmd) CmdWire(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option, locargc; int option, locargc;
char **msg, *lastargv; char **msg, *lastargv;
@ -1854,9 +1857,9 @@ CmdWire(w, cmd)
#define OPT_WRITEALL_MODIFIED 1 #define OPT_WRITEALL_MODIFIED 1
void void
CmdWriteall(w, cmd) CmdWriteall(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int cmdWriteallFunc(); int cmdWriteallFunc();
int option = -1; int option = -1;
@ -1911,11 +1914,11 @@ CmdWriteall(w, cmd)
/*ARGSUSED*/ /*ARGSUSED*/
int int
cmdWriteallFunc(def, cmd) cmdWriteallFunc(
CellDef *def; /* Pointer to CellDef to be saved. This def might CellDef *def, /* Pointer to CellDef to be saved. This def might
* be an internal buffer; if so, we ignore it. * 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, * to the command structure. If cmd->tx_argc == 1,
* then prompt for each action. If cmd->tx_argc * then prompt for each action. If cmd->tx_argc
* == 2, then write all cells without asking. If * == 2, then write all cells without asking. If
@ -2014,9 +2017,9 @@ cmdWriteallFunc(def, cmd)
*/ */
void void
CmdXload(w, cmd) CmdXload(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
windCheckOnlyWindow(&w, DBWclientID); windCheckOnlyWindow(&w, DBWclientID);
if (w == (MagWindow *) NULL) if (w == (MagWindow *) NULL)
@ -2062,9 +2065,9 @@ CmdXload(w, cmd)
*/ */
void void
CmdXor(w, cmd) CmdXor(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int rval, xMask; int rval, xMask;
bool dolabels; bool dolabels;

View File

@ -79,9 +79,9 @@ void cmdStatsHier(CellDef *, int, CellDef *);
*/ */
void void
CmdCoord(w, cmd) CmdCoord(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
MagWindow *pointW = (MagWindow *) NULL; MagWindow *pointW = (MagWindow *) NULL;
Rect editRect, rootRect; Rect editRect, rootRect;
@ -181,9 +181,9 @@ CmdCoord(w, cmd)
#ifndef NO_EXT #ifndef NO_EXT
void void
CmdExtractTest(w, cmd) CmdExtractTest(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
ExtractTest(w, cmd); ExtractTest(w, cmd);
} }
@ -212,9 +212,9 @@ CmdExtractTest(w, cmd)
*/ */
void void
showTech(outf, verbose) showTech(
FILE *outf; /* File to which information is to be output */ FILE *outf, /* File to which information is to be output */
bool verbose; /* If TRUE, output detailed erase table */ bool verbose) /* If TRUE, output detailed erase table */
{ {
int i, j; int i, j;
int pNum; int pNum;
@ -359,9 +359,9 @@ showTech(outf, verbose)
} }
void void
CmdShowtech(w, cmd) CmdShowtech(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
FILE *outf; FILE *outf;
bool verbose; bool verbose;
@ -427,9 +427,9 @@ CmdShowtech(w, cmd)
*/ */
void void
CmdTilestats(w, cmd) CmdTilestats(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
CellUse *selectedUse; CellUse *selectedUse;
FILE *outf = stdout; FILE *outf = stdout;
@ -511,9 +511,9 @@ int totalTiles[TT_MAXTYPES];
*/ */
int int
cmdStatsFunc(def, outf) cmdStatsFunc(
CellDef *def; CellDef *def,
FILE *outf; FILE *outf)
{ {
int cmdStatsCount(), cmdStatsOutput(); int cmdStatsCount(), cmdStatsOutput();
struct countClient cc; struct countClient cc;
@ -564,9 +564,9 @@ cmdStatsFunc(def, outf)
*/ */
int int
cmdStatsCount(def, cc) cmdStatsCount(
CellDef *def; CellDef *def,
struct countClient *cc; struct countClient *cc)
{ {
int cmdStatsCountTile(); int cmdStatsCountTile();
int pNum; int pNum;
@ -595,9 +595,9 @@ cmdStatsCount(def, cc)
} }
int int
cmdStatsCountTile(tile, ci) cmdStatsCountTile(
Tile *tile; Tile *tile,
struct cellInfo *ci; struct cellInfo *ci)
{ {
TileType type = TiGetType(tile); TileType type = TiGetType(tile);
@ -638,9 +638,10 @@ cmdStatsCountTile(tile, ci)
*/ */
void void
cmdStatsHier(parent, nuses, child) cmdStatsHier(
CellDef *parent, *child; CellDef *parent,
int nuses; int nuses,
CellDef *child)
{ {
struct cellInfo *pi, *ci; struct cellInfo *pi, *ci;
TileType t; TileType t;
@ -685,9 +686,9 @@ cmdStatsHier(parent, nuses, child)
*/ */
int int
cmdStatsOutput(def, cc) cmdStatsOutput(
CellDef *def; CellDef *def,
struct countClient *cc; struct countClient *cc)
{ {
TileType t; TileType t;
struct cellInfo *ci; struct cellInfo *ci;
@ -750,9 +751,9 @@ cmdStatsOutput(def, cc)
*/ */
void void
CmdPsearch(w, cmd) CmdPsearch(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
char *RunStats(); char *RunStats();
static struct tms tlast, tdelta; static struct tms tlast, tdelta;
@ -816,10 +817,11 @@ CmdPsearch(w, cmd)
} }
void void
cmdPsearchStats(str, tl, td, count) cmdPsearchStats(
char *str; char *str,
struct tms *tl, *td; struct tms *tl,
int count; struct tms *td,
int count)
{ {
char *RunStats(); char *RunStats();
char *rstatp; char *rstatp;
@ -861,9 +863,9 @@ int numTilesFound;
bool cmdTsearchDebug = FALSE; bool cmdTsearchDebug = FALSE;
void void
CmdTsearch(w, cmd) CmdTsearch(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int cmdTsrFunc(); int cmdTsrFunc();
char *RunStats(), *rstatp; char *RunStats(), *rstatp;
@ -973,8 +975,8 @@ CmdTsearch(w, cmd)
} }
int int
cmdTsrFunc(tp) cmdTsrFunc(
Tile *tp; Tile *tp)
{ {
if (cmdTsearchDebug) if (cmdTsearchDebug)
TxPrintf("%lx\n", (intmax_t) tp); TxPrintf("%lx\n", (intmax_t) tp);
@ -1000,9 +1002,9 @@ cmdTsrFunc(tp)
*/ */
void void
CmdWatch(w, cmd) CmdWatch(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
DBWclientRec *crec; DBWclientRec *crec;
int pNum; int pNum;