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

View File

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

View File

@ -57,8 +57,8 @@ extern int CalmaPolygonCount;
extern int CalmaPathCount;
extern HashTable calmaDefInitHash;
extern void calmaLayerError();
bool calmaReadPath();
extern void calmaLayerError(char *mesg, int layer, int dt);
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 void calmaUnexpected();
extern int calmaWriteInitFunc();
extern void calmaUnexpected(int wanted, int got);
extern int calmaWriteInitFunc(CellDef *def);
/*
* Scaling.

View File

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

View File

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