Merge branch 'master' into output
[pspp-builds.git] / src / output / table.h
index d5a0329846d452d4dc7ef54bc4ea0f8c3dbdd404..f4fbc786f0440ea39da04ebfa0c54070ccec7cd1 100644 (file)
@@ -79,7 +79,6 @@ struct tab_table
 
     /* Contents. */
     int col_style;             /* Columns: One of TAB_COL_*. */
-    int col_group;             /* Number of rows per column group. */
     char *title;                /* Table title. */
     unsigned flags;            /* SOMF_*. */
     int nc, nr;                        /* Number of columns, rows. */
@@ -127,13 +126,13 @@ struct tab_rendering
   };
 
 /* Tables. */
-struct tab_table *tab_create (int nc, int nr, int reallocable);
+struct tab_table *tab_create (int nc, int nr);
 void tab_destroy (struct tab_table *);
 void tab_ref (struct tab_table *);
 void tab_resize (struct tab_table *, int nc, int nr);
 void tab_realloc (struct tab_table *, int nc, int nr);
 void tab_headers (struct tab_table *, int l, int r, int t, int b);
-void tab_columns (struct tab_table *, int style, int group);
+void tab_columns (struct tab_table *, int style);
 void tab_title (struct tab_table *, const char *, ...)
      PRINTF_FORMAT (2, 3);
 void tab_flags (struct tab_table *, unsigned);
@@ -156,16 +155,17 @@ void tab_box (struct tab_table *, int f_h, int f_v, int i_h, int i_v,
 enum
   {
     TAT_NONE = 0,              /* No options. */
-    TAT_PRINTF = 0x0100,       /* Format the text string with sprintf. */
     TAT_TITLE = 0x0200 | TAB_EMPH, /* Title attributes. */
     TAT_NOWRAP = 0x0800         /* No text wrap (tab_output_text() only). */
   };
 
 /* Cells. */
 struct fmt_spec;
+struct dictionary;
 union value;
 void tab_value (struct tab_table *, int c, int r, unsigned char opt,
-               const union value *, const struct fmt_spec *);
+               const union value *, const struct dictionary *dict,
+               const struct fmt_spec *);
 
 void tab_fixed (struct tab_table *, int c, int r, unsigned char opt,
                double v, int w, int d);
@@ -173,18 +173,17 @@ void tab_fixed (struct tab_table *, int c, int r, unsigned char opt,
 void tab_double (struct tab_table *, int c, int r, unsigned char opt,
                double v, const struct fmt_spec *);
 
-void tab_text (struct tab_table *, int c, int r, unsigned opt,
-              const char *, ...)
+void tab_text (struct tab_table *, int c, int r, unsigned opt, const char *);
+void tab_text_format (struct tab_table *, int c, int r, unsigned opt,
+                      const char *, ...)
      PRINTF_FORMAT (5, 6);
+
 void tab_joint_text (struct tab_table *, int x1, int y1, int x2, int y2,
-                    unsigned opt, const char *, ...)
+                    unsigned opt, const char *);
+void tab_joint_text_format (struct tab_table *, int x1, int y1, int x2, int y2,
+                            unsigned opt, const char *, ...)
      PRINTF_FORMAT (7, 8);
 
-/* Cell low-level access. */
-#define tab_alloc(TABLE, AMT) pool_alloc ((TABLE)->container, (AMT))
-void tab_raw (struct tab_table *, int c, int r, unsigned opt,
-             struct substring *);
-
 /* Editing. */
 void tab_offset (struct tab_table *, int col, int row);
 void tab_next_row (struct tab_table *);
@@ -194,7 +193,8 @@ void tab_next_row (struct tab_table *);
 #define tab_col(TABLE) ((TABLE)->col_ofs)
 
 /* Simple output. */
-void tab_output_text (int options, const char *string, ...)
+void tab_output_text (int options, const char *string);
+void tab_output_text_format (int options, const char *, ...)
      PRINTF_FORMAT (2, 3);
 
 #endif /* tab_h */