K&R calma/*.c: bulk function implementation conversion
K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
parent
f3ace65a78
commit
a9ea08a597
|
|
@ -96,8 +96,8 @@ typedef struct {
|
|||
*/
|
||||
|
||||
OFFTYPE
|
||||
calmaSetPosition(sname)
|
||||
char *sname;
|
||||
calmaSetPosition(
|
||||
char *sname)
|
||||
{
|
||||
OFFTYPE originalPos = 0, currentPos = 0;
|
||||
int nbytes, rtype;
|
||||
|
|
@ -188,7 +188,7 @@ calmaSetPosition(sname)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaNextCell()
|
||||
calmaNextCell(void)
|
||||
{
|
||||
int nbytes, rtype;
|
||||
|
||||
|
|
@ -240,7 +240,7 @@ calmaNextCell()
|
|||
*/
|
||||
|
||||
Plane **
|
||||
calmaExact()
|
||||
calmaExact(void)
|
||||
{
|
||||
int pNum;
|
||||
Plane *newplane;
|
||||
|
|
@ -298,9 +298,9 @@ calmaExact()
|
|||
*/
|
||||
|
||||
int
|
||||
calmaFlattenPolygonFunc(use, parent)
|
||||
CellUse *use;
|
||||
CellDef *parent;
|
||||
calmaFlattenPolygonFunc(
|
||||
CellUse *use,
|
||||
CellDef *parent)
|
||||
{
|
||||
int i;
|
||||
CellUse dummy;
|
||||
|
|
@ -347,8 +347,8 @@ calmaFlattenPolygonFunc(use, parent)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaParseStructure(filename)
|
||||
char *filename; /* Name of the GDS file read */
|
||||
calmaParseStructure(
|
||||
char *filename) /* Name of the GDS file read */
|
||||
{
|
||||
static int structs[] = { CALMA_STRCLASS, CALMA_STRTYPE, -1 };
|
||||
int nbytes = -1, rtype = 0, nsrefs, osrefs, npaths;
|
||||
|
|
@ -675,9 +675,10 @@ syntaxerror:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaParseElement(filename, pnsrefs, pnpaths)
|
||||
char *filename;
|
||||
int *pnsrefs, *pnpaths;
|
||||
calmaParseElement(
|
||||
char *filename,
|
||||
int *pnsrefs,
|
||||
int *pnpaths)
|
||||
{
|
||||
static int node[] = { CALMA_ELFLAGS, CALMA_PLEX, CALMA_LAYER,
|
||||
CALMA_NODETYPE, CALMA_XY, -1 };
|
||||
|
|
@ -737,9 +738,9 @@ calmaParseElement(filename, pnsrefs, pnpaths)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaEnumFunc(tile, plane)
|
||||
Tile *tile;
|
||||
int *plane;
|
||||
calmaEnumFunc(
|
||||
Tile *tile,
|
||||
int *plane)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -764,8 +765,8 @@ calmaEnumFunc(tile, plane)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaElementSref(filename)
|
||||
char *filename;
|
||||
calmaElementSref(
|
||||
char *filename)
|
||||
{
|
||||
int nbytes, rtype, cols, rows, nref, n, i, savescale;
|
||||
int xlo, ylo, xhi, yhi, xsep, ysep;
|
||||
|
|
@ -1232,9 +1233,9 @@ calmaElementSref(filename)
|
|||
/* Callback function for determining if a cell has at least one subcell */
|
||||
|
||||
int
|
||||
gdsHasUses(use, clientdata)
|
||||
CellUse *use;
|
||||
ClientData clientdata;
|
||||
gdsHasUses(
|
||||
CellUse *use,
|
||||
ClientData clientdata)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -1242,9 +1243,9 @@ gdsHasUses(use, clientdata)
|
|||
/* Callback function for copying paint from one CIF cell into another */
|
||||
|
||||
int
|
||||
gdsCopyPaintFunc(tile, gdsCopyRec)
|
||||
Tile *tile;
|
||||
GDSCopyRec *gdsCopyRec;
|
||||
gdsCopyPaintFunc(
|
||||
Tile *tile,
|
||||
GDSCopyRec *gdsCopyRec)
|
||||
{
|
||||
int pNum;
|
||||
TileType dinfo;
|
||||
|
|
@ -1289,8 +1290,8 @@ gdsCopyPaintFunc(tile, gdsCopyRec)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaUniqueCell(sname)
|
||||
char *sname;
|
||||
calmaUniqueCell(
|
||||
char *sname)
|
||||
{
|
||||
HashEntry *h;
|
||||
CellDef *def, *testdef;
|
||||
|
|
@ -1349,14 +1350,14 @@ calmaUniqueCell(sname)
|
|||
*/
|
||||
|
||||
CellDef *
|
||||
calmaFindCell(name, was_called, predefined)
|
||||
char *name; /* Name of desired cell */
|
||||
bool *was_called; /* If this cell is in the hash table, then it
|
||||
calmaFindCell(
|
||||
char *name, /* Name of desired cell */
|
||||
bool *was_called, /* If this cell is in the hash table, then it
|
||||
* was instanced before it was defined. We
|
||||
* need to know this so as to avoid flattening
|
||||
* the cell if requested.
|
||||
*/
|
||||
bool *predefined; /* If this cell was in memory before the GDS
|
||||
bool *predefined) /* If this cell was in memory before the GDS
|
||||
* file was read, then this flag gets set.
|
||||
*/
|
||||
|
||||
|
|
@ -1431,8 +1432,8 @@ calmaFindCell(name, was_called, predefined)
|
|||
*/
|
||||
|
||||
CellDef *
|
||||
calmaLookCell(name)
|
||||
char *name; /* Name of desired cell */
|
||||
calmaLookCell(
|
||||
char *name) /* Name of desired cell */
|
||||
{
|
||||
HashEntry *h;
|
||||
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ bool calmaSkipBytes(int nbytes);
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadTransform(ptrans, name)
|
||||
Transform *ptrans; /* Fill in this transform */
|
||||
char *name; /* Name of subcell (for errors) */
|
||||
calmaReadTransform(
|
||||
Transform *ptrans, /* Fill in this transform */
|
||||
char *name) /* Name of subcell (for errors) */
|
||||
{
|
||||
int nbytes, rtype, flags, angle;
|
||||
double dangle;
|
||||
|
|
@ -205,9 +205,9 @@ calmaReadTransform(ptrans, name)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadI2Record(type, pvalue)
|
||||
int type; /* Type of record expected */
|
||||
int *pvalue; /* Store value here */
|
||||
calmaReadI2Record(
|
||||
int type, /* Type of record expected */
|
||||
int *pvalue) /* Store value here */
|
||||
{
|
||||
int nbytes, rtype, n;
|
||||
|
||||
|
|
@ -250,9 +250,9 @@ eof:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadI4Record(type, pvalue)
|
||||
int type; /* Type of record expected */
|
||||
int *pvalue; /* Store value here */
|
||||
calmaReadI4Record(
|
||||
int type, /* Type of record expected */
|
||||
int *pvalue) /* Store value here */
|
||||
{
|
||||
int nbytes, rtype, n;
|
||||
|
||||
|
|
@ -298,9 +298,9 @@ eof:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadStampRecord(type, stampptr)
|
||||
int type;
|
||||
int *stampptr;
|
||||
calmaReadStampRecord(
|
||||
int type,
|
||||
int *stampptr)
|
||||
{
|
||||
int nbytes, rtype;
|
||||
struct tm gds_timestamp;
|
||||
|
|
@ -371,9 +371,9 @@ eof:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadStringRecord(type, str)
|
||||
int type;
|
||||
char **str;
|
||||
calmaReadStringRecord(
|
||||
int type,
|
||||
char **str)
|
||||
{
|
||||
int nbytes, rtype;
|
||||
|
||||
|
|
@ -420,8 +420,8 @@ eof:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadR8(pd)
|
||||
double *pd; /* Store result in *pd */
|
||||
calmaReadR8(
|
||||
double *pd) /* Store result in *pd */
|
||||
{
|
||||
int i, exponent;
|
||||
unsigned char dchars[8];
|
||||
|
|
@ -489,8 +489,8 @@ calmaReadR8(pd)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaSkipSet(skipwhat)
|
||||
int *skipwhat;
|
||||
calmaSkipSet(
|
||||
int *skipwhat)
|
||||
{
|
||||
int *skipp;
|
||||
int nbytes, rtype;
|
||||
|
|
@ -533,8 +533,8 @@ skipit:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaSkipExact(type)
|
||||
int type;
|
||||
calmaSkipExact(
|
||||
int type)
|
||||
{
|
||||
int nbytes, rtype;
|
||||
|
||||
|
|
@ -579,8 +579,8 @@ eof:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaSkipTo(what)
|
||||
int what;
|
||||
calmaSkipTo(
|
||||
int what)
|
||||
{
|
||||
int nbytes, rtype;
|
||||
|
||||
|
|
@ -615,8 +615,8 @@ calmaSkipTo(what)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaSkipBytes(nbytes)
|
||||
int nbytes; /* Skip this many bytes */
|
||||
calmaSkipBytes(
|
||||
int nbytes) /* Skip this many bytes */
|
||||
{
|
||||
while (nbytes-- > 0)
|
||||
if (FGETC(calmaInputFile) < 0)
|
||||
|
|
|
|||
|
|
@ -82,8 +82,9 @@ bool calmaReadPath(CIFPath **pathheadpp, int iscale);
|
|||
*/
|
||||
|
||||
void
|
||||
calmaInputRescale(n, d)
|
||||
int n, d;
|
||||
calmaInputRescale(
|
||||
int n,
|
||||
int d)
|
||||
{
|
||||
HashEntry *h;
|
||||
HashSearch hs;
|
||||
|
|
@ -135,9 +136,9 @@ calmaInputRescale(n, d)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaReadPoint(p, iscale)
|
||||
Point *p;
|
||||
int iscale;
|
||||
calmaReadPoint(
|
||||
Point *p,
|
||||
int iscale)
|
||||
{
|
||||
int rescale;
|
||||
|
||||
|
|
@ -205,7 +206,7 @@ calmaReadPoint(p, iscale)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaElementBoundary()
|
||||
calmaElementBoundary(void)
|
||||
{
|
||||
int dt, layer, ciftype;
|
||||
CIFPath *pathheadp;
|
||||
|
|
@ -406,7 +407,7 @@ calmaElementBoundary()
|
|||
*/
|
||||
|
||||
void
|
||||
calmaElementBox()
|
||||
calmaElementBox(void)
|
||||
{
|
||||
int nbytes, rtype, npoints, savescale;
|
||||
int dt, layer, ciftype;
|
||||
|
|
@ -501,7 +502,7 @@ calmaElementBox()
|
|||
*/
|
||||
|
||||
void
|
||||
calmaElementPath()
|
||||
calmaElementPath(void)
|
||||
{
|
||||
int nbytes = -1, rtype = 0, extend1, extend2;
|
||||
int layer, dt, width, pathtype, ciftype, savescale;
|
||||
|
|
@ -729,7 +730,7 @@ calmaElementPath()
|
|||
*/
|
||||
|
||||
void
|
||||
calmaElementText()
|
||||
calmaElementText(void)
|
||||
{
|
||||
static int ignore[] = { CALMA_PATHTYPE, CALMA_WIDTH, -1 };
|
||||
char *textbody = NULL;
|
||||
|
|
@ -1108,9 +1109,9 @@ calmaElementText()
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaReadPath(pathheadpp, iscale)
|
||||
CIFPath **pathheadpp;
|
||||
int iscale;
|
||||
calmaReadPath(
|
||||
CIFPath **pathheadpp,
|
||||
int iscale)
|
||||
{
|
||||
CIFPath path, *pathtailp, *newpathp;
|
||||
int nbytes, rtype, npoints, savescale;
|
||||
|
|
@ -1215,10 +1216,10 @@ calmaReadPath(pathheadpp, iscale)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaLayerError(mesg, layer, dt)
|
||||
char *mesg;
|
||||
int layer;
|
||||
int dt;
|
||||
calmaLayerError(
|
||||
char *mesg,
|
||||
int layer,
|
||||
int dt)
|
||||
{
|
||||
CalmaLayerType clt;
|
||||
HashEntry *he;
|
||||
|
|
|
|||
|
|
@ -167,9 +167,9 @@ int calmaElementIgnore[] = { CALMA_ELFLAGS, CALMA_PLEX, -1 };
|
|||
*/
|
||||
|
||||
void
|
||||
CalmaReadFile(file, filename)
|
||||
FILETYPE file; /* File from which to read Calma */
|
||||
char *filename; /* The real name of the file read */
|
||||
CalmaReadFile(
|
||||
FILETYPE file, /* File from which to read Calma */
|
||||
char *filename) /* The real name of the file read */
|
||||
{
|
||||
int k, version;
|
||||
char *libname = NULL, *libnameptr = NULL;
|
||||
|
|
@ -347,7 +347,7 @@ done:
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaParseUnits()
|
||||
calmaParseUnits(void)
|
||||
{
|
||||
int nbytes, rtype = 0;
|
||||
double metersPerDBUnit;
|
||||
|
|
@ -458,7 +458,8 @@ calmaParseUnits()
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void CalmaReadError(char *format, ...)
|
||||
void
|
||||
CalmaReadError(char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
OFFTYPE filepos;
|
||||
|
|
@ -515,9 +516,9 @@ void CalmaReadError(char *format, ...)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaUnexpected(wanted, got)
|
||||
int wanted; /* Type of record we wanted */
|
||||
int got; /* Type of record we got */
|
||||
calmaUnexpected(
|
||||
int wanted, /* Type of record we wanted */
|
||||
int got) /* Type of record we got */
|
||||
{
|
||||
CalmaReadError("Unexpected record type in input: \n");
|
||||
|
||||
|
|
@ -558,8 +559,8 @@ calmaUnexpected(wanted, got)
|
|||
*/
|
||||
|
||||
char *
|
||||
calmaRecordName(rtype)
|
||||
int rtype;
|
||||
calmaRecordName(
|
||||
int rtype)
|
||||
{
|
||||
static char numeric[10];
|
||||
static char *calmaRecordNames[] =
|
||||
|
|
@ -607,7 +608,7 @@ calmaRecordName(rtype)
|
|||
*/
|
||||
|
||||
void
|
||||
CalmaTechInit()
|
||||
CalmaTechInit(void)
|
||||
{
|
||||
ASSERT(sizeof(FourByteInt)==4, "definition in calmaInt.h");
|
||||
ASSERT(sizeof(TwoByteInt)==2, "definition in calmaInt.h");
|
||||
|
|
|
|||
|
|
@ -291,9 +291,9 @@ static char calmaMapTablePermissive[] =
|
|||
*/
|
||||
|
||||
bool
|
||||
CalmaWrite(rootDef, f)
|
||||
CellDef *rootDef; /* Pointer to CellDef to be written */
|
||||
FILE *f; /* Open output file */
|
||||
CalmaWrite(
|
||||
CellDef *rootDef, /* Pointer to CellDef to be written */
|
||||
FILE *f) /* Open output file */
|
||||
{
|
||||
int oldCount = DBWFeedbackCount, problems, nerr;
|
||||
bool good;
|
||||
|
|
@ -418,11 +418,11 @@ CalmaWrite(rootDef, f)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaDumpStructure(def, outf, calmaDefHash, filename)
|
||||
CellDef *def;
|
||||
FILE *outf;
|
||||
HashTable *calmaDefHash;
|
||||
char *filename;
|
||||
calmaDumpStructure(
|
||||
CellDef *def,
|
||||
FILE *outf,
|
||||
HashTable *calmaDefHash,
|
||||
char *filename)
|
||||
{
|
||||
int nbytes = -1, rtype = 0;
|
||||
char *strname = NULL, *newnameptr;
|
||||
|
|
@ -688,11 +688,11 @@ syntaxerror:
|
|||
*/
|
||||
|
||||
void
|
||||
calmaFullDump(def, fi, outf, filename)
|
||||
CellDef *def;
|
||||
FILETYPE fi;
|
||||
FILE *outf;
|
||||
char *filename;
|
||||
calmaFullDump(
|
||||
CellDef *def,
|
||||
FILETYPE fi,
|
||||
FILE *outf,
|
||||
char *filename)
|
||||
{
|
||||
int version, rval;
|
||||
char *libname = NULL, *testlib, uniqlibname[4];
|
||||
|
|
@ -832,8 +832,8 @@ done:
|
|||
*/
|
||||
|
||||
int
|
||||
calmaWriteInitFunc(def)
|
||||
CellDef *def;
|
||||
calmaWriteInitFunc(
|
||||
CellDef *def)
|
||||
{
|
||||
def->cd_client = (ClientData) 0;
|
||||
return (0);
|
||||
|
|
@ -863,18 +863,18 @@ calmaWriteInitFunc(def)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaProcessUse(use, outf)
|
||||
CellUse *use; /* Process use->cu_def */
|
||||
FILE *outf; /* Stream file */
|
||||
calmaProcessUse(
|
||||
CellUse *use, /* Process use->cu_def */
|
||||
FILE *outf) /* Stream file */
|
||||
{
|
||||
return (calmaProcessDef(use->cu_def, outf, FALSE));
|
||||
}
|
||||
|
||||
int
|
||||
calmaProcessDef(def, outf, do_library)
|
||||
CellDef *def; /* Output this def's children, then the def itself */
|
||||
FILE *outf; /* Stream file */
|
||||
bool do_library; /* If TRUE, output only children of def, but not def */
|
||||
calmaProcessDef(
|
||||
CellDef *def, /* Output this def's children, then the def itself */
|
||||
FILE *outf, /* Stream file */
|
||||
bool do_library) /* If TRUE, output only children of def, but not def */
|
||||
{
|
||||
char *filename;
|
||||
int polyidx;
|
||||
|
|
@ -1295,10 +1295,10 @@ compport(const void *one, const void *two)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutFunc(def, f, cliprect)
|
||||
CellDef *def; /* Pointer to cell def to be written */
|
||||
FILE *f; /* Open output file */
|
||||
Rect *cliprect; /* Area to clip to (used for contact cells),
|
||||
calmaOutFunc(
|
||||
CellDef *def, /* Pointer to cell def to be written */
|
||||
FILE *f, /* Open output file */
|
||||
Rect *cliprect) /* Area to clip to (used for contact cells),
|
||||
* in CIF/GDS coordinates.
|
||||
*/
|
||||
{
|
||||
|
|
@ -1490,9 +1490,9 @@ calmaOutFunc(def, f, cliprect)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaIsUseNameDefault(defName, useName)
|
||||
char *defName;
|
||||
char *useName;
|
||||
calmaIsUseNameDefault(
|
||||
char *defName,
|
||||
char *useName)
|
||||
{
|
||||
int idx, slen;
|
||||
char *sptr;
|
||||
|
|
@ -1530,9 +1530,9 @@ calmaIsUseNameDefault(defName, useName)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaWriteUseFunc(use, f)
|
||||
CellUse *use;
|
||||
FILE *f;
|
||||
calmaWriteUseFunc(
|
||||
CellUse *use,
|
||||
FILE *f)
|
||||
{
|
||||
/*
|
||||
* r90, r180, and r270 are Calma 8-byte real representations
|
||||
|
|
@ -1745,10 +1745,10 @@ calmaWriteUseFunc(use, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutStructName(type, def, f)
|
||||
int type;
|
||||
CellDef *def;
|
||||
FILE *f;
|
||||
calmaOutStructName(
|
||||
int type,
|
||||
CellDef *def,
|
||||
FILE *f)
|
||||
{
|
||||
char *defname;
|
||||
unsigned char c;
|
||||
|
|
@ -1818,9 +1818,9 @@ bad:
|
|||
*/
|
||||
|
||||
CellDef *
|
||||
calmaGetContactCell(type, lookOnly)
|
||||
TileType type; /* magic contact tile type */
|
||||
bool lookOnly; /* if true, don't generate any new cells */
|
||||
calmaGetContactCell(
|
||||
TileType type, /* magic contact tile type */
|
||||
bool lookOnly) /* if true, don't generate any new cells */
|
||||
{
|
||||
TileType j;
|
||||
char contactCellName[100];
|
||||
|
|
@ -1871,14 +1871,16 @@ calmaGetContactCell(type, lookOnly)
|
|||
*/
|
||||
|
||||
bool
|
||||
CalmaGenerateArray(f, type, llx, lly, pitch, cols, rows)
|
||||
FILE *f; /* GDS output file */
|
||||
TileType type; /* Magic tile type of contact */
|
||||
int llx, lly; /* Lower-left hand coordinate of the array
|
||||
CalmaGenerateArray(
|
||||
FILE *f, /* GDS output file */
|
||||
TileType type, /* Magic tile type of contact */
|
||||
int llx,
|
||||
int lly, /* Lower-left hand coordinate of the array
|
||||
* (centered on contact cut)
|
||||
*/
|
||||
int pitch; /* Pitch of the array elements */
|
||||
int cols, rows; /* Number of array elements in X and Y */
|
||||
int pitch, /* Pitch of the array elements */
|
||||
int cols,
|
||||
int rows) /* Number of array elements in X and Y */
|
||||
{
|
||||
CellDef *child; /* Cell definition of the contact cell */
|
||||
int xxlate, yxlate;
|
||||
|
|
@ -1940,8 +1942,8 @@ CalmaGenerateArray(f, type, llx, lly, pitch, cols, rows)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaWriteContacts(f)
|
||||
FILE *f;
|
||||
calmaWriteContacts(
|
||||
FILE *f)
|
||||
{
|
||||
TileType type;
|
||||
TileTypeBitMask tMask, *rMask;
|
||||
|
|
@ -2026,7 +2028,7 @@ calmaWriteContacts(f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaDelContacts()
|
||||
calmaDelContacts(void)
|
||||
{
|
||||
TileType type;
|
||||
CellDef *def;
|
||||
|
|
@ -2064,10 +2066,13 @@ calmaDelContacts()
|
|||
*/
|
||||
|
||||
int
|
||||
calmaAddSegment(lbptr, poly_edge, p1x, p1y, p2x, p2y)
|
||||
LinkedBoundary **lbptr;
|
||||
bool poly_edge;
|
||||
int p1x, p1y, p2x, p2y;
|
||||
calmaAddSegment(
|
||||
LinkedBoundary **lbptr,
|
||||
bool poly_edge,
|
||||
int p1x,
|
||||
int p1y,
|
||||
int p2x,
|
||||
int p2y)
|
||||
{
|
||||
LinkedBoundary *newseg, *curseg, *stopseg;
|
||||
bool startmatch = FALSE;
|
||||
|
|
@ -2139,8 +2144,8 @@ calmaAddSegment(lbptr, poly_edge, p1x, p1y, p2x, p2y)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaRemoveDegenerate(blist)
|
||||
BoundaryTop *blist;
|
||||
calmaRemoveDegenerate(
|
||||
BoundaryTop *blist)
|
||||
{
|
||||
bool segfound;
|
||||
LinkedBoundary *stopseg, *curseg, *lastseg;
|
||||
|
|
@ -2196,8 +2201,8 @@ calmaRemoveDegenerate(blist)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaRemoveColinear(blist)
|
||||
BoundaryTop *blist;
|
||||
calmaRemoveColinear(
|
||||
BoundaryTop *blist)
|
||||
{
|
||||
LinkedBoundary *stopseg, *curseg, *lastseg;
|
||||
BoundaryTop *bounds;
|
||||
|
|
@ -2294,10 +2299,10 @@ calmaRemoveColinear(blist)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaMergeSegments(edge, blist, num_points)
|
||||
LinkedBoundary *edge;
|
||||
BoundaryTop **blist;
|
||||
int num_points;
|
||||
calmaMergeSegments(
|
||||
LinkedBoundary *edge,
|
||||
BoundaryTop **blist,
|
||||
int num_points)
|
||||
{
|
||||
LinkedBoundary *stopseg, *curseg, *lastseg;
|
||||
LinkedBoundary *compstop, *compseg, *complast;
|
||||
|
|
@ -2380,9 +2385,9 @@ make_new_bound:
|
|||
*/
|
||||
|
||||
void
|
||||
calmaProcessBoundary(blist, cos)
|
||||
BoundaryTop *blist;
|
||||
calmaOutputStruct *cos;
|
||||
calmaProcessBoundary(
|
||||
BoundaryTop *blist,
|
||||
calmaOutputStruct *cos)
|
||||
{
|
||||
FILE *f = cos->f;
|
||||
LinkedBoundary *listtop, *lbref, *lbstop, *lbfree;
|
||||
|
|
@ -2490,9 +2495,9 @@ calmaProcessBoundary(blist, cos)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaMergePaintFunc(tile, cos)
|
||||
Tile *tile; /* Tile to be written out. */
|
||||
calmaOutputStruct *cos; /* Information needed by algorithm */
|
||||
calmaMergePaintFunc(
|
||||
Tile *tile, /* Tile to be written out. */
|
||||
calmaOutputStruct *cos) /* Information needed by algorithm */
|
||||
{
|
||||
FILE *f = cos->f;
|
||||
Rect *clipArea = cos->area;
|
||||
|
|
@ -2813,9 +2818,9 @@ done_searches:
|
|||
*/
|
||||
|
||||
int
|
||||
calmaWritePaintFunc(tile, cos)
|
||||
Tile *tile; /* Tile to be written out. */
|
||||
calmaOutputStruct *cos; /* File for output and clipping area */
|
||||
calmaWritePaintFunc(
|
||||
Tile *tile, /* Tile to be written out. */
|
||||
calmaOutputStruct *cos) /* File for output and clipping area */
|
||||
{
|
||||
FILE *f = cos->f;
|
||||
Rect *clipArea = cos->area;
|
||||
|
|
@ -2918,13 +2923,13 @@ calmaWritePaintFunc(tile, cos)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaWriteLabelFunc(lab, ltype, type, f)
|
||||
Label *lab; /* Label to output */
|
||||
int ltype; /* CIF layer number to use for TEXT record */
|
||||
int type; /* CIF layer number to use for BOUNDARY record,
|
||||
calmaWriteLabelFunc(
|
||||
Label *lab, /* Label to output */
|
||||
int ltype, /* CIF layer number to use for TEXT record */
|
||||
int type, /* CIF layer number to use for BOUNDARY record,
|
||||
* or -1 if not attached to a layer
|
||||
*/
|
||||
FILE *f; /* Stream file */
|
||||
FILE *f) /* Stream file */
|
||||
{
|
||||
Point p;
|
||||
int calmanum, calmatype;
|
||||
|
|
@ -3089,9 +3094,9 @@ calmaWriteLabelFunc(lab, ltype, type, f)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaPaintLabelFunc(tile, cos)
|
||||
Tile *tile; /* Tile contains area for label. */
|
||||
calmaOutputStruct *cos; /* File for output and clipping area */
|
||||
calmaPaintLabelFunc(
|
||||
Tile *tile, /* Tile contains area for label. */
|
||||
calmaOutputStruct *cos) /* File for output and clipping area */
|
||||
{
|
||||
FILE *f = cos->f;
|
||||
Rect *clipArea = cos->area;
|
||||
|
|
@ -3150,9 +3155,9 @@ calmaPaintLabelFunc(tile, cos)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutHeader(rootDef, f)
|
||||
CellDef *rootDef;
|
||||
FILE *f;
|
||||
calmaOutHeader(
|
||||
CellDef *rootDef,
|
||||
FILE *f)
|
||||
{
|
||||
static double useru = 0.001;
|
||||
static double mum = 1.0e-9;
|
||||
|
|
@ -3211,9 +3216,9 @@ calmaOutHeader(rootDef, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutDate(t, f)
|
||||
time_t t; /* Time (UNIX format) to be output */
|
||||
FILE *f; /* Stream file */
|
||||
calmaOutDate(
|
||||
time_t t, /* Time (UNIX format) to be output */
|
||||
FILE *f) /* Stream file */
|
||||
{
|
||||
struct tm *datep = localtime(&t);
|
||||
|
||||
|
|
@ -3246,10 +3251,10 @@ calmaOutDate(t, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutStringRecord(type, str, f)
|
||||
int type; /* Type of this record (data type is ASCII string) */
|
||||
char *str; /* String to be output */
|
||||
FILE *f; /* Stream file */
|
||||
calmaOutStringRecord(
|
||||
int type, /* Type of this record (data type is ASCII string) */
|
||||
char *str, /* String to be output */
|
||||
FILE *f) /* Stream file */
|
||||
{
|
||||
int len;
|
||||
unsigned char c;
|
||||
|
|
@ -3347,9 +3352,9 @@ calmaOutStringRecord(type, str, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutR8(d, f)
|
||||
double d; /* Double value to write to output */
|
||||
FILE *f; /* Stream file */
|
||||
calmaOutR8(
|
||||
double d, /* Double value to write to output */
|
||||
FILE *f) /* Stream file */
|
||||
{
|
||||
int c, i, sign, expon;
|
||||
|
||||
|
|
@ -3422,9 +3427,9 @@ calmaOutR8(d, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOut8(str, f)
|
||||
char *str; /* 8-byte string to be output */
|
||||
FILE *f; /* Stream file */
|
||||
calmaOut8(
|
||||
char *str, /* 8-byte string to be output */
|
||||
FILE *f) /* Stream file */
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
|||
|
|
@ -271,9 +271,9 @@ static char calmaMapTablePermissive[] =
|
|||
*/
|
||||
|
||||
bool
|
||||
CalmaWriteZ(rootDef, f)
|
||||
CellDef *rootDef; /* Pointer to CellDef to be written */
|
||||
gzFile f; /* Open compressed output file */
|
||||
CalmaWriteZ(
|
||||
CellDef *rootDef, /* Pointer to CellDef to be written */
|
||||
gzFile f) /* Open compressed output file */
|
||||
{
|
||||
int oldCount = DBWFeedbackCount, problems, nerr;
|
||||
bool good;
|
||||
|
|
@ -399,11 +399,11 @@ CalmaWriteZ(rootDef, f)
|
|||
*/
|
||||
|
||||
bool
|
||||
calmaDumpStructureZ(def, outf, calmaDefHash, filename)
|
||||
CellDef *def;
|
||||
gzFile outf;
|
||||
HashTable *calmaDefHash;
|
||||
char *filename;
|
||||
calmaDumpStructureZ(
|
||||
CellDef *def,
|
||||
gzFile outf,
|
||||
HashTable *calmaDefHash,
|
||||
char *filename)
|
||||
{
|
||||
int nbytes = -1, rtype = 0;
|
||||
char *strname = NULL, *newnameptr;
|
||||
|
|
@ -669,11 +669,11 @@ syntaxerror:
|
|||
*/
|
||||
|
||||
void
|
||||
calmaFullDumpZ(def, fi, outf, filename)
|
||||
CellDef *def;
|
||||
gzFile fi;
|
||||
gzFile outf;
|
||||
char *filename;
|
||||
calmaFullDumpZ(
|
||||
CellDef *def,
|
||||
gzFile fi,
|
||||
gzFile outf,
|
||||
char *filename)
|
||||
{
|
||||
int version, rval;
|
||||
char *libname = NULL, *testlib, uniqlibname[4];
|
||||
|
|
@ -817,18 +817,18 @@ done:
|
|||
*/
|
||||
|
||||
int
|
||||
calmaProcessUseZ(use, outf)
|
||||
CellUse *use; /* Process use->cu_def */
|
||||
gzFile outf; /* Stream file */
|
||||
calmaProcessUseZ(
|
||||
CellUse *use, /* Process use->cu_def */
|
||||
gzFile outf) /* Stream file */
|
||||
{
|
||||
return (calmaProcessDefZ(use->cu_def, outf, FALSE));
|
||||
}
|
||||
|
||||
int
|
||||
calmaProcessDefZ(def, outf, do_library)
|
||||
CellDef *def; /* Output this def's children, then the def itself */
|
||||
gzFile outf; /* Stream file */
|
||||
bool do_library; /* If TRUE, output only children of def, but not def */
|
||||
calmaProcessDefZ(
|
||||
CellDef *def, /* Output this def's children, then the def itself */
|
||||
gzFile outf, /* Stream file */
|
||||
bool do_library) /* If TRUE, output only children of def, but not def */
|
||||
{
|
||||
char *filename;
|
||||
int polyidx;
|
||||
|
|
@ -1176,10 +1176,10 @@ calmaProcessDefZ(def, outf, do_library)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutFuncZ(def, f, cliprect)
|
||||
CellDef *def; /* Pointer to cell def to be written */
|
||||
gzFile f; /* Open output file */
|
||||
Rect *cliprect; /* Area to clip to (used for contact cells),
|
||||
calmaOutFuncZ(
|
||||
CellDef *def, /* Pointer to cell def to be written */
|
||||
gzFile f, /* Open output file */
|
||||
Rect *cliprect) /* Area to clip to (used for contact cells),
|
||||
* in CIF/GDS coordinates.
|
||||
*/
|
||||
{
|
||||
|
|
@ -1371,9 +1371,9 @@ calmaOutFuncZ(def, f, cliprect)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaWriteUseFuncZ(use, f)
|
||||
CellUse *use;
|
||||
gzFile f;
|
||||
calmaWriteUseFuncZ(
|
||||
CellUse *use,
|
||||
gzFile f)
|
||||
{
|
||||
/*
|
||||
* r90, r180, and r270 are Calma 8-byte real representations
|
||||
|
|
@ -1586,10 +1586,10 @@ calmaWriteUseFuncZ(use, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutStructNameZ(type, def, f)
|
||||
int type;
|
||||
CellDef *def;
|
||||
gzFile f;
|
||||
calmaOutStructNameZ(
|
||||
int type,
|
||||
CellDef *def,
|
||||
gzFile f)
|
||||
{
|
||||
char *defname;
|
||||
unsigned char c;
|
||||
|
|
@ -1655,14 +1655,16 @@ bad:
|
|||
*/
|
||||
|
||||
bool
|
||||
CalmaGenerateArrayZ(f, type, llx, lly, pitch, cols, rows)
|
||||
gzFile f; /* GDS output file */
|
||||
TileType type; /* Magic tile type of contact */
|
||||
int llx, lly; /* Lower-left hand coordinate of the array
|
||||
CalmaGenerateArrayZ(
|
||||
gzFile f, /* GDS output file */
|
||||
TileType type, /* Magic tile type of contact */
|
||||
int llx,
|
||||
int lly, /* Lower-left hand coordinate of the array
|
||||
* (centered on contact cut)
|
||||
*/
|
||||
int pitch; /* Pitch of the array elements */
|
||||
int cols, rows; /* Number of array elements in X and Y */
|
||||
int pitch, /* Pitch of the array elements */
|
||||
int cols,
|
||||
int rows) /* Number of array elements in X and Y */
|
||||
{
|
||||
CellDef *child; /* Cell definition of the contact cell */
|
||||
int xxlate, yxlate;
|
||||
|
|
@ -1723,8 +1725,8 @@ CalmaGenerateArrayZ(f, type, llx, lly, pitch, cols, rows)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaWriteContactsZ(f)
|
||||
gzFile f;
|
||||
calmaWriteContactsZ(
|
||||
gzFile f)
|
||||
{
|
||||
TileType type;
|
||||
TileTypeBitMask tMask, *rMask;
|
||||
|
|
@ -1806,9 +1808,9 @@ calmaWriteContactsZ(f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaProcessBoundaryZ(blist, cos)
|
||||
BoundaryTop *blist;
|
||||
calmaOutputStructZ *cos;
|
||||
calmaProcessBoundaryZ(
|
||||
BoundaryTop *blist,
|
||||
calmaOutputStructZ *cos)
|
||||
{
|
||||
gzFile f = cos->f;
|
||||
LinkedBoundary *listtop, *lbref, *lbstop, *lbfree;
|
||||
|
|
@ -1886,9 +1888,9 @@ calmaProcessBoundaryZ(blist, cos)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaMergePaintFuncZ(tile, cos)
|
||||
Tile *tile; /* Tile to be written out. */
|
||||
calmaOutputStructZ *cos; /* Information needed by algorithm */
|
||||
calmaMergePaintFuncZ(
|
||||
Tile *tile, /* Tile to be written out. */
|
||||
calmaOutputStructZ *cos) /* Information needed by algorithm */
|
||||
{
|
||||
gzFile f = cos->f;
|
||||
Rect *clipArea = cos->area;
|
||||
|
|
@ -2209,9 +2211,9 @@ done_searches:
|
|||
*/
|
||||
|
||||
int
|
||||
calmaWritePaintFuncZ(tile, cos)
|
||||
Tile *tile; /* Tile to be written out. */
|
||||
calmaOutputStructZ *cos; /* File for output and clipping area */
|
||||
calmaWritePaintFuncZ(
|
||||
Tile *tile, /* Tile to be written out. */
|
||||
calmaOutputStructZ *cos) /* File for output and clipping area */
|
||||
{
|
||||
gzFile f = cos->f;
|
||||
Rect *clipArea = cos->area;
|
||||
|
|
@ -2314,13 +2316,13 @@ calmaWritePaintFuncZ(tile, cos)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaWriteLabelFuncZ(lab, ltype, type, f)
|
||||
Label *lab; /* Label to output */
|
||||
int ltype; /* CIF layer number to use for TEXT record */
|
||||
int type; /* CIF layer number to use for BOUNDARY record,
|
||||
calmaWriteLabelFuncZ(
|
||||
Label *lab, /* Label to output */
|
||||
int ltype, /* CIF layer number to use for TEXT record */
|
||||
int type, /* CIF layer number to use for BOUNDARY record,
|
||||
* or -1 if not attached to a layer
|
||||
*/
|
||||
gzFile f; /* Stream file */
|
||||
gzFile f) /* Stream file */
|
||||
{
|
||||
Point p;
|
||||
int calmanum, calmatype;
|
||||
|
|
@ -2485,9 +2487,9 @@ calmaWriteLabelFuncZ(lab, ltype, type, f)
|
|||
*/
|
||||
|
||||
int
|
||||
calmaPaintLabelFuncZ(tile, cos)
|
||||
Tile *tile; /* Tile contains area for label. */
|
||||
calmaOutputStructZ *cos; /* File for output and clipping area */
|
||||
calmaPaintLabelFuncZ(
|
||||
Tile *tile, /* Tile contains area for label. */
|
||||
calmaOutputStructZ *cos) /* File for output and clipping area */
|
||||
{
|
||||
gzFile f = cos->f;
|
||||
Rect *clipArea = cos->area;
|
||||
|
|
@ -2546,9 +2548,9 @@ calmaPaintLabelFuncZ(tile, cos)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutHeaderZ(rootDef, f)
|
||||
CellDef *rootDef;
|
||||
gzFile f;
|
||||
calmaOutHeaderZ(
|
||||
CellDef *rootDef,
|
||||
gzFile f)
|
||||
{
|
||||
static double useru = 0.001;
|
||||
static double mum = 1.0e-9;
|
||||
|
|
@ -2607,9 +2609,9 @@ calmaOutHeaderZ(rootDef, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutDateZ(t, f)
|
||||
time_t t; /* Time (UNIX format) to be output */
|
||||
gzFile f; /* Stream file */
|
||||
calmaOutDateZ(
|
||||
time_t t, /* Time (UNIX format) to be output */
|
||||
gzFile f) /* Stream file */
|
||||
{
|
||||
struct tm *datep = localtime(&t);
|
||||
|
||||
|
|
@ -2642,10 +2644,10 @@ calmaOutDateZ(t, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutStringRecordZ(type, str, f)
|
||||
int type; /* Type of this record (data type is ASCII string) */
|
||||
char *str; /* String to be output */
|
||||
gzFile f; /* Compressed stream file */
|
||||
calmaOutStringRecordZ(
|
||||
int type, /* Type of this record (data type is ASCII string) */
|
||||
char *str, /* String to be output */
|
||||
gzFile f) /* Compressed stream file */
|
||||
{
|
||||
int len;
|
||||
unsigned char c;
|
||||
|
|
@ -2743,9 +2745,9 @@ calmaOutStringRecordZ(type, str, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOutR8Z(d, f)
|
||||
double d; /* Double value to write to output */
|
||||
gzFile f; /* Stream file */
|
||||
calmaOutR8Z(
|
||||
double d, /* Double value to write to output */
|
||||
gzFile f) /* Stream file */
|
||||
{
|
||||
int c, i, sign, expon;
|
||||
|
||||
|
|
@ -2818,9 +2820,9 @@ calmaOutR8Z(d, f)
|
|||
*/
|
||||
|
||||
void
|
||||
calmaOut8Z(str, f)
|
||||
char *str; /* 8-byte string to be output */
|
||||
gzFile f; /* Compressed stream file */
|
||||
calmaOut8Z(
|
||||
char *str, /* 8-byte string to be output */
|
||||
gzFile f) /* Compressed stream file */
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue