Change license from GPLv2+ to GPLv3+.
[pspp-builds.git] / src / language / data-io / data-writer.c
index 2c8f38a73e470be66cf5f8b0c1a61a4c0b3d4326..0680fc410d0533df8e78b43ea566fea134da8794 100644 (file)
@@ -1,21 +1,18 @@
-/* PSPP - computes sample statistics.
+/* PSPP - a program for statistical analysis.
    Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
-   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>
 
@@ -50,7 +47,7 @@ dfm_open_writer (struct file_handle *fh)
 {
   struct dfm_writer *w;
   void **aux;
-  
+
   aux = fh_open (fh, FH_REF_FILE, "data file", "ws");
   if (aux == NULL)
     return NULL;
@@ -78,7 +75,7 @@ dfm_open_writer (struct file_handle *fh)
 
 /* Returns false if an I/O error occurred on WRITER, true otherwise. */
 bool
-dfm_write_error (const struct dfm_writer *writer) 
+dfm_write_error (const struct dfm_writer *writer)
 {
   return ferror (writer->file);
 }
@@ -95,7 +92,7 @@ dfm_put_record (struct dfm_writer *w, const char *rec, size_t len)
   if (dfm_write_error (w))
     return false;
 
-  switch (fh_get_mode (w->fh)) 
+  switch (fh_get_mode (w->fh))
     {
     case FH_MODE_TEXT:
       fwrite (rec, len, 1, w->file);
@@ -108,7 +105,7 @@ dfm_put_record (struct dfm_writer *w, const char *rec, size_t len)
         size_t write_bytes = MIN (len, record_width);
         size_t pad_bytes = record_width - write_bytes;
         fwrite (rec, write_bytes, 1, w->file);
-        while (pad_bytes > 0) 
+        while (pad_bytes > 0)
           {
             static const char spaces[32] = "                                ";
             size_t chunk = MIN (pad_bytes, sizeof spaces);
@@ -138,7 +135,7 @@ dfm_close_writer (struct dfm_writer *w)
   if (fh_close (w->fh, "data file", "ws"))
     {
       free (file_name);
-      return true; 
+      return true;
     }
 
   ok = true;