diff options
| author | Thorsten Töpper <atsutane@freethoughts.de> | 2025-04-08 21:57:55 +0200 |
|---|---|---|
| committer | Thorsten Töpper <atsutane@freethoughts.de> | 2025-04-08 21:57:55 +0200 |
| commit | d072d2ef6afadbbc7b8c80dc05c9952709d596c1 (patch) | |
| tree | dc9e958f71c0acd7c76d99fcf2a1c5287fca47bd | |
| parent | 71c4cbed3d30265b5ef56dd6ddd812139bd3fbb8 (diff) | |
| download | dotfiles-d072d2ef6afadbbc7b8c80dc05c9952709d596c1.tar.gz dotfiles-d072d2ef6afadbbc7b8c80dc05c9952709d596c1.tar.bz2 | |
poc-template.c: macro for stderr fprintf with position in code
| -rw-r--r-- | poc-template.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/poc-template.c b/poc-template.c index 713fc95..a62968a 100644 --- a/poc-template.c +++ b/poc-template.c @@ -7,6 +7,9 @@ #include <unistd.h> #include <stdbool.h> #include <stdint.h> +#include <errno.h> + +#define LOGERR(...) {fprintf(stderr, "[%s:%d] %s: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__);} int main(int argc, char **argv) { return EXIT_SUCCESS; |
