From d1e3f613ce43e5b355807398369393fb8e35e63e Mon Sep 17 00:00:00 2001 From: horchi Date: Mon, 21 Feb 2022 15:00:59 +0100 Subject: compiler porting --- HISTORY | 1 + locks.c | 2 +- locks.h | 21 ++++++++++----------- menu.h | 16 ++++++++-------- pin.h | 2 +- setupmenu.h | 6 +++--- talk.h | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/HISTORY b/HISTORY index 738292d..591cabb 100644 --- a/HISTORY +++ b/HISTORY @@ -5,6 +5,7 @@ * build version date comment * + * #43 0.1.18 21.02.21, change: compiler porting * #42 0.1.17 05.05.20, change: fixed compile (patch by Alexander Grothe) * #41 0.1.16 01.11.15, added: fixed backward compatibility * #40 0.1.15 09.10.15, added: ported to vdr 2.3.1 diff --git a/locks.c b/locks.c index 2aa7d12..01c43c8 100644 --- a/locks.c +++ b/locks.c @@ -233,7 +233,7 @@ bool cLockItem::MatchPattern(const char* aName) else if (searchMode == smExact) return strcmp(pattern, aName) == 0; else if (searchMode == smInclude) - return strstr(aName, pattern) > 0; + return strstr(aName, pattern) != nullptr; else if (searchMode == smStartWith) return strstr(aName, pattern) == aName; diff --git a/locks.h b/locks.h index f64ccbb..21d81af 100644 --- a/locks.h +++ b/locks.h @@ -24,7 +24,7 @@ //*************************************************************************** class cLockItem : public cListObject -{ +{ public: enum SearchMode @@ -38,11 +38,11 @@ class cLockItem : public cListObject smCount }; - + cLockItem(int aActive = no); cLockItem(const char* aName, int aActive = yes, const char* aTitle = 0); virtual ~cLockItem(); - + // interface virtual bool Parse(char* line); @@ -53,7 +53,7 @@ class cLockItem : public cListObject virtual int Locked(long startTime = 0); bool MatchPattern(const char* aName); bool HasName(const char* aName); - + // gettings int GetActive() { return active; } @@ -83,7 +83,7 @@ class cLockItem : public cListObject static const char* searchModes[smCount+1]; protected: - + char* name; char* title; long start; // in seconds @@ -99,7 +99,7 @@ class cLockItem : public cListObject //*************************************************************************** class cLockedBroadcast : public cLockItem -{ +{ public: cLockedBroadcast(); @@ -136,18 +136,18 @@ template class cLockList : public cConfig if (!aName) return 0; - + for (item = (T*)this->First(); item; item = (T*)this->Next(item)) { if (item->HasName(aName)) return item; } - + return 0; } protected: - + int listType; }; @@ -173,10 +173,9 @@ class cLockedBroadcasts : public cLockList public: cLockedBroadcasts(int aType = na) : cLockList::cLockList(aType) {} - + virtual int Locked(const char* aName, long startTime = 0); }; //*************************************************************************** #endif // VDR_PIN_LOCKS_H - diff --git a/menu.h b/menu.h index 186cd3a..c6df1dc 100644 --- a/menu.h +++ b/menu.h @@ -24,7 +24,7 @@ class cPinMenuItem : public cOsdItem { public: - + cPinMenuItem(const char* title, int osState); }; @@ -48,12 +48,12 @@ class cPinMenu : public cOsdMenu, public PinService miEditMenuItemList, miProtectSetup }; - - cPinMenu(const char* title, cLockItems* theChannels, + + cPinMenu(const char* title, cLockItems* theChannels, cLockedBroadcasts* theBroadcasts, cLockItems* thePlugins, cLockItems* theMenuItems); virtual ~cPinMenu(); - + virtual eOSState ProcessKey(eKeys key); int addCurrentChannel(); @@ -74,9 +74,9 @@ class cPinMenu : public cOsdMenu, public PinService class cLockMenuItem : public cOsdItem { - + public: - + cLockMenuItem(cLockItem* aItem); virtual ~cLockMenuItem(); @@ -96,10 +96,10 @@ class cLockMenuItem : public cOsdItem class cLockMenu : public cOsdMenu, public PinService { public: - + cLockMenu(const char* title, cLockItems* theItems, ListType theType); virtual ~cLockMenu(); - + eOSState ProcessKey(eKeys key); protected: diff --git a/pin.h b/pin.h index d0da785..5627a65 100644 --- a/pin.h +++ b/pin.h @@ -25,7 +25,7 @@ // Constants //*************************************************************************** -static const char *VERSION = "0.1.17"; +static const char *VERSION = "0.1.18"; static const char *DESCRIPTION = "Childlock plugin"; static const char *MAINMENUENTRY = tr("Childlock"); diff --git a/setupmenu.h b/setupmenu.h index 7b70944..7f70a50 100644 --- a/setupmenu.h +++ b/setupmenu.h @@ -17,12 +17,12 @@ class PinSetupMenu : public cMenuSetupPage { public: - + PinSetupMenu(); ~PinSetupMenu(); - + protected: - + void Store(void); // data diff --git a/talk.h b/talk.h index 94cb1db..a07926c 100644 --- a/talk.h +++ b/talk.h @@ -51,7 +51,7 @@ class Talk evtAnswer, // = 5 evtExit // = 6 }; - + struct Header { long sender; @@ -74,11 +74,11 @@ class Talk int isOpen() { return opened; } long getTimeout() { return timeout; } - int getEvent() { return event; } - long getFrom() { return from; } + int getEvent() { return event; } + long getFrom() { return from; } const char* getMessage() { return message; } - void setTimeout(long t) { timeout = t; } + void setTimeout(long t) { timeout = t; } protected: -- cgit v1.2.3