aboutsummaryrefslogtreecommitdiffstats
path: root/trace.h
blob: 8dee696181728e5ba7ed7a8eed141d261dac51fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (C) 2020 Tomasz Kramkowski <tk@the-tk.com>
 * SPDX-License-Identifier: MIT
 */
#ifndef PACK_TRACE_H
#define PACK_TRACE_H

#ifdef DEVEL
#define ATTRIBUTE_FORMAT(type, fmt, args) __attribute__((format(type, fmt, args)))
#else
#define ATTRIBUTE_FORMAT(type, fmt, args)
#endif

ATTRIBUTE_FORMAT(printf, 1, 2)
void tr_call(const char *fmt, ...);
ATTRIBUTE_FORMAT(printf, 1, 2)
void tr_debug(const char *fmt, ...);

#endif // !PACK_TRACE_H