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

K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
Darryl L. Miles 2025-01-31 19:00:47 +00:00 committed by Tim Edwards
parent 5058152c8f
commit 4f54bcf4f4
3 changed files with 38 additions and 37 deletions

View File

@ -75,8 +75,8 @@ static CellDef *wireDesiredDef;
*/ */
MagWindow * MagWindow *
wireFindRootWindow(rootDef) wireFindRootWindow(
CellDef *rootDef; /* Root definition for which a root use CellDef *rootDef) /* Root definition for which a root use
* is desired. * is desired.
*/ */
{ {
@ -96,9 +96,9 @@ wireFindRootWindow(rootDef)
*/ */
int int
wireFindRootFunc(window, mwPtr) wireFindRootFunc(
MagWindow *window; /* A layout window. */ MagWindow *window, /* A layout window. */
MagWindow **mwPtr; /* Copy layout window pointer to this */ MagWindow **mwPtr) /* Copy layout window pointer to this */
{ {
CellUse *use; CellUse *use;
@ -128,15 +128,15 @@ wireFindRootFunc(window, mwPtr)
*/ */
void void
WirePickType(type, ppoint, width) WirePickType(
TileType type; /* New type of material to use for wiring. TileType type, /* New type of material to use for wiring.
* If less than zero, then pick a new type * If less than zero, then pick a new type
* based on what's underneath the cursor. * based on what's underneath the cursor.
*/ */
Point *ppoint; /* If non-NULL, contains a point position Point *ppoint, /* If non-NULL, contains a point position
* from which to get the wire type. * from which to get the wire type.
*/ */
int width; /* Width to use for future wiring. If type int width) /* Width to use for future wiring. If type
* is less than zero then this parameter is * is less than zero then this parameter is
* ignored and the width of the material * ignored and the width of the material
* underneath the cursor is used. * underneath the cursor is used.
@ -269,13 +269,13 @@ WirePickType(type, ppoint, width)
*/ */
int int
WireGetWidth() WireGetWidth(void)
{ {
return WireWidth; return WireWidth;
} }
TileType TileType
WireGetType() WireGetType(void)
{ {
return WireType; return WireType;
} }
@ -299,16 +299,16 @@ WireGetType()
*/ */
void void
WireAddLeg(rect, point, direction) WireAddLeg(
Rect *rect; /* Describes the current (last-painted) leg Rect *rect, /* Describes the current (last-painted) leg
* of the wire, in root coordinates. If NULL, * of the wire, in root coordinates. If NULL,
* then the box is used for this. * then the box is used for this.
*/ */
Point *point; /* Describes where to paint the wire to, in Point *point, /* Describes where to paint the wire to, in
* root coordinates. If NULL, then the cursor * root coordinates. If NULL, then the cursor
* location is used as the point. * location is used as the point.
*/ */
int direction; /* Which direction to run the wire, in root int direction) /* Which direction to run the wire, in root
* coords. If WIRE_CHOOSE, then pick a * coords. If WIRE_CHOOSE, then pick a
* direction based on point. If WIRE_VERTICAL * direction based on point. If WIRE_VERTICAL
* or WIRE_HORIZONTAL, then run the wire in * or WIRE_HORIZONTAL, then run the wire in
@ -557,7 +557,7 @@ WireAddLeg(rect, point, direction)
*/ */
void void
WireShowLeg() WireShowLeg(void)
{ {
Rect current, new, leg, editArea, *rect = &current; Rect current, new, leg, editArea, *rect = &current;
CellDef *boxRootDef; CellDef *boxRootDef;
@ -731,12 +731,12 @@ WireShowLeg()
#define WIRING_CONTACT_DOWN 0 #define WIRING_CONTACT_DOWN 0
void void
WireAddContact(newType, newWidth) WireAddContact(
TileType newType; /* New type of material to use for wiring. TileType newType, /* New type of material to use for wiring.
* If less than zero, pick a new type based * If less than zero, pick a new type based
* on what's underneath the cursor. * on what's underneath the cursor.
*/ */
int newWidth; /* New width to use for future wiring. If int newWidth) /* New width to use for future wiring. If
* newType is less than zero, then this * newType is less than zero, then this
* parameter is ignored and the width of * parameter is ignored and the width of
* the material underneath the cursor is * the material underneath the cursor is
@ -1071,9 +1071,9 @@ WireAddContact(newType, newWidth)
*/ */
void void
WireButtonProc(w, cmd) WireButtonProc(
MagWindow *w; /* Window in which button was pushed. */ MagWindow *w, /* Window in which button was pushed. */
TxCommand *cmd; /* Describes exactly what happened. */ TxCommand *cmd) /* Describes exactly what happened. */
{ {
/* We do commands on the down-pushes and ignore the releases. */ /* We do commands on the down-pushes and ignore the releases. */
@ -1112,7 +1112,7 @@ WireButtonProc(w, cmd)
*/ */
void void
WireInit() WireInit(void)
{ {
static char *doc = static char *doc =
"You are currently using the \"wiring\" tool. The button actions are:\n\ "You are currently using the \"wiring\" tool. The button actions are:\n\

View File

@ -56,7 +56,7 @@ int WireUnits; // Units per lambda for wiring sizes
*/ */
void void
WireTechInit() WireTechInit(void)
{ {
Contact *contact; Contact *contact;
int i; int i;
@ -87,10 +87,10 @@ WireTechInit()
/* ARGSUSED */ /* ARGSUSED */
bool bool
WireTechLine(sectionName, argc, argv) WireTechLine(
char *sectionName; /* Name of this section (unused). */ char *sectionName, /* Name of this section (unused). */
int argc; /* Number of arguments on line. */ int argc, /* Number of arguments on line. */
char *argv[]; /* Pointers to fields of line. */ char *argv[]) /* Pointers to fields of line. */
{ {
Contact *new; Contact *new;
int hasExtend = 0; int hasExtend = 0;
@ -193,7 +193,7 @@ WireTechLine(sectionName, argc, argv)
*/ */
void void
WireTechFinal() WireTechFinal(void)
{ {
/* Debugging code to print info about layers: */ /* Debugging code to print info about layers: */
@ -223,8 +223,9 @@ WireTechFinal()
*/ */
void void
WireTechScale(scalen, scaled) WireTechScale(
int scalen, scaled; int scalen,
int scaled)
{ {
Contact *con; Contact *con;

View File

@ -80,7 +80,7 @@ static int wireOldDir = GEO_NORTH; /* Last direction */
*/ */
void void
WireUndoInit() WireUndoInit(void)
{ {
extern void WireUndoForw(), WireUndoBack(); extern void WireUndoForw(), WireUndoBack();
@ -110,7 +110,7 @@ WireUndoInit()
*/ */
void void
WireRememberForUndo() WireRememberForUndo(void)
{ {
WireUndoEvent *wue; WireUndoEvent *wue;
@ -144,8 +144,8 @@ WireRememberForUndo()
*/ */
void void
WireUndoForw(wue) WireUndoForw(
WireUndoEvent *wue; /* Event to be redone. */ WireUndoEvent *wue) /* Event to be redone. */
{ {
WireType = wireOldType = wue->wue_newType; WireType = wireOldType = wue->wue_newType;
WireWidth = wireOldWidth = wue->wue_newWidth; WireWidth = wireOldWidth = wue->wue_newWidth;
@ -153,8 +153,8 @@ WireUndoForw(wue)
} }
void void
WireUndoBack(wue) WireUndoBack(
WireUndoEvent *wue; /* Event to be undone. */ WireUndoEvent *wue) /* Event to be undone. */
{ {
WireType = wireOldType = wue->wue_oldType; WireType = wireOldType = wue->wue_oldType;
WireWidth = wireOldWidth = wue->wue_oldWidth; WireWidth = wireOldWidth = wue->wue_oldWidth;