# Storeton, Wirral # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy T 546167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE alternate' title='Atom feed' href='https://git.dereenigne.org/debian/linux-dvb-apps.git/atom/util/scan/scan.h?h=debian/1.1.1+rev1207-5' type='application/atom+xml'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/util/scan/scan.h
blob: 6ccf6fc3c220d9a4324877a1d94d94a81cae7503 (plain)
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
#ifndef __SCAN_H__
#define __SCAN_H__

#include <stdio.h>
#include <errno.h>

extern int verbosity;

#define dprintf(level, fmt...)			\
	do {					\
		if (level <= verbosity)		\
			fprintf(stderr, fmt);	\
	} while (0)

#define dpprintf(level, fmt, args...) \
	dprintf(level, "%s:%d: " fmt, __FUNCTION__, __LINE__ , ##args)

#define fatal(fmt, args...) do { dpprintf(-1, "FATAL: " fmt , ##args); exit(1); } while(0)
#define error(msg...) dprintf(0, "ERROR: " msg)
#define errorn(msg) dprintf(0, "%s:%d: ERROR: " msg ": %d %m\n", __FUNCTION__, __LINE__, errno)
#define warning(msg...) dprintf(1, "WARNING: " msg)
#define info(msg...) dprintf(2, msg)
#define verbose(msg...) dprintf(3, msg)
#define moreverbose(msg...) dprintf(4, msg)
#define debug(msg...) dpprintf(5, msg)
#define verbosedebug(msg...) dpprintf(6, msg)

#endif