magic/commands
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
..
CmdAB.c Corrected another place where the property handling had not been 2026-02-19 11:40:46 -05:00
CmdAuto.c K&R commands/*.c: bulk function implementation conversion 2024-12-26 13:13:13 -05:00
CmdCD.c Corrected another place where the property handling had not been 2026-02-19 11:40:46 -05:00
CmdE.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
CmdFI.c More updates. . . Got it to the point were gpio_ovtv2 is LVS 2026-01-17 20:49:52 -05:00
CmdLQ.c Fixed the mess that is the "expand"/"unexpand" command set. This 2026-04-04 20:47:04 -04:00
CmdRS.c Solved three issues: 2026-04-01 21:17:54 -04:00
CmdSubrs.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
CmdTZ.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
CmdWizard.c First cut of pulling the TT_SIDE bit out of the tile database 2026-01-09 12:05:03 -05:00
Makefile readline/Makefile: move up before with no scheme 2025-07-29 10:50:31 -04:00
commands.h Extended the "property" command and modified the way that properties 2026-02-18 10:48:47 -05:00