spvbin-helpers: Properly handle parsing strings with no destination.
[pspp] / src / output / pivot-table.h
index e2bb886c30dc891d65c266d2aac7cdd3e6160fcf..2a5d8467f81037e152505df4a8e7ae1049e24faa 100644 (file)
@@ -278,7 +278,8 @@ struct pivot_dimension *pivot_dimension_create__ (struct pivot_table *,
 
 void pivot_dimension_destroy (struct pivot_dimension *);
 
-void pivot_dimension_dump (const struct pivot_dimension *, int indentation);
+void pivot_dimension_dump (const struct pivot_dimension *,
+                           const struct pivot_table *, int indentation);
 \f
 /* A pivot_category is a leaf (a category) or a group:
 
@@ -306,10 +307,11 @@ struct pivot_category
     bool show_label_in_corner;
 
     /* Leaf only. */
-    struct fmt_spec format;
     size_t group_index;        /* In ->parent->subs[]. */
     size_t data_index;         /* In ->dimension->data_leaves[]. */
     size_t presentation_index; /* In ->dimension->presentation_leaves[]. */
+    struct fmt_spec format;    /* Default format for values in this category. */
+    bool honor_small;          /* Honor pivot_table 'small' setting? */
   };
 
 static inline bool
@@ -439,10 +441,8 @@ struct pivot_table
     struct pivot_table_sizing sizing[TABLE_N_AXES];
 
     /* Format settings. */
-    int epoch;
-    char decimal;               /* Usually ',' or '.'. */
+    struct fmt_settings settings;
     char grouping;              /* Usually '.' or ','. */
-    char *ccs[5];               /* Custom currency. */
     double small;
 
     /* Command information. */
@@ -553,6 +553,12 @@ struct pivot_footnote *pivot_table_create_footnote__ (
   struct pivot_table *, size_t idx,
   struct pivot_value *marker, struct pivot_value *content);
 
+void pivot_footnote_format_marker (const struct pivot_footnote *,
+                                   const struct pivot_table *,
+                                   struct string *);
+char *pivot_footnote_marker_string (const struct pivot_footnote *,
+                                    const struct pivot_table *);
+
 void pivot_footnote_destroy (struct pivot_footnote *);
 
 /* Internals. */
@@ -661,6 +667,7 @@ struct pivot_value
             char *var_name;           /* May be NULL. */
             char *value_label;        /* May be NULL. */
             enum settings_value_show show; /* Show value or label or both? */
+            bool honor_small;         /* Honor value of pivot table 'small'? */
           }
         numeric;
 
@@ -687,6 +694,8 @@ struct pivot_value
         /* PIVOT_VALUE_TEXT. */
         struct
           {
+            /* 'local', 'c', and 'id' must all be nonnull, but they are allowed
+               to be the same pointer. */
             char *local;              /* Localized. */
             char *c;                  /* English. */
             char *id;                 /* Identifier. */
@@ -697,6 +706,8 @@ struct pivot_value
         /* PIVOT_VALUE_TEMPLATE. */
         struct
           {
+            /* Both 'local' and 'id' must be nonnull, but they are allowed to
+               be the same pointer. */
             char *local;              /* Localized. */
             char *id;                 /* Identifier. */
             struct pivot_argument *args;
@@ -738,6 +749,7 @@ struct pivot_value *pivot_value_new_user_text_nocopy (char *);
 
 /* Footnotes. */
 void pivot_value_add_footnote (struct pivot_value *, const struct pivot_footnote *);
+void pivot_value_sort_footnotes (struct pivot_value *);
 
 /* Numeric formats. */
 void pivot_value_set_rc (const struct pivot_table *, struct pivot_value *,
@@ -747,7 +759,7 @@ void pivot_value_set_rc (const struct pivot_table *, struct pivot_value *,
 char *pivot_value_to_string (const struct pivot_value *,
                              const struct pivot_table *);
 char *pivot_value_to_string_defaults (const struct pivot_value *);
-void pivot_value_format (const struct pivot_value *,
+bool pivot_value_format (const struct pivot_value *,
                          const struct pivot_table *, struct string *);
 bool pivot_value_format_body (const struct pivot_value *,
                               const struct pivot_table *,