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.
the previous version was probably working just fine
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.
no attempt to free memory was made previously
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.
Unclear with all the flip operations if there is some kind of attachment
(exchange of channels), the other 2 channels created in the function
are also cleaned up.
Maybe it was a single bit and '!' operator inverted a single bit, but it
appears to be a 4-bit mask today.
TODO check rtrMARKED() this looks like it uses '&' operator is in use
but from the context of a bitmask maybe this should be '|' operator.
ourgl local variable is set to a non-NULL value (first initialization)
in code that is in lines below where it is dereferenced in a loop.
Somewhere in the loop there is a point where the precondition of ourgl
being set to non-null is expected.
ASSERT added.
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.
This has a knock on effect of causing EFvisit.c to require database.h
to be defined BEFORE the EFint.h due to an identical copy of ArrayInfo
type being present in both files.
Maybe there should be database_arrayinfo.h ? To remove the copy.
interactive wiring into coordinate-based commands. Added new
command extensions for "wire leg", "wire vertical", "wire type",
and "wire horizontal". Modified the command logging such that
"wire show" (which does not modify layout) does not get logged,
which avoids unnecessary logging of mouse movement.
that has since been compressed and given a ".gz" extension.
Removed code that uses a system call to "gunzip" and "gzip" when
the target file is compressed, since the compression is handled
in the code.
requires that subcells be unexpanded in order to select them. This
seems to be more in line with what one would expect from the
documented description of the "select area" command, and more in
line with common-sense expectations.
"MASK_HINTS" was implemented, it was put into a routine that
scales all coordinate-related properties, including "FIXED_BBOX",
but the original code that scaled only "FIXED_BBOX" was never
removed, resulting in the bounding box getting incorrectly scaled
twice by any grid scaling.
new CIF operator is used in a tech file. Reworked yesterday's
commit to add more related operators, so there are now four new
ones (also renamed them): interacting, noninteracting, overlapping,
and nonoverlapping. "interacting" now means overlapping or touching;
so the four cases allow all variations of adjacency between the two
material types.
regions of a given type and retains only those regions which
interact with (overlap) another given type. Both sets of types
can be either magic database types or CIF temp layers. This will
allow the implementation of rules that were not previously
possible.
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.
generate a name for an instance that is set to NULL. It is not
clear to me by an instance would have a NULL name, but apparently
it can happen, and should not crash magic.
generally unused, as it is incompatible with the Tcl/Tk build of
magic. However, I had not intended to remove it, only move the
name from "readline-4.3" to "readline". But "readline/readline"
was in .gitignore, which caused the contents to be removed from
the repository. This commit restores those files, and also
prevents the readline directory Makefile from making a symbolic
link called "readline" to itself, which was causing compile-time
issues. The readline code is only kept for backwards compatibility
with ancient versions of magic not using the Tcl/Tk interpreter.