Fix bug in CLABELS when a missing category was moved, and add test.
[pspp] / src / ui / gui / find-dialog.c
index 4dc9b70405cc050b25f66613fbc49b976550745c..16f5e365761a12ab3b13cec78ea4d91e42da3bce 100644 (file)
@@ -364,7 +364,7 @@ enum iteration_type{
   n_iterators
 };
 
-static const struct casenum_iterator ip[n_iterators] =
+static const struct casenum_iterator case_iterator[n_iterators] =
   {
    /* Forward iterator (linear) */
     {cp1, last, forward},
@@ -394,16 +394,16 @@ get_iteration_params (const struct find_dialog *fd)
   if (wrap)
     {
       if (reverse)
-       return &ip[REVERSE_WRAP];
+       return &case_iterator[REVERSE_WRAP];
       else
-       return &ip[FORWARD_WRAP];
+       return &case_iterator[FORWARD_WRAP];
     }
   else
     {
       if (reverse)
-       return &ip[REVERSE];
+       return &case_iterator[REVERSE];
       else
-       return &ip[FORWARD];
+       return &case_iterator[FORWARD];
     }
 }
 
@@ -597,7 +597,7 @@ regexp_destroy (struct comparator *cmptr)
 static struct comparator *
 numeric_comparator_create (const struct variable *var, const char *target)
 {
-  struct numeric_comparator *nc = xzalloc (sizeof (*nc));
+  struct numeric_comparator *nc = XZALLOC (struct numeric_comparator);
   struct comparator *cmptr = &nc->parent;
 
   cmptr->flags = 0;
@@ -617,7 +617,7 @@ static struct comparator *
 string_comparator_create (const struct variable *var, const char *target,
                          enum string_cmp_flags flags)
 {
-  struct string_comparator *ssc = xzalloc (sizeof (*ssc));
+  struct string_comparator *ssc = XZALLOC (struct string_comparator);
   struct comparator *cmptr = &ssc->parent;
 
   cmptr->flags = flags;
@@ -639,7 +639,7 @@ regexp_comparator_create (const struct variable *var, const char *target,
                          enum string_cmp_flags flags)
 {
   int code;
-  struct regexp_comparator *rec = xzalloc (sizeof (*rec));
+  struct regexp_comparator *rec = XZALLOC (struct regexp_comparator);
   struct comparator *cmptr = &rec->parent;
 
   cmptr->flags = flags;