Added support for reading Gnumeric spreadsheet files.
[pspp-builds.git] / src / language / data-io / get.c
index abfc62472a3b50e11bbf61bfaa5e9ac5c18acf23..b861aca52ffef7df758d3eabfc506718795081eb 100644 (file)
@@ -37,7 +37,6 @@
 #include <language/data-io/file-handle.h>
 #include <language/lexer/lexer.h>
 #include <language/lexer/variable-parser.h>
-#include <libpspp/alloc.h>
 #include <libpspp/assertion.h>
 #include <libpspp/compiler.h>
 #include <libpspp/hash.h>
 #include <libpspp/str.h>
 #include <libpspp/taint.h>
 
+#include "get-data.h"
+
+#include "xalloc.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
@@ -72,6 +75,11 @@ parse_read_command (struct lexer *lexer, struct dataset *ds, enum reader_command
   struct dictionary *dict = NULL;
   struct case_map *map = NULL;
 
+  if ( type == GET_CMD && lex_match_id (lexer, "DATA") )
+    {
+      return parse_get_data_command (lexer, ds);
+    }
+
   for (;;)
     {
       lex_match (lexer, '/');
@@ -563,10 +571,10 @@ rename_variables (struct lexer *lexer, struct dictionary *dict)
        goto done;
       if (nn != nv)
        {
-         msg (SE, _("Number of variables on left side of `=' (%d) does not "
-                     "match number of variables on right side (%d), in "
+         msg (SE, _("Number of variables on left side of `=' (%zu) does not "
+                     "match number of variables on right side (%zu), in "
                      "parenthesized group %d of RENAME subcommand."),
-              (unsigned) (nv - old_nv), (unsigned) (nn - old_nv), group);
+              nv - old_nv, nn - old_nv, group);
          goto done;
        }
       if (!lex_force_match (lexer, ')'))