diff options
author | Alice Frosi <afrosi@redhat.com> | 2023-03-24 10:07:48 +0100 |
---|---|---|
committer | Alice Frosi <afrosi@redhat.com> | 2023-03-24 15:38:07 +0100 |
commit | 069009f8e39238ec1a67fba6cfb287b9a0cac83e (patch) | |
tree | 77f817eb7b96178b71f3d573a83cec19f7fba09c /src/cooker/util.c | |
parent | 06b0f6d323c396ca1df000af96fdd07cc69b06e0 (diff) | |
download | seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.gz seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.bz2 seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.lz seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.xz seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.tar.zst seitan-069009f8e39238ec1a67fba6cfb287b9a0cac83e.zip |
Re-organize project and add license header
Diffstat (limited to 'src/cooker/util.c')
-rw-r--r-- | src/cooker/util.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/cooker/util.c b/src/cooker/util.c new file mode 100644 index 0000000..a2ecce0 --- /dev/null +++ b/src/cooker/util.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +/* seitan - Syscall Expressive Interpreter, Transformer and Notifier + * + * cooker/util.c - Convenience routines + * + * Copyright 2023 Red Hat GmbH + * Author: Stefano Brivio <sbrivio@redhat.com> + */ + +#include <stdio.h> +#include <stdarg.h> +#include <string.h> + +#define logfn(name) \ +void name(const char *format, ...) { \ + va_list args; \ + \ + va_start(args, format); \ + (void)vfprintf(stderr, format, args); \ + va_end(args); \ + if (format[strlen(format)] != '\n') \ + fprintf(stderr, "\n"); \ +} + +logfn(err) +logfn(info) +logfn(debug) + |