magic/graphics
Intubun fdfb54badb graphics/grNull.c: typed no-op stubs for WASM call_indirect
Magic's graphics layer routes every drawing primitive through
function pointers (GrXxxPtr / grXxxPtr) that are bound to a driver
at startup. The original null driver assigned a single 0-arg
nullDoNothing() to every pointer, which works in native builds
because of K&R loose prototype rules but fails in WASM where
call_indirect requires an exact type match between caller and
callee.

This commit:
* Adds typed no-op stubs nullDoNothingI/II/IIII/IIIIIII for
  void-returning callbacks of various arities.
* Adds nullReturnFalseI/II/III for bool-returning callbacks and
  nullReturnZeroI for int-returning callbacks.
* Casts each pointer assignment in nullSetDisplay() to the K&R
  pointer type the public header still uses, while the underlying
  function carries the correct WASM signature.
* Fills in window-management and backing-store pointers that the
  original null driver left at NULL — many of these are called
  unconditionally by WindUpdate paths, and need at least a no-op
  to avoid traps.
* Guards the stdin watch in nullSetDisplay() with #ifndef
  __EMSCRIPTEN__: WASM has no real stdin file descriptor and
  TxAdd1InputDevice() / SigWatchFile() are POSIX-specific.

Native builds are unaffected: the K&R-loose prototype machinery
still accepts the previous and the new code identically.
2026-05-11 14:20:47 -04:00
..
cairo_new Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
cairo_orig graphics/cairo_orig/grTCairo5.c uninitialized local variable 2024-10-01 12:36:13 -04:00
DEFAULT.glyphs Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
FreeMono.pt3 Remove all the $XXX: YYY$ 2020-05-23 17:00:38 -04:00
FreeSans.pt3 Remove all the $XXX: YYY$ 2020-05-23 17:00:38 -04:00
FreeSerif.pt3 Remove all the $XXX: YYY$ 2020-05-23 17:00:38 -04:00
Makefile graphics: minor change to Makefile and configure 2025-10-04 20:50:31 -04:00
README.X10a Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
READ_ME Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
W3Dmain.c Reworked the way that magic displays measurement values (both linear 2026-01-24 16:19:12 -05:00
X11Helper.c Use HAVE_SYS_TIME_H and TIME_WITH_SYS_TIME from autoconf where possible 2025-07-27 12:43:04 -04:00
bw.glyphs Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
color.glyphs Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
glyphs.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
grCMap.c CodeQL File{MayNot,Never}BeClosed.ql file-handle resource leaks 2025-02-22 21:02:49 -05:00
grClip.c First cut of pulling the TT_SIDE bit out of the tile database 2026-01-09 12:05:03 -05:00
grDStyle.c freeMagic1() idiom insertion at all sites reported by static code analysis 2025-12-19 09:31:58 -05:00
grGlyphs.c CodeQL InconsistentNullnessTest.ql ourgl != NULL 2025-02-22 21:31:22 -05:00
grLock.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
grMain.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grNull.c graphics/grNull.c: typed no-op stubs for WASM call_indirect 2026-05-11 14:20:47 -04:00
grOGL1.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grOGL2.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
grOGL3.c grX11su3.c: warning for ClientData compare 2025-10-04 20:50:31 -04:00
grOGL4.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grOGL5.c graphics: multiple definition of `various_x11_symbols' 2024-10-09 20:35:19 -04:00
grOGLInt.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
grTCairo1.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grTCairo2.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
grTCairo3.c fix GrTextSizePtr API interface return type consistency 2025-07-27 12:45:51 -04:00
grTCairo4.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grTCairo5.c 38 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
grTCairoInt.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
grTOGL1.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grTOGL2.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
grTOGL3.c fix GrTextSizePtr API interface return type consistency 2025-07-27 12:45:51 -04:00
grTOGL4.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grTOGL5.c 38 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
grTOGLInt.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
grText.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
grTk1.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grTk2.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
grTk3.c fix GrTextSizePtr API interface return type consistency 2025-07-27 12:45:51 -04:00
grTk4.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grTk5.c 38 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
grTkCommon.c gtTkCommon.c: SUPPORT_DIRECT_MALLOC around function pointer use of legacy malloc 2025-12-19 09:31:58 -05:00
grTkCommon.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
grTkInt.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
grX11Int.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
grX11su1.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grX11su2.c C99 code compat when configured with no TCL support 2022-10-29 06:07:46 +02:00
grX11su3.c graphics: cleanup various warnings 2025-10-04 20:50:31 -04:00
grX11su4.c utils/magsgtty.h removal and fixup 2026-03-26 09:21:18 -04:00
grX11su5.c graphics: cleanup various warnings 2025-10-04 20:50:31 -04:00
grX11thread.c C99 code compat when configured with no TCL support 2022-10-29 06:07:46 +02:00
graphics.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
graphicsInt.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
prcolors.c Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
wind3d.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00

README.X10a

This driver is a modification of the Stanford X10 driver.  The modifications
were done by Walter Scott and Eric Lunow at Lawrence Livermore National Labs.