Redo VFM interface. Get rid of compaction_necessary, compaction_nval,
[pspp-builds.git] / src / command.c
index 2c62d2f26d79200b8dce23cc80b79dea24820cb1..316868a2be5d5663ffb72ba4745144b62e8ea694 100644 (file)
@@ -201,7 +201,8 @@ cmd_parse (void)
 
   /* If we're in a FILE TYPE structure, only certain commands can be
      allowed. */
-  if (pgm_state == STATE_INPUT && vfm_source == &file_type_source
+  if (pgm_state == STATE_INPUT
+      && case_source_is_class (vfm_source, &file_type_source_class)
       && !FILE_TYPE_okay (cp))
     return CMD_FAILURE;
 
@@ -249,7 +250,7 @@ cmd_parse (void)
     
     /* Perform the state transition if the command completed
        successfully (at least in part). */
-    if (result != 0)
+    if (result != CMD_FAILURE)
       {
        pgm_state = cp->transition[pgm_state];
 
@@ -561,11 +562,10 @@ int
 cmd_execute (void)
 {
   lex_match_id ("EXECUTE");
-  procedure (NULL, NULL, NULL);
+  procedure (NULL, NULL);
   return lex_end_of_command ();
 }
 
-
 #define assert_not_safer() \
   do { \
    if (set_safer) \
@@ -575,8 +575,6 @@ cmd_execute (void)
     } \
 } while(0) 
 
-
-
 /* Parses, performs the ERASE command. */
 int
 cmd_erase (void)
@@ -601,7 +599,7 @@ cmd_erase (void)
   return CMD_SUCCESS;
 }
 
-#if unix
+#ifdef unix
 /* Spawn a shell process. */
 static int
 shell (void)
@@ -713,7 +711,7 @@ cmd_host (void)
   
   lex_match_id ("HOST");
 
-#if unix
+#ifdef unix
   /* Figure out whether to invoke an interactive shell or to execute a
      single shell command. */
   if (lex_look_ahead () == '.')