Make the expression code a little nicer and fix bugs found
[pspp] / src / matrix.c
index 7e474677aa92dc0bc7a93cb1b96e29912130e223..4631e7d809cf4aa5654f63309598bfee756d0524 100644 (file)
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "matrix.h"
+#include "error.h"
 #include <stdlib.h>
 #include "alloc.h"
-#include "matrix.h"
 \f
 /* Kahan summation formula, Thm. 8, _What Every Computer Scientist
    Should Know About Floating-Point Arithmetic_, David Goldberg,
@@ -107,7 +107,7 @@ vec_print (const struct vector *vec)
 
   for (i = 0; i < vec->n; i++)
     {
-      if (i % ((set_viewwidth - 4) / 8) == 0)
+      if (i % ((get_viewwidth() - 4) / 8) == 0)
        {
          if (i)
            putchar ('\n');