Encapsulated the static data of procedure.[ch] into a single object, to be
[pspp-builds.git] / src / language / dictionary / weight.c
index 5d492c4f50ceefcad2e807f85391e0629a3dfe86..fb0972f9afeadab3b92320cd5b033bd8244d4949 100644 (file)
@@ -26,6 +26,7 @@
 #include <data/variable.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
 #include <libpspp/message.h>
 #include <libpspp/str.h>
 
@@ -36,7 +37,7 @@ int
 cmd_weight (void)
 {
   if (lex_match_id ("OFF"))
-    dict_set_weight (default_dict, NULL);
+    dict_set_weight (dataset_dict (current_dataset), NULL);
   else
     {
       struct variable *v;
@@ -56,7 +57,7 @@ cmd_weight (void)
          return CMD_CASCADING_FAILURE;
        }
 
-      dict_set_weight (default_dict, v);
+      dict_set_weight (dataset_dict (current_dataset), v);
     }
 
   return lex_end_of_command ();