Commit Graph

11 Commits

Author SHA1 Message Date
R. Timothy Edwards 27c423c2ed Substantially revised the "macro" command callback functions and
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.
2025-10-09 15:43:54 -04:00
Darryl L. Miles d55a2b74ac header file #ifndef guard namespace consistency (global change)
This add an effective namespace prefix to the guard ifndef
2025-07-29 10:50:32 -04:00
Darryl L. Miles 81d526562c dbwind: DBWAddButtonHandler() cb_database_buttonhandler_t
constify API call arguments as appropiate
2025-02-23 10:21:41 -05:00
Alessandro De Laurenzis 68cecd5382 C99 code compat when configured with no TCL support 2022-10-29 06:07:46 +02:00
Alessandro De Laurenzis b306a39560 Compatibility with C99 standard
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.
2022-10-29 06:07:46 +02:00
Tim Edwards 0dcc9c6ca7 Corrected two potentially fatal errors: (1) Code doing the PDK_PATH
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.
2021-04-24 22:13:30 -04:00
Tim Edwards d1f7e43dcc Revised DBWloadWindow (again) so that boolean flags are passed to
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.
2021-02-10 13:05:38 -05:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards fa60cbaaf0 Corrected the cell delete routine to include removing any elements
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.
2020-05-15 20:49:51 -04:00
Tim Edwards 55ff3fd1ff Modified GDS read output to avoid generating error messages on
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.
2020-05-12 12:03:38 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00