X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fdata-reader.c;h=8fc7a80ad7b0dc0ce3d894c6733e2e46fea9c83d;hb=42032f52651da9b17083f5a3782aa12b84ccd19f;hp=22e15f973c83ec3ff2d7adbc27fdbbea95e8a1aa;hpb=5f168bf8465ae50ba5c2c761b52f29a0500c0658;p=pspp diff --git a/src/language/data-io/data-reader.c b/src/language/data-io/data-reader.c index 22e15f973c..8fc7a80ad7 100644 --- a/src/language/data-io/data-reader.c +++ b/src/language/data-io/data-reader.c @@ -50,7 +50,7 @@ enum dfm_reader_flags struct dfm_reader { struct file_handle *fh; /* File handle. */ - struct file_locator where; /* Current location in data file. */ + struct msg_locator where; /* Current location in data file. */ struct string line; /* Current line. */ struct string scratch; /* Extra line buffer. */ enum dfm_reader_flags flags; /* Zero or more of DFM_*. */ @@ -71,7 +71,7 @@ dfm_close_reader (struct dfm_reader *r) return; is_inline = r->fh == fh_inline_file (); - file_name = is_inline ? NULL : xstrdup (fh_get_filename (r->fh)); + file_name = is_inline ? NULL : xstrdup (fh_get_file_name (r->fh)); still_open = fh_close (r->fh, "data file", "rs"); if (still_open) { @@ -123,13 +123,13 @@ dfm_open_reader (struct file_handle *fh) r->eof_cnt = 0; if (fh != fh_inline_file ()) { - r->where.filename = fh_get_filename (fh); + r->where.file_name = fh_get_file_name (fh); r->where.line_number = 0; - r->file = fn_open (fh_get_filename (fh), "rb"); + r->file = fn_open (fh_get_file_name (fh), "rb"); if (r->file == NULL) { msg (ME, _("Could not open \"%s\" for reading as a data file: %s."), - fh_get_filename (r->fh), strerror (errno)); + fh_get_file_name (r->fh), strerror (errno)); fh_close (fh,"data file", "rs"); free (r); return NULL; @@ -387,20 +387,20 @@ dfm_column_start (struct dfm_reader *r) return r->pos + 1; } -/* Pushes the filename and line number on the fn/ln stack. */ +/* Pushes the file name and line number on the fn/ln stack. */ void dfm_push (struct dfm_reader *r) { if (r->fh != fh_inline_file ()) - err_push_file_locator (&r->where); + msg_push_msg_locator (&r->where); } -/* Pops the filename and line number from the fn/ln stack. */ +/* Pops the file name and line number from the fn/ln stack. */ void dfm_pop (struct dfm_reader *r) { if (r->fh != fh_inline_file ()) - err_pop_file_locator (&r->where); + msg_pop_msg_locator (&r->where); } /* BEGIN DATA...END DATA procedure. */