]> git.vomp.tv Git - vompclient.git/commitdiff
Portability
authorChris Tallon <chris@vomp.tv>
Sat, 25 Mar 2006 18:57:36 +0000 (18:57 +0000)
committerChris Tallon <chris@vomp.tv>
Sat, 25 Mar 2006 18:57:36 +0000 (18:57 +0000)
command.cc
defines.h
voptions.cc
voptions.h
vvideolive.cc

index 286e1bd63896bb0b43633f609aa0d85f11f285cb..3f55d2aa5237b927cf4e305a9094bc1d3407f443 100644 (file)
@@ -456,27 +456,27 @@ void Command::doJustConnected(VConnect* vconnect)
 
     if (config)
     {
-      if (!strcasecmp(config, "On"))
+      if (!STRCASECMP(config, "On"))
       {
         logger->log("Command", Log::INFO, "Config says Power After Boot = On");
       }
-      else if (!strcasecmp(config, "Off"))
+      else if (!STRCASECMP(config, "Off"))
       {
         logger->log("Command", Log::INFO, "Config says Power After Boot = Off");
         doStandby();
         delete[] config;
         return; // quit here
       }
-      else if (!strcasecmp(config, "Last state"))
+      else if (!STRCASECMP(config, "Last state"))
       {
         char* lastPowerState = vdr->configLoad("General", "Last Power State");
         if (lastPowerState)
         {
-          if (!strcasecmp(lastPowerState, "On"))
+          if (!STRCASECMP(lastPowerState, "On"))
           {
             logger->log("Command", Log::INFO, "Config says Last Power State = On");
           }
-          else if (!strcasecmp(lastPowerState, "Off"))
+          else if (!STRCASECMP(lastPowerState, "Off"))
           {
             logger->log("Command", Log::INFO, "Config says Last Power State = Off");
             doStandby();
@@ -512,7 +512,7 @@ void Command::doJustConnected(VConnect* vconnect)
 
   if (config)
   {
-    if (!strcasecmp(config, "S-Video"))
+    if (!STRCASECMP(config, "S-Video"))
     {
       logger->log("Command", Log::INFO, "Switching to S-Video as Connection=%s", config);
       video->setConnection(Video::SVIDEO);
@@ -535,7 +535,7 @@ void Command::doJustConnected(VConnect* vconnect)
 
   if (config)
   {
-    if (!strcasecmp(config, "New"))
+    if (!STRCASECMP(config, "New"))
     {
       logger->log("Command", Log::INFO, "Switching to New remote type");
       remote->setRemoteType(Remote::NEWREMOTE);
@@ -558,7 +558,7 @@ void Command::doJustConnected(VConnect* vconnect)
   config = vdr->configLoad("TV", "Aspect");
   if (config)
   {
-    if (!strcasecmp(config, "16:9"))
+    if (!STRCASECMP(config, "16:9"))
     {
       logger->log("Command", Log::INFO, "/// Switching to TV aspect 16:9");
       video->setTVsize(Video::ASPECT16X9);
@@ -579,7 +579,7 @@ void Command::doJustConnected(VConnect* vconnect)
   config = vdr->configLoad("TV", "Widemode");
   if (config)
   {
-    if (!strcasecmp(config, "Letterbox"))
+    if (!STRCASECMP(config, "Letterbox"))
     {
       logger->log("Command", Log::INFO, "Setting letterbox mode");
       video->setMode(Video::LETTERBOX);
index dcc5a89998809040ed465adf64cd40032c62e271..bb4ebeb0a390ac66a430439a80270cb0a2a86f99 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -36,9 +36,11 @@ ULLONG ntohll(ULLONG a);
 #ifdef WIN32
 #define SNPRINTF _snprintf
 #define VSNPRINTF _vsnprintf
+#define STRCASECMP stricmp
 #else
 #define SNPRINTF snprintf
 #define VSNPRINTF vsnprintf
+#define STRCASECMP strcasecmp
 #endif
 
 #endif
index 47c9fd791d059d034e0928d540b45419455dba0c..2157ddfea488a7564877f6b557ff10c329d4117b 100644 (file)
@@ -81,7 +81,7 @@ VOptions::VOptions(View* tparent, const char* title, const OPTIONDATA* toptionDa
       {
         for (j = 0; j < optionData[i].optionCount; j++)
         {
-          if (!strcasecmp(config, optionData[i].options[j]))
+          if (!STRCASECMP(config, optionData[i].options[j]))
           {
             optionBoxes[i].setSelected(tr((char*)optionData[i].options[j]));
           }
index d30dbade8c45384c1cd37fbdc915260072fcfc14..c7b959c961d5c3085894a9d5be6d0b38703c3ee7 100644 (file)
@@ -22,6 +22,7 @@
 #define VOPTIONS_H
 
 #include <map>
+#include "defines.h"
 #include "view.h"
 #include "viewman.h"
 #include "vdr.h"
index 95b03a34c5ca9762849c22be03c2439d96580c81..f854de43c091d9d7e1e1564b3eb2507da3398ff6 100644 (file)
@@ -137,7 +137,16 @@ int VVideoLive::handleCommand(int command)
       return 2;
     }
 
-    case Remote::ZERO ... Remote::NINE:
+    case Remote::ZERO:
+    case Remote::ONE:
+    case Remote::TWO:
+    case Remote::THREE:
+    case Remote::FOUR:
+    case Remote::FIVE:
+    case Remote::SIX:
+    case Remote::SEVEN:
+    case Remote::EIGHT:
+    case Remote::NINE:
     {
       VChannelSelect* v = new VChannelSelect(this, command);
       v->draw();