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.
This commit is contained in:
Tim Edwards 2024-10-01 21:14:12 -04:00
parent 3e0ad4ff58
commit e2c3eb3e20
4 changed files with 37 additions and 18 deletions

View File

@ -47,6 +47,12 @@ Autoconf Capsule Summary:
Disable threaded X11 and OpenGL graphics. Disable threaded X11 and OpenGL graphics.
Normally enabled. 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: Notes to Magic maintainers:
-------------------------- --------------------------

View File

@ -2017,6 +2017,7 @@ badTransform:
char argstr[1024]; char argstr[1024];
githash1[0] = '\0'; githash1[0] = '\0';
githash2[0] = '\0';
/* Remove the file component */ /* Remove the file component */
sl1ptr = strrchr(pathptr, '/'); sl1ptr = strrchr(pathptr, '/');
@ -2487,8 +2488,8 @@ dbReadProperties(cellDef, line, len, f, scalen, scaled)
/* Skip forward four values in pvalueptr */ /* Skip forward four values in pvalueptr */
for (n = 0; n < 4; n++) for (n = 0; n < 4; n++)
{ {
while (!isspace(*pptr)) pptr++; while ((*pptr != '\0') && !isspace(*pptr)) pptr++;
while (isspace(*pptr) && (*pptr != '\0')) pptr++; while ((*pptr != '\0') && isspace(*pptr)) pptr++;
} }
} }
} }

View File

@ -692,9 +692,15 @@ drcTile (tile, arg)
cptr->drcc_dist++; cptr->drcc_dist++;
if (cptr->drcc_flags & DRC_REVERSE) if (cptr->drcc_flags & DRC_REVERSE)
{
mrd = drcCanonicalMaxwidth(tpleft, GEO_WEST, arg, cptr); mrd = drcCanonicalMaxwidth(tpleft, GEO_WEST, arg, cptr);
triggered = 0;
}
else if (firsttile) else if (firsttile)
{
mrd = drcCanonicalMaxwidth(tile, GEO_EAST, arg, cptr); mrd = drcCanonicalMaxwidth(tile, GEO_EAST, arg, cptr);
triggered = 0;
}
if (!trigpending || (DRCCurStyle->DRCFlags if (!trigpending || (DRCCurStyle->DRCFlags
& DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE)) & DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE))
cptr->drcc_dist--; cptr->drcc_dist--;
@ -1089,9 +1095,15 @@ drcTile (tile, arg)
cptr->drcc_dist++; cptr->drcc_dist++;
if (cptr->drcc_flags & DRC_REVERSE) if (cptr->drcc_flags & DRC_REVERSE)
{
mrd = drcCanonicalMaxwidth(tpbot, GEO_SOUTH, arg, cptr); mrd = drcCanonicalMaxwidth(tpbot, GEO_SOUTH, arg, cptr);
triggered = 0;
}
else if (firsttile) else if (firsttile)
{
mrd = drcCanonicalMaxwidth(tile, GEO_NORTH, arg, cptr); mrd = drcCanonicalMaxwidth(tile, GEO_NORTH, arg, cptr);
triggered = 0;
}
if (!trigpending || (DRCCurStyle->DRCFlags if (!trigpending || (DRCCurStyle->DRCFlags
& DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE)) & DRC_FLAGS_WIDEWIDTH_NONINCLUSIVE))
cptr->drcc_dist--; cptr->drcc_dist--;

View File

@ -243,12 +243,12 @@ proc magic::drcupdate { option } {
} }
proc magic::drcstate { status } { proc magic::drcstate { status } {
logcommands suspend *bypass logcommands suspend
set winlist [*bypass windownames layout] set winlist [*bypass windownames layout]
foreach lwin $winlist { foreach lwin $winlist {
set framename [winfo parent $lwin] set framename [winfo parent $lwin]
if {$framename == "."} { if {$framename == "."} {
logcommands resume *bypass logcommands resume
return return
} }
switch $status { switch $status {
@ -264,7 +264,7 @@ proc magic::drcstate { status } {
busy { ${framename}.titlebar.drcbutton configure -selectcolor yellow } 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, # 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"} { if {$subcommand != {} && $subcommand != "writeable" && $subcommand != "load"} {
return return
} }
logcommands suspend *bypass logcommands suspend
set winlist [magic::windownames layout] set winlist [magic::windownames layout]
foreach winpath $winlist { foreach winpath $winlist {
set framename [winfo parent $winpath] set framename [winfo parent $winpath]
@ -535,7 +535,7 @@ proc magic::captions {{subcommand {}}} {
"Loaded: ${subcaption1} Editing: ${subcaption2} Tool: $Opts(tool) \ "Loaded: ${subcaption1} Editing: ${subcaption2} Tool: $Opts(tool) \
Technology: ${techname}" Technology: ${techname}"
} }
logcommands resume *bypass logcommands resume
} }
# Allow captioning in the title window by tagging the "load" and "edit" commands # Allow captioning in the title window by tagging the "load" and "edit" commands
@ -670,10 +670,10 @@ proc magic::cursorview {win} {
if {$win == {}} { if {$win == {}} {
return return
} }
logcommands suspend *bypass logcommands suspend
set framename [winfo parent $win] set framename [winfo parent $win]
if {[catch {set cr [*bypass cif scale out]}]} { if {[catch {set cr [*bypass cif scale out]}]} {
logcommands resume *bypass logcommands resume
return return
} }
if {$cr == 0} {return} if {$cr == 0} {return}
@ -691,7 +691,7 @@ proc magic::cursorview {win} {
set olstx [expr {$olstx * $cr}] set olstx [expr {$olstx * $cr}]
set olsty [expr {$olsty * $cr}] set olsty [expr {$olsty * $cr}]
}]} { }]} {
logcommands resume *bypass logcommands resume
return return
} }
@ -707,24 +707,24 @@ proc magic::cursorview {win} {
set titletext [format "(%+g %+g) microns" $olstx $olsty] set titletext [format "(%+g %+g) microns" $olstx $olsty]
${framename}.titlebar.pos configure -text $titletext ${framename}.titlebar.pos configure -text $titletext
} }
logcommands resume *bypass logcommands resume
} }
proc magic::toolupdate {win {yesno "yes"} {layerlist "none"}} { proc magic::toolupdate {win {yesno "yes"} {layerlist "none"}} {
global Winopts global Winopts
if {[magic::display] == "NULL"} {return} if {[magic::display] == "NULL"} {return}
logcommands suspend *bypass logcommands suspend
if {$win == {}} { if {$win == {}} {
set win [magic::windownames] set win [magic::windownames]
} }
# Wind3d has a "see" function, so make sure this is not a 3d window # Wind3d has a "see" function, so make sure this is not a 3d window
if {$win == [magic::windownames wind3d]} { if {$win == [magic::windownames wind3d]} {
logcommands resume *bypass logcommands resume
return return
} }
logcommands resume *bypass logcommands resume
set topname [winfo toplevel $win] set topname [winfo toplevel $win]
set framename [winfo parent $win] set framename [winfo parent $win]
@ -831,13 +831,13 @@ proc magic::techrebuild {winpath {cmdstr ""}} {
proc magic::setscrollvalues {win} { proc magic::setscrollvalues {win} {
global Opts global Opts
logcommands suspend *bypass logcommands suspend
set svalues [${win} view get] set svalues [${win} view get]
set bvalues [${win} view bbox] set bvalues [${win} view bbox]
set framename [winfo parent ${win}] set framename [winfo parent ${win}]
if {$framename == "."} { if {$framename == "."} {
logcommands resume *bypass logcommands resume
return return
} }
@ -881,7 +881,7 @@ proc magic::setscrollvalues {win} {
proc magic::scrollupdate {win} { proc magic::scrollupdate {win} {
logcommands suspend *bypass logcommands suspend
if {[magic::display] == "NULL"} {return} if {[magic::display] == "NULL"} {return}
if {[info level] <= 1} { if {[info level] <= 1} {
@ -898,7 +898,7 @@ proc magic::scrollupdate {win} {
magic::setscrollvalues $win magic::setscrollvalues $win
} }
} }
logcommands resume *bypass logcommands resume
} }
# scrollview: update the magic display to match the # scrollview: update the magic display to match the