+ min_w = fmt_min_width (spec.type, use);
+ max_w = fmt_max_width (spec.type, use);
+ if (spec.w < min_w || spec.w > max_w)
+ return (use == FMT_FOR_INPUT
+ ? xasprintf (_("Input format %s specifies width %d, but "
+ "%s requires a width between %d and %d."),
+ str, spec.w, fmt_name (spec.type), min_w, max_w)
+ : xasprintf (_("Output format %s specifies width %d, but "
+ "%s requires a width between %d and %d."),
+ str, spec.w, fmt_name (spec.type), min_w, max_w));
+
+ max_d = fmt_max_decimals (spec.type, spec.w, use);
+ if (!fmt_takes_decimals (spec.type) && spec.d != 0)
+ return (use == FMT_FOR_INPUT
+ ? xasprintf (ngettext (
+ "Input format %s specifies %d decimal "
+ "place, but %s does not allow any decimals.",
+ "Input format %s specifies %d decimal "
+ "places, but %s does not allow any "
+ "decimals.",
+ spec.d),
+ str, spec.d, fmt_name (spec.type))
+ : xasprintf (ngettext (
+ "Output format %s specifies %d decimal "
+ "place, but %s does not allow any decimals.",
+ "Output format %s specifies %d decimal places, but "
+ "%s does not allow any decimals.",
+ spec.d),
+ str, spec.d, fmt_name (spec.type)));
+ else if (spec.d > max_d)