Continue work on bug 12859, plus some code cleanup.
[pspp] / src / data-in.c
index 8f36dcb046d298c3e431b59fc53617c939ca4113..3a49fa23706e8537881c204ffaeb9f83b99204d7 100644 (file)
@@ -468,7 +468,7 @@ parse_IB (struct data_in *i)
   p = i->s;
 #else
   memcpy (buf, i->s, i->e - i->s);
-  mm_reverse (buf, i->e - i->s);
+  buf_reverse (buf, i->e - i->s);
   p = buf;
 #endif
 
@@ -760,7 +760,7 @@ parse_enum (struct data_in *i, const char *what,
     if ((ep->can_abbreviate
          && lex_id_match_len (ep->name, strlen (ep->name), name, length))
         || (!ep->can_abbreviate && length == strlen (ep->name)
-            && !mm_case_compare (name, ep->name, length)))
+            && !buf_compare_case (name, ep->name, length)))
       {
         *output = ep->value;
         return true;
@@ -1363,6 +1363,8 @@ data_in (struct data_in *i)
 {
   const struct fmt_desc *const fmt = &formats[i->format.type];
 
+  assert (check_input_specifier (&i->format, 0));
+
   /* Check that we've got a string to work with. */
   if (i->e == i->s || i->format.w <= 0)
     {