From e2c3eb3e20c2227099fbcece6c354eec3772aa75 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 1 Oct 2024 21:14:12 -0400 Subject: [PATCH] Corrected the previous commit, which did not fix the problem that it claimed to fix, but caused an incorrect DRC maxwidth check instead. The problem appears to be correctly resolved now. Also: Tracked down a recently-introduced minor issue in which the interactive DRC stops running after issuing "drc check" and does not resume until another key or mouse even occurs. This turned out to be caused by the work on the "logcommands" command, which should have used "*bypass" before "logcommands suspend" and "logcommands resume", since the "*bypass" indicates that the command has no impact on layout and should not interrupt the DRC checker. --- INSTALL | 6 ++++++ database/DBio.c | 5 +++-- drc/DRCbasic.c | 12 ++++++++++++ tcltk/wrapper.tcl | 32 ++++++++++++++++---------------- 4 files changed, 37 insertions(+), 18 deletions(-) diff --git a/INSTALL b/INSTALL index 0543faba..a80553fc 100644 --- a/INSTALL +++ b/INSTALL @@ -47,6 +47,12 @@ Autoconf Capsule Summary: Disable threaded X11 and OpenGL graphics. Normally enabled. + --disable-compression + Disable reading and writing of compressed + (gzipped) GDS files and reading of compressed + .mag files. Normally enabled, if the zlib + development package is installed. + Notes to Magic maintainers: -------------------------- diff --git a/database/DBio.c b/database/DBio.c index c30dff12..27a03b3a 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -2017,6 +2017,7 @@ badTransform: char argstr[1024]; githash1[0] = '\0'; + githash2[0] = '\0'; /* Remove the file component */ sl1ptr = strrchr(pathptr, '/'); @@ -2487,8 +2488,8 @@ dbReadProperties(cellDef, line, len, f, scalen, scaled) /* Skip forward four values in pvalueptr */ for (n = 0; n < 4; n++) { - while (!isspace(*pptr)) pptr++; - while (isspace(*pptr) && (*pptr != '\0')) pptr++; + while ((*pptr != '\0') && !isspace(*pptr)) pptr++; + while ((*pptr != '\0') && isspace(*pptr)) pptr++; } } } diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index 0a6e1fdb..d56f5185 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -692,9 +692,15 @@ drcTile (tile, arg) cptr->drcc_dist++; if (cptr->drcc_flags & DRC_REVERSE) + { mrd = drcCanonicalMaxwidth(tpleft, GEO_WEST, arg, cptr); + triggered = 0; + } else if (firsttile) + { mrd = drcCanonicalMaxwidth(tile, GEO_EAST, arg, cptr); + triggered = 0; + } if (!trigpending || (DRCCurStyle->DRCFlags & DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE)) cptr->drcc_dist--; @@ -1089,9 +1095,15 @@ drcTile (tile, arg) cptr->drcc_dist++; if (cptr->drcc_flags & DRC_REVERSE) + { mrd = drcCanonicalMaxwidth(tpbot, GEO_SOUTH, arg, cptr); + triggered = 0; + } else if (firsttile) + { mrd = drcCanonicalMaxwidth(tile, GEO_NORTH, arg, cptr); + triggered = 0; + } if (!trigpending || (DRCCurStyle->DRCFlags & DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE)) cptr->drcc_dist--; diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl index 73f18ae9..18ea23ed 100644 --- a/tcltk/wrapper.tcl +++ b/tcltk/wrapper.tcl @@ -243,12 +243,12 @@ proc magic::drcupdate { option } { } proc magic::drcstate { status } { - logcommands suspend + *bypass logcommands suspend set winlist [*bypass windownames layout] foreach lwin $winlist { set framename [winfo parent $lwin] if {$framename == "."} { - logcommands resume + *bypass logcommands resume return } switch $status { @@ -264,7 +264,7 @@ proc magic::drcstate { status } { busy { ${framename}.titlebar.drcbutton configure -selectcolor yellow } } } - logcommands resume + *bypass logcommands resume } # Create the menu of windows. This is kept separate from the cell manager, @@ -515,7 +515,7 @@ proc magic::captions {{subcommand {}}} { if {$subcommand != {} && $subcommand != "writeable" && $subcommand != "load"} { return } - logcommands suspend + *bypass logcommands suspend set winlist [magic::windownames layout] foreach winpath $winlist { set framename [winfo parent $winpath] @@ -535,7 +535,7 @@ proc magic::captions {{subcommand {}}} { "Loaded: ${subcaption1} Editing: ${subcaption2} Tool: $Opts(tool) \ Technology: ${techname}" } - logcommands resume + *bypass logcommands resume } # Allow captioning in the title window by tagging the "load" and "edit" commands @@ -670,10 +670,10 @@ proc magic::cursorview {win} { if {$win == {}} { return } - logcommands suspend + *bypass logcommands suspend set framename [winfo parent $win] if {[catch {set cr [*bypass cif scale out]}]} { - logcommands resume + *bypass logcommands resume return } if {$cr == 0} {return} @@ -691,7 +691,7 @@ proc magic::cursorview {win} { set olstx [expr {$olstx * $cr}] set olsty [expr {$olsty * $cr}] }]} { - logcommands resume + *bypass logcommands resume return } @@ -707,24 +707,24 @@ proc magic::cursorview {win} { set titletext [format "(%+g %+g) microns" $olstx $olsty] ${framename}.titlebar.pos configure -text $titletext } - logcommands resume + *bypass logcommands resume } proc magic::toolupdate {win {yesno "yes"} {layerlist "none"}} { global Winopts if {[magic::display] == "NULL"} {return} - logcommands suspend + *bypass logcommands suspend if {$win == {}} { set win [magic::windownames] } # Wind3d has a "see" function, so make sure this is not a 3d window if {$win == [magic::windownames wind3d]} { - logcommands resume + *bypass logcommands resume return } - logcommands resume + *bypass logcommands resume set topname [winfo toplevel $win] set framename [winfo parent $win] @@ -831,13 +831,13 @@ proc magic::techrebuild {winpath {cmdstr ""}} { proc magic::setscrollvalues {win} { global Opts - logcommands suspend + *bypass logcommands suspend set svalues [${win} view get] set bvalues [${win} view bbox] set framename [winfo parent ${win}] if {$framename == "."} { - logcommands resume + *bypass logcommands resume return } @@ -881,7 +881,7 @@ proc magic::setscrollvalues {win} { proc magic::scrollupdate {win} { - logcommands suspend + *bypass logcommands suspend if {[magic::display] == "NULL"} {return} if {[info level] <= 1} { @@ -898,7 +898,7 @@ proc magic::scrollupdate {win} { magic::setscrollvalues $win } } - logcommands resume + *bypass logcommands resume } # scrollview: update the magic display to match the