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.
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.
and HOME substitution in filenames needs to watch for a NULL
cd_file, and (2) The routine that removes the (UNNAMED) cell when
another cell is loaded needs to NULL the boxRootDef pointer or else
it ends up pointing to deallocated memory.
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.
related to that cell (since elements are usually temporary and so
kept in a separate list, not in the cell). Corrected a major error
in the bplane implementation that failed to remove a cell use from
the child def's parent list when deleting the use. Can cause magic
to go into an infinite loop, especially after selecting and unselecting
cells.
unrecognized layers when the "readonly" read option is set.
Added support to scale elements (from the "element" command,
such as the measurement text and arrows) when the grid scales,
which was missing. Corrected the output of persistent elements
in a .mag file so that they are correctly scaled by the scale
reducer.