X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fpor-file-reader.c;h=0897d77aa2e30a4520f645c9fa9a647ed7fde652;hb=5b5099296b3c7212623991de8920e1459e234922;hp=58d4d03985688b5a39e03872811b0f2038907c6b;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/data/por-file-reader.c b/src/data/por-file-reader.c index 58d4d03985..0897d77aa2 100644 --- a/src/data/por-file-reader.c +++ b/src/data/por-file-reader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014 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 @@ -540,7 +540,7 @@ read_version_data (struct pfm_reader *r, struct pfm_read_info *info) { static const char empty_string[] = ""; char *date, *time; - const char *product, *author, *subproduct; + const char *product, *subproduct; int i; /* Read file. */ @@ -549,7 +549,11 @@ read_version_data (struct pfm_reader *r, struct pfm_read_info *info) date = read_pool_string (r); time = read_pool_string (r); product = match (r, '1') ? read_pool_string (r) : empty_string; - author = match (r, '2') ? read_pool_string (r) : empty_string; + if (match (r, '2')) + { + /* Skip "author" field. */ + read_pool_string (r); + } subproduct = match (r, '3') ? read_pool_string (r) : empty_string; /* Validate file. */ @@ -653,8 +657,8 @@ read_variables (struct pfm_reader *r, struct dictionary *dict) if (r->var_cnt <= 0) error (r, _("Invalid number of variables %d."), r->var_cnt); - /* Purpose of this value is unknown. It is typically 161. */ - read_int (r); + if (match (r, '5')) + read_int (r); if (match (r, '6')) { @@ -746,7 +750,7 @@ read_variables (struct pfm_reader *r, struct dictionary *dict) { char label[256]; read_string (r, label); - var_set_label (v, label, false); /* XXX */ + var_set_label (v, label); /* XXX */ } }