From 02ffe0ed4113e7b479197d0ba1b160e6280b4099 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sun, 2 May 2021 10:19:23 +0200 Subject: Move the source files to a src directory --- src/print.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/print.c (limited to 'src/print.c') diff --git a/src/print.c b/src/print.c new file mode 100644 index 0000000..824f818 --- /dev/null +++ b/src/print.c @@ -0,0 +1,21 @@ +#include +#include + +#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); +} -- cgit v1.2.3