#include "sort-prs.h"
#include "var.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
/* (headers) */
/* (specification)
static struct rank_spec *rank_specs;
-static int n_rank_specs;
+static size_t n_rank_specs;
static struct sort_criteria *sc;
static struct variable **group_vars;
-static int n_group_vars;
+static size_t n_group_vars;
static struct cmd_rank cmd;
int
cmd_rank(void)
{
- int i;
+ size_t i;
n_rank_specs = 0;
if ( !parse_rank(&cmd) )
int var_count = 0;
n_rank_specs++;
- rank_specs = xrealloc(rank_specs, n_rank_specs * sizeof *rank_specs);
+ rank_specs = xnrealloc(rank_specs, n_rank_specs, sizeof *rank_specs);
rank_specs[n_rank_specs - 1].rfunc = f;
rank_specs[n_rank_specs - 1].destvars =
- xcalloc(sc->crit_cnt ,sizeof (struct variable *));
+ xcalloc (sc->crit_cnt, sizeof (struct variable *));
if (lex_match_id("INTO"))
{
}
if ( var_count > sc->crit_cnt )
{
- msg(ME, _("Too many variables in INTO clause."), tokid);
+ msg(ME, _("Too many variables in INTO clause."));
return 0;
}