magic/dbwind
Intubun fc21472ee8 Add ClientData parameter to indirect-call callbacks for WASM
WASM call_indirect enforces an exact type match between the caller
and the callee. Many Magic callbacks had K&R-style () forward
declarations and a single-argument definition, but were passed to
iterators that always push a trailing ClientData argument. Native
builds tolerated the mismatch via loose prototypes; WASM traps with
"indirect call signature mismatch".

Added the missing ClientData (or, where the concrete type is known,
FindRegion *) parameter to:

* calma/CalmaRead.c, calma/CalmaWrite.c, calma/CalmaWriteZ.c —
  calmaWriteInitFunc
* cif/CIFwrite.c — cifWriteInitFunc
* commands/CmdSubrs.c — cmdWindSet
* database/DBtimestmp.c — dbStampFunc
* dbwind/DBWelement.c — dbwElementAlways1
* dbwind/DBWfdback.c — dbwfbWindFunc
* dbwind/DBWhlights.c — DBWHLRedrawWind
* ext2spice/ext2hier.c — spcnodeHierVisit
* extract/ExtBasic.c — extSDTileFunc, extTransPerimFunc,
  extAnnularTileFunc, extResistorTileFunc
* extract/ExtMain.c — extDefInitFunc
* extract/ExtTimes.c — extTimesInitFunc

Also adjusted commands/CmdE.c and commands/CmdTZ.c: SelectExpand was
being called with four arguments (the legacy surroundFlag), but its
real signature has been three arguments for years (the surround mode
is encoded in the expandType bit). The fourth argument was redundant
(DB_EXPAND_SURROUND in arg 2 is the source of truth) and rejected by
WASM. Native behavior is unchanged.

The added parameters are unused in the function bodies; they exist
only to satisfy the indirect-call signature.
2026-05-06 09:58:20 +02:00
..
DBWbuttons.c Fixed issues with the "macro" command that have existed since the 2026-04-13 12:26:42 -04:00
DBWcommands.c Reworked the way that magic displays measurement values (both linear 2026-01-24 16:19:12 -05:00
DBWdisplay.c Solved three issues: 2026-04-01 21:17:54 -04:00
DBWelement.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
DBWfdback.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
DBWhlights.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
DBWprocs.c Fixed the mess that is the "expand"/"unexpand" command set. This 2026-04-04 20:47:04 -04:00
DBWtools.c Reworked the way that magic displays measurement values (both linear 2026-01-24 16:19:12 -05:00
DBWundo.c GCC14: warning: missing braces around initializer 2024-10-09 21:12:55 -04:00
Makefile Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
dbwind.h Fixed issues with the "macro" command that have existed since the 2026-04-13 12:26:42 -04:00
dbwtech.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00