#include "output/charts/barchart.h"
#include "gl/minmax.h"
+#include "gl/xalloc-oversized.h"
#include "gl/xalloc.h"
#include "gl/xsize.h"
}
}
- int *by_iter = xcalloc (n_by, sizeof *by_iter);
+ int *by_iter = XCALLOC (n_by, int);
proc->pivots = xnrealloc (proc->pivots,
proc->n_pivots + nx, sizeof *proc->pivots);
for (int i = 0; i < nx; i++)
for (;;)
{
size_t orig_nv = proc->n_variables;
- size_t i;
-
- long min, max;
if (!parse_variables_const (lexer, dataset_dict (ds),
&proc->variables, &proc->n_variables,
if (!lex_force_int (lexer))
goto error;
- min = lex_integer (lexer);
+ long min = lex_integer (lexer);
lex_get (lexer);
lex_match (lexer, T_COMMA);
- if (!lex_force_int (lexer))
+ if (!lex_force_int_range (lexer, NULL, min, LONG_MAX))
goto error;
- max = lex_integer (lexer);
- if (max < min)
- {
- msg (SE, _("Maximum value (%ld) less than minimum value (%ld)."),
- max, min);
- goto error;
- }
+ long max = lex_integer (lexer);
lex_get (lexer);
if (!lex_force_match (lexer, T_RPAREN))
goto error;
- for (i = orig_nv; i < proc->n_variables; i++)
+ for (size_t i = orig_nv; i < proc->n_variables; i++)
{
const struct variable *var = proc->variables[i];
struct var_range *vr = xmalloc (sizeof *vr);
if (proc->barchart)
{
int n_vars = (xt->n_vars > 2 ? 2 : xt->n_vars);
- const struct variable **vars = xcalloc (n_vars, sizeof *vars);
+ const struct variable **vars = XCALLOC (n_vars, const struct variable*);
for (size_t i = 0; i < n_vars; i++)
vars[i] = xt->vars[i].var;
chart_submit (barchart_create (vars, n_vars, _("Count"),
union value c[2];
if (!calc_risk (xt, risk_v, upper, lower, c, &n_valid))
return;
+ assert (risk_statistics);
size_t *indexes = xnmalloc (risk->n_dimensions, sizeof *indexes);
assert (xt->n_vars == 2);
return 1;
}
-
-/*
- Local Variables:
- mode: c
- End:
-*/