Fix some warnings.
[pspp] / src / data / dictionary.c
index de529d6798d080aa1ee0f3bac6bc8577c18aedf0..d2d93c3bd2f535d59dac071f0ce4fbe2f57d7772 100644 (file)
 #include "dictionary.h"
 #include <stdlib.h>
 #include <ctype.h>
-#include "array.h"
-#include "alloc.h"
+#include <libpspp/array.h>
+#include <libpspp/alloc.h>
 #include "case.h"
 #include "category.h"
 #include "cat-routines.h"
-#include "compiler.h"
-#include "message.h"
-#include "hash.h"
-#include "misc.h"
+#include <libpspp/compiler.h>
+#include <libpspp/message.h>
+#include <libpspp/hash.h>
+#include <libpspp/misc.h>
 #include "settings.h"
-#include "str.h"
+#include <libpspp/str.h>
 #include "value-labels.h"
 #include "variable.h"
 
@@ -224,9 +224,10 @@ dict_get_var (const struct dictionary *d, size_t idx)
 }
 
 /* Sets *VARS to an array of pointers to variables in D and *CNT
-   to the number of variables in *D.  By default all variables
-   are returned, but bits may be set in EXCLUDE_CLASSES to
-   exclude ordinary, system, and/or scratch variables. */
+   to the number of variables in *D.  All variables are returned
+   if EXCLUDE_CLASSES is 0, or it may contain one or more of (1u
+   << DC_ORDINARY), (1u << DC_SYSTEM), or (1u << DC_SCRATCH) to
+   exclude the corresponding type of variable. */
 void
 dict_get_vars (const struct dictionary *d, struct variable ***vars,
                size_t *cnt, unsigned exclude_classes)
@@ -268,7 +269,7 @@ dict_create_var (struct dictionary *d, const char *name, int width)
 
   assert (width >= 0 && width < 256);
 
-  assert (var_is_valid_name(name,0));
+  assert (var_is_plausible_name(name,0));
     
   /* Make sure there's not already a variable by that name. */
   if (dict_lookup_var (d, name) != NULL)
@@ -584,7 +585,7 @@ dict_rename_var (struct dictionary *d, struct variable *v,
   assert (d != NULL);
   assert (v != NULL);
   assert (new_name != NULL);
-  assert (var_is_valid_name (new_name, false));
+  assert (var_is_plausible_name (new_name, false));
   assert (dict_contains_var (d, v));
   assert (!compare_var_names (v->name, new_name, NULL)
           || dict_lookup_var (d, new_name) == NULL);
@@ -622,7 +623,7 @@ dict_rename_vars (struct dictionary *d,
   for (i = 0; i < count; i++) 
     {
       assert (d->var[vars[i]->index] == vars[i]);
-      assert (var_is_valid_name (new_names[i], false));
+      assert (var_is_plausible_name (new_names[i], false));
       hsh_force_delete (d->name_tab, vars[i]);
       old_names[i] = xstrdup (vars[i]->name);
       strcpy (vars[i]->name, new_names[i]);
@@ -1063,7 +1064,7 @@ dict_create_vector (struct dictionary *d,
 
   assert (d != NULL);
   assert (name != NULL);
-  assert (var_is_valid_name (name, false));
+  assert (var_is_plausible_name (name, false));
   assert (var != NULL);
   assert (cnt > 0);