combine-files: Break apart apply_file_case_and_advance().
[pspp] / src / language / data-io / save.c
index cf847361264d618b1001677bd86c62661e73d3cb..b8031f71ea131055fbf516dfca1bdfeefe724c19 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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
@@ -159,8 +159,6 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
   struct case_map *map;       /* Map from input data to data for writer. */
 
   /* Common options. */
-  bool print_map;             /* Print map?  TODO. */
-  bool print_short_names;     /* Print long-to-short name map.  TODO. */
   struct sfm_write_options sysfile_opts;
   struct pfm_write_options porfile_opts;
 
@@ -175,8 +173,6 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
   dict = dict_clone (dataset_dict (ds));
   writer = NULL;
   map = NULL;
-  print_map = false;
-  print_short_names = false;
   sysfile_opts = sfm_writer_default_options ();
   porfile_opts = pfm_writer_default_options ();
 
@@ -201,7 +197,9 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
            goto error;
        }
       else if (lex_match_id (lexer, "NAMES"))
-        print_short_names = true;
+        {
+          /* Not yet implemented. */
+        }
       else if (lex_match_id (lexer, "PERMISSIONS"))
         {
           bool cw;
@@ -213,8 +211,8 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
             cw = true;
           else
             {
-              lex_error (lexer, _("expecting %s or %s"),
-                         "READONLY", "WRITEABLE");
+              lex_error_expecting (lexer, "READONLY", "WRITEABLE",
+                                   NULL_SENTINEL);
               goto error;
             }
           sysfile_opts.create_writeable = porfile_opts.create_writeable = cw;
@@ -228,7 +226,7 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
             *retain_unselected = false;
           else
             {
-              lex_error (lexer, _("expecting %s or %s"), "RETAIN", "DELETE");
+              lex_error_expecting (lexer, "RETAIN", "DELETE", NULL_SENTINEL);
               goto error;
             }
         }
@@ -256,7 +254,7 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
             porfile_opts.type = PFM_TAPE;
           else
             {
-              lex_error (lexer, _("expecting %s or %s"), "COMM", "TAPE");
+              lex_error_expecting (lexer, "COMM", "TAPE", NULL_SENTINEL);
               goto error;
             }
         }
@@ -279,7 +277,7 @@ parse_write_command (struct lexer *lexer, struct dataset *ds,
 
   if (handle == NULL)
     {
-      lex_sbc_missing (lexer, "OUTFILE");
+      lex_sbc_missing ("OUTFILE");
       goto error;
     }