aboutsummaryrefslogtreecommitdiff
path: root/include/output.h
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2025-06-15 23:55:47 +0200
committerThorsten Töpper <atsutane@freethoughts.de>2025-06-15 23:55:47 +0200
commit62e45906f1ffcaa2e3039a4306c01465c3eadfd8 (patch)
tree4e388adaa1893807829c3714ea88ac8beb2dfcf7 /include/output.h
parent633e1ea568b5f9608319bbbe32c8fcdbf195c47d (diff)
downloaddir_monitor-62e45906f1ffcaa2e3039a4306c01465c3eadfd8.tar.gz
dir_monitor-62e45906f1ffcaa2e3039a4306c01465c3eadfd8.tar.bz2
Spread code into multiple files.
Diffstat (limited to 'include/output.h')
-rw-r--r--include/output.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/output.h b/include/output.h
new file mode 100644
index 0000000..22f3885
--- /dev/null
+++ b/include/output.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+
+/* Copyright 2025 Thorsten Töpper
+ *
+ * output related functions and definitions
+ *
+ * vim:ts=4:sw=4:expandtab
+ */
+#ifndef OUTPUT_H
+#define OUTPUT_H
+#include <stdio.h>
+
+#include "list_management.h"
+
+
+#define LOGERR(...) {fprintf(stderr, "[%s:%d] %s: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__);}
+
+#ifdef DEBUGBUILD
+#define DBGTRC(...) LOGERR(__VA_ARGS__)
+#else
+#define DBGTRC(...)
+#endif
+
+
+int fputc_all_cols(char c, FILE *fdout);
+int fputc_width_x(char c, size_t x, FILE *fdout);
+void print_list(struct list_head *list);
+#endif
+