From bf45f9ea313c07da729df7065cfa5e0d2910a578 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Fri, 4 Oct 2024 11:26:58 +0100 Subject: [PATCH] K&R: cif/*.c bulk forward reference function prototype conversion K&R obsolete syntax removal for C23 compatibility series --- cif/CIFgen.c | 12 ++++++------ cif/CIFrdcl.c | 4 ++-- cif/CIFrdpt.c | 2 +- cif/CIFrdtech.c | 4 ++-- cif/CIFsee.c | 2 +- cif/CIFtech.c | 4 ++-- cif/CIFwrite.c | 18 +++++++++--------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/cif/CIFgen.c b/cif/CIFgen.c index 250f1d41..e6cd47ef 100644 --- a/cif/CIFgen.c +++ b/cif/CIFgen.c @@ -78,8 +78,8 @@ static int growDistance; /* Distance to grow stuff. */ static Plane *cifPlane; /* Plane acted on by search functions. */ static int cifScale; /* Scale factor to use on tiles. */ -extern void cifClipPlane(); -extern void cifGenClip(); +extern void cifClipPlane(Plane *plane, Rect *clip); +extern void cifGenClip(Rect *area, Rect *expanded, Rect *clip); /* * ---------------------------------------------------------------------------- @@ -305,7 +305,7 @@ cifGrowMinFunc(tile, table) TileType type, tptype; Tile *tp, *tp2; bool changed; - void SetMinBoxGrid(); /* Forward reference */ + void SetMinBoxGrid(Rect *area, int width); /* Forward reference */ TiToRect(tile, &area); @@ -1793,7 +1793,7 @@ cifBridgeFunc1(tile, brs) int width = brs->bridge->br_width; int spacing = growDistance; BridgeCheckStruct brcs; - int cifBridgeCheckFunc(); /* Forward reference */ + int cifBridgeCheckFunc(Tile *tile, BridgeCheckStruct *brcs); /* Forward reference */ /* If tile is marked, then it has been handled, so ignore it */ if (tile->ti_client != (ClientData)CIF_UNPROCESSED) return 0; @@ -1916,7 +1916,7 @@ cifBridgeFunc2(tile, brs) int wtest; int spacing = growDistance; BridgeCheckStruct brcs; - int cifBridgeCheckFunc(); /* Forward reference */ + int cifBridgeCheckFunc(Tile *tile, BridgeCheckStruct *brcs); /* Forward reference */ /* If tile is marked, then it has been handled, so ignore it */ if (tile->ti_client != (ClientData)CIF_UNPROCESSED) return 0; @@ -2087,7 +2087,7 @@ cifCloseFunc(tile, plane) { Rect area, newarea; int atotal; - int cifGatherFunc(); + int cifGatherFunc(Tile *tile, int *atotal, int mode); /* If tile is marked, then it has been handled, so ignore it */ if (tile->ti_client != (ClientData)CIF_UNPROCESSED) return 0; diff --git a/cif/CIFrdcl.c b/cif/CIFrdcl.c index 7d859077..f08c8116 100644 --- a/cif/CIFrdcl.c +++ b/cif/CIFrdcl.c @@ -596,8 +596,8 @@ int CIFPaintCurrent(filetype) bool filetype; { - extern int cifMakeBoundaryFunc(); /* Forward declaration. */ - extern int cifPaintCurrentFunc(); /* Forward declaration. */ + extern int cifMakeBoundaryFunc(Tile *tile, ClientData clientdata); /* Forward declaration. */ + extern int cifPaintCurrentFunc(Tile *tile, TileType type); /* Forward declaration. */ Plane *plane, *swapplane; int i; diff --git a/cif/CIFrdpt.c b/cif/CIFrdpt.c index d05bedf1..ba407ee6 100644 --- a/cif/CIFrdpt.c +++ b/cif/CIFrdpt.c @@ -242,7 +242,7 @@ CIFPropRecordPath(def, pathheadp, iswire, propname) bool iswire; char *propname; { - extern float CIFGetOutputScale(); + extern float CIFGetOutputScale(int convert); CIFPath *pathp; char *pathstr, *sptr; int components; diff --git a/cif/CIFrdtech.c b/cif/CIFrdtech.c index 271ee1b3..723c0644 100644 --- a/cif/CIFrdtech.c +++ b/cif/CIFrdtech.c @@ -62,8 +62,8 @@ CIFReadLayer *cifCurReadLayer; /* Current layer being processed. */ CIFOp *cifCurReadOp; /* Last geometric operation seen. */ /* Forward declarations */ -void cifReadStyleInit(); -void CIFReadLoadStyle(); +void cifReadStyleInit(void); +void CIFReadLoadStyle(char *stylename); /* * ---------------------------------------------------------------------------- diff --git a/cif/CIFsee.c b/cif/CIFsee.c index 9f461af4..6f7bc43d 100644 --- a/cif/CIFsee.c +++ b/cif/CIFsee.c @@ -438,7 +438,7 @@ CIFCoverageLayer(rootDef, area, layer, dolist) SearchContext scx; TileTypeBitMask mask, depend; float fcover; - int cifCoverageFunc(); + int cifCoverageFunc(Tile *tile, ClientData *arg); bool doBox = (area != &rootDef->cd_bbox) ? TRUE : FALSE; /* Check out the CIF layer name. */ diff --git a/cif/CIFtech.c b/cif/CIFtech.c index 1dce5f44..42e73ec8 100644 --- a/cif/CIFtech.c +++ b/cif/CIFtech.c @@ -64,8 +64,8 @@ TileTypeBitMask CIFSolidBits; /* Forward Declarations */ -void cifTechStyleInit(); -bool cifCheckCalmaNum(); +void cifTechStyleInit(void); +bool cifCheckCalmaNum(char *str); /* * ---------------------------------------------------------------------------- diff --git a/cif/CIFwrite.c b/cif/CIFwrite.c index 64e427cc..22d1fe72 100644 --- a/cif/CIFwrite.c +++ b/cif/CIFwrite.c @@ -44,15 +44,15 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "textio/textio.h" /* Forward declarations */ -extern int cifWriteInitFunc(); -extern int cifWriteMarkFunc(); -extern int cifWritePaintFunc(); -extern int cifWriteLabelFunc(); -extern int cifWriteUseFunc(); -extern void cifOutPreamble(); -extern void cifOut(); -extern void cifOutFunc(); -extern int GrClipTriangle(); +extern int cifWriteInitFunc(CellDef *def); +extern int cifWriteMarkFunc(CellUse *use); +extern int cifWritePaintFunc(Tile *tile, FILE *f); +extern int cifWriteLabelFunc(Tile *tile, FILE *f); +extern int cifWriteUseFunc(CellUse *use, FILE *f); +extern void cifOutPreamble(FILE *outf, CellDef *cell); +extern void cifOut(FILE *outf); +extern void cifOutFunc(CellDef *def, FILE *f); +extern void GrClipTriangle(Rect *r, Rect *c, int clipped, TileType dinfo, Point *points, int *np); /* Current cell number in CIF numbering scheme */