pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src/data ChangeLog sys-file-reader.c


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/data ChangeLog sys-file-reader.c
Date: Sun, 03 Feb 2008 06:45:04 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 08/02/03 06:45:04

Modified files:
        src/data       : ChangeLog sys-file-reader.c 

Log message:
        In system files, allow missing values to be specified on long string
        variables, but warn about them because PSPP does not yet support them.
        Ignore extension records 20 and 21, which PSPP does not yet support.
        
        Patch #6347.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/ChangeLog?cvsroot=pspp&r1=1.179&r2=1.180
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/sys-file-reader.c?cvsroot=pspp&r1=1.55&r2=1.56

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/ChangeLog,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -b -r1.179 -r1.180
--- ChangeLog   2 Feb 2008 06:58:12 -0000       1.179
+++ ChangeLog   3 Feb 2008 06:45:03 -0000       1.180
@@ -1,3 +1,13 @@
+2008-02-02  Ben Pfaff  <address@hidden>
+
+       Patch #6347.
+
+       * sys-file-reader.c (read_variable_record): Allow missing values
+       to be specified on long string variables, but warn about them
+       because PSPP does not yet support them.
+       (read_extension_record): Ignore extension records 20 and 21, which
+       PSPP does not yet support.
+
 2008-02-01  Ben Pfaff  <address@hidden>
 
        Patch #6386.  Thanks to John Darrington for review and for the

Index: sys-file-reader.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/data/sys-file-reader.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- sys-file-reader.c   24 Dec 2007 01:33:43 -0000      1.55
+++ sys-file-reader.c   3 Feb 2008 06:45:03 -0000       1.56
@@ -549,11 +549,14 @@
           for (i = 0; i < missing_value_code; i++)
             mv_add_num (&mv, read_float (r));
         }
-      else if (var_get_width (var) <= MAX_SHORT_STRING)
+      else
         {
           if (missing_value_code < 1 || missing_value_code > 3)
             sys_error (r, _("String missing value indicator field is not "
                             "0, 1, 2, or 3."));
+          if (var_is_long_string (var))
+            sys_warn (r, _("Ignoring missing values on long string variable "
+                           "%s, which PSPP does not yet support."), name);
           for (i = 0; i < missing_value_code; i++)
             {
               char string[9];
@@ -561,9 +564,7 @@
               mv_add_str (&mv, string);
             }
         }
-      else
-        sys_error (r, _("Long string variable %s may not have missing "
-                        "values."), name);
+      if (!var_is_long_string (var))
       var_set_missing_values (var, &mv);
     }
 
@@ -752,6 +753,18 @@
          SPSS 14. */
       break;
 
+    case 20:
+      /* New in SPSS 16.  Contains a single string that describes
+         the character encoding, e.g. "windows-1252". */
+      break;
+
+    case 21:
+      /* New in SPSS 16.  Encodes value labels for long string
+         variables. */
+      sys_warn (r, _("Ignoring value labels for long string variables, "
+                     "which PSPP does not yet support."));
+      break;
+
     default:
       sys_warn (r, _("Unrecognized record type 7, subtype %d."), subtype);
       break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]