From 9c53646dc79a1447fd3201b37412108d7f94ea28 Mon Sep 17 00:00:00 2001 From: Dimitar Petrovski Date: Wed, 14 Sep 2011 16:10:56 +0200 Subject: fix compile --- Makefile | 7 +++++-- dish.c | 4 ++-- dish.h | 60 ++++++++++++++++++++++++++++++------------------------------ eepg.c | 6 +++--- 4 files changed, 40 insertions(+), 37 deletions(-) diff --git a/Makefile b/Makefile index 4d28ef7..19c0684 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### The object files (add further files here): -OBJS = $(PLUGIN).o +OBJS = $(PLUGIN).o dish.o ifdef DBG CXXFLAGS += -g @@ -78,7 +78,10 @@ I18Npot = $(PODIR)/$(PLUGIN).pot I18Nmsgs = $(addprefix $(LOCALEDIR)/,$(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo,$(notdir $(foreach file, $(wildcard $(PODIR)/*.po), $(basename $(file)))))) LOCALEDIR = $(VDRDIR)/locale -# Dependencies: +### Default Target +default: $(OBJS) + +### Dependencies: MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies diff --git a/dish.c b/dish.c index f20faf1..44a7081 100644 --- a/dish.c +++ b/dish.c @@ -12,6 +12,7 @@ #include "dish.h" #include +#include #include #include @@ -58,8 +59,7 @@ namespace SI const char* theme; using namespace DISH_THEMES; - eDishThemes t; - switch (t) { + switch (contentNibleLvl2) { case Movie: theme = "Movie"; break; diff --git a/dish.h b/dish.h index 80d2c6a..fb1689c 100644 --- a/dish.h +++ b/dish.h @@ -13,36 +13,6 @@ namespace SI { -#define SIZE_TABLE_128 128 -#define SIZE_TABLE_255 255 - -class UnimplementedDescriptor; - -class DishDescriptor { -public: - DishDescriptor(UnimplementedDescriptor*); - virtual ~DishDescriptor(); - const char* getText(void) const { return text; } - - const char* getShortText(void) const { return shortText; } - const char* getTheme(int contentNibleLvl2); - const char* getCategory(int userNible); - // Decompress the byte arrary and stores the result to a text string - void Decompress(unsigned char Tid); -protected: - const char* text; // name or description of the event - const char* shortText; // usually the episode name - unsigned char* decompressed; - UnimplementedDescriptor* unimplementedDesc; - - struct HuffmanTable { - unsigned int startingAddress; - unsigned char character; - unsigned char numberOfBits; - }; - static HuffmanTable Table128[SIZE_TABLE_128]; - static HuffmanTable Table255[SIZE_TABLE_255]; - namespace DISH_THEMES { enum eDishThemes { Movie = 0x01, @@ -266,6 +236,36 @@ protected: DishNetwork = 0xff }; }; +#define SIZE_TABLE_128 128 +#define SIZE_TABLE_255 255 + +class UnimplementedDescriptor; + +class DishDescriptor { +public: + DishDescriptor(UnimplementedDescriptor*); + virtual ~DishDescriptor(); + const char* getText(void) const { return text; } + + const char* getShortText(void) const { return shortText; } + const char* getTheme(int contentNibleLvl2); + const char* getCategory(int userNible); + // Decompress the byte arrary and stores the result to a text string + void Decompress(unsigned char Tid); +protected: + const char* text; // name or description of the event + const char* shortText; // usually the episode name + unsigned char* decompressed; + UnimplementedDescriptor* unimplementedDesc; + + struct HuffmanTable { + unsigned int startingAddress; + unsigned char character; + unsigned char numberOfBits; + }; + static HuffmanTable Table128[SIZE_TABLE_128]; + static HuffmanTable Table255[SIZE_TABLE_255]; + }; } /* namespace SI */ diff --git a/eepg.c b/eepg.c index 0183e12..b9258c8 100644 --- a/eepg.c +++ b/eepg.c @@ -367,7 +367,7 @@ void cFilterEEPG::SetStatus (bool On) if (!On) { FreeSummaries (); FreeTitles (); - Format = 0; + //Format = 0; ChannelsOk = false; NumberOfTables = 0; } else { @@ -3259,7 +3259,7 @@ cEIT2::cEIT2 (cSchedules * Schedules, int Source, u_char Tid, const u_char * Dat , DishExtendedEventDescriptor->getTheme(DishTheme) , DishExtendedEventDescriptor->getCategory(DishCategory)); pEvent->SetShortText(tmp); - free tmp; + free(tmp); } else pEvent->SetShortText(DishExtendedEventDescriptor->getShortText()); //LogD(2, prep("DishDescription: %s"), DishExtendedEventDescriptor->getText()); @@ -3416,7 +3416,7 @@ void cFilterEEPG::ProcessNextFormat (bool FirstTime = false) for (int i = 0; i <= HIGHEST_FORMAT; i++){ //find first format that is detected if (UnprocessedFormat[i]) { isyslog ("EEPG: %s Extended EPG detected on pid %x.", FormatName[i], UnprocessedFormat[i]); - Format = i; + Format = (EFormat)i; // highest format is processed first this way // make sure that CONT protocols like Premiere, Freesat are processed // AFTER ONCE protocols like MHW, SKY and NAGRA -- cgit v1.2.3