magic/cif
Intubun 476bb5474c 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-11 14:20:47 -04:00
..
CIFgen.c Found that I needed to apply the same correction as the last 2026-04-10 13:39:17 -04:00
CIFhier.c Fix five latent bugs surfaced while porting to WASM 2026-05-11 14:20:47 -04:00
CIFint.h Decided to change the name of the new cifinput/cifoutput operator 2026-03-11 15:52:42 -04:00
CIFmain.c cif: use 'const' with 'rcsid' 2025-01-04 11:31:17 -05:00
CIFrdcl.c Corrected what appears to be a long-standing error in the GDS read 2026-03-22 13:11:27 -04:00
CIFrdpoly.c cif: use 'const' with readonly data (also consumer DBpaint) 2025-01-04 11:31:17 -05:00
CIFrdpt.c Corrected another place where the property handling had not been 2026-02-19 11:40:46 -05:00
CIFrdtech.c Decided to change the name of the new cifinput/cifoutput operator 2026-03-11 15:52:42 -04:00
CIFrdutils.c freeMagic1() idiom insertion at all sites reported by static code analysis 2025-12-19 09:31:58 -05:00
CIFread.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
CIFsee.c Reworked the method from the previous set of commits, which creates 2026-03-10 14:25:02 -04:00
CIFtech.c Decided to change the name of the new cifinput/cifoutput operator 2026-03-11 15:52:42 -04:00
CIFwrite.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-11 14:20:47 -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
cif.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00