K&R commands/*.c: bulk forward reference function prototype conversion
K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
parent
afd1b0b2df
commit
56139b48eb
|
|
@ -156,7 +156,7 @@ CmdArray(
|
|||
Tcl_Obj *tobj;
|
||||
#endif
|
||||
|
||||
extern int selGetArrayFunc();
|
||||
extern int selGetArrayFunc(CellUse *selUse, CellUse *use, Transform *trans, LinkedArray **arg);
|
||||
|
||||
locargc = cmd->tx_argc;
|
||||
argstart = 1;
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ struct cmdCornerArea
|
|||
};
|
||||
|
||||
/* Forward declarations */
|
||||
int cmdDumpFunc();
|
||||
bool cmdDumpParseArgs();
|
||||
int cmdDumpFunc(Rect *rect, char *name, Label *label, Point *point);
|
||||
bool cmdDumpParseArgs(char *cmdName, MagWindow *w, TxCommand *cmd, CellUse *dummy, SearchContext *scx);
|
||||
#ifdef CALMA_MODULE
|
||||
|
||||
/*
|
||||
|
|
@ -1323,7 +1323,7 @@ CmdCellname(
|
|||
/* Unload the cell definition and re-read with search paths */
|
||||
if (locargc == 3)
|
||||
{
|
||||
void cmdFlushCell();
|
||||
void cmdFlushCell(CellDef *def, int force_deref);
|
||||
|
||||
if (cellname == NULL)
|
||||
cellDef = EditRootDef;
|
||||
|
|
@ -2387,8 +2387,8 @@ CmdContact(
|
|||
CCStruct ccs;
|
||||
Rect area;
|
||||
LinkedRect *lr = NULL;
|
||||
int cmdContactFunc(); /* Forward declaration */
|
||||
int cmdContactEraseFunc(); /* Forward declaration */
|
||||
int cmdContactFunc(Tile *tile, CCStruct *ccs); /* Forward declaration */
|
||||
int cmdContactEraseFunc(Tile *tile, LinkedRect **lr); /* Forward declaration */
|
||||
|
||||
windCheckOnlyWindow(&w, DBWclientID);
|
||||
if ((w == (MagWindow *) NULL) || (w->w_client != DBWclientID))
|
||||
|
|
@ -2522,7 +2522,7 @@ cmdContactFunc(
|
|||
{
|
||||
TileType stype;
|
||||
TileTypeBitMask smask;
|
||||
int cmdContactFunc2(); /* Forward declaration */
|
||||
int cmdContactFunc2(Tile *tile, CCStruct *ccs); /* Forward declaration */
|
||||
|
||||
TiToRect(tile, &ccs->area);
|
||||
GeoClip(&ccs->area, &ccs->clip);
|
||||
|
|
@ -2815,11 +2815,11 @@ CmdCorner(
|
|||
TileTypeBitMask maskBits;
|
||||
Rect editBox;
|
||||
SearchContext scx;
|
||||
extern int cmdCornerFunc();
|
||||
extern int cmdCornerFunc(Tile *tile, TreeContext *cxp);
|
||||
bool hasErr = FALSE;
|
||||
int locargc = cmd->tx_argc;
|
||||
|
||||
extern int cmdBevelFunc();
|
||||
extern int cmdBevelFunc(Tile *tile, TreeContext *cxp);
|
||||
bool dobevel = FALSE;
|
||||
NMCornerPath cmdPathList;
|
||||
|
||||
|
|
@ -3833,8 +3833,8 @@ CmdDown(
|
|||
{
|
||||
CellUse *use = NULL;
|
||||
Rect area, pointArea;
|
||||
int cmdEditRedisplayFunc(); /* External declaration. */
|
||||
int cmdDownEnumFunc(); /* Forward declaration. */
|
||||
int cmdEditRedisplayFunc(MagWindow *w, Rect *area); /* External declaration. */
|
||||
int cmdDownEnumFunc(CellUse *selUse, CellUse *use, Transform *transform, Rect *area); /* Forward declaration. */
|
||||
|
||||
if ((w != NULL) && (cmd->tx_argc == 2))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@ CmdEdit(
|
|||
Rect area, pointArea;
|
||||
CellUse *usave, *use = NULL;
|
||||
CellDef *csave;
|
||||
int cmdEditRedisplayFunc(); /* Forward declaration. */
|
||||
int cmdEditEnumFunc(); /* Forward declaration. */
|
||||
int cmdEditRedisplayFunc(MagWindow *w, Rect *area); /* Forward declaration. */
|
||||
int cmdEditEnumFunc(CellUse *selUse, CellUse *use, Transform *transform, Rect *area); /* Forward declaration. */
|
||||
bool noCurrentUse = FALSE;
|
||||
|
||||
if ((w != NULL) && (cmd->tx_argc == 2))
|
||||
|
|
@ -633,7 +633,7 @@ CmdErase(
|
|||
{
|
||||
Rect editRect, areaReturn;
|
||||
TileTypeBitMask mask, errorLayersForErasure, activeLayersForErasure;
|
||||
extern int cmdEraseCellsFunc();
|
||||
extern int cmdEraseCellsFunc(SearchContext *scx, ClientData cdarg);
|
||||
|
||||
windCheckOnlyWindow(&w, DBWclientID);
|
||||
if (w == (MagWindow *) NULL) return;
|
||||
|
|
@ -805,7 +805,7 @@ CmdExpand(
|
|||
Rect rootRect;
|
||||
CellUse *rootBoxUse;
|
||||
CellDef *rootBoxDef;
|
||||
int cmdExpandFunc(); /* Forward reference. */
|
||||
int cmdExpandFunc(CellUse *use, int windowMask); /* Forward reference. */
|
||||
|
||||
if (cmd->tx_argc > 2 || (cmd->tx_argc == 2
|
||||
&& (strncmp(cmd->tx_argv[1], "toggle", strlen(cmd->tx_argv[1])) != 0)))
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ CmdFill(
|
|||
TileTypeBitMask maskBits;
|
||||
Rect editBox;
|
||||
SearchContext scx;
|
||||
extern int cmdFillFunc();
|
||||
extern int cmdFillFunc(Tile *tile, TreeContext *cxp);
|
||||
|
||||
if (cmd->tx_argc < 2 || cmd->tx_argc > 3)
|
||||
{
|
||||
|
|
@ -802,7 +802,7 @@ CmdFindLabel(
|
|||
int found, occur, plainargs;
|
||||
bool doglob = FALSE; /* csh-style glob matching (see utils/match.c) */
|
||||
LabSearchRec lsr;
|
||||
int dbListLabels(); /* forward declaration */
|
||||
int dbListLabels(SearchContext *scx, Label *label, TerminalPath *tpath, ClientData cdarg); /* forward declaration */
|
||||
|
||||
plainargs = cmd->tx_argc;
|
||||
if ((plainargs > 2) && !strncmp(cmd->tx_argv[1], "-glob", 5))
|
||||
|
|
@ -1512,7 +1512,7 @@ CmdIdentify(
|
|||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
extern int cmdIdFunc(); /* Forward reference. */
|
||||
extern int cmdIdFunc(CellUse *selUse, CellUse *use, Transform *transform, char *newId); /* Forward reference. */
|
||||
|
||||
if (cmd->tx_argc != 2)
|
||||
{
|
||||
|
|
@ -1702,7 +1702,7 @@ checklocal:
|
|||
|
||||
if (locvalid == TRUE)
|
||||
{
|
||||
int findTile();
|
||||
int findTile(Tile *tile, TileType *rtype);
|
||||
CellDef *targetdef = use->cu_def;
|
||||
Plane *plane = targetdef->cd_planes[pnum];
|
||||
|
||||
|
|
@ -1865,7 +1865,7 @@ FlatCopyAllLabels(
|
|||
int xMask,
|
||||
CellUse *targetUse)
|
||||
{
|
||||
int flatCopyAllLabels();
|
||||
int flatCopyAllLabels(SearchContext *scx, Label *lab, TerminalPath *tpath, CellUse *targetUse);
|
||||
char pathstring[FLATTERMSIZE];
|
||||
TerminalPath tpath;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
|
||||
/* Forward declarations */
|
||||
|
||||
void CmdPaintEraseButton();
|
||||
void CmdPaintEraseButton(MagWindow *w, Point *refPoint, bool isPaint, bool isScreen);
|
||||
|
||||
/* See the SetLabel command */
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ CmdLoad(
|
|||
bool failNotFound = FALSE;
|
||||
unsigned char saveVerbose;
|
||||
unsigned char flags;
|
||||
int keepGoing(); /* forward declaration */
|
||||
int keepGoing(CellUse *use, ClientData clientdata); /* forward declaration */
|
||||
extern unsigned char DBVerbose; /* from DBio.c */
|
||||
|
||||
saveVerbose = DBVerbose;
|
||||
|
|
@ -1448,7 +1448,7 @@ complabel(
|
|||
/* Natural sort order routine from DBcellname.c
|
||||
* replaces strcasecmp().
|
||||
*/
|
||||
int strcmpbynum();
|
||||
int strcmpbynum(const char *s1, const char *s2);
|
||||
|
||||
Label *l1 = *((Label **)one);
|
||||
Label *l2 = *((Label **)two);
|
||||
|
|
@ -2076,7 +2076,7 @@ CmdPort(
|
|||
{
|
||||
int numlabels, n, p;
|
||||
Label **slablist, *tlab, *lastlab;
|
||||
extern int complabel();
|
||||
extern int complabel(const void *one, const void *two);
|
||||
|
||||
/* Create a sortable list of labels */
|
||||
numlabels = 0;
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
|
||||
/* Forward declarations */
|
||||
|
||||
extern char *cmdCheckNewName();
|
||||
extern int cmdSaveWindSet();
|
||||
extern void CmdSetWindCaption();
|
||||
extern char *cmdCheckNewName(CellDef *def, char *newName, bool tryRename, bool noninteractive);
|
||||
extern int cmdSaveWindSet(MagWindow *window, CellDef *def);
|
||||
extern void CmdSetWindCaption(CellUse *newEditUse, CellDef *rootDef);
|
||||
|
||||
TileTypeBitMask CmdYMLabel;
|
||||
TileTypeBitMask CmdYMCell;
|
||||
|
|
@ -908,7 +908,7 @@ CmdSetWindCaption(
|
|||
* edit cell was selected.
|
||||
*/
|
||||
{
|
||||
int cmdWindSet();
|
||||
int cmdWindSet(MagWindow *window);
|
||||
|
||||
newEditDef = (newEditUse) ? newEditUse->cu_def : NULL;
|
||||
newRootDef = rootDef;
|
||||
|
|
@ -1075,7 +1075,7 @@ bool
|
|||
CmdWarnWrite(void)
|
||||
{
|
||||
int count, code;
|
||||
int cmdWarnWriteFunc();
|
||||
int cmdWarnWriteFunc(CellDef *cellDef, int *pcount);
|
||||
static char *yesno[] = { "no", "yes", 0 };
|
||||
char *prompt;
|
||||
|
||||
|
|
@ -1125,7 +1125,7 @@ cmdExpandOneLevel(
|
|||
int bitmask,
|
||||
bool expand)
|
||||
{
|
||||
extern int cmdExpand1func();
|
||||
extern int cmdExpand1func(CellUse *cu, ClientData bitmask);
|
||||
|
||||
/* first, expand this cell use */
|
||||
DBExpand(cu, bitmask, expand);
|
||||
|
|
@ -1174,7 +1174,7 @@ CmdGetSelectedCell(
|
|||
*/
|
||||
{
|
||||
CellUse *result = NULL;
|
||||
int cmdGetSelFunc(); /* Forward declaration. */
|
||||
int cmdGetSelFunc(CellUse *selUse, CellUse *realUse, Transform *transform, CellUse **pResult); /* Forward declaration. */
|
||||
|
||||
cmdSelTrans = pTrans;
|
||||
(void) SelEnumCells(FALSE, (bool *) NULL, (SearchContext *) NULL,
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ CmdUnexpand(
|
|||
{
|
||||
int windowMask, boxMask;
|
||||
Rect rootRect;
|
||||
int cmdUnexpandFunc(); /* Forward reference. */
|
||||
int cmdUnexpandFunc(CellUse *use, int windowMask); /* Forward reference. */
|
||||
|
||||
if (cmd->tx_argc != 1)
|
||||
{
|
||||
|
|
@ -943,11 +943,14 @@ CmdWhat(
|
|||
|
||||
#ifdef MAGIC_WRAPPER
|
||||
Tcl_Obj *lobj, *paintobj, *paintcellobj, *celllistobj, *labelobj, *cellobj;
|
||||
extern int cmdWhatCellListFunc();
|
||||
extern int cmdWhatCellListFunc(CellUse *selUse, CellUse *realUse, Transform *transform, Tcl_Obj *newobj);
|
||||
#endif
|
||||
|
||||
extern int cmdWhatPaintFunc(), cmdWhatLabelFunc(), cmdWhatCellFunc();
|
||||
extern int cmdWhatLabelPreFunc(), orderLabelFunc();
|
||||
extern int cmdWhatPaintFunc(Rect *rect, TileType type, TileTypeBitMask *mask);
|
||||
extern int cmdWhatLabelFunc(LabelStore *entry, bool *foundAny);
|
||||
extern int cmdWhatCellFunc(CellUse *selUse, CellUse *realUse, Transform *transform, bool *foundAny);
|
||||
extern int cmdWhatLabelPreFunc(Label *label, CellUse *cellUse, Transform *transform, bool *foundAny);
|
||||
extern int orderLabelFunc(LabelStore *one, LabelStore *two);
|
||||
|
||||
locargc = cmd->tx_argc;
|
||||
|
||||
|
|
@ -1345,7 +1348,7 @@ cmdWhatCellFunc(
|
|||
*/
|
||||
{
|
||||
/* Forward reference */
|
||||
char *dbGetUseName();
|
||||
char *dbGetUseName(CellUse *celluse);
|
||||
|
||||
if (!*foundAny)
|
||||
{
|
||||
|
|
@ -1370,7 +1373,7 @@ cmdWhatCellListFunc(
|
|||
{
|
||||
Tcl_Obj *tuple;
|
||||
/* Forward reference */
|
||||
char *dbGetUseName();
|
||||
char *dbGetUseName(CellUse *celluse);
|
||||
|
||||
tuple = Tcl_NewListObj(0, NULL);
|
||||
Tcl_ListObjAppendElement(magicinterp, tuple,
|
||||
|
|
@ -1859,7 +1862,7 @@ CmdWriteall(
|
|||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int cmdWriteallFunc();
|
||||
int cmdWriteallFunc(CellDef *def, TxCommand *cmd);
|
||||
int option = -1;
|
||||
static char *writeallOpts[] = { "force", "modified", 0 };
|
||||
int argc;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
|
||||
/* Forward declarations */
|
||||
|
||||
extern void cmdPsearchStats();
|
||||
extern void cmdPsearchStats(char *str, struct tms *tl, struct tms *td, int count);
|
||||
|
||||
void cmdStatsHier(CellDef *, int, CellDef *);
|
||||
|
||||
|
|
@ -436,7 +436,7 @@ CmdTilestats(
|
|||
bool allDefs = FALSE;
|
||||
char **av = cmd->tx_argv + 1;
|
||||
int ac = cmd->tx_argc - 1;
|
||||
int cmdStatsFunc();
|
||||
int cmdStatsFunc(CellDef *def, FILE *outf);
|
||||
|
||||
if (ac > 2)
|
||||
{
|
||||
|
|
@ -515,7 +515,8 @@ cmdStatsFunc(
|
|||
CellDef *def,
|
||||
FILE *outf)
|
||||
{
|
||||
int cmdStatsCount(), cmdStatsOutput();
|
||||
int cmdStatsCount(CellDef *def, struct countClient *cc);
|
||||
int cmdStatsOutput(CellDef *def, struct countClient *cc);
|
||||
struct countClient cc;
|
||||
int total;
|
||||
TileType t;
|
||||
|
|
@ -568,7 +569,7 @@ cmdStatsCount(
|
|||
CellDef *def,
|
||||
struct countClient *cc)
|
||||
{
|
||||
int cmdStatsCountTile();
|
||||
int cmdStatsCountTile(Tile *tile, struct cellInfo *ci);
|
||||
int pNum;
|
||||
struct cellInfo *ci;
|
||||
TileType t;
|
||||
|
|
@ -755,7 +756,7 @@ CmdPsearch(
|
|||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
char *RunStats();
|
||||
char *RunStats(int flags, struct tms *lastt, struct tms *deltat);
|
||||
static struct tms tlast, tdelta;
|
||||
Point p;
|
||||
Plane *plane;
|
||||
|
|
@ -823,7 +824,7 @@ cmdPsearchStats(
|
|||
struct tms *td,
|
||||
int count)
|
||||
{
|
||||
char *RunStats();
|
||||
char *RunStats(int flags, struct tms *lastt, struct tms *deltat);
|
||||
char *rstatp;
|
||||
int us, ups;
|
||||
|
||||
|
|
@ -867,8 +868,9 @@ CmdTsearch(
|
|||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int cmdTsrFunc();
|
||||
char *RunStats(), *rstatp;
|
||||
int cmdTsrFunc(Tile *tp);
|
||||
char *RunStats(int flags, struct tms *lastt, struct tms *deltat);
|
||||
char *rstatp;
|
||||
static TileTypeBitMask mask;
|
||||
static struct tms tlast, tdelta;
|
||||
Rect rtool, rsearch;
|
||||
|
|
|
|||
Loading…
Reference in New Issue