Debian Codegraph @

kiss_fft_log.h

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /*
2 * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved.
3 * This file is part of KISS FFT - https://github.com/mborgerding/kissfft
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 * See COPYING file for more information.
7 */
8
9 #ifndef kiss_fft_log_h
10 #define kiss_fft_log_h
11
12 #define ERROR 1
13 #define WARNING 2
14 #define INFO 3
15 #define DEBUG 4
16
17 #define STRINGIFY(x) #x
18 #define TOSTRING(x) STRINGIFY(x)
19
20 #if defined(NDEBUG)
21 # define KISS_FFT_LOG_MSG(severity, ...) ((void)0)
22 #else
23 # define KISS_FFT_LOG_MSG(severity, ...) \
24 fprintf(stderr, "[" #severity "] " __FILE__ ":" TOSTRING(__LINE__) " "); \
25 fprintf(stderr, __VA_ARGS__); \
26 fprintf(stderr, "\n")
27 #endif
28
29 #define KISS_FFT_ERROR(...) KISS_FFT_LOG_MSG(ERROR, __VA_ARGS__)
30 #define KISS_FFT_WARNING(...) KISS_FFT_LOG_MSG(WARNING, __VA_ARGS__)
31 #define KISS_FFT_INFO(...) KISS_FFT_LOG_MSG(INFO, __VA_ARGS__)
32 #define KISS_FFT_DEBUG(...) KISS_FFT_LOG_MSG(DEBUG, __VA_ARGS__)
33
34
35
36 #endif /* kiss_fft_log_h */