diff options
| author | Jan Sucan <sucanjan@fit.cvut.cz> | 2019-04-11 18:44:34 +0200 |
|---|---|---|
| committer | Jan Sucan <sucanjan@fit.cvut.cz> | 2019-04-11 18:44:34 +0200 |
| commit | 498c691eb0dd19b23f70421484aa6d738f35e73c (patch) | |
| tree | 10f244796344981ee6e5ddc5f3912372d7c5990b /print.c | |
Initial commit
Diffstat (limited to 'print.c')
| -rw-r--r-- | print.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#include <stdio.h> +#include <stdarg.h> + +#include "print.h" + +#define PRINT_ERROR_PREFIX "ERROR: " +#define PRINT_ERROR_SUFFIX "\n" + +void +print_error(const char * const format, ...) +{ + fprintf(stderr, PRINT_ERROR_PREFIX); + + va_list args; + + va_start(args, format); + vfprintf(stderr, format, args); + va_end(args); + + fprintf(stderr, PRINT_ERROR_SUFFIX); +} |
