aboutsummaryrefslogtreecommitdiff
path: root/include/output.h
blob: 22f38856c64dfedab6b7e6f036c35573a0a20a5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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