Issue an error if no valid data are found
[pspp] / src / language / stats / sort-criteria.c
index 87dc6b4fd5875ecb21e3684d09a77fbed88fdbac..81b68eab6c41afd5cb79fa2205aa72cb5ba347ff 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -51,13 +50,13 @@ static bool  is_terminator(int tok, const int *terminators);
 */
 struct sort_criteria *
 sort_parse_criteria (struct lexer *lexer, const struct dictionary *dict,
-                     struct variable ***vars, size_t *var_cnt,
+                     const struct variable ***vars, size_t *var_cnt,
                      bool *saw_direction,
                     const int *terminators
                     )
 {
   struct sort_criteria *criteria;
-  struct variable **local_vars = NULL;
+  const struct variable **local_vars = NULL;
   size_t local_var_cnt;
 
   assert ((vars == NULL) == (var_cnt == NULL));
@@ -82,7 +81,7 @@ sort_parse_criteria (struct lexer *lexer, const struct dictionary *dict,
       enum sort_direction direction;
 
       /* Variables. */
-      if (!parse_variables (lexer, dict, vars, var_cnt,
+      if (!parse_variables_const (lexer, dict, vars, var_cnt,
                            PV_NO_DUPLICATE | PV_APPEND | PV_NO_SCRATCH))
         goto error;