X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcasereader-filter.c;h=a5a2dd5476d52ab76ee89ebbfb4f45f60a477521;hb=1a26ffe4489b411bda630d9e5b87e2d2e4538fdb;hp=d387f5ea03181794e790ea297a3b10cdc8337880;hpb=cc57a28ef6796ae9a64ef80d453f72126956d49d;p=pspp diff --git a/src/data/casereader-filter.c b/src/data/casereader-filter.c index d387f5ea03..a5a2dd5476 100644 --- a/src/data/casereader-filter.c +++ b/src/data/casereader-filter.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,18 +16,18 @@ #include -#include +#include "data/casereader.h" #include -#include -#include -#include -#include -#include -#include +#include "data/casereader-provider.h" +#include "data/casewriter.h" +#include "data/variable.h" +#include "data/dictionary.h" +#include "libpspp/taint.h" +#include "libpspp/message.h" -#include "xalloc.h" +#include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -78,7 +78,7 @@ casereader_create_filter_func (struct casereader *subreader, filter->aux = aux; filter->exclude = exclude; reader = casereader_create_sequential ( - NULL, casereader_get_value_cnt (filter->subreader), CASENUMBER_MAX, + NULL, casereader_get_proto (filter->subreader), CASENUMBER_MAX, &casereader_filter_class, filter); taint_propagate (casereader_get_taint (filter->subreader), casereader_get_taint (reader)); @@ -266,14 +266,14 @@ static bool casereader_filter_missing_destroy (void *); is destroyed. If N_MISSING is non-null, then after reading, it will be filled - with the totla number of dropped cases. + with the total number of dropped cases. After this function is called, READER must not ever again be referenced directly. It will be destroyed automatically when the filtering casereader is destroyed. */ struct casereader * casereader_create_filter_missing (struct casereader *reader, - const struct variable **vars, size_t var_cnt, + const struct variable *const*vars, size_t var_cnt, enum mv_class class, casenumber *n_missing, struct casewriter *exclude) @@ -310,7 +310,7 @@ casereader_filter_missing_include (const struct ccase *c, void *cfm_) const union value *value = case_data (c, var); if (var_is_value_missing (var, value, cfm->class)) { - if ( cfm->n_missing ) + if (cfm->n_missing) (*cfm->n_missing)++; return false; }