/* * Copyright (c) 2002, Dominik Schnitzer * $Id: debug.h,v 1.2 2002/09/18 21:46:23 stefan Exp $ */ #ifndef JFK_DEBUG_H #define JFK_DEBUG_H #include #ifdef DEBUG /* Call LOG with *2* pairs of parens. Example: * LOG(("foo: %s", bar())); */ #define LOG(X) \ do { \ std::printf("%s:%d ", __FILE__, __LINE__); \ std::printf X; \ std::printf("\n"); \ } while (0) #else #define LOG(X) /* nothing */ #endif /* DEBUG */ #endif /* JFK_DEBUG_H */