Yet more constness
[pspp] / src / language / utilities / set.q
index b403843a1abe604c9f4d683c10e6cf542db10365..113373d73787b5fa6918c8f9cc5f77016f3faf73 100644 (file)
@@ -30,6 +30,7 @@
 #include <data/settings.h>
 #include <data/variable.h>
 #include <language/command.h>
+#include <language/lexer/format-parser.h>
 #include <language/lexer/lexer.h>
 #include <language/line-buffer.h>
 #include <libpspp/alloc.h>
@@ -110,6 +111,8 @@ int tgetnum (const char *);
      xsort=xsort:yes/no.
 */
 
+/* (headers) */
+
 /* (declarations) */
 
 /* (_functions) */
@@ -408,7 +411,7 @@ stc_custom_format (struct cmd_set *cmd UNUSED, void *aux UNUSED)
   struct fmt_spec fmt;
 
   lex_match ('=');
-  if (!parse_format_specifier (&fmt, 0))
+  if (!parse_format_specifier (&fmt))
     return 0;
   if ((formats[fmt.type].cat & FCAT_STRING) != 0)
     {
@@ -600,7 +603,7 @@ show_undefined (void)
 static void
 show_weight (void) 
 {
-  struct variable *var = dict_get_weight (default_dict);
+  struct variable *var = dict_get_weight (dataset_dict (current_dataset));
   if (var == NULL)
     msg (SN, _("WEIGHT is off."));
   else
@@ -619,7 +622,7 @@ struct show_sbc
     void (*function) (void);
   };
 
-struct show_sbc show_table[] = 
+const struct show_sbc show_table[] = 
   {
     {"BLANKS", show_blanks},
     {"CCA", show_cca},