- struct cnt_num *cur;
- if (n >= m - 1)
- {
- m += 16;
- c->crit.n = xrealloc (c->crit.n, m * sizeof (struct cnt_num));
- }
-
- cur = &c->crit.n[n++];
- if (lex_is_number ())
- {
- cur->a = tokval;
- lex_get ();
- if (lex_match_id ("THRU"))
- {
- if (lex_is_number ())
- {
- if (!lex_force_num ())
- return 0;
- cur->b = tokval;
- cur->type = CNT_RANGE;
- lex_get ();
-
- if (cur->a > cur->b)
- {
- msg (SE, _("%g THRU %g is not a valid range. The "
- "number following THRU must be at least "
- "as big as the number preceding THRU."),
- cur->a, cur->b);
- return 0;
- }
- }
- else if (lex_match_id ("HI") || lex_match_id ("HIGHEST"))
- cur->type = CNT_HIGH;
- else
- {
- lex_error (NULL);
- return 0;
- }
- }
- else
- cur->type = CNT_SINGLE;
- }
- else if (lex_match_id ("LO") || lex_match_id ("LOWEST"))
- {
- if (!lex_force_match_id ("THRU"))
- return 0;
- if (lex_is_number ())
- {
- cur->type = CNT_LOW;
- cur->a = tokval;
- lex_get ();
- }
- else if (lex_match_id ("HI") || lex_match_id ("HIGHEST"))
- cur->type = CNT_ANY;
- else
- {
- lex_error (NULL);
- return 0;
- }
- }
- else if (lex_match_id ("SYSMIS"))
- {
- if (c->missing < 1)
- c->missing = 1;
- }