Updated parse_format() function signature.