diff --git a/VERSION b/VERSION index 29e4fa08..09d404ad 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.21 +8.3.22 diff --git a/commands/CmdFI.c b/commands/CmdFI.c index 1db446e9..b3b8b1be 100644 --- a/commands/CmdFI.c +++ b/commands/CmdFI.c @@ -1784,8 +1784,6 @@ findTile(tile, rtype) * purposes. */ -#define FLATTERMSIZE 1024 - void FlatCopyAllLabels(scx, mask, xMask, targetUse) SearchContext *scx; diff --git a/database/DBconnect.c b/database/DBconnect.c index 7f84e243..2001be96 100644 --- a/database/DBconnect.c +++ b/database/DBconnect.c @@ -661,9 +661,6 @@ dbcUnconnectFunc(tile, clientData) * ---------------------------------------------------------------------------- */ -/* To do: Make the tpath entries dynamically allocated */ -#define FLATTERMSIZE 1024 - int dbcConnectLabelFunc(scx, lab, tpath, csa2) SearchContext *scx; @@ -690,12 +687,16 @@ dbcConnectLabelFunc(scx, lab, tpath, csa2) if (scx->scx_use != csa2->csa2_topscx->scx_use) { - int newllen = tpath->tp_next - tpath->tp_first; - newlabtext[0] = '\0'; - if (newllen > 0) - strncpy(newlabtext, tpath->tp_first, newllen); - sprintf(newlabtext + newllen, "%s", lab->lab_text); - newlabptr = newlabtext; + if (tpath) + { + int newllen = tpath->tp_next - tpath->tp_first; + newlabtext[0] = '\0'; + if (newllen > 0) + strncpy(newlabtext, tpath->tp_first, newllen); + sprintf(newlabtext + newllen, "%s", lab->lab_text); + newlabptr = newlabtext; + } + else return 0; } else newlabptr = lab->lab_text; diff --git a/database/database.h.in b/database/database.h.in index 9ee227b2..af818186 100644 --- a/database/database.h.in +++ b/database/database.h.in @@ -651,6 +651,9 @@ typedef struct treeFilter #define TF_LABEL_ATTACH_NOT_SW 0x20 /* Same as above, ignore tile SW corner */ #define TF_LABEL_ATTACH_CORNER 0x3C /* Mask of the four types above */ +/* To do: Make the tpath entries dynamically allocated */ +#define FLATTERMSIZE 1024 /* Used for generating flattened labels */ + /* -------------- Undo information passed to DBPaintPlane ------------- */ typedef struct diff --git a/extflat/EFread.c b/extflat/EFread.c index 01456b85..714c3604 100644 --- a/extflat/EFread.c +++ b/extflat/EFread.c @@ -606,7 +606,6 @@ resistChanged: } } (void) fclose(inf); - if (line != NULL) freeMagic(line); /* Is there an "extresist" extract file? */ if (DoResist) @@ -616,6 +615,7 @@ resistChanged: if (inf != NULL) goto readfile; } + if (line != NULL) freeMagic(line); /* If we are considering standard cells, only the first level of */ /* subcircuits is meaningful. */ diff --git a/extract/ExtTech.c b/extract/ExtTech.c index 06e04b54..bc3d371b 100644 --- a/extract/ExtTech.c +++ b/extract/ExtTech.c @@ -810,8 +810,14 @@ ExtStyle * extTechStyleNew() { ExtStyle *style; + TileType r; style = extTechStyleAlloc(); + + /* This entry in ExtStyle is allocated and must be initialized */ + for (r = 0; r < NT; r++) + style->exts_device[r] = NULL; + extTechStyleInit(style); return style; } diff --git a/resis/ResConDCS.c b/resis/ResConDCS.c index 22098b22..a150cfb8 100644 --- a/resis/ResConDCS.c +++ b/resis/ResConDCS.c @@ -103,6 +103,8 @@ dbcConnectFuncDCS(tile, cx) int pNum; CellDef *def; ExtDevice *devptr; + TerminalPath tpath; + char pathstring[FLATTERMSIZE]; TiToRect(tile, &tileArea); srArea = &scx->scx_area; @@ -113,8 +115,6 @@ dbcConnectFuncDCS(tile, cx) (tileArea.r_ytop <= srArea->r_ybot+1))) return 0; - - t1 = TiGetType(tile); if TTMaskHasType(&DiffTypeBitMask,t1) { @@ -264,7 +264,12 @@ dbcConnectFuncDCS(tile, cx) scx2 = *csa2->csa2_topscx; scx2.scx_area = newarea; - DBTreeSrLabels(&scx2, connectMask, csa2->csa2_xMask, NULL, + + pathstring[0] = '\0'; + tpath.tp_first = tpath.tp_next = pathstring; + tpath.tp_last = pathstring + FLATTERMSIZE; + + DBTreeSrLabels(&scx2, connectMask, csa2->csa2_xMask, &tpath, TF_LABEL_ATTACH, dbcConnectLabelFunc, (ClientData)csa2); // DBCellCopyLabels(&scx2, connectMask, csa2->csa2_xMask, csa2->csa2_use, NULL);