pivot-table: New functions for setting captions, etc.
[pspp] / src / language / dictionary / sys-file-info.c
index e871dfd59bf0a23f2513d64195db6256e2ec664d..7f5216134c8e1d869700ce3437db2ea7e7209845 100644 (file)
@@ -596,7 +596,7 @@ display_value_labels (const struct variable **vars, size_t n_vars)
             value->numeric.show = SETTINGS_VALUE_SHOW_VALUE;
           else
             value->string.show = SETTINGS_VALUE_SHOW_VALUE;
-          if (var_is_value_missing (vars[i], &vl->value, MV_USER))
+          if (var_is_value_missing (vars[i], &vl->value) == MV_USER)
             pivot_value_add_footnote (value, missing_footnote);
           int row = pivot_category_create_leaf (group, value);
 
@@ -1002,11 +1002,12 @@ report_encodings (const struct file_handle *h, struct pool *pool,
   struct pivot_table *table = pivot_table_create__ (
     pivot_value_new_text_format (N_("Usable encodings for %s."),
                                  fh_get_name (h)), "Usable Encodings");
-  table->caption = pivot_value_new_text_format (
-    N_("Encodings that can successfully read %s (by specifying the encoding "
-       "name on the GET command's ENCODING subcommand).  Encodings that "
-       "yield identical text are listed together."),
-    fh_get_name (h));
+  pivot_table_set_caption (
+    table, pivot_value_new_text_format (
+      N_("Encodings that can successfully read %s (by specifying the encoding "
+         "name on the GET command's ENCODING subcommand).  Encodings that "
+         "yield identical text are listed together."),
+      fh_get_name (h)));
 
   pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Encodings"),
                           N_("Encodings"));
@@ -1041,9 +1042,10 @@ report_encodings (const struct file_handle *h, struct pool *pool,
     pivot_value_new_text_format (N_("%s Encoded Text Strings"),
                                  fh_get_name (h)),
     "Alternate Encoded Text Strings");
-  table->caption = pivot_value_new_text (
-    N_("Text strings in the file dictionary that the previously listed "
-       "encodings interpret differently, along with the interpretations."));
+  pivot_table_set_caption (
+    table, pivot_value_new_text (
+      N_("Text strings in the file dictionary that the previously listed "
+         "encodings interpret differently, along with the interpretations.")));
 
   pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Text"), N_("Text"));