diff options
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -1,10 +1,10 @@ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ /*debug.h*/ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ /*Simple facilities for debugging messages*/ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ /*Based on the code of unionfs translator.*/ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ /*Copyright (C) 2001, 2002, 2005, 2008 Free Software Foundation, Inc. Written by Sergiu Ivanov <unlimitedscolobb@gmail.com>. @@ -22,38 +22,38 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.*/ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ #ifndef __DEBUG_H__ #define __DEBUG_H__ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ #include <stdio.h> -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -/*--------Macros--------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ +/*--------Macros-------------------------------------------------------------*/ /*Print debug messages here*/ #define DEBUG_OUTPUT "/var/log/filter.dbg" -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ #ifdef DEBUG - /*Initializes the log*/ -# define INIT_LOG() filter_dbg = fopen(DEBUG_OUTPUT, "wt") - /*Closes the log*/ +/*Initializes the log */ +# define INIT_LOG() filter_dbg = fopen(DEBUG_OUTPUT, "wt") +/*Closes the log */ # define CLOSE_LOG() fclose(filter_dbg) - /*Prints a debug message and flushes the debug output*/ -# define LOG_MSG(fmt, args...) {fprintf(filter_dbg, fmt"\n", ##args);\ - fflush(filter_dbg);} +/*Prints a debug message and flushes the debug output */ +# define LOG_MSG(fmt, args...) {fprintf(filter_dbg, fmt"\n", ##args);\ + fflush(filter_dbg);} #else - /*Remove requests for debugging output*/ -# define INIT_LOG() -# define CLOSE_LOG() -# define LOG_MSG(fmt, args...) +/*Remove requests for debugging output */ +# define INIT_LOG() +# define CLOSE_LOG() +# define LOG_MSG(fmt, args...) #endif /*DEBUG*/ -/*----------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ -/*----------------------------------------------------------------------------*/ -/*--------Global Variables----------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ +/*--------Global Variables---------------------------------------------------*/ /*The file to write debugging info to*/ -extern FILE * filter_dbg; -/*----------------------------------------------------------------------------*/ +extern FILE *filter_dbg; +/*---------------------------------------------------------------------------*/ #endif /*__DEBUG_H__*/ |