02111-1307, USA. */
#include <config.h>
+#include "main.h"
#include <assert.h>
#include <stdio.h>
+#include "cmdline.h"
#include "command.h"
#include "error.h"
#include "getline.h"
+#include "glob.h"
#include "lexer.h"
#include "output.h"
#include <stdlib.h>
-#undef DEBUGGING
-/*#define DEBUGGING 1*/
#include "debug-print.h"
static void parse_script (void) __attribute__ ((noreturn));
int
main (int argc, char **argv)
{
- void init_glob (int, char **); /* Exported by glob.c. */
- void parse_command_line (int, char **); /* Exported by cmdline.c */
-
/* Initialization. */
if (!outp_init ())
err_hcf (0);
/* Execution. */
parse_script ();
+
+ /* Should never be reached */
+ return (-1);
}
/* Parses the entire script. */
handle_error (execute_command ());
}
- err_hcf (1);
+ err_hcf (err_error_count==0);
}
/* Parse and execute a command, returning its return code. */
break;
if (!getl_perform_delayed_reset ())
- err_hcf (1);
+ err_hcf (err_error_count==0);
}
/* Parse the command. */