Move WIREF and REWIREF macros to format.h