gen_scanf_fmt(): delete function and use snprintf() instead