LIST: Allow a subset of the CASES settings to be specified.
[pspp] / src / language / data-io / data-reader.c
index 14cb57d77a8597de6ac6d8cc7d420fd0d08e9f85..0a00619e84b3cbac356c9b5094101ab7a06d3001 100644 (file)
@@ -95,7 +95,7 @@ dfm_close_reader (struct dfm_reader *r)
 
   /* This was the last client, so close the underlying file. */
   if (fh_get_referent (r->fh) != FH_REF_INLINE)
-    fn_close (fh_get_file_name (r->fh), r->file);
+    fn_close (r->fh, r->file);
   else
     {
       /* Skip any remaining data on the inline file. */
@@ -157,7 +157,7 @@ dfm_open_reader (struct file_handle *fh, struct lexer *lexer,
     {
       struct stat s;
       r->line_number = 0;
-      r->file = fn_open (fh_get_file_name (fh), "rb");
+      r->file = fn_open (fh, "rb");
       if (r->file == NULL)
         {
           msg (ME, _("Could not open `%s' for reading as a data file: %s."),
@@ -236,11 +236,11 @@ read_inline_record (struct dfm_reader *r)
     {
       if (!lex_match_id (r->lexer, "END") || !lex_match_id (r->lexer, "DATA"))
         {
-          msg (SE, _("Missing END DATA while reading inline data.  "
+          msg (SE, _("Missing %s while reading inline data.  "
                      "This probably indicates a missing or incorrectly "
-                     "formatted END DATA command.  END DATA must appear "
+                     "formatted %s command.  %s must appear "
                      "by itself on a single line with exactly one space "
-                     "between words."));
+                     "between words."), "END DATA", "END DATA", "END DATA");
           lex_discard_rest_of_command (r->lexer);
         }
       return false;
@@ -573,7 +573,7 @@ dfm_eof (struct dfm_reader *r)
             msg (ME, _("Attempt to read beyond end-of-file on file %s."),
                  fh_get_name (r->fh));
           else
-            msg (ME, _("Attempt to read beyond END DATA."));
+            msg (ME, _("Attempt to read beyond %s."), "END DATA");
         }
     }