#ifndef DEBUG_H
#define DEBUG_H

#define NUM_DEBUG_LVLS	5
#include <stdio.h>

extern int debug; 

/*equals 0 by default = greater number indicates more debugging
capability, also more verbose logging*/

#ifdef _VXWORKS_
	extern "C"{
	int	logMsg (char *fmt, ...);
	};
	#define DPRINTF if(debug > 0 && debug < NUM_DEBUG_LVLS) printf	  // prints for levels 1,2,3,4
	#define DPRINTF_L2 if(debug > 1 && debug < NUM_DEBUG_LVLS) printf // prints for levels 2,3,4
	#define DPRINTF_L3 if(debug > 2 && debug < NUM_DEBUG_LVLS) printf // prints for levels 3,4
	#define DPRINTF_L4 if(debug == (NUM_DEBUG_LVLS - 1)) printf		  // prints for level 5*/	
#endif //_VXWORKS_
	
#ifdef _WIN32_		
	#define DPRINTF if(debug > 0 && debug < NUM_DEBUG_LVLS) printf	  // prints for levels 1,2,3,4
	#define DPRINTF_L2 if(debug > 1 && debug < NUM_DEBUG_LVLS) printf // prints for levels 2,3,4
	#define DPRINTF_L3 if(debug > 2 && debug < NUM_DEBUG_LVLS) printf // prints for levels 3,4
	#define DPRINTF_L4 if(debug == (NUM_DEBUG_LVLS - 1)) printf		  // prints for level 5*/
#endif //_WIN32_


#endif
