aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_io.c
blob: b7ce6342abd8ee2db048c3ef9bd2523e4e01292c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "xc_io.h"

void xcio_error(XcIOContext *ctxt, const char *msg, ...){
  va_list args;

  va_start(args, msg);
  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
  IOStream_vprint(ctxt->info, msg, args);
  IOStream_print(ctxt->info, "\n");
  va_end(args);
}

void xcio_info(XcIOContext *ctxt, const char *msg, ...){
  va_list args;

  if(0 && !(ctxt->flags & XCFLAGS_VERBOSE)) return;
  va_start(args, msg);
  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
  IOStream_vprint(ctxt->info, msg, args);
  va_end(args);
}

void xcio_debug(XcIOContext *ctxt, const char *msg, ...){
  va_list args;

  if(0 && !(ctxt->flags & XCFLAGS_DEBUG)) return;
  va_start(args, msg);
  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
  IOStream_vprint(ctxt->info, msg, args);
  va_end(args);
}