magic/calma
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
..
CalmaRdcl.c Corrected an error caused by a recent commit that was attempting 2026-03-16 12:50:17 -04:00
CalmaRdio.c calma: use 'const' with 'rcsid' 2025-01-04 11:31:17 -05:00
CalmaRdpt.c Came across a weird error today in which some tool inserted bogus 2026-02-24 20:56:27 -05:00
CalmaRead.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
CalmaWrite.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
CalmaWriteZ.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-06 09:58:20 +02:00
Makefile Implemented native gzip compression/decompression using zlib routines. 2022-05-10 09:19:39 -04:00
calma.h Came across a weird error today in which some tool inserted bogus 2026-02-24 20:56:27 -05:00
calmaInt.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00