xref: /freebsd/sbin/ipf/libipf/verbose.c (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1 
2 /*
3  * Copyright (C) 2012 by Darren Reed.
4  *
5  * See the IPFILTER.LICENCE file for details on licencing.
6  *
7  * $Id$
8  */
9 
10 # include <stdarg.h>
11 #include <stdio.h>
12 
13 #include "ipf.h"
14 #include "opts.h"
15 
16 
17 void	verbose(int level, char *fmt, ...)
18 {
19 	va_list pvar;
20 
21 	va_start(pvar, fmt);
22 
23 	if (opts & OPT_VERBOSE)
24 		vprintf(fmt, pvar);
25 	va_end(pvar);
26 }
27 
28 
29 void	ipfkverbose(char *fmt, ...)
30 {
31 	va_list pvar;
32 
33 	va_start(pvar, fmt);
34 
35 	if (opts & OPT_VERBOSE)
36 		verbose(0x1fffffff, fmt, pvar);
37 	va_end(pvar);
38 }
39