Implemented long variable names a la spss V12.
[pspp-builds.git] / src / count.c
index a6e70616460cf7ce40583c0f858e5801095d75a7..665248de6ca591ecb2de02406c00b8b12cd99ab5 100644 (file)
@@ -23,6 +23,7 @@
 #include "alloc.h"
 #include "case.h"
 #include "command.h"
+#include "dictionary.h"
 #include "error.h"
 #include "lexer.h"
 #include "str.h"
@@ -107,7 +108,7 @@ struct cnt_var_info
     struct cnt_var_info *next;
 
     struct variable *d;                /* Destination variable. */
-    char n[9];                 /* Name of dest var. */
+    char n[SHORT_NAME_LEN + 1];        /* Name of dest var. */
 
     struct counting *c;                /* The counting specifications. */
   };
@@ -243,13 +244,13 @@ parse_numeric_criteria (struct counting * c)
        }
 
       cur = &c->crit.n[n++];
-      if (token == T_NUM)
+      if (lex_is_number ())
        {
          cur->a = tokval;
          lex_get ();
          if (lex_match_id ("THRU"))
            {
-             if (token == T_NUM)
+             if (lex_is_number ())
                {
                  if (!lex_force_num ())
                    return 0;
@@ -281,7 +282,7 @@ parse_numeric_criteria (struct counting * c)
        {
          if (!lex_force_match_id ("THRU"))
            return 0;
-         if (token == T_NUM)
+         if (lex_is_number ())
            {
              cur->type = CNT_LOW;
              cur->a = tokval;