/*
  err.c - Simple stupid error handler.

*/

#include <stdio.h>
#include <stdlib.h>

#include "err.h"

/* ------------------------------------------------------------------------ */
int do_error(int code, char *msg)
{
    fprintf(stderr, "Error (%d): %s\n", code, msg);
    
    if (code < 0) {
	exit(-code);
    }
    return(code);
}
