- msg (SE, ngettext ("%s %s specifies %d decimal place, but "
- "the given width does not allow for any decimals.",
- "%s %s specifies %d decimal places, but "
- "the given width does not allow for any decimals.",
- spec->d),
- io_fmt, str, spec->d);
+ return (use == FMT_FOR_INPUT
+ ? xasprintf (ngettext (
+ "Input format %s specifies %d decimal place, "
+ "but width %d does not allow for any decimals.",
+ "Input format %s specifies %d decimal places, "
+ "but width %d does not allow for any decimals.",
+ spec->d),
+ str, spec->d, spec->w)
+ : xasprintf (ngettext (
+ "Output format %s specifies %d decimal place, "
+ "but width %d does not allow for any decimals.",
+ "Output format %s specifies %d decimal places, "
+ "but width %d does not allow for any decimals.",
+ spec->d),
+ str, spec->d, spec->w));
+ }
+
+ return NULL;
+}
+
+char *
+fmt_check_input__ (const struct fmt_spec *spec)
+{
+ return fmt_check__ (spec, FMT_FOR_INPUT);
+}
+
+char *
+fmt_check_output__ (const struct fmt_spec *spec)
+{
+ return fmt_check__ (spec, FMT_FOR_OUTPUT);
+}
+
+static bool
+error_to_bool (char *error)
+{
+ if (error)
+ {
+ free (error);