ref-filter.h: add functions for filter/format & format-only