/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/utils.c

  • Committer: Gustav Hartvigsson
  • Date: 2015-03-26 11:06:48 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150326110648-rnzezpe8q0u4bans
* Added something to config.h.in, still not sure how it cmake works.
* added ANSI colours  to defs.h
* added s_err_print and s_dbg_print
  s_dbg_print only does any work if the DEBUG flag is not unset.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
  fprintf (stdout, (char *) format, args);
54
54
  va_end (args);
55
55
}
 
56
 
 
57
void s_err_print (const char * format, ...) {
 
58
  va_list args;
 
59
  va_start (args, format);
 
60
  fprintf (stderr, RED [ERR] (char *) format RESET, args);
 
61
  va_end (args);
 
62
}
 
63
 
 
64
#if DEBUG
 
65
  void s_dbg_print (const char * format, ...) {
 
66
    va_list args;
 
67
    va_start (args, format);
 
68
    fprintf (stderr, YELLOW "[DEBUG] " (char *) format RESET, args);
 
69
    va_end (args);
 
70
  }
 
71
#elif
 
72
  void s_dbg_print (const char * format, ...) {
 
73
    /* do nothing */
 
74
  }
 
75
#endif