Make data input and output take a fmt_settings structure.
[pspp] / src / data / format.c
index d0b87a503f198a8d7db58978abbf6c2fa27a6d06..12939c5dce5cbfcc64edb6155e230afdfb2723f6 100644 (file)
@@ -208,7 +208,8 @@ fmt_for_output (enum fmt_type type, int w, int d)
 /* Returns the output format specifier corresponding to input
    format specifier INPUT. */
 struct fmt_spec
-fmt_for_output_from_input (const struct fmt_spec *input)
+fmt_for_output_from_input (const struct fmt_spec *input,
+                           const struct fmt_settings *settings)
 {
   struct fmt_spec output;
 
@@ -237,7 +238,7 @@ fmt_for_output_from_input (const struct fmt_spec *input)
     case FMT_PCT:
       {
         const struct fmt_number_style *style =
-         settings_get_style (input->type);
+         fmt_settings_get_style (settings, input->type);
 
         output.w += fmt_affix_width (style);
         if (style->grouping != 0 && input->w - input->d >= 3)