Fixed a bug causing pspp to crash when computed variables had no format
[pspp-builds.git] / src / vfm.c
index e9c7d2048064d5abdc406fe1ddcadf83681f33dc..42e6b7ccd29dfef5e2b5792cbe16c705fdceaec9 100644 (file)
--- a/src/vfm.c
+++ b/src/vfm.c
@@ -28,7 +28,6 @@
 #include <unistd.h>    /* Required by SunOS4. */
 #endif
 #include "alloc.h"
-#include "approx.h"
 #include "do-ifP.h"
 #include "error.h"
 #include "expr.h"
@@ -126,9 +125,13 @@ procedure (void (*beginfunc) (void *),
           void (*endfunc) (void *),
            void *aux)
 {
+  static int recursive_call;
+
   struct write_case_data procedure_write_data;
   struct write_case_data split_file_data;
 
+  assert (++recursive_call == 1);
+
   if (dict_get_split_cnt (default_dict) == 0) 
     {
       /* Normally we just use the data passed by the user. */
@@ -156,6 +159,8 @@ procedure (void (*beginfunc) (void *),
   open_active_file ();
   vfm_source->read (procedure_write_case, &procedure_write_data);
   close_active_file (&procedure_write_data);
+
+  assert (--recursive_call == 0);
 }
 \f
 /* Active file processing support.  Subtly different semantics from
@@ -1143,7 +1148,7 @@ SPLIT_FILE_procfunc (struct ccase *c, void *data_)
       switch (v->type)
        {
        case NUMERIC:
-         if (approx_ne (c->data[v->fv].f, prev_case->data[v->fv].f))
+         if (c->data[v->fv].f != prev_case->data[v->fv].f)
            goto not_equal;
          break;
        case ALPHA: