X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fpc%2B-file-reader.c;h=a608d2500c913f685a0467a4abbfb401d2a437da;hb=e04c680aae366f5af85cd50776875fcdf3c8927a;hp=08e6470697361b871acecdd6d9174da670268e62;hpb=87798cfc4b530dc7dfdefef77e632a22ee8a4866;p=pspp diff --git a/src/data/pc+-file-reader.c b/src/data/pc+-file-reader.c index 08e6470697..a608d2500c 100644 --- a/src/data/pc+-file-reader.c +++ b/src/data/pc+-file-reader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-2000, 2006-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1997-2000, 2006-2007, 2009-2016 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 @@ -209,7 +209,7 @@ pcp_open (struct file_handle *fh) goto error; /* Open file. */ - r->file = fn_open (fh_get_file_name (fh), "rb"); + r->file = fn_open (fh, "rb"); if (r->file == NULL) { msg (ME, _("Error opening `%s' for reading as an SPSS/PC+ " @@ -478,7 +478,7 @@ pcp_close (struct any_reader *r_) if (r->file) { - if (fn_close (fh_get_file_name (r->fh), r->file) == EOF) + if (fn_close (r->fh, r->file) == EOF) { msg (ME, _("Error closing system file `%s': %s."), fh_get_file_name (r->fh), strerror (errno)); @@ -641,8 +641,9 @@ read_value_labels (struct pcp_reader *r, struct pcp_var_record *var, uint8_t len; if (var->n_val_labs >= allocated_val_labs) - var->val_labs = x2nrealloc (var->val_labs, &allocated_val_labs, - sizeof *var->val_labs); + var->val_labs = pool_2nrealloc (r->pool, var->val_labs, + &allocated_val_labs, + sizeof *var->val_labs); vl = &var->val_labs[var->n_val_labs]; if (!read_bytes (r, vl->value, sizeof vl->value)