aboutsummaryrefslogblamecommitdiff
path: root/contrib/ipfilter/lib/verbose.c
blob: 47988c08451613fc07522a952fa887e980e26c2e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                          

  
                                     


                                                          
       

   
                    

                  
                


                 
                                          








                                   

 
                                   








                                               
/*	$FreeBSD$	*/

/*
 * Copyright (C) 2012 by Darren Reed.
 *
 * See the IPFILTER.LICENCE file for details on licencing.
 *
 * $Id$
 */

# include <stdarg.h>
#include <stdio.h>

#include "ipf.h"
#include "opts.h"


void	verbose(int level, char *fmt, ...)
{
	va_list pvar;

	va_start(pvar, fmt);

	if (opts & OPT_VERBOSE)
		vprintf(fmt, pvar);
	va_end(pvar);
}


void	ipfkverbose(char *fmt, ...)
{
	va_list pvar;

	va_start(pvar, fmt);

	if (opts & OPT_VERBOSE)
		verbose(0x1fffffff, fmt, pvar);
	va_end(pvar);
}