Implemented the NPAR TESTS command.
[pspp-builds.git] / src / data / casefilter.c
index 1494133359d2b3aaa3608269316f82190f215953..267a695ac2bfeca4be9c6eae27cb99c0a2f5dcb4 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 2006 Free Software Foundation, Inc.
-   Written by John Darrington <john@darrington.wattle.id.au>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -58,9 +57,9 @@ casefilter_variable_missing (const struct casefilter *filter,
                             const struct ccase *c,
                             const struct variable *var)
 {
-  const union value *val = case_data (c, var->fv) ;
+  const union value *val = case_data (c, var) ;
 
-  if ( var_get_type (var) != ALPHA && val->f == SYSMIS )
+  if ( var_is_numeric (var) && val->f == SYSMIS )
     return true;
 
   if ( filter->exclude_user_missing &&
@@ -98,7 +97,7 @@ casefilter_create (bool excl, struct variable **vars, int n_vars)
    filter considers. N_VARS is the size of VARS */
 void
 casefilter_add_variables (struct casefilter *filter,
-                          struct variable **vars, int n_vars)
+                         struct variable *const *vars, int n_vars)
 {
   int i;
 
@@ -118,5 +117,3 @@ casefilter_destroy (struct casefilter *filter)
   free (filter->vars);
   free (filter);
 }
-
-