diff --git a/VERSION b/VERSION index f5cf6fd9..4e2cdc1f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.7 +8.3.8 diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 03857648..a5c84661 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -1143,6 +1143,15 @@ calmaLayerError(mesg, layer, dt) CalmaLayerType clt; HashEntry *he; + /* Ignore errors for cells that are marked as read-only, since */ + /* these are normally expected to have unhandled layer types, */ + /* since the purpose of read-only cells is to preserve exactly */ + /* layout in the cell which may not be represented in the tech */ + /* file. */ + + if ((cifReadCellDef->cd_flags & CDVENDORGDS) == CDVENDORGDS) + return; + clt.clt_layer = layer; clt.clt_type = dt; he = HashFind(&calmaLayerHash, (char *) &clt); diff --git a/database/DBcellname.c b/database/DBcellname.c index 4fd5f36f..129ff6a3 100644 --- a/database/DBcellname.c +++ b/database/DBcellname.c @@ -111,6 +111,16 @@ DBCellRename(cellname, newname) return FALSE; } + /* Disallow renaming if the cell has the READONLY flag set, */ + /* because the cellname must match the name in the GDS */ + /* file referenced. */ + + if ((celldef->cd_flags & CDVENDORGDS) == CDVENDORGDS) + { + TxError("Attempt to rename read-only cell \"%s\"\n", cellname); + return FALSE; + } + /* Good to go! */ UndoDisable(); diff --git a/database/DBcellsrch.c b/database/DBcellsrch.c index a398ffa8..a62523ae 100644 --- a/database/DBcellsrch.c +++ b/database/DBcellsrch.c @@ -30,6 +30,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/hash.h" #include "database/database.h" #include "database/databaseInt.h" +#include "dbwind/dbwind.h" #include "textio/textio.h" #include "utils/signals.h" #include "windows/windows.h" @@ -1496,7 +1497,6 @@ DBScaleEverything(scalen, scaled) int scalen, scaled; { void ToolScaleBox(); - void DBWScaleCrosshair(); int dbCellDefEnumFunc(); LinkedCellDef *lhead, *lcd; @@ -1526,6 +1526,9 @@ DBScaleEverything(scalen, scaled) lcd = lcd->cd_next; } + /* Scale all elements */ + DBWScaleElements(scalen, scaled); + /* Recovery of global plane pointers */ MZAttachHintPlanes(); diff --git a/database/DBio.c b/database/DBio.c index 93c4b0bb..a1782244 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -2558,7 +2558,7 @@ DBCellWriteFile(cellDef, f) } /* Now any persistent elements */ - estring = DBWPrintElements(cellDef, DBW_ELEMENT_PERSISTENT); + estring = DBWPrintElements(cellDef, DBW_ELEMENT_PERSISTENT, reducer); if (estring != NULL) { FPRINTF(f, "<< elements >>\n"); diff --git a/dbwind/DBWelement.c b/dbwind/DBWelement.c index 12a94804..9170233d 100644 --- a/dbwind/DBWelement.c +++ b/dbwind/DBWelement.c @@ -168,9 +168,10 @@ void AppendFlag(char **rstr, bool *flagset, char *fname) */ char * -DBWPrintElements(cellDef, flagmask) +DBWPrintElements(cellDef, flagmask, reducer) CellDef *cellDef; unsigned char flagmask; + int reducer; { DBWElement *elem; HashSearch hs; @@ -205,17 +206,17 @@ DBWPrintElements(cellDef, flagmask) ((sptr->next == NULL) ? " " : ",")); /* print start point */ - sprintf(istr, "%d", elem->area.r_xbot); + sprintf(istr, "%d", elem->area.r_xbot / reducer); AppendString(&rstr, istr, " "); - sprintf(istr, "%d", elem->area.r_ybot); + sprintf(istr, "%d", elem->area.r_ybot / reducer); AppendString(&rstr, istr, " "); switch (elem->type) { case ELEMENT_RECT: /* end point */ - sprintf(istr, "%d", elem->area.r_xtop); + sprintf(istr, "%d", elem->area.r_xtop / reducer); AppendString(&rstr, istr, " "); - sprintf(istr, "%d", elem->area.r_ytop); + sprintf(istr, "%d", elem->area.r_ytop / reducer); AppendString(&rstr, istr, "\n"); /* no flags to write. Only applicable flag is */ /* temporary/persistent, and temporary elements */ @@ -223,9 +224,9 @@ DBWPrintElements(cellDef, flagmask) break; case ELEMENT_LINE: /* end point */ - sprintf(istr, "%d", elem->area.r_xtop); + sprintf(istr, "%d", elem->area.r_xtop / reducer); AppendString(&rstr, istr, " "); - sprintf(istr, "%d", elem->area.r_ytop); + sprintf(istr, "%d", elem->area.r_ytop / reducer); AppendString(&rstr, istr, NULL); /* any non-default flags? */ flagset = FALSE; @@ -263,6 +264,42 @@ DBWPrintElements(cellDef, flagmask) return rstr; } +/* + * ---------------------------------------------------------------------------- + * + * DBWScaleElements -- + * + * Scale each element by the given integer numerator and denominator + * + * Results: + * None. + * + * Side Effects: + * Element values are modified. + * ---------------------------------------------------------------------------- + */ + +void +DBWScaleElements(n, d) + int n, d; +{ + DBWElement *elem; + HashSearch hs; + HashEntry *he; + extern bool DBScalePoint(); /* Forward declaration */ + + HashStartSearch(&hs); + while (he = HashNext(&elementTable, &hs)) + { + if (elem = (DBWElement *)HashGetValue(he)) + { + /* scale area rectangle */ + DBScalePoint(&elem->area.r_ll, n, d); + DBScalePoint(&elem->area.r_ur, n, d); + } + } +} + /* * ---------------------------------------------------------------------------- diff --git a/dbwind/dbwind.h b/dbwind/dbwind.h index 8d180d29..9a1486d6 100644 --- a/dbwind/dbwind.h +++ b/dbwind/dbwind.h @@ -219,6 +219,8 @@ extern void DBWElementNames(); extern void DBWElementInbox(); extern void DBWElementParseFlags(); extern char *DBWPrintElements(); +extern void DBWScaleElements(); +extern void DBWScaleCrosshair(); /* Random procedures used internally to this module. None of these * should ever need to be called by the outside world. @@ -232,4 +234,5 @@ extern void DBWFeedbackShow(); extern void dbwElementInit(); extern void dbwCrosshairInit(); + #endif /* _DBWIND_H */