Make the expression code a little nicer and fix bugs found
[pspp] / src / flip.c
index 7e424ba2e0f0705f170c54433c41e14494fdfa42..1349ef1a014597ba8b6f992657ddc029d6823799 100644 (file)
@@ -18,7 +18,7 @@
    02111-1307, USA. */
 
 #include <config.h>
-#include <assert.h>
+#include "error.h"
 #include <ctype.h>
 #include <errno.h>
 #include <float.h>
@@ -87,7 +87,6 @@ cmd_flip (void)
   flip->new_names_tail = NULL;
   flip->file = NULL;
 
-  lex_match_id ("FLIP");
   lex_match ('/');
   if (lex_match_id ("VARIABLES"))
     {
@@ -359,7 +358,7 @@ flip_file (struct flip_pgm *flip)
 
   /* Allocate memory for many cases. */
   case_bytes = flip->var_cnt * sizeof *input_buf;
-  case_capacity = set_max_workspace / case_bytes;
+  case_capacity = get_max_workspace() / case_bytes;
   if (case_capacity > flip->case_cnt * 2)
     case_capacity = flip->case_cnt * 2;
   if (case_capacity < 2)