Rewrite PSPP output engine.
[pspp-builds.git] / src / language / stats / oneway.q
index e1d5b79fdc1aa8ff8a5e36e131e155931744ed32..2d55edff73fb286597a7be6771b467a9c4b6422c 100644 (file)
@@ -40,8 +40,7 @@
 #include <math/group-proc.h>
 #include <math/group.h>
 #include <math/levene.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
 #include "sort-criteria.h"
 #include <data/format.h>
 
@@ -259,10 +258,8 @@ show_anova_table (void)
   struct tab_table *t;
 
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL, NULL);
-
 
   tab_box (t,
           TAL_2, TAL_2,
@@ -370,9 +367,8 @@ show_descriptives (const struct dictionary *dict)
   for ( v = 0; v < n_vars; ++v )
     n_rows += group_proc_get (vars[v])->n_groups + 1;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 2, 0);
-  tab_dim (t, tab_natural_dimensions, NULL, NULL);
 
 
   /* Put a frame around the entire box, and vertical lines inside */
@@ -394,8 +390,9 @@ show_descriptives (const struct dictionary *dict)
 
   tab_vline (t, TAL_0, 7, 0, 0);
   tab_hline (t, TAL_1, 6, 7, 1);
-  tab_joint_text (t, 6, 0, 7, 0, TAB_CENTER | TAT_TITLE | TAT_PRINTF,
-                 _("%g%% Confidence Interval for Mean"), confidence*100.0);
+  tab_joint_text_format (t, 6, 0, 7, 0, TAB_CENTER | TAT_TITLE,
+                         _("%g%% Confidence Interval for Mean"),
+                         confidence*100.0);
 
   tab_text (t, 6, 1, TAB_CENTER | TAT_TITLE, _("Lower Bound"));
   tab_text (t, 7, 1, TAB_CENTER | TAT_TITLE, _("Upper Bound"));
@@ -516,9 +513,9 @@ show_homogeneity (void)
   struct tab_table *t;
 
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 1, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL, NULL);
+
 
   /* Put a frame around the entire box, and vertical lines inside */
   tab_box (t,
@@ -576,9 +573,8 @@ show_contrast_coeffs (short *bad_contrast)
 
   struct tab_table *t;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 2, 0, 2, 0);
-  tab_dim (t, tab_natural_dimensions, NULL, NULL);
 
   /* Put a frame around the entire box, and vertical lines inside */
   tab_box (t,
@@ -636,14 +632,13 @@ show_contrast_coeffs (short *bad_contrast)
 
       for (i = 0; i < cmd.sbc_contrast; ++i )
        {
-         tab_text (t, 1, i + 2, TAB_CENTER | TAT_PRINTF, "%d", i + 1);
+         tab_text_format (t, 1, i + 2, TAB_CENTER, "%d", i + 1);
 
          if ( bad_contrast[i] )
            tab_text (t, count + 2, i + 2, TAB_RIGHT, "?" );
          else
-           tab_text (t, count + 2, i + 2, TAB_RIGHT | TAT_PRINTF, "%g",
-                     subc_list_double_at (&cmd.dl_contrast[i], count)
-                     );
+           tab_text_format (t, count + 2, i + 2, TAB_RIGHT, "%g",
+                             subc_list_double_at (&cmd.dl_contrast[i], count));
        }
     }
 
@@ -661,9 +656,8 @@ show_contrast_tests (short *bad_contrast)
 
   struct tab_table *t;
 
-  t = tab_create (n_cols, n_rows, 0);
+  t = tab_create (n_cols, n_rows);
   tab_headers (t, 3, 0, 1, 0);
-  tab_dim (t, tab_natural_dimensions, NULL, NULL);
 
   /* Put a frame around the entire box, and vertical lines inside */
   tab_box (t,
@@ -740,12 +734,13 @@ show_contrast_tests (short *bad_contrast)
                        _("Does not assume equal"));
            }
 
-         tab_text (t,  2, (v * lines_per_variable) + i + 1,
-                   TAB_CENTER | TAT_TITLE | TAT_PRINTF, "%d", i + 1);
+         tab_text_format (t,  2, (v * lines_per_variable) + i + 1,
+                           TAB_CENTER | TAT_TITLE, "%d", i + 1);
 
 
-         tab_text (t,  2, (v * lines_per_variable) + i + 1 + cmd.sbc_contrast,
-                   TAB_CENTER | TAT_TITLE | TAT_PRINTF, "%d", i + 1);
+         tab_text_format (t,  2,
+                           (v * lines_per_variable) + i + 1 + cmd.sbc_contrast,
+                           TAB_CENTER | TAT_TITLE, "%d", i + 1);
 
 
          if ( bad_contrast[i])