X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fdata-io%2Fdata-list.c;h=9f77ed8d9a135b7751ba408662779e70d1b7b70a;hb=2bb71a3d1229189fc5fb6917caeb59fd54274606;hp=d2ca99185833c745cbb3daff0763fd9244a7a470;hpb=f5c108becd49d78f4898cab11352291f5689d24e;p=pspp-builds.git diff --git a/src/language/data-io/data-list.c b/src/language/data-io/data-list.c index d2ca9918..9f77ed8d 100644 --- a/src/language/data-io/data-list.c +++ b/src/language/data-io/data-list.c @@ -1,20 +1,18 @@ -/* PSPP - computes sample statistics. +/* PSPP - a program for statistical analysis. Copyright (C) 1997-9, 2000, 2006 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 the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ #include @@ -685,9 +683,15 @@ read_from_data_list_fixed (const struct data_list_pgm *dls, struct ccase *c) line = dfm_get_record (dls->reader); ll_for_each_continue (spec, struct dls_var_spec, ll, &dls->specs) - data_in (ss_substr (line, spec->first_column - 1, spec->input.w), - spec->input.type, spec->input.d, spec->first_column, - case_data_rw_idx (c, spec->fv), fmt_var_width (&spec->input)); + { + if (row < spec->record) + break; + + data_in (ss_substr (line, spec->first_column - 1, spec->input.w), + spec->input.type, spec->input.d, spec->first_column, + case_data_rw_idx (c, spec->fv), + fmt_var_width (&spec->input)); + } dfm_forward_record (dls->reader); }