X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fpfm-read.c;h=7be8ea05472d3defb3143c7675fac4ecb6b57e4f;hb=06f9ee45954e5e71fa7f6262dbf37defa1dbf996;hp=ab33e700f724ab2c5c6562593be0351a673a3e17;hpb=92bfefccd465052e492f669ce561aa25b0110283;p=pspp-builds.git diff --git a/src/pfm-read.c b/src/pfm-read.c index ab33e700..7be8ea05 100644 --- a/src/pfm-read.c +++ b/src/pfm-read.c @@ -27,6 +27,7 @@ #include #include #include "alloc.h" +#include "case.h" #include "file-handle.h" #include "format.h" #include "getline.h" @@ -274,9 +275,6 @@ pfm_read_dictionary (struct file_handle *h, struct pfm_read_info *inf) msg (VM (2), _("Read portable-file dictionary successfully.")); -#if DEBUGGING - dump_dictionary (ext->dict); -#endif return ext->dict; lossage: @@ -972,12 +970,13 @@ read_value_label (struct file_handle *h) return 0; } -/* Reads one case from portable file H into the value array PERM +/* Reads one case from portable file H into PERM according to the instuctions given in associated dictionary DICT, which must have the get.fv elements appropriately set. Returns nonzero only if successful. */ int -pfm_read_case (struct file_handle *h, union value *perm, struct dictionary *dict) +pfm_read_case (struct file_handle *h, struct ccase *perm, + struct dictionary *dict) { struct pfm_fhuser_ext *ext = h->ext; @@ -1021,9 +1020,9 @@ pfm_read_case (struct file_handle *h, union value *perm, struct dictionary *dict continue; if (v->type == NUMERIC) - perm[v->fv].f = temp[v->get.fv].f; + case_data_rw (perm, v->fv)->f = temp[v->get.fv].f; else - memcpy (&perm[v->fv].s, &temp[v->get.fv], v->width); + memcpy (case_data_rw (perm, v->fv)->s, &temp[v->get.fv], v->width); } local_free (temp);