add support for *_flag global variables needed by bfp_* functions