# include "basic.h"

int exec_break (int argc, char **argv) {

  int N, value;

  if ((N = get_argument (argc, argv, "-auto"))) {
    remove_argument (N, &argc, argv);
    value = -1;
    if (!strcasecmp (argv[N], "on")) value = TRUE;
    if (!strcasecmp (argv[N], "off")) value = FALSE;
    if (value == -1) {
      gprint (GP_ERR, "USAGE: break -auto [on / off]\n");
      if (auto_break) 
	gprint (GP_ERR, "auto break on\n");
      else 
	gprint (GP_ERR, "auto break off\n");
      return (FALSE);
    }
    auto_break = value;
    return (TRUE);
  }

  loop_break = TRUE;
  return (FALSE);

}
