magic/extflat
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
..
COMPRESS Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
EFantenna.c First cut of pulling the TT_SIDE bit out of the tile database 2026-01-09 12:05:03 -05:00
EFargs.c Wire up headless / WASM mode at module boundaries 2026-05-11 14:20:47 -04:00
EFbuild.c Corrected an error when merging nodes during "ext2spice". The code 2026-05-29 14:06:50 -04:00
EFdef.c Significant overhaul of the extresist code. The purpose of this 2026-05-28 13:12:13 -04:00
EFerr.c Final work on the first stage of the extresist overhaul. The 2026-01-28 14:31:38 -05:00
EFflat.c Corrected two errors related to extraction: 2026-01-30 16:47:36 -05:00
EFhier.c Additional corrections fix the problem of devices being removed from 2026-06-04 17:45:03 -04:00
EFint.h Significant overhaul of the extresist code. The purpose of this 2026-05-28 13:12:13 -04:00
EFname.c Made another update to go along with the previous commit, that 2026-01-31 13:02:35 -05:00
EFread.c I hope this is the last change to the "extresist" code for a while. 2026-06-07 20:30:33 -04:00
EFsym.c 38 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
EFtypes.h codebase-wide: use flexible arrays where appropriate 2026-07-01 12:37:44 -04:00
EFvisit.c Added a new device type "dsubcircuit" which basically behaves like 2025-10-07 16:45:22 -04:00
Makefile Corrected a mistake with the extension of the bloat-all CIF operator 2019-10-16 20:53:03 -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
extflat.h Final work on the first stage of the extresist overhaul. The 2026-01-28 14:31:38 -05:00
extparse.h Significant overhaul of the extresist code. The purpose of this 2026-05-28 13:12:13 -04:00