#ifndef _DEBUG_H #define _DEBUG_H #ifdef DEBUG #define PRINTF(x) \ PRINTF ## x #if DEBUG >= 1 #define PRINTF1 \ if (verbose >= 1 ) \ printf ("%s:%d:", __FILE__, __LINE__); \ if (verbose >= 1) printf #else #define PRINTF1 #endif #if DEBUG >= 2 #define PRINTF2 \ if (verbose >= 2 ) \ printf ("%s:%d:", __FILE__, __LINE__); \ if (verbose >= 2) printf #else #define PRINTF2 #endif #if DEBUG >= 3 #define PRINTF3 \ if (verbose >= 3 ) \ printf ("%s:%d:", __FILE__, __LINE__); \ if (verbose >= 3) printf #else #define PRINTF3 #endif #if DEBUG >= 4 #define PRINTF4 \ if (verbose >= 4 ) \ printf ("%s:%d:", __FILE__, __LINE__); \ if (verbose >= 4) printf #else #define PRINTF4 #endif #else #define PRINTF(x) #endif #endif /* _DEBUG_H */