Refactor bypass to reduce code duplication
Reduce boilerplate code and refactor trigger_joiner, postcoh, and multiratespiir to reduce code duplication across these multiple files.
As one example, there is a lot of duplicate gap flag management functions and structs such as add_flag_segment
, need_flag_gap
, flag_segment`.
Ideally, this issue would be closed when we have a common.c file that encapsulates these repeated code segments that pass in callbacks for module specific logic.