From 2863a88a41959952cfce6b9c01c55d33a3252ef2 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Sat, 27 Mar 2010 19:55:02 +0100 Subject: Got rid of dependency --- debug.h | 10 ++++++++-- decoder.h | 2 +- queue.h | 10 +++++++--- ts2pkt.h | 5 ++++- video.h | 10 ++++++++-- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/debug.h b/debug.h index 33745b3..a12a972 100644 --- a/debug.h +++ b/debug.h @@ -12,6 +12,12 @@ #define LOG_ERR 3 #endif -#define tsyslog(fmt,...) void( (SysLogLevel > 3) ? syslog_with_tid(LOG_ERR, fmt, __VA_ARGS__) : void() ) +extern int SysLogLevel; +extern void syslog_with_tid(int priority, const char *format, ...) __attribute__ ((format (printf, 2, 3))); -#endif \ No newline at end of file +#define esyslog(a...) void( (SysLogLevel > 0) ? syslog_with_tid(LOG_ERR, a) : void() ) +#define isyslog(a...) void( (SysLogLevel > 1) ? syslog_with_tid(LOG_ERR, a) : void() ) +#define dsyslog(a...) void( (SysLogLevel > 2) ? syslog_with_tid(LOG_ERR, a) : void() ) +#define tsyslog(a...) void( (SysLogLevel > 3) ? syslog_with_tid(LOG_ERR, a) : void() ) + +#endif diff --git a/decoder.h b/decoder.h index f35ddfe..46e9f74 100644 --- a/decoder.h +++ b/decoder.h @@ -10,7 +10,6 @@ #define __STDC_CONSTANT_MACROS -#include // needed for (d/e/i)syslog #include #include @@ -37,6 +36,7 @@ extern "C" #if LIBAVCODEC_VERSION_INT < ((52<<16)+(23<<8)+0) #include #endif +#include "debug.h" } #include "global.h" diff --git a/queue.h b/queue.h index f550e62..20cac32 100644 --- a/queue.h +++ b/queue.h @@ -8,14 +8,18 @@ #ifndef __queue_h_ #define __queue_h_ -#include // needed for (d/e/i)syslog -#include "debug.h" +#include +#include +#include #ifndef uchar typedef unsigned char uchar; #endif -#include +extern "C" +{ +#include "debug.h" +} class cMarkAdPaketQueue { diff --git a/ts2pkt.h b/ts2pkt.h index 7567994..a485d5b 100644 --- a/ts2pkt.h +++ b/ts2pkt.h @@ -8,7 +8,10 @@ #ifndef __ts2pkt_h_ #define __ts2pkt_h_ -#include // needed for (d/e/i)syslog +extern "C" +{ +#include "debug.h" +} #ifndef TS_SIZE #define TS_SIZE 188 diff --git a/video.h b/video.h index 5c81202..d9ff9a9 100644 --- a/video.h +++ b/video.h @@ -8,12 +8,18 @@ #ifndef __video_h_ #define __video_h_ -#include // needed for (d/e/i)syslog - #include #include +#include +#include +#include #include "global.h" +extern "C" +{ +#include "debug.h" +} + #define LOGO_MAXHEIGHT 170 #define LOGO_MAXWIDTH 480 -- cgit v1.2.3