Perhaps simultaneity could be implemented as an option. On the
other hand, what good are the above commands? */
-#undef DEBUGGING
-/*#define DEBUGGING 1*/
#include "debug-print.h"
\f
/* Definitions. */
static int parse_numeric_criteria (struct counting *);
static int parse_string_criteria (struct counting *);
-int cmd_count (void);
-
-int
-internal_cmd_count (void)
-{
- int code = cmd_count ();
- if (!code)
- {
- struct count_trns c;
- c.specs = head;
- count_trns_free ((struct trns_header *) & c);
- }
- return code;
-}
-
int
cmd_count (void)
{
/* Get destination struct variable, or at least its name. */
if (!lex_force_id ())
goto fail;
- cnt->d = find_variable (tokid);
+ cnt->d = dict_lookup_var (default_dict, tokid);
if (cnt->d)
{
if (cnt->d->type == ALPHA)
{
c->next = NULL;
c->v = NULL;
- if (!parse_variables (NULL, &c->v, &c->n, PV_DUPLICATE | PV_SAME_TYPE))
+ if (!parse_variables (default_dict, &c->v, &c->n,
+ PV_DUPLICATE | PV_SAME_TYPE))
goto fail;
if (!lex_force_match ('('))
for (cnt = head; cnt; cnt = cnt->next)
if (!cnt->d)
{
- /* It's legal, though motivationally questionable, to count to
+ /* It's valid, though motivationally questionable, to count to
the same dest var more than once. */
- cnt->d = find_variable (cnt->n);
+ cnt->d = dict_lookup_var (default_dict, cnt->n);
- if (!cnt->d)
- cnt->d = force_create_variable (&default_dict, cnt->n, NUMERIC, 0);
+ if (!cnt->d)
+ {
+ cnt->d = dict_create_var (default_dict, cnt->n, 0);
+ assert (cnt->d != NULL);
+ }
}
#if DEBUGGING