Zane Shelley | 7649b8b | 2020-05-08 20:12:35 -0500 | [diff] [blame] | 1 | #include <stdarg.h> |
| 2 | #include <stdio.h> |
| 3 | |
| 4 | namespace libhei |
| 5 | { |
| 6 | |
| 7 | // prints a single line to stdout |
| 8 | void hei_inf(char* format, ...) |
| 9 | { |
| 10 | va_list args; |
| 11 | fprintf(stdout, "I> "); |
| 12 | va_start(args, format); |
| 13 | vfprintf(stdout, format, args); |
| 14 | va_end(args); |
| 15 | fprintf(stdout, "\n"); |
| 16 | } |
| 17 | |
| 18 | // prints a single line to stderr |
| 19 | void hei_err(char* format, ...) |
| 20 | { |
| 21 | va_list args; |
| 22 | fprintf(stderr, "E> "); |
| 23 | va_start(args, format); |
| 24 | vfprintf(stderr, format, args); |
| 25 | va_end(args); |
| 26 | fprintf(stderr, "\n"); |
| 27 | } |
| 28 | |
| 29 | } // namespace libhei |