From 62e45906f1ffcaa2e3039a4306c01465c3eadfd8 Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Sun, 15 Jun 2025 23:55:47 +0200 Subject: Spread code into multiple files. --- include/output.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 include/output.h (limited to 'include/output.h') 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 + +#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 + -- cgit v1.2.3-70-g09d2