24 lines
393 B
C
24 lines
393 B
C
#include "common.h"
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
|
|
static int is_verbose = FALSE;
|
|
|
|
void printVerbose(const char* format, ...) {
|
|
if (is_verbose) {
|
|
va_list args_list;
|
|
|
|
va_start(args_list, format);
|
|
vprintf(format, args_list);
|
|
va_end(args_list);
|
|
}
|
|
}
|
|
|
|
void setVerbose(int flag) {
|
|
is_verbose = flag;
|
|
}
|
|
|
|
int isVerbose() {
|
|
return is_verbose;
|
|
}
|