/*
   Non-fatal Error Handling Routine:

     Returns control to calling routine whether or not there has
     been an error to allow program to "clean up" -- close files, etc.

     Returns 0 to calling routine if no error was detected;
     otherwise, prints error message to stdout (and some log file,
     if specified--see REPT_MSG.C) and returns 1.

*/
#include <stdio.h>
#include "ioserv.h"  /* report_msg() */

#if PROTOTYPE_ALLOWED
int error_found(int test_value, char message[])
#else
int error_found(test_value, message)
   int test_value;
   char message[];
#endif
{
   char buff[255];

   if (test_value)
   {
      sprintf(buff, "\n%%%% ERROR: %d, %s", test_value, message);
      report_msg(buff);
      return(1);
   }
   return(0);
}

