]> git.vomp.tv Git - vompclient.git/commitdiff
Some changes for windows comptibility
authorMarten Richter <marten.richter@freenet.de>
Sun, 19 Oct 2014 20:30:05 +0000 (22:30 +0200)
committerMarten Richter <marten.richter@freenet.de>
Sun, 19 Oct 2014 20:30:05 +0000 (22:30 +0200)
defines.h
osdopenvg.cc
osdopenvg.h
osdvector.h
surfacevector.cc
wselectlist.cc

index 3d975e57d6934ebc209e5b1464a3d3586b05103a..960a5e9a383232e0edfb4ed19a5fe818d9ffb53e 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -51,6 +51,8 @@ long long getTimeMS();
   #define STRCASESTR StrStrI
 /*  #define STRTOULL _strtoui64 */
   #define STRTOUL strtoul
+  #define STRTOKR strtok_l
+
   #define CLOSESOCKET closesocket
   #define DEFAULT_TCP_WINDOWSIZE 2048
   #define DEFAULT_TCP_WINDOWSIZENR 2  /*=2048*/
@@ -82,6 +84,7 @@ long long getTimeMS();
   #define STRCASECMP strcasecmp
   #define STRCASESTR strcasestr
   #define STRTOUL strtoul
+  #define STRTOKR strtok_r
   #define CLOSESOCKET close
 
 // add here defines for plattform specific objects
index 77f0b425271fc5f2c6f76ae59123b06f605fee36..45cab2153874922b26a2aef84224cc63a7294a9d 100644 (file)
@@ -386,14 +386,14 @@ void OsdOpenVG::initPaths()
 
        vguLine(current,0.f,0.f,1.f,0.f);
        // HorzLine
-       std_paths[HorzLine]=current;
+       std_paths[PIHorzLine]=current;
 
        current=vgCreatePath(VG_PATH_FORMAT_STANDARD,
                                VG_PATH_DATATYPE_F,1.f,0.f,
                                0,0,VG_PATH_CAPABILITY_ALL);
        vguLine(current,0.f,0.f,0.f,1.f);
        // VertLine
-       std_paths[VertLine]=current;
+       std_paths[PIVertLine]=current;
 
        current=vgCreatePath(VG_PATH_FORMAT_STANDARD,
                                VG_PATH_DATATYPE_F,1.f,0.f,
@@ -401,23 +401,23 @@ void OsdOpenVG::initPaths()
        //vguRect(current,0.f,0.f,1.f,1.f);
        vguRect(current,0.f,0.f,1.f,1.f);
        // Rectabgle
-       std_paths[Rectangle]=current;
+       std_paths[PIRectangle]=current;
 
        current=vgCreatePath(VG_PATH_FORMAT_STANDARD,
                                VG_PATH_DATATYPE_F,1.f,0.f,
                                0,0,0);
        vguEllipse(current,0.f,0.f,1.f,1.f);
        // Point
-       std_paths[Point]=current;
+       std_paths[PIPoint]=current;
 
 }
 
 void OsdOpenVG::destroyPaths()
 {
-       vgDestroyPath(std_paths[HorzLine]);
-       vgDestroyPath(std_paths[VertLine]);
-       vgDestroyPath(std_paths[Rectangle]);
-       vgDestroyPath(std_paths[Point]);
+       vgDestroyPath(std_paths[PIHorzLine]);
+       vgDestroyPath(std_paths[PIVertLine]);
+       vgDestroyPath(std_paths[PIRectangle]);
+       vgDestroyPath(std_paths[PIPoint]);
 
 }
 
index c3f4dfa3ae503c8869e390a89918d33585d552f7..e0a07bd0566e5816c67f2b031ba21e2289a4ad30 100644 (file)
@@ -123,7 +123,7 @@ protected:
 
        void initPaths();
        void destroyPaths();
-       VGPath std_paths[Point+1];
+       VGPath std_paths[PIPoint+1];
        long long  lastrendertime;
        void InternalRendering();
        void getScreenSize(int &width, int &height);
index 4e27ab4dd5073102f3ca25f2c0c84aae22bf123b..0daae43da6a9697413685cfd3685cad74978cde4 100644 (file)
@@ -43,10 +43,10 @@ enum SVGCommandInstr {
        DrawImageLoading
 };
 enum PathIndex {
-       HorzLine,
-       VertLine,
-       Rectangle,
-       Point
+       PIHorzLine,
+       PIVertLine,
+       PIRectangle,
+       PIPoint
 };
 
 enum Corner{
index eb612cb647f9c81814dad0243641adf54350feba..af23530dff9f9769351bff031534123879489c7f 100644 (file)
@@ -231,7 +231,7 @@ int SurfaceVector::fillblt(int x, int y, int width, int height, const DrawStyle&
        command_mutex.Lock();
        removeCommands(x,y,width,height); // remove commands below the box
        unsigned int ref=osd->getStyleRef(c);
-       commands.push_back(SVGCommand::PaintPath(x,y,width,height,Rectangle,ref));
+       commands.push_back(SVGCommand::PaintPath(x,y,width,height,PIRectangle,ref));
        command_mutex.Unlock();
        return 1;
 
@@ -240,14 +240,14 @@ void SurfaceVector::drawHorzLine(int x1, int x2, int y, const DrawStyle& c)
 {
        command_mutex.Lock();
        unsigned int ref=osd->getStyleRef(c);
-       commands.push_back(SVGCommand::PaintPath(x1,y,x2-x1,1,HorzLine,ref));
+       commands.push_back(SVGCommand::PaintPath(x1,y,x2-x1,1,PIHorzLine,ref));
        command_mutex.Unlock();
 }
 
 void SurfaceVector::drawVertLine(int x, int y1, int y2, const DrawStyle& c){
        command_mutex.Lock();
        unsigned int ref=osd->getStyleRef(c);
-       commands.push_back(SVGCommand::PaintPath(x,y1,1,y2-y1,VertLine,ref));
+       commands.push_back(SVGCommand::PaintPath(x,y1,1,y2-y1,PIVertLine,ref));
        command_mutex.Unlock();
 }
 
@@ -286,7 +286,7 @@ void SurfaceVector::drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegio
 void SurfaceVector::drawPoint(int x, int y, DrawStyle& c, bool fastdraw){
        if (!fastdraw) command_mutex.Lock();
        unsigned int ref=osd->getStyleRef(c);
-       commands.push_back(SVGCommand::PaintPath(x,y,1,1,Point,ref));
+       commands.push_back(SVGCommand::PaintPath(x,y,1,1,PIPoint,ref));
        if (!fastdraw)  command_mutex.Unlock();
 }
 void SurfaceVector::drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, DrawStyle& nextColour)
index 7a08144023ad3979f92c1de3d658a6a986a35391..35dce918f356be17cfe7d6c59ccab12fc62c1c4d 100644 (file)
@@ -182,12 +182,12 @@ void WSelectList::drawOptionLine(char* text, int xpos, int ypos, int width, cons
     char* pointer;
     char* savepointer;
 
-    pointer = strtok_r(buffer, "\t\n", &savepointer);
+    pointer = STRTOKR(buffer, "\t\n", &savepointer);
     while(pointer)
     {
       drawText(pointer, xposmod + columns[currentColumn], ypos_mod + curline * fontHeight, width - columns[currentColumn], colour);
 
-      pointer = strtok_r(NULL, "\t\n", &savepointer);
+      pointer = STRTOKR(NULL, "\t\n", &savepointer);
       if (pointer) {
          char delimiter = text[pointer - buffer-1];
          if (delimiter == '\t') currentColumn++;