summaryrefslogtreecommitdiff
path: root/tvision/include/tv/linux/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'tvision/include/tv/linux/log.h')
-rw-r--r--tvision/include/tv/linux/log.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/tvision/include/tv/linux/log.h b/tvision/include/tv/linux/log.h
new file mode 100644
index 0000000..3b3c3fc
--- /dev/null
+++ b/tvision/include/tv/linux/log.h
@@ -0,0 +1,25 @@
+/**[txh]********************************************************************
+
+ Debug logger helper Copyright 1996-1998 by Robert Hoehne
+ Description:
+ Used to debug Linux driver.
+ I (SET) moved it here to avoid repeating it in each module.
+ The idea is from Robert, I usually use another approach.
+
+***************************************************************************/
+
+#if defined(TVOSf_Linux) && !defined(LOGLINUXDEBUG_INCLUDED)
+#define LOGLINUXDEBUG_INCLUDED
+
+//#define DEBUG
+#ifdef DEBUG
+ extern char *program_invocation_short_name;
+ #define LOG(s) do {CLY_std(cerr) << program_invocation_short_name << ": " << s << CLY_std(endl); fflush(stderr);} while(0)
+#else
+ #define LOG(s) do {;} while(0)
+#endif
+
+#else
+ #define LOG(s) do {;} while(0)
+#endif // LOGLINUXDEBUG_INCLUDED
+