Make data input and output take a fmt_settings structure.