Change license from GPLv2+ to GPLv3+.
[pspp] / src / data / procedure.c
index 0741b1cc944ce479b6214aba0933d624cb8611c8..5f3ad2065a4037d2ebda033a6d5b26affcffe76f 100644 (file)
@@ -1,20 +1,18 @@
-/* PSPP - computes sample statistics.
+/* PSPP - a program for statistical analysis.
    Copyright (C) 1997-9, 2000, 2006, 2007 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 <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 
@@ -92,7 +90,7 @@ struct dataset {
                                    but proc_commit not yet called. */
     }
   proc_state;
-  size_t cases_written;       /* Cases output so far. */
+  casenumber cases_written;       /* Cases output so far. */
   bool ok;                    /* Error status. */
 }; /* struct dataset */
 
@@ -213,7 +211,7 @@ proc_casereader_read (struct casereader *reader UNUSED, void *ds_,
   assert (ds->proc_state == PROC_OPEN);
   for (;;)
     {
-      size_t case_nr;
+      casenumber case_nr;
 
       assert (retval == TRNS_DROP_CASE || retval == TRNS_ERROR);
       if (retval == TRNS_ERROR)
@@ -230,7 +228,7 @@ proc_casereader_read (struct casereader *reader UNUSED, void *ds_,
       /* Execute permanent transformations.  */
       case_nr = ds->cases_written + 1;
       retval = trns_chain_execute (ds->permanent_trns_chain, TRNS_CONTINUE,
-                                   c, &case_nr);
+                                   c, case_nr);
       caseinit_update_left_vars (ds->caseinit, c);
       if (retval != TRNS_CONTINUE)
         {
@@ -265,7 +263,7 @@ proc_casereader_read (struct casereader *reader UNUSED, void *ds_,
       if (ds->temporary_trns_chain != NULL)
         {
           retval = trns_chain_execute (ds->temporary_trns_chain, TRNS_CONTINUE,
-                                       c, &ds->cases_written);
+                                       c, ds->cases_written);
           if (retval != TRNS_CONTINUE)
             {
               case_destroy (c);
@@ -700,6 +698,12 @@ dataset_dict (const struct dataset *ds)
   return ds->dict;
 }
 
+const struct casereader *
+dataset_source (const struct dataset *ds)
+{
+  return ds->source;
+}
+
 void
 dataset_need_lag (struct dataset *ds, int n_before)
 {