Constness and global namespace patrol.
[pspp-builds.git] / src / language / control / repeat.c
index d2d894a9e248ddf337fdf757f3466d76341ddd83..0b4607ffd6a24b0fffd36c12317af76b0c1fb1a7 100644 (file)
@@ -30,6 +30,7 @@
 #include <data/settings.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
 #include <language/line-buffer.h>
 #include <libpspp/alloc.h>
 #include <libpspp/message.h>
@@ -136,7 +137,7 @@ parse_specification (struct repeat_block *block)
       /* Get a stand-in variable name and make sure it's unique. */
       if (!lex_force_id ())
        return false;
-      if (dict_lookup_var (default_dict, tokid))
+      if (dict_lookup_var (dataset_dict (current_dataset), tokid))
         msg (SW, _("Dummy variable name \"%s\" hides dictionary "
                    "variable \"%s\"."),
              tokid, tokid);
@@ -330,7 +331,7 @@ create_vars (struct repeat_block *block)
           {
             /* Ignore return value: if the variable already
                exists there is no harm done. */
-            dict_create_var (default_dict, iter->replacement[i], 0);
+            dict_create_var (dataset_dict (current_dataset), iter->replacement[i], 0);
           }
       }
 }