"macro" command will crash magic. This will happen if, for
example, magic is compiled without OpenGL support, in which case
the "wind3d" client does not exist, and parsing the default
macros from the system .magicrc file will cause an immediate
crash.
the "tool" implementation. Previously, the "tool" implementation
would overwrite the button bindings for the mouse. The problem
with that is that if the user customizes one or more of the
bindings, such as using the mouse wheel for zooming instead of
panning, then the custom macro gets obliterated when the tool
changes. The reimplementation creates multiple macro sets which
are unique to each tool. The "enable_tools" function sets up
the initial unique default bindings for each tool. The user
can then customize the bindings for any tool, and the
implementation no longer requires the constant changing of key
bindings. Note that the new implementation is slightly less
efficient because the macro tables are found by string hash
based on the name of the tool or client type, not the integer
client ID. The reduction in efficiency is balanced by the
increased flexibility of the macros.
Support gcc -Werror=format-security which is used by default on Fedora.
ext2spice/ext2spice.c: format not a string literal and no format arguments
extflat/EFargs.c: likewise
windows/windCmdNR.c: likewise
Was looking to implement this feature and found it was already
implemented but is a secret feature.
Updated documentation and modified implementation so it is possible
a user can discover the feature via usage such as "quit -help -invalid"
like other commands.
This commit related to the dynamic creation of data that is used
to parse commands and options via Lookup.
windows/windows.h: Lookup() constify call-site
tcltk/tclmagic.c: Lookup() constify call-site
graphics/W3Dmain.c: Lookup() constify call-site
windows/windSend.c: Lookup() constify call-site
windows/windMain.c: Lookup() constify call-site
windows/windInt.h: Lookup() constify call-site
textio/txMain.c: Lookup() constify call-site
ext2spice/ext2spice.c: Lookup() constify call-site
ext2sim/ext2sim.c: Lookup() constify call-site
windows/windCmdAM.c: Lookup() constify call-site
Tcl_SetResult() uses cast to remove 'const' from type, the pointer
is only used to take a copy of the data, the lack of 'const' is due
to Tcl heritage when supporting C89 era compilers.
TCL9 appears to fix this, in that the macro used ends up at
Tcl_NewStringObj() which has 'const' here.
Fix code scanning alert no. 130: Wrong type of arguments to formatting function (#43)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Fix code scanning alert no. 133: Redundant null check due to previous dereference (#40)
* Update windDisp.c
* DLM - AI wanted to guard the '*area' dereference in if() statement, but the code path above has address of '&' operator for the assignment to 'area' so it must always be non-null. So I rejected this approach and removed the extra null check, replacing it with an assert().
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Fix code scanning alert no. 129: Wrong type of arguments to formatting function (#24)
* Update windDebug.c
* AI wanted "%p", DLM changed to (intmax_t) "%lx"
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
been broken ever since moving to the Tcl/Tk wrapped version. Added
some new features that allow background commands from the window
handling (like pointer tracking) to be omitted from the log file
via a suspend/resume function. Added a header file and a few
commands at the top of the log file that align the log file contents
with the screen and box state at the start of logging. This makes
a log file which can be "played back" by sourcing it from the magic
console prompt. Per request from Harald Pretl.
This commit makes the code (mostly) C99-compatible, enabling to compile
it without the -Wno-error=implicit-function-declaration flag. This
way, Magic becomes usable on arm64 architectures, specifically on Apple
computers with M1/M2 SoC.
it as a single value "flags" (unsigned char) with meaningful flag
names. Added new option "-fail" to the load command to allow
magic to fail on loading a cell that does not have a corresponding
file rather than the default action of creating a new cell. Added
a flag for the "-quiet" option so that behavior on "-fail" can be
done quietly.
coordinate system origin to the specified (current) location.
This is a much more efficient method than selecting everything in
a layout and moving it, especially for very large layouts where
selection and moving becomes prohibitive.
which had been changed a few months back to remove the individual
cell count and only list the top level cell. The behavior has been
changed a bit so that "list" returns values for the top level cell
only, but "listall" returns a complete list. "drc list count total"
gives the DRC count for the top cell, but "drc listall count total"
gives the DRC count for everything (probably not very useful).
Also: Implemented a behavior by request to automatically removed
the (UNNAMED) cell whenever a new cell is loaded and the (UNNAMED)
cell has not been modified.
distributed installations, where the immediate installation location
is different from the final installation location, but in the case
where it is not desirable to put the entire install hierarchy as a
subdirectory of DESTDIR.
rid of redundant port entries in subcircuits. There is still an outstanding
issue as to whether nodes and connections need to be recursively iterated
to the hierarchy bottom. The current fix corrected the test case. Also,
added a "-dereference" option to the "load" command to revert to the
original behavior of using only search paths from "addpath" when searching
for files to load.
frame buffers and render buffers, and use fast frame buffer bit
block transfers to do copies to and from backing store. Also found
a long-standing problem where multiple windows fail to refresh
properly in OpenGL and Cairo interfaces due to a lack of calling
GrLock() and GrUnlock() around the call to fetch backing store
after an expose event. The use of the general purpose frame
buffer allows magic to avoid calling any indirect rendering methods
and should now (finally) allow magic to run in OpenGL mode over a
VNC. Use of direct rendering methods only also means that magic
does not need to be compiled with the ad hoc switch to have Cairo
handle drawing into pixmaps for the icons (this remains to be
tested).
development had been halted since it was first created back in April.
Version 8.2 is now the official development version, with the first
development push to create a Cairo graphics interface.