-/* Parse CROSSBREAK subcommand. */
-static int
-mns_custom_crossbreak (struct cmd_means *cmd)
-{
- return mns_custom_tables (cmd);
-}
-
-/* Parses the VARIABLES subcommand. */
-static int
-mns_custom_variables (struct cmd_means *cmd)
-{
- if (cmd->sbc_tables)
- {
- msg (SE, _("VARIABLES must precede TABLES."));
- return 0;
- }
-
- if (cmd->sbc_variables == 1)
- {
- int i;
-
- for (i = 0; i < dict_get_var_cnt (default_dict); i++)
- dict_get_var (default_dict, i)->p.mns.min = SYSMIS;
- }
-
- do
- {
- int orig_n = n_var;
-
- double min, max;
-
- if (!parse_variables (default_dict, &v_var, &n_var,
- PV_APPEND | PV_NO_DUPLICATE | PV_NO_SCRATCH))
- return 0;
-
- if (!lex_force_match ('('))
- return 0;
-
- /* Lower value. */
- if (token == T_ID
- && (!strcmp (tokid, "LO") || lex_id_match ("LOWEST", tokid)))
- min = LOWEST;
- else
- {
- if (!lex_force_num ())
- return 0;
- min = tokval;
- }
- lex_get ();
-
- lex_match (',');
-
- /* Higher value. */
- if (token == T_ID
- && (!strcmp (tokid, "HI") || lex_id_match ("HIGHEST", tokid)))
- max = HIGHEST;
- else
- {
- if (!lex_force_num ())
- return 0;
- max = tokval;
- }
- lex_get ();
-
- if (!lex_force_match (')'))
- return 0;
-
- /* Range check. */
- if (max < min)
- {
- msg (SE, _("Upper value (%g) is less than lower value "
- "(%g) on VARIABLES subcommand."), max, min);
- return 0;
- }
-
- {
- int i;
-
- for (i = orig_n; i < n_var; i++)
- {
- struct means_proc *v_inf = &v_var[i]->p.mns;
-
- v_inf->min = min;
- v_inf->max = max;
- }
- }
- }
- while (token != '/' && token != '.');
-
- return 1;
-}
-