/* 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 #include "ioserv.h" /* report_msg() */ int error_found(int test_value, char message[]) { char buff[255]; if (test_value) { sprintf(buff, "ERROR: %d, %s", test_value, message); report_msg(buff); return(1); } return(0); }