error.cc 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #include "error.hh"
  9. int line_on=0;
  10. char *file_on=0;
  11. int mk_debug_on=0;
  12. char *file_contents=0;
  13. void mk_error(char *format,...)
  14. {
  15. if (file_on)
  16. fprintf(stderr, "%s:%d: ", file_on, line_on);
  17. va_list args;
  18. va_start(args,format);
  19. vfprintf(stderr, format, args);
  20. va_end(args);
  21. exit(1);
  22. }
  23. void mk_debug(char *format,...)
  24. {
  25. if (mk_debug_on)
  26. {
  27. va_list args;
  28. va_start(args,format);
  29. vfprintf(stderr, format, args);
  30. va_end(args);
  31. }
  32. }