Encapsulated the static data of procedure.[ch] into a single object, to be
[pspp-builds.git] / src / language / dictionary / formats.c
index 2d5e1c354dfadbbae4d9f9a0a4898426d3083757..5e1bd7d407fd68e100e0f7b98cf2c44e22a80395 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <procedure.h>
+#include <data/procedure.h>
 #include <data/variable.h>
 #include <language/command.h>
+#include <language/lexer/format-parser.h>
 #include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
 #include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
@@ -81,16 +83,16 @@ internal_cmd_formats (int which)
       if (token == '.')
        break;
 
-      if (!parse_variables (default_dict, &v, &cv, PV_NUMERIC))
+      if (!parse_variables (dataset_dict (current_dataset), &v, &cv, PV_NUMERIC))
        return CMD_FAILURE;
       type = v[0]->type;
 
       if (!lex_match ('('))
        {
-         msg (SE, _("`(' expected after variable list"));
+         msg (SE, _("`(' expected after variable list."));
          goto fail;
        }
-      if (!parse_format_specifier (&f, 0)
+      if (!parse_format_specifier (&f)
           || !check_output_specifier (&f, true)
           || !check_specifier_type (&f, NUMERIC, true))
        goto fail;