Fully implement arbitrary delimiters on DATA LIST, extending the half
[pspp-builds.git] / src / count.c
index 2ab52e250ea82aafdb1efdd7074b65d02b6fa3ac..dd88e01a62aeac8d4bf845af1ae0f9c06584c524 100644 (file)
@@ -18,7 +18,7 @@
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "error.h"
 #include <stdlib.h>
 #include "alloc.h"
 #include "command.h"
@@ -134,8 +134,6 @@ cmd_count (void)
   struct count_trns *trns;      /* Transformation. */
   struct cnt_var_info *head;    /* First counting in chain. */
 
-  lex_match_id ("COUNT");
-
   /* Parses each slash-delimited specification. */
   head = cnt = xmalloc (sizeof *cnt);
   for (;;)
@@ -349,7 +347,7 @@ parse_string_criteria (struct counting * c)
       cur = &c->crit.s[n++];
       cur->type = CNT_SINGLE;
       cur->s = malloc (len + 1);
-      st_pad_copy (cur->s, ds_value (&tokstr), len + 1);
+      st_pad_copy (cur->s, ds_c_str (&tokstr), len + 1);
       lex_get ();
 
       lex_match (',');