#include <config.h>
#include "var.h"
-#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include "alloc.h"
return _("scratch");
default:
assert (0);
+ abort ();
}
}
/* Parses a set of variables from dictionary D given options
OPTS. Resulting list of variables stored in *VAR and the
- number of variables into *CNT. */
+ number of variables into *CNT. Returns nonzero only if
+ successful. */
int
parse_variables (struct dictionary *d, struct variable ***var, int *cnt,
int opts)
lex_error ("expecting variable name");
goto fail;
}
- if (tokid[0] == '#' && (pv_opts & PV_NO_SCRATCH))
+ if (dict_class_from_id (tokid) == DC_SCRATCH
+ && (pv_opts & PV_NO_SCRATCH))
{
msg (SE, _("Scratch variables not allowed here."));
goto fail;