Finish converting struct variable to an opaque type. In this
[pspp-builds.git] / src / output / table.c
index 029fd5d07ddc57db49395c02717e45664d93ab57..3f1672a5f56707e14b5e7c1c8a977d59df613ae6 100644 (file)
@@ -29,8 +29,9 @@
 #include "output.h"
 #include "manager.h"
 
+#include <data/data-out.h>
 #include <data/format.h>
-#include <data/variable.h>
+#include <data/value.h>
 #include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
@@ -141,8 +142,8 @@ tab_realloc (struct tab_table *t, int nc, int nr)
   
   if (nc > t->cf)
     {
-      int mr1 = min (nr, t->nr);
-      int mc1 = min (nc, t->nc);
+      int mr1 = MIN (nr, t->nr);
+      int mc1 = MIN (nc, t->nc);
       
       struct substring *new_cc;
       unsigned char *new_ct;
@@ -541,7 +542,7 @@ tab_value (struct tab_table *table, int c, int r, unsigned char opt,
   table->cc[c + r * table->cf] = ss_buffer (contents, f->w);
   table->ct[c + r * table->cf] = opt;
   
-  data_out (contents, f, v);
+  data_out (v, f, contents);
 }
 
 /* Sets cell (C,R) in TABLE, with options OPT, to have value VAL
@@ -580,7 +581,7 @@ tab_float (struct tab_table *table, int c, int r, unsigned char opt,
 #endif
 
   double_value.f = val;
-  data_out (buf, &f, &double_value);
+  data_out (&double_value, &f, buf);
 
   cp = buf;
   while (isspace ((unsigned char) *cp) && cp < &buf[w])