/* Bonnie Berger, David Wilson and Theodore Tonchev 1992 */ /* C Code File */ #include #include #include #include "scsystem.h" /* Error Messages */ char* err_msg[] = { "Tracing", "Usage Error", "Unrecognized switch:", "Error while opening file", "Error while writing in", "Error while reading from", "Bad Magic Number of", "Not Enough Memory" }; void error(int errcode, char* msg) { switch (errcode) { case NO_ERR: fprintf(stderr,"%s\n", err_msg[NO_ERR]); break; case USAGE_ERR: usage(); exit(1); default: fprintf(stderr,"ERROR: %s %s\n", err_msg[errcode], msg); exit(2); } } void timestamp(FILE* flog) { time_t tp; time(&tp); fprintf(flog, "%s\n", ctime(&tp)); } /* End of Code */