Files
BFM-decomp/tools
Drew T 6eea1ac6a4 fix(phase-30 S48-0b): _carry_typedefs' already-carried test was line-oriented
The test was `^\s*typedef\b[^\n]*\bNAME\b` — the name must sit on the SAME LINE
as the keyword. True of `typedef unsigned char u8;`, never true of the
multi-line form the preamble backscan actually carries:

    typedef struct Foo {   …   } Foo;

so every multi-line typedef already in the unit was carried a SECOND time and
the unit reached the gate with two definitions of one tag. canon_sig_reconcile
uniquifies draft tags, so the duplicate is exact: `redefinition of struct
Foo_8013C0F8`.

- Extract the block capture as `_typedef_blocks(lines)` and derive the
  already-carried set from it (R33: one parser, two callers), so the
  multi-line form is recognised exactly as the single-line form always was.

Measured on the 0b population: func_8013C0F8 (3 slots) carried Foo+Bar twice;
func_8013B83C dropped a redundant file-scope copy of a typedef its body
declares at block scope. 6 other families byte-identical output.
2026-08-11 16:00:02 -06:00
..