We've had a mix of min, max from libpspp/misc.h and MIN, MAX from
[pspp-builds.git] / src / language / data-io / matrix-data.c
index a1e5d2184ec6adeccd79d43d4cd99cd7137d15bc..88cae91f450c7abfa77f463d5276026db1bdc547 100644 (file)
@@ -44,6 +44,7 @@
 #include <libpspp/pool.h>
 #include <libpspp/str.h>
 
+#include "minmax.h"
 #include "size_max.h"
 
 #include "gettext.h"
@@ -865,17 +866,9 @@ static int
       s = ss_buffer (start, ss_data (p) - start);
 
       if (is_num)
-       {
-         struct data_in di;
-
-         di.s = ss_data (s);
-         di.e = ss_end (s);
-         di.v = (union value *) &token->number;
-         di.f1 = dfm_get_column (reader, di.s);
-         di.format = fmt_for_output (FMT_F, token->length, 0);
-
-         data_in (&di);
-       }
+        data_in (s, FMT_F, 0,
+                 dfm_get_column (reader, ss_data (s)),
+                 (union value *) &token->number, 0);
       else
        token->type = MSTR;
     }
@@ -1745,8 +1738,8 @@ wr_read_rowtype (struct wr_aux_data *wr,
     char s[16];
     char *cp;
     
-    memcpy (s, token->string, min (15, token->length));
-    s[min (15, token->length)] = 0;
+    memcpy (s, token->string, MIN (15, token->length));
+    s[MIN (15, token->length)] = 0;
 
     for (cp = s; *cp; cp++)
       *cp = toupper ((unsigned char) *cp);