Revised the messaging coming from "gds read" so that it does not

post error messages when a GDS library addendum is read.  It now
assumes that if a cell is called but not defined in the GDS, and
that cell happens to be in memory already, then this is intentional.
This commit is contained in:
Tim Edwards 2021-12-31 23:11:24 -05:00
parent cb27fba5ab
commit 72227b4995
1 changed files with 20 additions and 11 deletions

View File

@ -130,23 +130,31 @@ calmaSetPosition(sname)
return originalPos;
}
freeMagic(strname);
}
}
// Ran out of file. It's possible that we were seeking ahead to a
// definition that called something that was defined between it and
// our previous position, so we will rewind the file and try again.
// If that doesn't work, then the cell is not defined in the file.
/* Ran out of file. It's possible that we were seeking ahead to a
* definition that called something that was defined between it and
* our previous position, so we will rewind the file and try again.
* If that doesn't work, then the cell is not defined in the file.
*/
if (originalPos != 0)
{
if (originalPos != 0)
{
rewind(calmaInputFile);
calmaSetPosition(sname);
return originalPos;
}
}
CalmaReadError("Cell \"%s\" is used but not defined in this file.\n", sname);
/* Avoid generating an error message in the case that the cell is not in
* the GDS file but is in memory. Assume that such a case is intentional,
* meaning the GDS library is an addendum and the proper library it
* depends on was read first as intended.
*/
if (DBCellLookDef(sname) == NULL)
CalmaReadError("Cell \"%s\" is used but not defined in this file.\n",
sname);
return originalPos;
return originalPos;
}
/* Added by NP 8/11/04 */
@ -746,7 +754,8 @@ calmaElementSref(filename)
}
else
{
TxPrintf("Cell definition %s does not exist!\n", sname);
/* This is redundant messaging */
// TxPrintf("Cell definition %s does not exist!\n", sname);
fseek(calmaInputFile, originalFilePos, SEEK_SET);
def = calmaFindCell(sname, NULL, NULL);
/* Cell flags set to "dereferenced" in case there is no */