Commit Graph

100 Commits

Author SHA1 Message Date
Darryl L. Miles 8b7e0aaec6 Makefile: whitespace only change 2025-07-29 10:50:32 -04:00
Darryl L. Miles fd50bc1f4d TiJoin[XY]1 API introduction at all call sites 2025-07-27 12:42:05 -04:00
Darryl L. Miles 1a84eab4ce Plane[GS]etHint() added to encapsulate access to Plane->pl_hint
This is ground work to intercept usage and validate changes in
this area.

Fixed conflicts with earler patch in extract/ExtNghbors.c
2025-04-09 15:02:59 -04:00
Darryl L. Miles f942ae6e78 TiGetClient() excessive use hotspots
This is reducing nearby calls to TiGetClient() API when the value
can be looked up one time and stored in a local variable to make
other decisions about.

This is due to TiGetClient() potentially having a slightly higher
cost to call than previously, this is a kind of peephole
optimization approach (if I can see multiple getters used within
the window it got optmized).

'ticlient' was used for retrieval as ClientData so that future
greps across the codebase for `ti_client` should only match naked
access.
2025-04-09 14:55:58 -04:00
Darryl L. Miles 606f37cc80 Ti[GS]etClient() usage enforcement
All naked access to `ti_client` now uses the function-like-macro
to encapsulate this action.  This macro existed before this just
makes all sites utilize it.

Added additional INT and PTR variants to remove the programmer
load on thinking about casing and casts polluting the point
of use.  So the use now looks cleaner.

Equivalent prototypes:

 void TiSetClient(Tile*, ClientData)
 void TiSetClientINT(Tile*, intptr_t) /* pointertype */
 void TiSetClientPTR(Tile*, void*)

 ClientData TiGetClient(Tile*)
 intptr_t TiGetClientINT(Tile*) /* pointertype */
 void *TiGetClientPTR(Tile*)
2025-04-09 14:55:58 -04:00
Darryl L. Miles 12c6ccc97b ResReadSim.c remove existing fclose() as conflict with recent change
After futher review of this function it looks like the existing
fclose() is not in the correct place, and recent patches have
added fclose() to this function in better places (covering all
returns) but did not take into account the existing misplaced
fclose().
2025-02-23 10:23:51 -05:00
Darryl L. Miles 92c4fc35db ResMain.c: use-after-free: simple reorder of statements 2025-02-23 10:20:41 -05:00
Darryl L. Miles 37fa75dd77 CodeQL MemoryMayNotBeFreed.ql ResRex.c ResCheckSimNodes()
created use of 'alloc' local variable to track when an allocation occurred
so exit path logic is more straight forward for compiler/analyser to see
potential optimisations.
2025-02-22 21:35:23 -05:00
Darryl L. Miles ca9229b35a CodeQL MissingNegativtyTest.ql ttype>=0 ResSimSubckt()
This variable is used as array index, but the extGetDevType() API allows
a negative return to occur.
2025-02-22 21:31:22 -05:00
Darryl L. Miles e88dcba1c5 CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks
Guided by CodeQL static code analyser.

FileMayNotBeClosed.ql
FileMayNeverBeClosed.ql

The trick with "if(fp != stdout)" is problematic (to analyser) as
technically 'stdout' can be a global pointer that COULD be modified any
time, so it might have changed between the fopen() and fclose() calls so
the close MAY NEVER occurs (which is problem the analyzer can see).

So local state is maintained as a bool which will also clarify to the
compiler see the intention without concern for external stdout
modification.

Some items appear to be out and out leaks when certain commands are use.
2025-02-22 21:02:49 -05:00
Tim Edwards 72368a3d13 Added a fallback method for "extresist" whenever a device terminal
connection to a net that has been decomposed into a resistor array
cannot be found.  This indicates some fundamental error in the way
extresist works.  However, it should not be producing an invalid
and unsimulatable netlist.  Instead, it makes an arbitrary connection
from the device terminal to the resistor array and adds an entry in
the output netlist (.res.ext file).  This results in a poor
representation of the resistor network to that terminal, but an
otherwise simulatable netlist.  A warning is issued to note that an
arbitrary connection has been made.  This is most typically a
"garbage in, garbage out" situation in which insufficient information
exists in a layout to inform magic on which direction current is
traveling through a net.  However, it should be possible to rewrite
the extresist code so that magic makes somewhat informed decisions
about current paths and produces a halfway decent representation of
the actual net, instead of just giving up on the detailed extraction.
2025-01-15 10:38:10 -05:00
Darryl L. Miles f010d4d20b resis.h: create RESTRUE to replace use of TRUE macro ((bool)1)
Looks to be used as integer bitmask which is flagged by compiler warning
as dubious, when using compiler provided type 'bool' from stdbool.h
in C99 instead of unsigned char type.

C29 bool type compatibility
2025-01-07 14:02:07 -05:00
Darryl L. Miles 07f9bbe1fb gcc11 -Wall -Wpedantic cleanup 2025-01-06 16:12:11 +00:00
Tim Edwards f80540af46 Applied patch from Darryl Miles that prevents a segfault on an
error in "extresist".  The underlying error still exists and
causes a "Bad Device" error but no longer crashes magic.  See
github Issue #353.
2024-12-26 16:39:23 -05:00
Darryl L. Miles 3dbcb0759e Lookup() constify call-site
plow/PlowCmd.c: Lookup() constify call-site
plot/plotVers.c: Lookup() constify call-site
plot/plotMain.c: Lookup() constify call-site
plot/plotCmd.c: Lookup() constify call-site
netmenu/NMnetlist.c: Lookup() constify call-site
netmenu/NMcmdLZ.c: Lookup() constify call-site
netmenu/NMcmdAK.c: Lookup() constify call-site
lef/lefTech.c: Lookup() constify call-site
lef/lefCmd.c: Lookup() constify call-site
irouter/irRoute.c: Lookup() constify call-site
irouter/irCommand.c: Lookup() constify call-site
router/rtrCmd.c: Lookup() constify call-site
resis/ResRex.c: Lookup() constify call-site
gcr/gcrShwFlgs.c: Lookup() constify call-site
windows/windCmdSZ.c: Lookup() constify call-site
2024-12-26 15:20:58 -05:00
Darryl L. Miles 9ca8697659 strings.h: add #include required when strict
Due to use of strcasecmp() or similar C API.

Maybe HAVE_STRINGS_H is needed ?  If so which platforms needs this ?

clang18 default warning cleanup (strict)
2024-10-09 21:22:37 -04:00
Darryl L. Miles be09edb8d8 12 x warning: suggest parentheses around '&&' within '||'
The '&' has higher precedence, so the expression of the '&' side receive
extra parentheses.

ResMakeRes.c:671:37: warning: suggest parentheses around '&&' within '||'
ResMakeRes.c:942:32: warning: suggest parentheses around '&&' within '||'
ResSimple.c:201:70: warning: suggest parentheses around '&&' within '||'
ResRex.c:1036:28: warning: suggest parentheses around '&&' within '||'
ResRex.c:1038:50: warning: suggest parentheses around '&&' within '||'
ext2sim.c:1341:47: warning: suggest parentheses around '&&' within '||'
ext2spice.c:172:44: warning: suggest parentheses around '&&' within '||'
ext2spice.c:173:49: warning: suggest parentheses around '&&' within '||'
ext2spice.c:3655:50: warning: suggest parentheses around '&&' within '||'
ext2hier.c:1412:50: warning: suggest parentheses around '&&' within '||'
gcrDebug.c:638:55: warning: suggest parentheses around '&&' within '||'
selEnum.c:323:28: warning: suggest parentheses around '&&' within '||'

GCC14 -Wall cleanup series [-Wparentheses]
2024-10-09 21:12:55 -04:00
Darryl L. Miles 76d8c8c911 35 x warning: suggest parentheses around assignment used as truth value
PlowRules1.c:439:9: warning: suggest parentheses around assignment used as truth value
PlowTech.c:645:17: warning: suggest parentheses around assignment used as truth value
PlowTech.c:652:17: warning: suggest parentheses around assignment used as truth value
PlowTech.c:1019:17: warning: suggest parentheses around assignment used as truth value
ResReadSim.c:270:13: warning: suggest parentheses around assignment used as truth value
ResReadSim.c:871:9: warning: suggest parentheses around assignment used as truth value
ResRex.c:1840:17: warning: suggest parentheses around assignment used as truth value
getrect.c:72:9: warning: suggest parentheses around assignment used as truth value
getrect.c:79:9: warning: suggest parentheses around assignment used as truth value
getrect.c:86:9: warning: suggest parentheses around assignment used as truth value
getrect.c:93:9: warning: suggest parentheses around assignment used as truth value
hash.c:732:16: warning: suggest parentheses around assignment used as truth value
heap.c:328:17: warning: suggest parentheses around assignment used as truth value
heap.c:344:17: warning: suggest parentheses around assignment used as truth value
netlist.c:323:17: warning: suggest parentheses around assignment used as truth value
niceabort.c:121:9: warning: suggest parentheses around assignment used as truth value
path.c:1102:12: warning: suggest parentheses around assignment used as truth value
pathvisit.c:245:13: warning: suggest parentheses around assignment used as truth value
pathvisit.c:295:17: warning: suggest parentheses around assignment used as truth value
tech.c:656:17: warning: suggest parentheses around assignment used as truth value
ext2spice.c:1591:16: warning: suggest parentheses around assignment used as truth value
ext2spice.c:1622:16: warning: suggest parentheses around assignment used as truth value
ext2spice.c:1813:12: warning: suggest parentheses around assignment used as truth value
ext2spice.c:1862:12: warning: suggest parentheses around assignment used as truth value
ext2spice.c:3808:16: warning: suggest parentheses around assignment used as truth value
CalmaRdio.c:437:9: warning: suggest parentheses around assignment used as truth value
CalmaWrite.c:396:9: warning: suggest parentheses around assignment used as truth value
CalmaWrite.c:1772:29: warning: suggest parentheses around assignment used as truth value
CalmaWriteZ.c:372:9: warning: suggest parentheses around assignment used as truth value
CalmaWriteZ.c:1608:29: warning: suggest parentheses around assignment used as truth value
CIFrdtech.c:209:9: warning: suggest parentheses around assignment used as truth value
CIFrdtech.c:214:9: warning: suggest parentheses around assignment used as truth value
CIFrdtech.c:220:9: warning: suggest parentheses around assignment used as truth value
CIFrdtech.c:226:9: warning: suggest parentheses around assignment used as truth value
CIFrdutils.c:1258:12: warning: suggest parentheses around assignment used as truth value

GCC14 -Wall cleanup series [-Wparentheses]
2024-10-09 21:12:55 -04:00
Darryl L. Miles d94cd72538 37 x warning: array subscript has type 'char'
Compiler is expressing range concern with the warning mitigated by using
unsigned C array offsets.  This also draws attention to the range concern
when reading the code and making changes.

DBundo.c:263:45: warning: array subscript has type 'char'
DBundo.c:279:49: warning: array subscript has type 'char'
DBundo.c:317:52: warning: array subscript has type 'char'
DBundo.c:318:64: warning: array subscript has type 'char'
DBundo.c:324:52: warning: array subscript has type 'char'
DBundo.c:325:64: warning: array subscript has type 'char'
DBundo.c:329:50: warning: array subscript has type 'char'
DBundo.c:330:58: warning: array subscript has type 'char'
DBundo.c:338:52: warning: array subscript has type 'char'
DBundo.c:339:64: warning: array subscript has type 'char'
DBundo.c:345:52: warning: array subscript has type 'char'
DBundo.c:346:64: warning: array subscript has type 'char'
DBundo.c:350:50: warning: array subscript has type 'char'
DBundo.c:351:58: warning: array subscript has type 'char'
DBundo.c:371:52: warning: array subscript has type 'char'
DBundo.c:372:64: warning: array subscript has type 'char'
DBundo.c:378:52: warning: array subscript has type 'char'
DBundo.c:379:64: warning: array subscript has type 'char'
DBundo.c:383:50: warning: array subscript has type 'char'
DBundo.c:384:58: warning: array subscript has type 'char'
DBundo.c:392:52: warning: array subscript has type 'char'
DBundo.c:393:57: warning: array subscript has type 'char'
DBundo.c:399:52: warning: array subscript has type 'char'
DBundo.c:400:57: warning: array subscript has type 'char'
DBundo.c:403:53: warning: array subscript has type 'char'
DBundo.c:407:50: warning: array subscript has type 'char'
DBundo.c:408:58: warning: array subscript has type 'char'
EFbuild.c:1048:32: warning: array subscript has type 'char'
EFbuild.c:1056:32: warning: array subscript has type 'char'
ExtBasic.c:2358:43: warning: array subscript has type 'char'
ExtBasic.c:2493:43: warning: array subscript has type 'char'
ExtBasic.c:2519:43: warning: array subscript has type 'char'
ExtBasic.c:2644:43: warning: array subscript has type 'char'
ExtBasic.c:2678:43: warning: array subscript has type 'char'
ResPrint.c:143:43: warning: array subscript has type 'char'
plotRutils.c:713:34: warning: array subscript has type 'char'
plotRutils.c:786:29: warning: array subscript has type 'char'

GCC14 -Wall cleanup series [-Wchar-subscripts]
2024-10-09 21:12:55 -04:00
Darryl L. Miles 0cde303563 ResReadSim.c: warning: this 'if' clause does not guard...
break keyword indention corrected, braces added to better
convey code intention of multiline statement.

GCC14 -Wall cleanup series [-Wmisleading-indentation]
2024-10-09 21:12:55 -04:00
Darryl L. Miles b81e04eed4 ResPrint.c: '%s' directive writing 2 bytes into a region of size between 1 and 1000
GCC14 loud default warnings series [-Wformat-overflow=]
2024-10-09 20:39:12 -04:00
Tim Edwards dba6f99d93 Updated the revision number to go along with the merge of pull
request #325 from Daryl Miles.  Made a few simple style changes
to conform to (what is vaguely defined as) the overall programming
style for magic (passed down from John Ousterhout).
2024-10-01 12:56:31 -04:00
Darryl L. Miles aa703a67b7 resis/ResDebug.c: %.2f Wrong type of arguments to formatting function
Applied same fix as other patch for line below;

Copilot Autofix: did not infer the same fix for same vaiable from line next to it.

CodeQL: https://github.com/dlmiles/magic/security/code-scanning/158
2024-10-01 12:36:13 -04:00
Darryl Miles f976005d2d resis/ResMerge.c: Too few arguments to formatting function
Fix code scanning alert no. 64: Too few arguments to formatting function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-01 12:36:13 -04:00
Darryl Miles 91ec4e4cb8 resis/ResRex.c: Wrong type of arguments to formatting function
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-01 12:36:12 -04:00
Darryl Miles 9f39380b6a resis/ResDebug.c: Wrong type of arguments to formatting function
Fix code scanning alert no. 109: Wrong type of arguments to formatting function (#27)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-10-01 12:36:12 -04:00
Darryl L. Miles ce1e027c55 resis/ResSimple.c: ResGetDevice(): Call to function with fewer arguments than declared parameters
gparams.rg_ttype seems to be the only value of the correct type that has connectivity with the callsite.

Copilot Autofix rejected: ResGetDevice(gparams.rg_devloc, /* second argument */);

resis/ResSimple.c
9aa39f82 (2021-05-25 22:41:52 -0400 1039)           resDevice *res = ResGetDevice(gparams.rg_devloc);

commit 9aa39f820f (tag: 8.3.169)
Date:   Tue May 25 22:41:52 2021 -0400
2024-10-01 12:36:12 -04:00
Tim Edwards efccdbf341 Made some changes to the extresist code to handle the case where
a transistor's first tile record is a well or substrate type;
normally this is avoided, but if that's the only device terminal
that connects to the node, it will be used.  Also changed the
code to not report a failure when space is found under the
device, when space is allowed as a substrate type.  Instead it
will print a message that the substrate is not being extracted as
a resistive network.  However, note that the correct solution is
to do what the regular "extract" code does, which is to paint the
substrate type in the cell area first, so that there are valid
tile types to use for extracting the substrate network.
2024-05-04 20:16:55 -04:00
Tim Edwards 41e65b5214 Committing a patch to prevent segfaulting during "extresist" when
non-Manhattan geometry is analyzed for resistance extraction.
This patch merely prevents the crash condition.  It does not
solve the root of the problem, which is that split tiles can
belong to two different nets, but the tile can hold extraction
information for at most one of those nets.
2024-04-16 20:51:52 -04:00
Tim Edwards 814fb6f18d Corrected two separate issues with R-C extraction: (1) There was
a method that failed to work on devices with complex shapes on the
device recognition layer, such as snake-geometry resistors.  (2)
The use of contact type "xpc" in the sky130 tech file as its own
contact residue caused the contact tracing in extresist to fail.
I opted to keep the unorthodox contact description in the tech
file and wrote an extension to a routine in extresist to handle
the case.
2024-02-18 14:04:21 -05:00
Tim Edwards 83ed73ac52 One more change to the "extresist" code which prevents extresist
from substituting a regular label for a port during a node merge,
which can cause ports to become orphaned.
2023-11-27 16:18:43 -05:00
Tim Edwards 84af801608 Fixed two independent errors, both of which can cause devices to be
missing from a netlist generated by ext2spice with the "extresist"
option enabled.  The first had to do with some parts of nets being
given alias names for a net, and the second was caused during
"extresist" and would also result in error messages about devices
missing terminals.
2023-11-24 16:51:26 -05:00
Tim Edwards 2aa7380cb6 Changed the fix from the last commit by solving the problem in a
different way.  Added a routine to remove all layers of a contact
from all planes except the contact's base plane before finding
and processing contacts.  This causes ExtFindRegions() to find
and process only one tile on one plane per contact, so there are
no redundant contact entries.  Also, any overlapping stacked
contacts are resolved, which avoids the very common error of
contacts not being processed at the correct size because they
are being processed per tile for chopped-up areas.
2023-09-29 12:41:54 -04:00
Tim Edwards dacbfc4e1f Found that "extresist" double-counts contacts because no attempt
was made to limit the ExtFindRegions() search to one plane per
contact.  Fixed this simply by doubling the resistance per via
so that the final result is correct.
2023-09-29 10:48:05 -04:00
Tim Edwards 088bb828ac Corrected an error in the original resistor network simplifying
routine that marks resistors in loops to prevent infinite
recursion, but later incorrectly eliminates those resistors.
Also:  Changed the "tolerance" command to affect only the R-C
time constant tolerance.  Added a "threshold" command option
that limits output of small resistors.  This can help reduce
large networks that are otherwise not reducible by the three
methods of reduction (serial, parallel, and delta-wye), but
does affect output values (slightly).  This will probably need
to be revisited at some point.
2023-09-28 17:15:27 -04:00
Tim Edwards 656b5dbabe Corrected an error in the calculation of the number of contact
cuts per contact area during parasitic resistance extraction.
Previously, the result was divided by the via pitch twice,
resulting in most contact areas being reported as a single
cut.
2023-09-28 12:38:08 -04:00
Tim Edwards 13a7cc32e2 Corrected an issue with the last commit for fixing the "extresist"
command for use with "extract path";  the cellname was being cleared
after generating the filename with the extract path, but was being
used afterward, so it needed to be reverted back to the original
value, not just free'd.  Otherwise "extresist" will fail to produce
any results.
2023-08-07 15:37:04 -04:00
Tim Edwards 22fbb28656 Corrected one major error which will cause magic to fail to find the
".res.ext" file from "extresist" after using "extract do local" (and
probably with "extract path" as well).  Fixed this, and also made
sure that "extresist" writes the ".res.ext" file to the same location
as ".ext" always, so that handling is consistent throughout the
full R-C extraction process, across the use of "extract", "ext2sim",
"extresist", and "ext2spice".
2023-08-06 16:53:07 -04:00
Tim Edwards 380b9245f3 changed MAXTOKEN in ResReadSim.c from 256 to 1024, having
encountered an issue where a label in a flattened layout
exceeded 256 characters, ended up in the .sim file, and was
truncated when read back during "extresist".  The change to 1024
is a stop-gap measure because ultimately I want to replace the
use of .sim files with .ext files using the routines in extflat/,
which would deprecate everything in ResReadSim.c.
2023-03-25 16:11:46 -04:00
Tim Edwards fc62a63d41 Corrected errors in the extresist code and in extflat, both of which
can result in negative resistors due to integer overflow.  In all
cases, the target was floating-point and it was only necessary to
recast everything to float first.
2023-03-25 11:01:52 -04:00
Tim Edwards f0c94d59f3 Minor adjustment to output from esSIvalue() to avoid round-off error
causing the SI suffix not to be the expected one.  Adjusted the
bounds where each SI suffix is used to keep output in the range of
0.1 to 100, although the boundary is very subjective.  Made a
correction to the extresist code to scan through all device records
for a tile type.  However, (1) there are cases being missed, and (2)
this should not be necessary since all device types should be able
to be known exactly from the contents of the .sim file.  Needs more
work.
2023-03-23 15:38:31 -04:00
Tim Edwards e10901e32b Updated the version to go along with the merge of pull request
222 from Sean Cross.  Corrected a few places where the blanket
conversion "Region"->"ExtRegion" picked up some comment lines
that were unrelated to the structure name.
2023-03-10 11:14:23 -05:00
Sean Cross 1e7da74672 rename Region to ExtRegion
On Macos, Tk includes X11, which has this define:

    #if !defined(MAC_OSX_TK)
    #   include <X11/X.h>
    #endif
    #ifdef MAC_OSX_TK
    #   include <X11/X.h>
    #   define Cursor XCursor
    #   define Region XRegion
    #endif

This causes the keywords `Cursor` and `Region` to be reserved, which
prevents magic from building.

Rename `Region` to `ExtRegion` as suggested by @RTimothyEdwards in
https://github.com/RTimothyEdwards/magic/issues/195#issuecomment-1298870983
and https://github.com/RTimothyEdwards/magic/pull/222#pullrequestreview-1334900670

Signed-off-by: Sean Cross <sean@xobs.io>
2023-03-10 11:07:55 -05:00
Tim Edwards 3da6172706 Modified the "port renumber" command to use (case-insensitive)
natural sort instead of ASCII-based sorting, so that ports that
are numbered arrays will be indexed properly by count.  Also:
Modified the "extresist" handling of substrate to draw the default
substrate type over the entire cell area (less areas of nwell or
other conflicting type).  This allows extresist to extract the
entire substrate as a resistive network.  The result is ugly and
may warrant some aggressive network simplification, but it should
at least be realistic.
2023-02-27 22:22:09 -05:00
Tim Edwards e72f85fd10 Corrected the ext2sim output and extresist to properly handle
2-terminal devices without complaining.  The previous handling
seemed to be technically correct other than spitting out warnings
about missing terminals.
2023-02-24 12:58:46 -05:00
Tim Edwards c7f11d2169 Important update: Reworked the extraction method to properly
isolate the terminal areas of a device (e.g., source and drain)
and calculate their area and perimeter individually for the
device (in addition to the traditional method of calculating
area and perimeter of each resistance class for the entire node).

Also:  Reworked the SPICE syntax output to generate SI values
in the range 1-1000 with the appropriate suffix (e.g., "20u")
instead of defaulting to "u" for lengths and "p" for areas.
This prevents it from producing weird units like "150000u" when
a process definition already includes a scalefactor.

Reworked the "extresist" code to use the device terminal area
and perimeter.  This fixes an error in which "extresist" would
lose these values and "ext2spice" with option "extresist on"
would generate a new netlist output with zero terminal areas
and perimeters.
2023-02-16 11:59:13 -05:00
Tim Edwards 87702ac98a Reworked the previous commit in a way that makes more sense, as
the problem only occurs when handling the legacy "fet" device.
2023-02-13 13:41:58 -05:00
Tim Edwards 5fcd4441c1 Corrected the "extresist" command behavior to ensure that
transistor records match between the ".ext" file and the ".res.ext"
file for the number of terminals per device.  Previously, the first
device type for the layer type was always being used, and if it had
fewer terminals (e.g., a MOScap), then one terminal would go missing
in the output.
2023-02-13 10:57:43 -05:00
Tim Edwards 11ddd559b2 Fixed an error with LEF read where duplicate macros are encountered
in the input.  The name of one was being modified but was being
right-justified into the string, resulting in a name starting with
many space characters.  Also:  Fixed an issue with extresist where
a label that ends up with an empty string can become a node with
an empty string name in the .res.ext file output.
2022-12-09 17:31:47 -05:00
Tim Edwards 02bbb1064e Corrected an error in "extresist" that can output an incorrect
number of terminals for devices that don't have the usual gate/
source/drain terminals (e.g., diodes, resistors, capacitors) when
writing the devices with re-mapped terminals into the .res.ext
file.  Also:  Changed the size of the word containing the name
refcount for "equiv" statements, since an accidental shorting
of pins can cause a large number of "equiv" statements in a .ext
file, causing an overrun of the previously 1-byte refcount (this
probably does not make the structure any longer, since it likely
has to fit to a word boundary).
2022-12-06 21:55:01 -05:00