- /* Weighting variable. */
- if (cmd.weight == LST_WEIGHT)
- {
- if (dict_get_weight (dict) != NULL)
- {
- size_t i;
-
- for (i = 0; i < cmd.n_variables; i++)
- if (cmd.v_variables[i] == dict_get_weight (dict))
- break;
- if (i >= cmd.n_variables)
- {
- /* Add the weight variable to the end of the variable list. */
- cmd.n_variables++;
- cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
- sizeof *cmd.v_variables);
- cmd.v_variables[cmd.n_variables - 1]
- = dict_get_weight (dict);
- }
- }
- else
- msg (SW, _("`/FORMAT WEIGHT' specified, but weighting is not on."));
- }
-