debug.c revision 153881
1/* $FreeBSD: head/contrib/ipfilter/lib/debug.c 153881 2005-12-30 11:52:26Z guido $ */ 2 3/* 4 * Copyright (C) 1993-2001 by Darren Reed. 5 * 6 * See the IPFILTER.LICENCE file for details on licencing. 7 * 8 * $Id: debug.c,v 1.6 2001/06/09 17:09:24 darrenr Exp $ 9 */ 10 11#if defined(__STDC__) 12# include <stdarg.h> 13#else 14# include <varargs.h> 15#endif 16#include <stdio.h> 17 18#include "ipt.h" 19#include "opts.h" 20 21 22#ifdef __STDC__ 23void debug(char *fmt, ...) 24#else 25void debug(fmt, va_alist) 26char *fmt; 27va_dcl 28#endif 29{ 30 va_list pvar; 31 32 va_start(pvar, fmt); 33 34 if (opts & OPT_DEBUG) 35 vprintf(fmt, pvar); 36 va_end(pvar); 37} 38