home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 308_01 / debug.c < prev    next >
Text File  |  1990-06-17  |  748b  |  36 lines

  1.  
  2. /*
  3.     HEADER:         CUG308;
  4.     TITLE:        debugging error message module;
  5.     DESCRIPTION:    "general purpose debugging error message routines";
  6.  
  7.     DATE:           5/6/90;
  8.     VERSION:        2.01;
  9.     FILENAME:       DEBUG.C;
  10.     SEE-ALSO:       DEBUG.H;
  11.  
  12.     AUTHOR:         Michael Kelly
  13.             254 Gold St. Boston Ma. 02127;
  14.     COPYRIGHT:    May be used freely if authorship is acknowledged;
  15.  
  16. */
  17.  
  18.  
  19. #include <stdlib.h>
  20. #include <stdio.h>
  21.  
  22.  
  23. void err_out(const char *errmsg)
  24. {
  25.     fprintf(stderr,"\n%s\n",errmsg);
  26.     exit(1);
  27. }
  28.  
  29. void bug_out(const char *errmsg, const char *filename, int lineno)
  30. {
  31.     fprintf(stderr,"\n%s\n",errmsg);
  32.     fprintf(stderr,"\tFile: %s\n",filename);
  33.     fprintf(stderr,"\tLine: %d\n",lineno);
  34.     exit(1);
  35. }
  36.