#include <errno.h>
#include <stdio.h>

/* Both of these routines are here to handle errors -- error is for
 * those errors that the programmer wants to cause, without system
 * help.  CheckError is for ones that are brought on by some true
 * system error (like out of memory, or other equivalent foolishness).
 * Both use Shutdown() to turn off anything the program is doing.
 * Shutdown() is assumed to 1) exist and 2) be the program-specific
 * method of turning off the program to exit.
 */

void error(s)
     char *s;
{
  void Shutdown();

  Shutdown();
  fprintf(stderr, "%s\n", s);
  exit(1);
}

void CheckError(s)
     char *s;
{
  void Shutdown();

  Shutdown();
  perror(s);
  exit(1);
}
