Revision: 7781
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7781&view=rev
Author:   thjc
Date:     2009-06-04 14:21:36 +0000 (Thu, 04 Jun 2009)

Log Message:
-----------
updated playerwkb with pauls latest changes

Modified Paths:
--------------
    code/player/trunk/CMakeLists.txt
    code/player/trunk/libplayerwkb/playerwkb.c
    code/player/trunk/libplayerwkb/playerwkb.h

Modified: code/player/trunk/CMakeLists.txt
===================================================================
--- code/player/trunk/CMakeLists.txt    2009-06-04 06:24:20 UTC (rev 7780)
+++ code/player/trunk/CMakeLists.txt    2009-06-04 14:21:36 UTC (rev 7781)
@@ -60,7 +60,7 @@
 ADD_SUBDIRECTORY (libplayercore)
 ADD_SUBDIRECTORY (libplayerxdr)
 ADD_SUBDIRECTORY (config)           # Example config files
-#ADD_SUBDIRECTORY (libplayerwkb)
+ADD_SUBDIRECTORY (libplayerwkb)
 ADD_SUBDIRECTORY (libplayerjpeg)
 ADD_SUBDIRECTORY (libplayertcp)
 ADD_SUBDIRECTORY (libplayersd)

Modified: code/player/trunk/libplayerwkb/playerwkb.c
===================================================================
--- code/player/trunk/libplayerwkb/playerwkb.c  2009-06-04 06:24:20 UTC (rev 
7780)
+++ code/player/trunk/libplayerwkb/playerwkb.c  2009-06-04 14:21:36 UTC (rev 
7781)
@@ -1,14 +1,23 @@
-#include "playerwkb.h"
 #include <playerconfig.h> /* this also includes <stdint.h> if needed for types 
like uint8_t */
 #include <libplayercore/error.h>
 #include <stddef.h>
 
+#include "playerwkb.h"
+
 #ifdef HAVE_GEOS
 
 #ifndef GEOS_VERSION_MAJOR
 #include <geos_c.h>
 #endif
 
+#if (GEOS_VERSION_MAJOR < 3 || GEOS_VERSION_MINOR < 1)
+#undef HAVE_GEOS
+#endif
+
+#endif
+
+#ifdef HAVE_GEOS
+
 #include <stdio.h>
 #include <stdarg.h>
 
@@ -209,7 +218,7 @@
     ((uint8_t *)(dst))[2] = wkb[(4 - 1) - 2]; \
     ((uint8_t *)(dst))[3] = wkb[(4 - 1) - 3]; \
   } \
-  wkb += 4; \
+  wkb += 4; wkb_count -= 4; \
 } while (0)
 
 #define DBL_FROM_WKB(dst) do \
@@ -226,18 +235,16 @@
     ((uint8_t *)(dst))[6] = wkb[(8 - 1) - 6]; \
     ((uint8_t *)(dst))[7] = wkb[(8 - 1) - 7]; \
   } \
-  wkb += 8; \
+  wkb += 8; wkb_count -= 4; \
 } while (0)
 
-  wkbprocessor = wkbprocessor;
-  wkb_count = wkb_count;
   if (!wkb)
   {
     PLAYER_ERROR("NULL wkb");
     return NULL;
   }
   if (player_wkb_endians_detect(&endians)) return NULL;
-  wkb_endians = (enum player_wkb_endians)(wkb[0]); wkb++;
+  wkb_endians = (enum player_wkb_endians)(wkb[0]); wkb++; wkb_count--;
   if ((wkb_endians != player_wkb_big) && (wkb_endians != player_wkb_little))
   {
     PLAYER_ERROR1("invalid wkb: unknown endians, %d", wkb_endians);
@@ -303,7 +310,7 @@
     UINT_FROM_WKB(&numrings);
     for (i = 0; i < (signed)(numrings); i++)
     {
-      wkb = player_wkb_process_wkb(wkb, callback, ptr);
+      wkb = player_wkb_process_wkb(wkbprocessor, wkb, wkb_count, callback, 
ptr);
       if (!wkb) return NULL;
     }
     break;

Modified: code/player/trunk/libplayerwkb/playerwkb.h
===================================================================
--- code/player/trunk/libplayerwkb/playerwkb.h  2009-06-04 06:24:20 UTC (rev 
7780)
+++ code/player/trunk/libplayerwkb/playerwkb.h  2009-06-04 14:21:36 UTC (rev 
7781)
@@ -9,8 +9,12 @@
 #include <geos_c.h>
 #endif
 
+#if (GEOS_VERSION_MAJOR < 3 || GEOS_VERSION_MINOR < 1)
+#undef HAVE_GEOS
 #endif
 
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to