K&R calma/*.c: bulk forward reference function prototype conversion

K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
Darryl L. Miles 2024-10-04 11:32:22 +01:00 committed by Tim Edwards
parent 7696f673df
commit f3ace65a78
6 changed files with 45 additions and 45 deletions

View File

@ -59,9 +59,9 @@ extern HashTable calmaDefInitHash;
extern int CalmaPolygonCount; extern int CalmaPolygonCount;
/* forward declarations */ /* forward declarations */
int calmaElementSref(); int calmaElementSref(char *filename);
bool calmaParseElement(); bool calmaParseElement(char *filename, int *pnsrefs, int *pnpaths);
void calmaUniqueCell(); void calmaUniqueCell(char *sname);
/* Structure used when flattening the GDS hierarchy on read-in */ /* Structure used when flattening the GDS hierarchy on read-in */
@ -245,7 +245,7 @@ calmaExact()
int pNum; int pNum;
Plane *newplane; Plane *newplane;
Plane **parray; Plane **parray;
int gdsCopyPaintFunc(); /* Forward reference */ int gdsCopyPaintFunc(Tile *tile, GDSCopyRec *gdsCopyRec); /* Forward reference */
parray = (Plane **)mallocMagic(MAXCIFRLAYERS * sizeof(Plane *)); parray = (Plane **)mallocMagic(MAXCIFRLAYERS * sizeof(Plane *));
@ -776,8 +776,8 @@ calmaElementSref(filename)
Point refarray[3], refunscaled[3], p; Point refarray[3], refunscaled[3], p;
CellUse *use; CellUse *use;
CellDef *def; CellDef *def;
int gdsCopyPaintFunc(); /* Forward reference */ int gdsCopyPaintFunc(Tile *tile, GDSCopyRec *gdsCopyRec); /* Forward reference */
int gdsHasUses(); /* Forward reference */ int gdsHasUses(CellUse *use, ClientData clientdata); /* Forward reference */
/* Added by NP */ /* Added by NP */
char *useid = NULL, *arraystr = NULL; char *useid = NULL, *arraystr = NULL;
int propAttrType; int propAttrType;

View File

@ -50,8 +50,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "calma/calma.h" #include "calma/calma.h"
/* Forward declarations */ /* Forward declarations */
bool calmaReadR8(); bool calmaReadR8(double *pd);
bool calmaSkipBytes(); bool calmaSkipBytes(int nbytes);
/* /*

View File

@ -57,8 +57,8 @@ extern int CalmaPolygonCount;
extern int CalmaPathCount; extern int CalmaPathCount;
extern HashTable calmaDefInitHash; extern HashTable calmaDefInitHash;
extern void calmaLayerError(); extern void calmaLayerError(char *mesg, int layer, int dt);
bool calmaReadPath(); bool calmaReadPath(CIFPath **pathheadpp, int iscale);
/* /*
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------

View File

@ -111,8 +111,8 @@ bool CalmaUnique = FALSE; /* If TRUE, then if a cell exists in
*/ */
extern bool CalmaDoLibrary; /* Also used by GDS write */ extern bool CalmaDoLibrary; /* Also used by GDS write */
extern void calmaUnexpected(); extern void calmaUnexpected(int wanted, int got);
extern int calmaWriteInitFunc(); extern int calmaWriteInitFunc(CellDef *def);
/* /*
* Scaling. * Scaling.

View File

@ -81,24 +81,24 @@ int CalmaCompression = 0; /* Output file compression level (0 = uncompressed) *
#endif #endif
/* Forward declarations */ /* Forward declarations */
extern int calmaWriteInitFunc(); extern int calmaWriteInitFunc(CellDef *def);
extern int calmaWritePaintFunc(); extern int calmaWritePaintFunc(Tile *tile, calmaOutputStruct *cos);
extern int calmaMergePaintFunc(); extern int calmaMergePaintFunc(Tile *tile, calmaOutputStruct *cos);
extern int calmaWriteUseFunc(); extern int calmaWriteUseFunc(CellUse *use, FILE *f);
extern int calmaPaintLabelFunc(); extern int calmaPaintLabelFunc(Tile *tile, calmaOutputStruct *cos);
extern void calmaWriteContacts(); extern void calmaWriteContacts(FILE *f);
extern void calmaDelContacts(); extern void calmaDelContacts(void);
extern void calmaOutFunc(); extern void calmaOutFunc(CellDef *def, FILE *f, Rect *cliprect);
extern void calmaOutStructName(); extern void calmaOutStructName(int type, CellDef *def, FILE *f);
extern void calmaWriteLabelFunc(); extern void calmaWriteLabelFunc(Label *lab, int ltype, int type, FILE *f);
extern void calmaOutHeader(); extern void calmaOutHeader(CellDef *rootDef, FILE *f);
extern void calmaOutDate(); extern void calmaOutDate(time_t t, FILE *f);
extern void calmaOutStringRecord(); extern void calmaOutStringRecord(int type, char *str, FILE *f);
extern void calmaOut8(); extern void calmaOut8(char *str, FILE *f);
extern void calmaOutR8(); extern void calmaOutR8(double d, FILE *f);
extern void calmaProcessBoundary(); extern void calmaProcessBoundary(BoundaryTop *blist, calmaOutputStruct *cos);
extern void calmaRemoveColinear(); extern void calmaRemoveColinear(BoundaryTop *blist);
extern void calmaRemoveDegenerate(); extern void calmaRemoveDegenerate(BoundaryTop *blist);
/* Structure used by calmaWritePaintFunc() */ /* Structure used by calmaWritePaintFunc() */

View File

@ -90,22 +90,22 @@ extern int calmaPaintLayerNumber;
extern int calmaPaintLayerType; extern int calmaPaintLayerType;
/* External functions from CalmaWrite.c */ /* External functions from CalmaWrite.c */
extern int calmaWriteInitFunc(); extern int calmaWriteInitFunc(CellDef *def);
/* Forward declarations */ /* Forward declarations */
extern int calmaWritePaintFuncZ(); extern int calmaWritePaintFuncZ(Tile *tile, calmaOutputStructZ *cos);
extern int calmaMergePaintFuncZ(); extern int calmaMergePaintFuncZ(Tile *tile, calmaOutputStructZ *cos);
extern int calmaWriteUseFuncZ(); extern int calmaWriteUseFuncZ(CellUse *use, gzFile f);
extern int calmaPaintLabelFuncZ(); extern int calmaPaintLabelFuncZ(Tile *tile, calmaOutputStructZ *cos);
extern void calmaWriteContactsZ(); extern void calmaWriteContactsZ(gzFile f);
extern void calmaOutFuncZ(); extern void calmaOutFuncZ(CellDef *def, gzFile f, Rect *cliprect);
extern void calmaOutStructNameZ(); extern void calmaOutStructNameZ(int type, CellDef *def, gzFile f);
extern void calmaWriteLabelFuncZ(); extern void calmaWriteLabelFuncZ(Label *lab, int ltype, int type, gzFile f);
extern void calmaOutHeaderZ(); extern void calmaOutHeaderZ(CellDef *rootDef, gzFile f);
extern void calmaOutDateZ(); extern void calmaOutDateZ(time_t t, gzFile f);
extern void calmaOutStringRecordZ(); extern void calmaOutStringRecordZ(int type, char *str, gzFile f);
extern void calmaOut8Z(); extern void calmaOut8Z(char *str, gzFile f);
extern void calmaOutR8Z(); extern void calmaOutR8Z(double d, gzFile f);
/* Structure used by calmaWritePaintFuncZ() and others */ /* Structure used by calmaWritePaintFuncZ() and others */
@ -1191,7 +1191,7 @@ calmaOutFuncZ(def, f, cliprect)
calmaOutputStructZ cos; calmaOutputStructZ cos;
bool propfound; bool propfound;
char *propvalue; char *propvalue;
extern int compport(); /* Forward declaration */ extern int compport(const void *one, const void *two); /* Forward declaration */
cos.f = f; cos.f = f;
cos.area = (cliprect == &TiPlaneRect) ? NULL : cliprect; cos.area = (cliprect == &TiPlaneRect) ? NULL : cliprect;