magic/commands
Mohamed Gaber 6638949233 codebase-wide: use flexible arrays where appropriate
In platforms with bounds-checking enabled, placeholder values for array sizes in structs that may be exceeded always result in a sigtrap.

This patch updates the following classes to use flexible arrays at the end of structs:
- database
  - Label
  - PropertyRecord (union of three flexible arrays and a pointer*)
  - cellUE
- extflat
  - HierName
  - EFAttr
  - Dev
- utils
  - HashEntry (union of two flexible arrays and a pointer*)
   - internalUndoEvent: Was a plain int, replaced with a flexible char array

Additionally, the database struct editUE, which would have just a single flexible-array member, was removed and simply replaced with a character pointer.

Where possible, allocation size macros have been introduced.

---

* It is noted flexible-length arrays as part of unions are not part of the C language spec and are a GNU99 extension, however, it is supported by both GCC and Clang.
2026-07-01 12:37:44 -04: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 Some further refinements to the last commit, and other additions: 2026-05-29 17:16:37 -04: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 codebase-wide: use flexible arrays where appropriate 2026-07-01 12:37:44 -04:00
CmdRS.c Corrected a problem caused by fixing the "select visible" command 2026-05-26 17:01:45 -04:00
CmdSubrs.c Annotate ClientData callbacks: /*ARGSUSED*/ + /* UNUSED */ markers 2026-05-11 14:20:47 -04:00
CmdTZ.c Add ClientData parameter to indirect-call callbacks for WASM 2026-05-11 14:20:47 -04: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