Fri Dec 19 23:35:04 2003 Ben Pfaff <blp@gnu.org>
[pspp] / src / main.c
index e25991862f7301b2e90e2bf5df0fc84093f648c4..3f519e5e0f6974ab477b1d01c268a111a0083660 100644 (file)
@@ -28,8 +28,6 @@
 
 #include <stdlib.h>
 
-#undef DEBUGGING
-/*#define DEBUGGING 1*/
 #include "debug-print.h"
 
 static void parse_script (void) __attribute__ ((noreturn));
@@ -69,6 +67,9 @@ main (int argc, char **argv)
 
   /* Execution. */
   parse_script ();
+
+  /* Should never be reached */
+  return (-1);
 }
 
 /* Parses the entire script. */
@@ -81,7 +82,7 @@ parse_script (void)
       handle_error (execute_command ());
     }
 
-  err_hcf (1);
+  err_hcf (err_error_count==0);
 }
 
 /* Parse and execute a command, returning its return code. */
@@ -101,7 +102,7 @@ execute_command (void)
        break;
 
       if (!getl_perform_delayed_reset ())
-       err_hcf (1);
+       err_hcf (err_error_count==0);
     }
 
   /* Parse the command. */