Remove "Written by Ben Pfaff <blp@gnu.org>" lines everywhere.
[pspp-builds.git] / src / data / por-file-reader.c
index b6bad0a00ae974f5e6c26a24f0c835887eb6502c..2fa02dedd3c8c5400ea1822e8f04484809ea76a1 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
    Code for parsing floating-point numbers adapted from GNU C
    library.
 
@@ -36,6 +35,7 @@
 #include "dictionary.h"
 #include "file-handle-def.h"
 #include "format.h"
+#include "missing-values.h"
 #include <libpspp/hash.h>
 #include <libpspp/magic.h>
 #include <libpspp/misc.h>
@@ -663,7 +663,7 @@ read_value_label (struct pfm_reader *r, struct dictionary *dict)
        {
          struct variable *var = v[j];
 
-         if (!val_labs_replace (var->val_labs, val, label))
+         if (!var_add_value_label (var, &val, label))
            continue;
 
          if (var_is_numeric (var))
@@ -698,14 +698,14 @@ pfm_read_case (struct pfm_reader *r, struct ccase *c)
       
       if (width == 0)
         {
-          case_data_rw (c, idx)->f = read_float (r);
+          case_data_rw_idx (c, idx)->f = read_float (r);
           idx++;
         }
       else
         {
           char string[256];
           read_string (r, string);
-          buf_copy_str_rpad (case_data_rw (c, idx)->s, width, string);
+          buf_copy_str_rpad (case_data_rw_idx (c, idx)->s, width, string);
           idx += DIV_RND_UP (width, MAX_SHORT_STRING);
         }
     }