| 1 | #include <stdarg.h> | ||
| 2 | #include <stdio.h> | ||
| 3 | #include "glog.h" | ||
| 4 | |||
| 5 | #ifndef GLOG_SHOW | ||
| 6 | |||
| 7 | 0 | void glog(const char* fmt, ...) { | |
| 8 | 0 | } | |
| 9 | |||
| 10 | #else | ||
| 11 | |||
| 12 | void glog(const char* fmt, ...) { | ||
| 13 | va_list args; | ||
| 14 | va_start(args, fmt); | ||
| 15 | vfprintf(stderr, fmt, args); | ||
| 16 | fputc('\n', stderr); | ||
| 17 | va_end(args); | ||
| 18 | } | ||
| 19 | |||
| 20 | #endif |