source: golgotha/src/make/error.cc

Last change on this file was 80, checked in by Sam Hocevar, 15 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 988 bytes
Line 
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
9#include "error.hh"
10
11
12int line_on=0;
13char *file_on=0;
14int mk_debug_on=0;
15char *file_contents=0;
16
17void mk_error(char *format,...)
18{
19  if (file_on)
20    fprintf(stderr, "%s:%d: ", file_on, line_on);
21
22
23  va_list args;
24
25  va_start(args,format);
26  vfprintf(stderr, format, args);
27  va_end(args);
28
29  exit(1);
30}
31
32void mk_debug(char *format,...)
33{
34  if (mk_debug_on)
35  {
36    va_list args;
37
38    va_start(args,format);
39    vfprintf(stderr, format, args);
40    va_end(args);
41
42  }
43}
Note: See TracBrowser for help on using the repository browser.