Added argument to fmt_scan() to specify the buffer size.