[mapserver] 01/08: Imported Upstream version 7.0.0
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Fri Jul 24 11:14:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch experimental
in repository mapserver.
commit 26441092e14b79d5088465d0a28df373b196ab05
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Jul 24 11:25:36 2015 +0200
Imported Upstream version 7.0.0
---
.gitmodules | 3 -
.travis.yml | 2 +-
CMakeLists.txt | 8 +-
HISTORY.TXT | 12 +-
Makefile | 4 +-
fontcache.c | 4 +-
install-msautotest.sh | 14 +
mapcairo.c | 3 +-
mapcluster.c | 2 +-
mapcontext.c | 7 +-
mapdebug.c | 4 +-
mapdraw.c | 1 +
maperror.c | 16 +-
maperror.h | 4 +-
mapfile.c | 17 +-
mapgdal.c | 2 +-
mapgeos.c | 4 +-
mapgml.c | 1 +
mapio.c | 10 +-
mapkmlrenderer.cpp | 4 +-
maplexer.c | 782 ++++++++++++++++----------------
maplexer.l | 2 +
mapmssql2008.c | 45 +-
mapobject.c | 1 +
mapogcfilter.c | 3 +-
mapogcfiltercommon.c | 1 +
mapogcsld.c | 5 +-
mapogcsos.c | 1 +
mapogr.cpp | 1 +
mapogroutput.c | 5 +
maporaclespatial.c | 10 +-
mapoutput.c | 1 +
mapows.c | 1 +
mapows.h | 13 +-
mapparser.c | 192 ++++----
mapparser.h | 4 +-
mappool.c | 2 +-
mappostgis.c | 4 +-
mapquery.c | 6 +-
maprendering.c | 3 +-
mapscript/php/color.c | 98 +++-
mapscript/php/image.c | 15 +-
mapscript/php/label.c | 2 -
mapscript/php/line.c | 4 -
mapscript/php/mapscript_i.c | 22 +-
mapscript/php/owsrequest.c | 7 +-
mapscript/php/php_mapscript.c | 4 +-
mapscript/php/php_mapscript.h | 1 +
mapscript/php/php_mapscript_util.c | 4 +
mapscript/php/result.c | 4 -
mapscript/php/shapefile.c | 4 -
mapscript/swiginc/color.i | 38 +-
mapscript/swiginc/layer.i | 5 +
mapscript/swiginc/mapzoom.i | 3 -
mapscript/swiginc/rect.i | 5 +-
mapscript/swiginc/symbol.i | 18 +-
mapserv.c | 6 +-
mapserver.h | 10 +-
mapservutil.c | 1 +
mapshape.c | 1 +
mapsymbol.c | 1 +
maptemplate.c | 21 +-
mapthread.c | 8 +-
mapthread.h | 2 +-
maputil.c | 6 +-
mapwcs.c | 1 +
mapwcs11.c | 1 +
mapwcs20.c | 1 +
mapwfs.c | 41 +-
mapwms.c | 11 +-
mapwmslayer.c | 1 +
renderers/agg/src/agg_font_freetype.cpp | 6 +-
scripts/vagrant/mapserver.sh | 2 +-
shp2img.c | 14 +-
74 files changed, 884 insertions(+), 688 deletions(-)
diff --git a/.gitmodules b/.gitmodules
index 7d633d3..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +0,0 @@
-[submodule "msautotest"]
- path = msautotest
- url = git://github.com/mapserver/msautotest.git
diff --git a/.travis.yml b/.travis.yml
index 784d3ba..9a2e3ed 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,13 +51,13 @@ before_install:
- make -j3
- sudo make install && sudo ldconfig
- cd ../..
- - git submodule update --init --recursive
- sudo mv /etc/apt/sources.list.d/pgdg-source.list* /tmp
- sudo apt-get remove postgis libpq5 libpq-dev postgresql-9.1-postgis postgresql-9.2-postgis postgresql-9.3-postgis postgresql-9.1 postgresql-9.2 postgresql-9.3 libgdal1
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
- sudo apt-get update
- sudo apt-get install bison flex python-lxml libfribidi-dev swig cmake librsvg2-dev colordiff postgis postgresql-9.1 postgresql-9.1-postgis-2.1 postgresql-9.1-postgis-2.1-scripts libpq-dev libpng12-dev libjpeg-dev libgif-dev libgeos-dev libgd2-xpm-dev libfreetype6-dev libfcgi-dev libcurl4-gnutls-dev libcairo2-dev libgdal1-dev libproj-dev libxml2-dev python-dev php5-dev libexempi-dev lcov lftp
- sudo pip install git+git://github.com/tbonfort/cpp-coveralls.git@extensions
+ - ./install-msautotest.sh
- cd msautotest
- ./create_postgis_test_data.sh
- python -m SimpleHTTPServer &> /dev/null &
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a6ca68..ff893a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 7)
set (MapServer_VERSION_MINOR 0)
set (MapServer_VERSION_REVISION 0)
-set (MapServer_VERSION_SUFFIX "-beta2")
+set (MapServer_VERSION_SUFFIX "")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
set(TARGET_VERSION_MINOR ${MapServer_VERSION_MINOR})
@@ -102,7 +102,7 @@ option(WITH_PROJ "Choose if reprojection support should be built in" ON)
option(WITH_KML "Enable native KML output support (requires libxml2 support)" OFF)
option(WITH_SOS "Enable SOS Server support (requires PROJ and libxml2 support)" OFF)
option(WITH_WMS "Enable WMS Server support (requires proj support)" ON)
-option(WITH_FRIBIDI "Choose if FriBidi glyph shaping support should be built in (usefull for left-to-right languages) (requires HARFBUZZ)" ON)
+option(WITH_FRIBIDI "Choose if FriBidi glyph shaping support should be built in (usefull for right-to-left languages) (requires HARFBUZZ)" ON)
option(WITH_HARFBUZZ "Choose if Harfbuzz complex text layout should be included (needed for e.g. arabic and hindi) (requires FRIBIDI)" ON)
option(WITH_ICONV "Choose if Iconv Internationalization support should be built in" ON)
option(WITH_CAIRO "Choose if CAIRO rendering support should be built in (required for SVG and PDF output)" ON)
@@ -250,7 +250,7 @@ if(BUILD_DYNAMIC)
add_library(mapserver SHARED ${mapserver_SOURCES} ${agg_SOURCES} ${v8_SOURCES})
set_target_properties( mapserver PROPERTIES
VERSION ${MapServer_VERSION_STRING}
- SOVERSION 1
+ SOVERSION 2
)
endif(BUILD_DYNAMIC)
@@ -258,7 +258,7 @@ if(BUILD_STATIC)
add_library(mapserver_static STATIC ${mapserver_SOURCES} ${agg_SOURCES} ${v8_SOURCES})
set_target_properties( mapserver_static PROPERTIES
VERSION ${MapServer_VERSION_STRING}
- SOVERSION 1
+ SOVERSION 2
)
endif(BUILD_STATIC)
diff --git a/HISTORY.TXT b/HISTORY.TXT
index 915929c..7ddb075 100644
--- a/HISTORY.TXT
+++ b/HISTORY.TXT
@@ -10,7 +10,17 @@ the top of the list.)
For a complete change history, please see the Git log comments.
-7.0.0-beta1 release (2014/02/12)
+7.0.0 release (2015/07/24)
+--------------------------
+
+- No major changes, see detailed changelog for bug fixes
+
+7.0.0-beta2 release (2015/06/29)
+--------------------------------
+
+- No major changes, see detailed changelog for bug fixes
+
+7.0.0-beta1 release (2015/02/12)
--------------------------------
- RFC91 Layer Filter Normalization
diff --git a/Makefile b/Makefile
index a772039..59c04ff 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ lexer: maplexer.c
parser: mapparser.c
maplexer.c: maplexer.l
- $(FLEX) --nounistd -Pmsyy -i -o$(CURDIR)/maplexer.c $(CURDIR)/maplexer.l
+ $(FLEX) --nounistd -Pmsyy -i -o$(CURDIR)/maplexer.c maplexer.l
mapparser.c: mapparser.y
- $(YACC) -d -o$(CURDIR)/mapparser.c $(CURDIR)/mapparser.y
+ $(YACC) -d -o$(CURDIR)/mapparser.c mapparser.y
diff --git a/fontcache.c b/fontcache.c
index e43eafe..a6eace5 100644
--- a/fontcache.c
+++ b/fontcache.c
@@ -41,7 +41,7 @@ typedef struct {
#ifdef USE_THREAD
typedef struct ft_thread_cache ft_thread_cache;
struct ft_thread_cache{
- int thread_id;
+ void* thread_id;
ft_thread_cache *next;
ft_cache cache;
};
@@ -102,7 +102,7 @@ ft_cache* msGetFontCache() {
#ifndef USE_THREAD
return &global_ft_cache;
#else
- int nThreadId = msGetThreadId();
+ void* nThreadId = msGetThreadId();
ft_thread_cache *prev = NULL, *cur = ft_caches;
if( cur != NULL && cur->thread_id == nThreadId )
diff --git a/install-msautotest.sh b/install-msautotest.sh
new file mode 100755
index 0000000..2ccd0f8
--- /dev/null
+++ b/install-msautotest.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+msa_commit=`git log -n1 | grep "msautotest=" | sed 's/msautotest=//'`
+branch=branch-7-0
+repo=git://github.com/mapserver/msautotest.git
+if [ -n "$msa_commit" ]; then
+ repo=`echo "$msa_commit" | grep -o '^[^@]*'`
+ branch=`echo "$msa_commit" | grep -o '[^@]*$'`
+fi
+echo "git clone $repo msautotest"
+git clone $repo msautotest
+cd msautotest
+echo "git checkout $branch"
+git checkout $branch
diff --git a/mapcairo.c b/mapcairo.c
index 9f61db2..9da189b 100644
--- a/mapcairo.c
+++ b/mapcairo.c
@@ -1084,7 +1084,8 @@ int msRenderRasterizedSVGSymbol(imageObj *img, double x, double y, symbolObj *sy
pixsymbol.pixmap_buffer = svg_cache->pixmap_buffer;
pixsymbol.type = MS_SYMBOL_PIXMAP;
- MS_IMAGE_RENDERER(img)->renderPixmapSymbol(img,x,y,&pixsymbol,&pixstyle);
+ if(MS_SUCCESS != MS_IMAGE_RENDERER(img)->renderPixmapSymbol(img,x,y,&pixsymbol,&pixstyle))
+ return MS_FAILURE;
MS_IMAGE_RENDERER(img)->freeSymbol(&pixsymbol);
return MS_SUCCESS;
#else
diff --git a/mapcluster.c b/mapcluster.c
index ce6d5ce..9abb4bd 100644
--- a/mapcluster.c
+++ b/mapcluster.c
@@ -803,7 +803,7 @@ int selectClusterShape(layerObj* layer, long shapeindex)
}
/* update the parameters from the related shapes */
-#ifndef NDEBUG
+#ifdef ms_notused
static void UpdateClusterParameters(msClusterLayerInfo* layerinfo, clusterTreeNode *node, clusterInfo *shape)
{
int i;
diff --git a/mapcontext.c b/mapcontext.c
index 1b71216..9e8d0e3 100644
--- a/mapcontext.c
+++ b/mapcontext.c
@@ -27,7 +27,7 @@
****************************************************************************/
#include "mapserver.h"
-
+#include "mapows.h"
#if defined(USE_WMS_LYR) && defined(USE_OGR)
@@ -661,6 +661,7 @@ int msLoadMapContextGeneral(mapObj *map, CPLXMLNode *psGeneral,
char *pszProj=NULL;
char *pszValue, *pszValue1, *pszValue2;
+ int nTmp;
/* Projection */
pszValue = (char*)CPLGetXMLValue(psGeneral,
@@ -678,12 +679,14 @@ int msLoadMapContextGeneral(mapObj *map, CPLXMLNode *psGeneral,
map->projection.numargs++;
msProcessProjection(&map->projection);
- if( (map->units = GetMapserverUnitUsingProj(&(map->projection))) == -1) {
+ if( (nTmp = GetMapserverUnitUsingProj(&(map->projection))) == -1) {
free(pszProj);
msSetError( MS_MAPCONTEXTERR,
"Unable to set units for projection '%s'",
"msLoadMapContext()", pszProj );
return MS_FAILURE;
+ } else {
+ map->units = nTmp;
}
free(pszProj);
} else {
diff --git a/mapdebug.c b/mapdebug.c
index ccac623..2043a99 100644
--- a/mapdebug.c
+++ b/mapdebug.c
@@ -68,7 +68,7 @@ static debugInfoObj *debuginfo_list = NULL;
debugInfoObj *msGetDebugInfoObj()
{
debugInfoObj *link;
- int thread_id;
+ void* thread_id;
debugInfoObj *ret_obj;
msAcquireLock( TLOCK_DEBUGOBJ );
@@ -285,7 +285,7 @@ void msDebugCleanup()
#ifdef USE_THREAD
{
- int thread_id = msGetThreadId();
+ void* thread_id = msGetThreadId();
debugInfoObj *link;
msAcquireLock( TLOCK_DEBUGOBJ );
diff --git a/mapdraw.c b/mapdraw.c
index 1221b90..1a7a73a 100644
--- a/mapdraw.c
+++ b/mapdraw.c
@@ -33,6 +33,7 @@
#include "maptime.h"
#include "mapcopy.h"
#include "mapfile.h"
+#include "mapows.h"
/* msPrepareImage()
diff --git a/maperror.c b/maperror.c
index 333b5f5..3c8f352 100644
--- a/maperror.c
+++ b/maperror.c
@@ -90,7 +90,7 @@ static char *ms_errorCodes[MS_NUMERRORCODES] = {"",
errorObj *msGetErrorObj()
{
- static errorObj ms_error = {MS_NOERR, "", "", MS_FALSE, NULL};
+ static errorObj ms_error = {MS_NOERR, "", "", MS_FALSE, 0, NULL};
return &ms_error;
}
@@ -100,7 +100,7 @@ errorObj *msGetErrorObj()
typedef struct te_info {
struct te_info *next;
- int thread_id;
+ void* thread_id;
errorObj ms_error;
} te_info_t;
@@ -109,7 +109,7 @@ static te_info_t *error_list = NULL;
errorObj *msGetErrorObj()
{
te_info_t *link;
- int thread_id;
+ void* thread_id;
errorObj *ret_obj;
msAcquireLock( TLOCK_ERROROBJ );
@@ -240,7 +240,7 @@ void msResetErrorList()
/* -------------------------------------------------------------------- */
#ifdef USE_THREAD
{
- int thread_id = msGetThreadId();
+ void* thread_id = msGetThreadId();
te_info_t *link;
msAcquireLock( TLOCK_ERROROBJ );
@@ -392,7 +392,6 @@ void msWriteErrorXML(FILE *stream)
void msWriteErrorImage(mapObj *map, char *filename, int blank)
{
imageObj *img;
- rendererVTableObj *renderer;
int width=400, height=300;
int nMargin =5;
int nTextLength = 0;
@@ -442,8 +441,6 @@ void msWriteErrorImage(mapObj *map, char *filename, int blank)
}
img = msImageCreate(width,height,format,imagepath,imageurl,MS_DEFAULT_RESOLUTION,MS_DEFAULT_RESOLUTION,imagecolorptr);
- renderer = MS_IMAGE_RENDERER(img);
-
nTextLength = strlen(errormsg);
nWidthTxt = nTextLength * charWidth;
@@ -491,8 +488,9 @@ void msWriteErrorImage(mapObj *map, char *filename, int blank)
initTextSymbol(&ts);
msPopulateTextSymbolForLabelAndString(&ts,&label,papszLines[i],1,1,0);
if(LIKELY(MS_SUCCESS == msComputeTextPath(map,&ts))) {
- int idontcare;
- idontcare = msDrawTextSymbol(NULL,img,pnt,&ts);
+ if(MS_SUCCESS!=msDrawTextSymbol(NULL,img,pnt,&ts)) {
+ /* an error occured, but there's nothing much we can do about it here as we are already handling an error condition */
+ }
freeTextSymbol(&ts);
}
}
diff --git a/maperror.h b/maperror.h
index f92f38d..9921776 100644
--- a/maperror.h
+++ b/maperror.h
@@ -30,6 +30,8 @@
#ifndef MAPERROR_H
#define MAPERROR_H
+#include "mapthread.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -162,7 +164,7 @@ extern "C" {
char *errorfile;
FILE *fp;
/* The following 2 members are used only with USE_THREAD (but we won't #ifndef them) */
- int thread_id;
+ void* thread_id;
struct debug_info_obj *next;
} debugInfoObj;
diff --git a/mapfile.c b/mapfile.c
index eb01324..e83bfe4 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -722,6 +722,7 @@ void freeJoin(joinObj *join)
int loadJoin(joinObj *join)
{
+ int nTmp;
initJoin(join);
for(;;) {
@@ -730,7 +731,8 @@ int loadJoin(joinObj *join)
if(getString(&join->connection) == MS_FAILURE) return(-1);
break;
case(CONNECTIONTYPE):
- if((join->connectiontype = getSymbol(5, MS_DB_XBASE, MS_DB_MYSQL, MS_DB_ORACLE, MS_DB_POSTGRES, MS_DB_CSV)) == -1) return(-1);
+ if((nTmp = getSymbol(5, MS_DB_XBASE, MS_DB_MYSQL, MS_DB_ORACLE, MS_DB_POSTGRES, MS_DB_CSV)) == -1) return(-1);
+ join->connectiontype = nTmp;
break;
case(EOF):
msSetError(MS_EOFERR, NULL, "loadJoin()");
@@ -769,7 +771,8 @@ int loadJoin(joinObj *join)
if(getString(&join->to) == MS_FAILURE) return(-1);
break;
case(TYPE):
- if((join->type = getSymbol(2, MS_JOIN_ONE_TO_ONE, MS_JOIN_ONE_TO_MANY)) == -1) return(-1);
+ if((nTmp = getSymbol(2, MS_JOIN_ONE_TO_ONE, MS_JOIN_ONE_TO_MANY)) == -1) return(-1);
+ join->type = nTmp;
break;
default:
msSetError(MS_IDENTERR, "Parsing error near (%s):(line %d)", "loadJoin()", msyystring_buffer, msyylineno);
@@ -4259,7 +4262,8 @@ int loadLayer(layerObj *layer, mapObj *map)
}
break;
case(CONNECTIONTYPE):
- if((layer->connectiontype = getSymbol(11, MS_OGR, MS_POSTGIS, MS_WMS, MS_ORACLESPATIAL, MS_WFS, MS_GRATICULE, MS_PLUGIN, MS_UNION, MS_UVRASTER, MS_CONTOUR, MS_KERNELDENSITY)) == -1) return(-1);
+ if((type = getSymbol(11, MS_OGR, MS_POSTGIS, MS_WMS, MS_ORACLESPATIAL, MS_WFS, MS_GRATICULE, MS_PLUGIN, MS_UNION, MS_UVRASTER, MS_CONTOUR, MS_KERNELDENSITY)) == -1) return(-1);
+ layer->connectiontype = type;
break;
case(DATA):
if(getString(&layer->data) == MS_FAILURE) return(-1); /* getString() cleans up previously allocated string */
@@ -4627,12 +4631,13 @@ int loadLayer(layerObj *layer, mapObj *map)
if((layer->transform = getSymbol(11, MS_TRUE,MS_FALSE, MS_UL,MS_UC,MS_UR,MS_CL,MS_CC,MS_CR,MS_LL,MS_LC,MS_LR)) == -1) return(-1);
break;
case(TYPE):
- if((layer->type = getSymbol(9, MS_LAYER_POINT,MS_LAYER_LINE,MS_LAYER_RASTER,MS_LAYER_POLYGON,MS_LAYER_ANNOTATION,MS_LAYER_QUERY,MS_LAYER_CIRCLE,MS_LAYER_CHART,TILEINDEX)) == -1) return(-1);
- if(layer->type == TILEINDEX) layer->type = MS_LAYER_TILEINDEX; /* TILEINDEX is also a parameter */
- if(layer->type == MS_LAYER_ANNOTATION) {
+ if((type = getSymbol(9, MS_LAYER_POINT,MS_LAYER_LINE,MS_LAYER_RASTER,MS_LAYER_POLYGON,MS_LAYER_ANNOTATION,MS_LAYER_QUERY,MS_LAYER_CIRCLE,MS_LAYER_CHART,TILEINDEX)) == -1) return(-1);
+ if(type == TILEINDEX) type = MS_LAYER_TILEINDEX; /* TILEINDEX is also a parameter */
+ if(type == MS_LAYER_ANNOTATION) {
msSetError(MS_IDENTERR, "Annotation Layers have been removed. To obtain same functionality, use a layer with label->styles and no class->styles", "loadLayer()");
return -1;
}
+ layer->type = type;
break;
case(UNITS):
if((layer->units = getSymbol(9, MS_INCHES,MS_FEET,MS_MILES,MS_METERS,MS_KILOMETERS,MS_NAUTICALMILES,MS_DD,MS_PIXELS,MS_PERCENTAGES)) == -1) return(-1);
diff --git a/mapgdal.c b/mapgdal.c
index b2cf2d9..4621eb6 100644
--- a/mapgdal.c
+++ b/mapgdal.c
@@ -243,7 +243,7 @@ int msSaveImageGDAL( mapObj *map, imageObj *image, char *filename )
eDataType = GDT_Byte;
} else {
msReleaseLock( TLOCK_GDAL );
- msSetError( MS_MEMERR, "Unkown format. This is a bug.", "msSaveImageGDAL()");
+ msSetError( MS_MEMERR, "Unknown format. This is a bug.", "msSaveImageGDAL()");
return MS_FAILURE;
}
diff --git a/mapgeos.c b/mapgeos.c
index b8f25f0..5858d6e 100644
--- a/mapgeos.c
+++ b/mapgeos.c
@@ -68,7 +68,7 @@ static inline GEOSContextHandle_t msGetGeosContextHandle()
#include "mapthread.h"
typedef struct geos_thread_info {
struct geos_thread_info *next;
- int thread_id;
+ void* thread_id;
GEOSContextHandle_t geos_handle;
} geos_thread_info_t;
@@ -78,7 +78,7 @@ static GEOSContextHandle_t msGetGeosContextHandle()
{
geos_thread_info_t *link;
GEOSContextHandle_t ret_obj;
- int thread_id;
+ void* thread_id;
msAcquireLock( TLOCK_GEOS );
diff --git a/mapgml.c b/mapgml.c
index 3e07119..52a6587 100644
--- a/mapgml.c
+++ b/mapgml.c
@@ -29,6 +29,7 @@
#include "mapserver.h"
#include "maperror.h"
+#include "mapows.h"
#include "mapgml.h"
#include "maptime.h"
diff --git a/mapio.c b/mapio.c
index 9e016fe..7077e8d 100644
--- a/mapio.c
+++ b/mapio.c
@@ -53,7 +53,7 @@ typedef struct msIOContextGroup_t {
msIOContext stdout_context;
msIOContext stderr_context;
- int thread_id;
+ void* thread_id;
struct msIOContextGroup_t *next;
} msIOContextGroup;
@@ -95,7 +95,7 @@ void msIO_Cleanup()
static msIOContextGroup *msIO_GetContextGroup()
{
- int nThreadId = msGetThreadId();
+ void* nThreadId = msGetThreadId();
msIOContextGroup *prev = NULL, *group = io_context_list;
if( group != NULL && group->thread_id == nThreadId )
@@ -149,7 +149,7 @@ static msIOContextGroup *msIO_GetContextGroup()
/* returns MS_TRUE if the msIO standard output hasn't been redirected */
int msIO_isStdContext() {
msIOContextGroup *group = io_context_list;
- int nThreadId = msGetThreadId();
+ void* nThreadId = msGetThreadId();
if(!group || group->thread_id != nThreadId) {
group = msIO_GetContextGroup();
if(!group) {
@@ -170,7 +170,7 @@ int msIO_isStdContext() {
msIOContext *msIO_getHandler( FILE * fp )
{
- int nThreadId = msGetThreadId();
+ void* nThreadId = msGetThreadId();
msIOContextGroup *group = io_context_list;
msIO_Initialize();
@@ -536,8 +536,6 @@ static int msIO_stdioWrite( void *cbData, void *data, int byteCount )
static void msIO_Initialize( void )
{
- const char* pszStripHTTPHeader;
-
if( is_msIO_initialized == MS_TRUE )
return;
diff --git a/mapkmlrenderer.cpp b/mapkmlrenderer.cpp
index f65fb45..234daf2 100644
--- a/mapkmlrenderer.cpp
+++ b/mapkmlrenderer.cpp
@@ -34,6 +34,7 @@
#include "maperror.h"
#include "mapkmlrenderer.h"
#include "mapio.h"
+#include "mapows.h"
#if defined(USE_OGR)
# include "cpl_conv.h"
@@ -769,7 +770,8 @@ int KmlRenderer::createIconImage(char *fileName, symbolObj *symbol, symbolStyleO
p.z = 0.0;
#endif
- msDrawMarkerSymbol(map,tmpImg, &p, symstyle->style, 1);
+ if(msDrawMarkerSymbol(map,tmpImg, &p, symstyle->style, 1) != MS_SUCCESS)
+ return MS_FAILURE;
return msSaveImage(map, tmpImg, fileName);
}
diff --git a/maplexer.c b/maplexer.c
index 9773769..a66819c 100644
--- a/maplexer.c
+++ b/maplexer.c
@@ -1,6 +1,6 @@
-#line 2 "/vagrant/maplexer.c"
+#line 2 "/Users/tbonfort/dev/mapserver/maplexer.c"
-#line 4 "/vagrant/maplexer.c"
+#line 4 "/Users/tbonfort/dev/mapserver/maplexer.c"
#define YY_INT_ALIGNED short int
@@ -66,6 +66,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
+typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@@ -73,6 +74,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -103,8 +105,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -161,15 +161,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -181,7 +173,12 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int msyyleng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t msyyleng;
extern FILE *msyyin, *msyyout;
@@ -207,11 +204,6 @@ extern FILE *msyyin, *msyyout;
#define unput(c) yyunput( c, (yytext_ptr) )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -229,7 +221,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -299,8 +291,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when msyytext is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int msyyleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t msyyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
@@ -328,7 +320,7 @@ static void msyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
YY_BUFFER_STATE msyy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE msyy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE msyy_scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE msyy_scan_bytes (yyconst char *bytes,yy_size_t len );
void *msyyalloc (yy_size_t );
void *msyyrealloc (void *,yy_size_t );
@@ -383,7 +375,7 @@ static void yy_fatal_error (yyconst char msg[] );
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- msyyleng = (size_t) (yy_cp - yy_bp); \
+ msyyleng = (yy_size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
@@ -2161,8 +2153,8 @@ int msyy_flex_debug = 0;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *msyytext;
-#line 1 "/vagrant/maplexer.l"
-#line 2 "/vagrant/maplexer.l"
+#line 1 "maplexer.l"
+#line 2 "maplexer.l"
/*
** READ ME FIRST!
**
@@ -2200,6 +2192,8 @@ char *msyytext;
int msyylineno = 1;
#endif
+#define YY_NO_INPUT
+
int msyysource=MS_STRING_TOKENS;
double msyynumber;
int msyystate=MS_TOKENIZE_DEFAULT;
@@ -2243,7 +2237,7 @@ char path[MS_MAXPATHLEN];
-#line 2247 "/vagrant/maplexer.c"
+#line 2241 "/Users/tbonfort/dev/mapserver/maplexer.c"
#define INITIAL 0
#define URL_VARIABLE 1
@@ -2279,7 +2273,7 @@ FILE *msyyget_out (void );
void msyyset_out (FILE * out_str );
-int msyyget_leng (void );
+yy_size_t msyyget_leng (void );
char *msyyget_text (void );
@@ -2321,12 +2315,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -2334,7 +2323,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( msyytext, msyyleng, 1, msyyout )) {} } while (0)
+#define ECHO fwrite( msyytext, msyyleng, 1, msyyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -2345,7 +2334,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( msyyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2427,7 +2416,7 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 85 "/vagrant/maplexer.l"
+#line 87 "maplexer.l"
if (msyystring_buffer == NULL)
msyystring_buffer = (char*) msSmallMalloc(sizeof(char) * msyystring_buffer_size);
@@ -2501,7 +2490,7 @@ YY_DECL
break;
}
-#line 2505 "/vagrant/maplexer.c"
+#line 2494 "/Users/tbonfort/dev/mapserver/maplexer.c"
if ( !(yy_init) )
{
@@ -2586,1592 +2575,1592 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 158 "/vagrant/maplexer.l"
+#line 160 "maplexer.l"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 160 "/vagrant/maplexer.l"
+#line 162 "maplexer.l"
{ if (msyyreturncomments) return(MS_COMMENT); }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 162 "/vagrant/maplexer.l"
+#line 164 "maplexer.l"
;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 164 "/vagrant/maplexer.l"
+#line 166 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_LOGICAL_OR); }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 165 "/vagrant/maplexer.l"
+#line 167 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_LOGICAL_AND); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 166 "/vagrant/maplexer.l"
+#line 168 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_LOGICAL_NOT); }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 167 "/vagrant/maplexer.l"
+#line 169 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_EQ); }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 168 "/vagrant/maplexer.l"
+#line 170 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_NE); }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 169 "/vagrant/maplexer.l"
+#line 171 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_GT); }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 170 "/vagrant/maplexer.l"
+#line 172 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_LT); }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 171 "/vagrant/maplexer.l"
+#line 173 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_GE); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 172 "/vagrant/maplexer.l"
+#line 174 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_LE); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 173 "/vagrant/maplexer.l"
+#line 175 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_RE); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 175 "/vagrant/maplexer.l"
+#line 177 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_IEQ); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 176 "/vagrant/maplexer.l"
+#line 178 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_IRE); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 178 "/vagrant/maplexer.l"
+#line 180 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IN); }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 180 "/vagrant/maplexer.l"
+#line 182 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_AREA); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 181 "/vagrant/maplexer.l"
+#line 183 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_LENGTH); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 182 "/vagrant/maplexer.l"
+#line 184 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_TOSTRING); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 183 "/vagrant/maplexer.l"
+#line 185 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_COMMIFY); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 184 "/vagrant/maplexer.l"
+#line 186 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_ROUND); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 185 "/vagrant/maplexer.l"
+#line 187 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_UPPER); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 186 "/vagrant/maplexer.l"
+#line 188 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_LOWER); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 187 "/vagrant/maplexer.l"
+#line 189 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_INITCAP); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 188 "/vagrant/maplexer.l"
+#line 190 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_FIRSTCAP); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 190 "/vagrant/maplexer.l"
+#line 192 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_BUFFER); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 191 "/vagrant/maplexer.l"
+#line 193 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_DIFFERENCE); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 192 "/vagrant/maplexer.l"
+#line 194 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_SIMPLIFY); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 193 "/vagrant/maplexer.l"
+#line 195 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_SIMPLIFYPT); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 194 "/vagrant/maplexer.l"
+#line 196 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_GENERALIZE); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 195 "/vagrant/maplexer.l"
+#line 197 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_SMOOTHSIA); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 196 "/vagrant/maplexer.l"
+#line 198 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_JAVASCRIPT); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 198 "/vagrant/maplexer.l"
+#line 200 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_INTERSECTS); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 199 "/vagrant/maplexer.l"
+#line 201 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_DISJOINT); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 200 "/vagrant/maplexer.l"
+#line 202 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_TOUCHES); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 201 "/vagrant/maplexer.l"
+#line 203 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_OVERLAPS); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 202 "/vagrant/maplexer.l"
+#line 204 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_CROSSES); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 203 "/vagrant/maplexer.l"
+#line 205 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_WITHIN); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 204 "/vagrant/maplexer.l"
+#line 206 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_CONTAINS); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 205 "/vagrant/maplexer.l"
+#line 207 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_EQUALS); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 206 "/vagrant/maplexer.l"
+#line 208 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_BEYOND); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 207 "/vagrant/maplexer.l"
+#line 209 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_COMPARISON_DWITHIN); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 209 "/vagrant/maplexer.l"
+#line 211 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TOKEN_FUNCTION_FROMTEXT); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 211 "/vagrant/maplexer.l"
+#line 213 "maplexer.l"
{ msyynumber=MS_TRUE; return(MS_TOKEN_LITERAL_BOOLEAN); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 212 "/vagrant/maplexer.l"
+#line 214 "maplexer.l"
{ msyynumber=MS_FALSE; return(MS_TOKEN_LITERAL_BOOLEAN); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 214 "/vagrant/maplexer.l"
+#line 216 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(COLORRANGE); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 215 "/vagrant/maplexer.l"
+#line 217 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DATARANGE); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 216 "/vagrant/maplexer.l"
+#line 218 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(RANGEITEM); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 218 "/vagrant/maplexer.l"
+#line 220 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ALIGN); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 219 "/vagrant/maplexer.l"
+#line 221 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ANCHORPOINT); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 220 "/vagrant/maplexer.l"
+#line 222 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ANGLE); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 221 "/vagrant/maplexer.l"
+#line 223 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ANTIALIAS); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 222 "/vagrant/maplexer.l"
+#line 224 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(BACKGROUNDCOLOR); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 223 "/vagrant/maplexer.l"
+#line 225 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(BANDSITEM); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 224 "/vagrant/maplexer.l"
+#line 226 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(BINDVALS); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 225 "/vagrant/maplexer.l"
+#line 227 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(BROWSEFORMAT); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 226 "/vagrant/maplexer.l"
+#line 228 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(BUFFER); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 227 "/vagrant/maplexer.l"
+#line 229 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CHARACTER); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 228 "/vagrant/maplexer.l"
+#line 230 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CLASS); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 229 "/vagrant/maplexer.l"
+#line 231 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CLASSITEM); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 230 "/vagrant/maplexer.l"
+#line 232 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CLASSGROUP); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 231 "/vagrant/maplexer.l"
+#line 233 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CLUSTER); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 232 "/vagrant/maplexer.l"
+#line 234 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(COLOR); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 233 "/vagrant/maplexer.l"
+#line 235 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(COMPFILTER); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 234 "/vagrant/maplexer.l"
+#line 236 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(COMPOSITE); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 235 "/vagrant/maplexer.l"
+#line 237 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(COMPOP); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 236 "/vagrant/maplexer.l"
+#line 238 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CONFIG); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 237 "/vagrant/maplexer.l"
+#line 239 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CONNECTION); }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 238 "/vagrant/maplexer.l"
+#line 240 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(CONNECTIONTYPE); }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 239 "/vagrant/maplexer.l"
+#line 241 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DATA); }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 240 "/vagrant/maplexer.l"
+#line 242 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DATAPATTERN); }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 241 "/vagrant/maplexer.l"
+#line 243 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DEBUG); }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 242 "/vagrant/maplexer.l"
+#line 244 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DRIVER); }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 243 "/vagrant/maplexer.l"
+#line 245 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DUMP); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 244 "/vagrant/maplexer.l"
+#line 246 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(EMPTY); }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 245 "/vagrant/maplexer.l"
+#line 247 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ENCODING); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 246 "/vagrant/maplexer.l"
+#line 248 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(END); }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 247 "/vagrant/maplexer.l"
+#line 249 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ERROR); }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 248 "/vagrant/maplexer.l"
+#line 250 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(EXPRESSION); }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 249 "/vagrant/maplexer.l"
+#line 251 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(EXTENT); }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 250 "/vagrant/maplexer.l"
+#line 252 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(EXTENSION); }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 251 "/vagrant/maplexer.l"
+#line 253 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FEATURE); }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 252 "/vagrant/maplexer.l"
+#line 254 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FILLED); }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 253 "/vagrant/maplexer.l"
+#line 255 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FILTER); }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 254 "/vagrant/maplexer.l"
+#line 256 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FILTERITEM); }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 255 "/vagrant/maplexer.l"
+#line 257 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FOOTER); }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 256 "/vagrant/maplexer.l"
+#line 258 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FONT); }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 257 "/vagrant/maplexer.l"
+#line 259 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FONTSET); }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 258 "/vagrant/maplexer.l"
+#line 260 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FORCE); }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 259 "/vagrant/maplexer.l"
+#line 261 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FORMATOPTION); }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 260 "/vagrant/maplexer.l"
+#line 262 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(FROM); }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 261 "/vagrant/maplexer.l"
+#line 263 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(GAP); }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 262 "/vagrant/maplexer.l"
+#line 264 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(GEOMTRANSFORM); }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 263 "/vagrant/maplexer.l"
+#line 265 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(GRID); }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 264 "/vagrant/maplexer.l"
+#line 266 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(GRIDSTEP); }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 265 "/vagrant/maplexer.l"
+#line 267 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(GRATICULE); }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 266 "/vagrant/maplexer.l"
+#line 268 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(GROUP); }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 267 "/vagrant/maplexer.l"
+#line 269 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(HEADER); }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 268 "/vagrant/maplexer.l"
+#line 270 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGE); }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 269 "/vagrant/maplexer.l"
+#line 271 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGECOLOR); }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 270 "/vagrant/maplexer.l"
+#line 272 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGETYPE); }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 271 "/vagrant/maplexer.l"
+#line 273 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGEQUALITY); }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 272 "/vagrant/maplexer.l"
+#line 274 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGEMODE); }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 273 "/vagrant/maplexer.l"
+#line 275 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGEPATH); }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 274 "/vagrant/maplexer.l"
+#line 276 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TEMPPATH); }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 275 "/vagrant/maplexer.l"
+#line 277 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(IMAGEURL); }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 276 "/vagrant/maplexer.l"
+#line 278 "maplexer.l"
{ BEGIN(INCLUDE); }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 277 "/vagrant/maplexer.l"
+#line 279 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(INDEX); }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 278 "/vagrant/maplexer.l"
+#line 280 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(INITIALGAP); }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 279 "/vagrant/maplexer.l"
+#line 281 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(INTERLACE); }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 280 "/vagrant/maplexer.l"
+#line 282 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(INTERVALS); }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 281 "/vagrant/maplexer.l"
+#line 283 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(JOIN); }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 282 "/vagrant/maplexer.l"
+#line 284 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(KEYIMAGE); }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 283 "/vagrant/maplexer.l"
+#line 285 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(KEYSIZE); }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 284 "/vagrant/maplexer.l"
+#line 286 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(KEYSPACING); }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 285 "/vagrant/maplexer.l"
+#line 287 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABEL); }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 286 "/vagrant/maplexer.l"
+#line 288 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELCACHE); }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 287 "/vagrant/maplexer.l"
+#line 289 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELFORMAT); }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 288 "/vagrant/maplexer.l"
+#line 290 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELITEM); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 289 "/vagrant/maplexer.l"
+#line 291 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELMAXSCALE); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 290 "/vagrant/maplexer.l"
+#line 292 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELMAXSCALEDENOM); }
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 291 "/vagrant/maplexer.l"
+#line 293 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELMINSCALE); }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 292 "/vagrant/maplexer.l"
+#line 294 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELMINSCALEDENOM); }
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 293 "/vagrant/maplexer.l"
+#line 295 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LABELREQUIRES); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 294 "/vagrant/maplexer.l"
+#line 296 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LATLON); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 295 "/vagrant/maplexer.l"
+#line 297 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LAYER); }
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 296 "/vagrant/maplexer.l"
+#line 298 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LEADER); }
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 297 "/vagrant/maplexer.l"
+#line 299 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LEGEND); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 298 "/vagrant/maplexer.l"
+#line 300 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LEGENDFORMAT); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 299 "/vagrant/maplexer.l"
+#line 301 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LINECAP); }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 300 "/vagrant/maplexer.l"
+#line 302 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LINEJOIN); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 301 "/vagrant/maplexer.l"
+#line 303 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LINEJOINMAXSIZE); }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 302 "/vagrant/maplexer.l"
+#line 304 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(LOG); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 303 "/vagrant/maplexer.l"
+#line 305 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAP); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 304 "/vagrant/maplexer.l"
+#line 306 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MARKER); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 305 "/vagrant/maplexer.l"
+#line 307 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MARKERSIZE); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 306 "/vagrant/maplexer.l"
+#line 308 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MASK); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 307 "/vagrant/maplexer.l"
+#line 309 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXARCS); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 308 "/vagrant/maplexer.l"
+#line 310 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXBOXSIZE); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 309 "/vagrant/maplexer.l"
+#line 311 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXDISTANCE); }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 310 "/vagrant/maplexer.l"
+#line 312 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXFEATURES); }
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 311 "/vagrant/maplexer.l"
+#line 313 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXINTERVAL); }
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 312 "/vagrant/maplexer.l"
+#line 314 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXSCALE); }
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 313 "/vagrant/maplexer.l"
+#line 315 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXSCALEDENOM); }
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 314 "/vagrant/maplexer.l"
+#line 316 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXGEOWIDTH); }
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 315 "/vagrant/maplexer.l"
+#line 317 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXLENGTH); }
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 316 "/vagrant/maplexer.l"
+#line 318 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXSIZE); }
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 317 "/vagrant/maplexer.l"
+#line 319 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXSUBDIVIDE); }
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 318 "/vagrant/maplexer.l"
+#line 320 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXTEMPLATE); }
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 319 "/vagrant/maplexer.l"
+#line 321 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXWIDTH); }
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 320 "/vagrant/maplexer.l"
+#line 322 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(METADATA); }
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 321 "/vagrant/maplexer.l"
+#line 323 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MIMETYPE); }
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 322 "/vagrant/maplexer.l"
+#line 324 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINARCS); }
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 323 "/vagrant/maplexer.l"
+#line 325 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINBOXSIZE); }
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 324 "/vagrant/maplexer.l"
+#line 326 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINDISTANCE); }
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 325 "/vagrant/maplexer.l"
+#line 327 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(REPEATDISTANCE); }
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 326 "/vagrant/maplexer.l"
+#line 328 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MAXOVERLAPANGLE); }
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 327 "/vagrant/maplexer.l"
+#line 329 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINFEATURESIZE); }
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 328 "/vagrant/maplexer.l"
+#line 330 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MININTERVAL); }
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 329 "/vagrant/maplexer.l"
+#line 331 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINSCALE); }
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 330 "/vagrant/maplexer.l"
+#line 332 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINSCALEDENOM); }
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 331 "/vagrant/maplexer.l"
+#line 333 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINGEOWIDTH); }
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 332 "/vagrant/maplexer.l"
+#line 334 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINLENGTH); }
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 333 "/vagrant/maplexer.l"
+#line 335 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINSIZE); }
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 334 "/vagrant/maplexer.l"
+#line 336 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINSUBDIVIDE); }
YY_BREAK
case 166:
YY_RULE_SETUP
-#line 335 "/vagrant/maplexer.l"
+#line 337 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINTEMPLATE); }
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 336 "/vagrant/maplexer.l"
+#line 338 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MINWIDTH); }
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 337 "/vagrant/maplexer.l"
+#line 339 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(NAME); }
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 338 "/vagrant/maplexer.l"
+#line 340 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OFFSET); }
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 339 "/vagrant/maplexer.l"
+#line 341 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OFFSITE); }
YY_BREAK
case 171:
YY_RULE_SETUP
-#line 340 "/vagrant/maplexer.l"
+#line 342 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OPACITY); }
YY_BREAK
case 172:
YY_RULE_SETUP
-#line 341 "/vagrant/maplexer.l"
+#line 343 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OUTLINECOLOR); }
YY_BREAK
case 173:
YY_RULE_SETUP
-#line 342 "/vagrant/maplexer.l"
+#line 344 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OUTLINEWIDTH); }
YY_BREAK
case 174:
YY_RULE_SETUP
-#line 343 "/vagrant/maplexer.l"
+#line 345 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OUTPUTFORMAT); }
YY_BREAK
case 175:
YY_RULE_SETUP
-#line 344 "/vagrant/maplexer.l"
+#line 346 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYBACKGROUNDCOLOR); }
YY_BREAK
case 176:
YY_RULE_SETUP
-#line 345 "/vagrant/maplexer.l"
+#line 347 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYCOLOR); }
YY_BREAK
case 177:
YY_RULE_SETUP
-#line 346 "/vagrant/maplexer.l"
+#line 348 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYMAXSIZE); }
YY_BREAK
case 178:
YY_RULE_SETUP
-#line 347 "/vagrant/maplexer.l"
+#line 349 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYMINSIZE); }
YY_BREAK
case 179:
YY_RULE_SETUP
-#line 348 "/vagrant/maplexer.l"
+#line 350 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYOUTLINECOLOR); }
YY_BREAK
case 180:
YY_RULE_SETUP
-#line 349 "/vagrant/maplexer.l"
+#line 351 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYSIZE); }
YY_BREAK
case 181:
YY_RULE_SETUP
-#line 350 "/vagrant/maplexer.l"
+#line 352 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(OVERLAYSYMBOL); }
YY_BREAK
case 182:
YY_RULE_SETUP
-#line 351 "/vagrant/maplexer.l"
+#line 353 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(PARTIALS); }
YY_BREAK
case 183:
YY_RULE_SETUP
-#line 352 "/vagrant/maplexer.l"
+#line 354 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(PATTERN); }
YY_BREAK
case 184:
YY_RULE_SETUP
-#line 353 "/vagrant/maplexer.l"
+#line 355 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(POINTS); }
YY_BREAK
case 185:
YY_RULE_SETUP
-#line 354 "/vagrant/maplexer.l"
+#line 356 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(ITEMS); }
YY_BREAK
case 186:
YY_RULE_SETUP
-#line 355 "/vagrant/maplexer.l"
+#line 357 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(POSITION); }
YY_BREAK
case 187:
YY_RULE_SETUP
-#line 356 "/vagrant/maplexer.l"
+#line 358 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(POSTLABELCACHE); }
YY_BREAK
case 188:
YY_RULE_SETUP
-#line 357 "/vagrant/maplexer.l"
+#line 359 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(PRIORITY); }
YY_BREAK
case 189:
YY_RULE_SETUP
-#line 358 "/vagrant/maplexer.l"
+#line 360 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(PROCESSING); }
YY_BREAK
case 190:
YY_RULE_SETUP
-#line 359 "/vagrant/maplexer.l"
+#line 361 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(PROJECTION); }
YY_BREAK
case 191:
YY_RULE_SETUP
-#line 360 "/vagrant/maplexer.l"
+#line 362 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(QUERYFORMAT); }
YY_BREAK
case 192:
YY_RULE_SETUP
-#line 361 "/vagrant/maplexer.l"
+#line 363 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(QUERYMAP); }
YY_BREAK
case 193:
YY_RULE_SETUP
-#line 362 "/vagrant/maplexer.l"
+#line 364 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(REFERENCE); }
YY_BREAK
case 194:
YY_RULE_SETUP
-#line 363 "/vagrant/maplexer.l"
+#line 365 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(REGION); }
YY_BREAK
case 195:
YY_RULE_SETUP
-#line 364 "/vagrant/maplexer.l"
+#line 366 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(RELATIVETO); }
YY_BREAK
case 196:
YY_RULE_SETUP
-#line 365 "/vagrant/maplexer.l"
+#line 367 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(REQUIRES); }
YY_BREAK
case 197:
YY_RULE_SETUP
-#line 366 "/vagrant/maplexer.l"
+#line 368 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(RESOLUTION); }
YY_BREAK
case 198:
YY_RULE_SETUP
-#line 367 "/vagrant/maplexer.l"
+#line 369 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(DEFRESOLUTION); }
YY_BREAK
case 199:
YY_RULE_SETUP
-#line 368 "/vagrant/maplexer.l"
+#line 370 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SCALE); }
YY_BREAK
case 200:
YY_RULE_SETUP
-#line 369 "/vagrant/maplexer.l"
+#line 371 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SCALEDENOM); }
YY_BREAK
case 201:
YY_RULE_SETUP
-#line 370 "/vagrant/maplexer.l"
+#line 372 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SCALEBAR); }
YY_BREAK
case 202:
YY_RULE_SETUP
-#line 371 "/vagrant/maplexer.l"
+#line 373 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SCALETOKEN); }
YY_BREAK
case 203:
YY_RULE_SETUP
-#line 372 "/vagrant/maplexer.l"
+#line 374 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SHADOWCOLOR); }
YY_BREAK
case 204:
YY_RULE_SETUP
-#line 373 "/vagrant/maplexer.l"
+#line 375 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SHADOWSIZE); }
YY_BREAK
case 205:
YY_RULE_SETUP
-#line 374 "/vagrant/maplexer.l"
+#line 376 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SHAPEPATH); }
YY_BREAK
case 206:
YY_RULE_SETUP
-#line 375 "/vagrant/maplexer.l"
+#line 377 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SIZE); }
YY_BREAK
case 207:
YY_RULE_SETUP
-#line 376 "/vagrant/maplexer.l"
+#line 378 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SIZEUNITS); }
YY_BREAK
case 208:
YY_RULE_SETUP
-#line 377 "/vagrant/maplexer.l"
+#line 379 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(STATUS); }
YY_BREAK
case 209:
YY_RULE_SETUP
-#line 378 "/vagrant/maplexer.l"
+#line 380 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(STYLE); }
YY_BREAK
case 210:
YY_RULE_SETUP
-#line 379 "/vagrant/maplexer.l"
+#line 381 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(STYLEITEM); }
YY_BREAK
case 211:
YY_RULE_SETUP
-#line 380 "/vagrant/maplexer.l"
+#line 382 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SYMBOL); }
YY_BREAK
case 212:
YY_RULE_SETUP
-#line 381 "/vagrant/maplexer.l"
+#line 383 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SYMBOLSCALE); }
YY_BREAK
case 213:
YY_RULE_SETUP
-#line 382 "/vagrant/maplexer.l"
+#line 384 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SYMBOLSCALEDENOM); }
YY_BREAK
case 214:
YY_RULE_SETUP
-#line 383 "/vagrant/maplexer.l"
+#line 385 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(SYMBOLSET); }
YY_BREAK
case 215:
YY_RULE_SETUP
-#line 384 "/vagrant/maplexer.l"
+#line 386 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TABLE); }
YY_BREAK
case 216:
YY_RULE_SETUP
-#line 385 "/vagrant/maplexer.l"
+#line 387 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TEMPLATE); }
YY_BREAK
case 217:
YY_RULE_SETUP
-#line 386 "/vagrant/maplexer.l"
+#line 388 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TEMPLATEPATTERN); }
YY_BREAK
case 218:
YY_RULE_SETUP
-#line 387 "/vagrant/maplexer.l"
+#line 389 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TEXT); }
YY_BREAK
case 219:
YY_RULE_SETUP
-#line 388 "/vagrant/maplexer.l"
+#line 390 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TILEINDEX); }
YY_BREAK
case 220:
YY_RULE_SETUP
-#line 389 "/vagrant/maplexer.l"
+#line 391 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TILEITEM); }
YY_BREAK
case 221:
YY_RULE_SETUP
-#line 390 "/vagrant/maplexer.l"
+#line 392 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TILESRS); }
YY_BREAK
case 222:
YY_RULE_SETUP
-#line 391 "/vagrant/maplexer.l"
+#line 393 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TITLE); }
YY_BREAK
case 223:
YY_RULE_SETUP
-#line 392 "/vagrant/maplexer.l"
+#line 394 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TO); }
YY_BREAK
case 224:
YY_RULE_SETUP
-#line 393 "/vagrant/maplexer.l"
+#line 395 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TOLERANCE); }
YY_BREAK
case 225:
YY_RULE_SETUP
-#line 394 "/vagrant/maplexer.l"
+#line 396 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TOLERANCEUNITS); }
YY_BREAK
case 226:
YY_RULE_SETUP
-#line 395 "/vagrant/maplexer.l"
+#line 397 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TRANSPARENCY); }
YY_BREAK
case 227:
YY_RULE_SETUP
-#line 396 "/vagrant/maplexer.l"
+#line 398 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TRANSPARENT); }
YY_BREAK
case 228:
YY_RULE_SETUP
-#line 397 "/vagrant/maplexer.l"
+#line 399 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TRANSFORM); }
YY_BREAK
case 229:
YY_RULE_SETUP
-#line 398 "/vagrant/maplexer.l"
+#line 400 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(TYPE); }
YY_BREAK
case 230:
YY_RULE_SETUP
-#line 399 "/vagrant/maplexer.l"
+#line 401 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(UNITS); }
YY_BREAK
case 231:
YY_RULE_SETUP
-#line 400 "/vagrant/maplexer.l"
+#line 402 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(UTFDATA); }
YY_BREAK
case 232:
YY_RULE_SETUP
-#line 401 "/vagrant/maplexer.l"
+#line 403 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(UTFITEM); }
YY_BREAK
case 233:
YY_RULE_SETUP
-#line 402 "/vagrant/maplexer.l"
+#line 404 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(VALIDATION); }
YY_BREAK
case 234:
YY_RULE_SETUP
-#line 403 "/vagrant/maplexer.l"
+#line 405 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(VALUES); }
YY_BREAK
case 235:
YY_RULE_SETUP
-#line 404 "/vagrant/maplexer.l"
+#line 406 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(WEB); }
YY_BREAK
case 236:
YY_RULE_SETUP
-#line 405 "/vagrant/maplexer.l"
+#line 407 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(WIDTH); }
YY_BREAK
case 237:
YY_RULE_SETUP
-#line 406 "/vagrant/maplexer.l"
+#line 408 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(WKT); }
YY_BREAK
case 238:
YY_RULE_SETUP
-#line 407 "/vagrant/maplexer.l"
+#line 409 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(WRAP); }
YY_BREAK
case 239:
YY_RULE_SETUP
-#line 409 "/vagrant/maplexer.l"
+#line 411 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_ANNOTATION); }
YY_BREAK
case 240:
YY_RULE_SETUP
-#line 410 "/vagrant/maplexer.l"
+#line 412 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_AUTO); }
YY_BREAK
case 241:
YY_RULE_SETUP
-#line 411 "/vagrant/maplexer.l"
+#line 413 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_AUTO2); }
YY_BREAK
case 242:
YY_RULE_SETUP
-#line 412 "/vagrant/maplexer.l"
+#line 414 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_BEVEL); }
YY_BREAK
case 243:
YY_RULE_SETUP
-#line 413 "/vagrant/maplexer.l"
+#line 415 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_BITMAP); }
YY_BREAK
case 244:
YY_RULE_SETUP
-#line 414 "/vagrant/maplexer.l"
+#line 416 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_BUTT); }
YY_BREAK
case 245:
YY_RULE_SETUP
-#line 415 "/vagrant/maplexer.l"
+#line 417 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CC); }
YY_BREAK
case 246:
YY_RULE_SETUP
-#line 416 "/vagrant/maplexer.l"
+#line 418 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_ALIGN_CENTER); }
YY_BREAK
case 247:
YY_RULE_SETUP
-#line 417 "/vagrant/maplexer.l"
+#line 419 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_CHART); }
YY_BREAK
case 248:
YY_RULE_SETUP
-#line 418 "/vagrant/maplexer.l"
+#line 420 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_CIRCLE); }
YY_BREAK
case 249:
YY_RULE_SETUP
-#line 419 "/vagrant/maplexer.l"
+#line 421 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CL); }
YY_BREAK
case 250:
YY_RULE_SETUP
-#line 420 "/vagrant/maplexer.l"
+#line 422 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CR); }
YY_BREAK
case 251:
YY_RULE_SETUP
-#line 421 "/vagrant/maplexer.l"
+#line 423 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_DB_CSV); }
YY_BREAK
case 252:
YY_RULE_SETUP
-#line 422 "/vagrant/maplexer.l"
+#line 424 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_DB_POSTGRES); }
YY_BREAK
case 253:
YY_RULE_SETUP
-#line 423 "/vagrant/maplexer.l"
+#line 425 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_DB_MYSQL); }
YY_BREAK
case 254:
YY_RULE_SETUP
-#line 424 "/vagrant/maplexer.l"
+#line 426 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_DEFAULT); }
YY_BREAK
case 255:
YY_RULE_SETUP
-#line 425 "/vagrant/maplexer.l"
+#line 427 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_DD); }
YY_BREAK
case 256:
YY_RULE_SETUP
-#line 426 "/vagrant/maplexer.l"
+#line 428 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SYMBOL_ELLIPSE); }
YY_BREAK
case 257:
YY_RULE_SETUP
-#line 427 "/vagrant/maplexer.l"
+#line 429 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_EMBED); }
YY_BREAK
case 258:
YY_RULE_SETUP
-#line 428 "/vagrant/maplexer.l"
+#line 430 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_FALSE); }
YY_BREAK
case 259:
YY_RULE_SETUP
-#line 429 "/vagrant/maplexer.l"
+#line 431 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_FEET); }
YY_BREAK
case 260:
YY_RULE_SETUP
-#line 430 "/vagrant/maplexer.l"
+#line 432 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_FOLLOW); }
YY_BREAK
case 261:
YY_RULE_SETUP
-#line 431 "/vagrant/maplexer.l"
+#line 433 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_GIANT); }
YY_BREAK
case 262:
YY_RULE_SETUP
-#line 432 "/vagrant/maplexer.l"
+#line 434 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SYMBOL_HATCH); }
YY_BREAK
case 263:
YY_RULE_SETUP
-#line 433 "/vagrant/maplexer.l"
+#line 435 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_KERNELDENSITY); }
YY_BREAK
case 264:
YY_RULE_SETUP
-#line 434 "/vagrant/maplexer.l"
+#line 436 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_HILITE); }
YY_BREAK
case 265:
YY_RULE_SETUP
-#line 435 "/vagrant/maplexer.l"
+#line 437 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_INCHES); }
YY_BREAK
case 266:
YY_RULE_SETUP
-#line 436 "/vagrant/maplexer.l"
+#line 438 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_KILOMETERS); }
YY_BREAK
case 267:
YY_RULE_SETUP
-#line 437 "/vagrant/maplexer.l"
+#line 439 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LARGE); }
YY_BREAK
case 268:
YY_RULE_SETUP
-#line 438 "/vagrant/maplexer.l"
+#line 440 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LC); }
YY_BREAK
case 269:
YY_RULE_SETUP
-#line 439 "/vagrant/maplexer.l"
+#line 441 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_ALIGN_LEFT); }
YY_BREAK
case 270:
YY_RULE_SETUP
-#line 440 "/vagrant/maplexer.l"
+#line 442 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_LINE); }
YY_BREAK
case 271:
YY_RULE_SETUP
-#line 441 "/vagrant/maplexer.l"
+#line 443 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LL); }
YY_BREAK
case 272:
YY_RULE_SETUP
-#line 442 "/vagrant/maplexer.l"
+#line 444 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LR); }
YY_BREAK
case 273:
YY_RULE_SETUP
-#line 443 "/vagrant/maplexer.l"
+#line 445 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_MEDIUM); }
YY_BREAK
case 274:
YY_RULE_SETUP
-#line 444 "/vagrant/maplexer.l"
+#line 446 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_METERS); }
YY_BREAK
case 275:
YY_RULE_SETUP
-#line 445 "/vagrant/maplexer.l"
+#line 447 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_NAUTICALMILES); }
YY_BREAK
case 276:
YY_RULE_SETUP
-#line 446 "/vagrant/maplexer.l"
+#line 448 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_MILES); }
YY_BREAK
case 277:
YY_RULE_SETUP
-#line 447 "/vagrant/maplexer.l"
+#line 449 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_MITER); }
YY_BREAK
case 278:
YY_RULE_SETUP
-#line 448 "/vagrant/maplexer.l"
+#line 450 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_MULTIPLE); }
YY_BREAK
case 279:
YY_RULE_SETUP
-#line 449 "/vagrant/maplexer.l"
+#line 451 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_NONE); }
YY_BREAK
case 280:
YY_RULE_SETUP
-#line 450 "/vagrant/maplexer.l"
+#line 452 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_NORMAL); }
YY_BREAK
case 281:
YY_RULE_SETUP
-#line 451 "/vagrant/maplexer.l"
+#line 453 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_OFF); }
YY_BREAK
case 282:
YY_RULE_SETUP
-#line 452 "/vagrant/maplexer.l"
+#line 454 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_OGR); }
YY_BREAK
case 283:
YY_RULE_SETUP
-#line 453 "/vagrant/maplexer.l"
+#line 455 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_ON); }
YY_BREAK
case 284:
YY_RULE_SETUP
-#line 454 "/vagrant/maplexer.l"
+#line 456 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_JOIN_ONE_TO_ONE); }
YY_BREAK
case 285:
YY_RULE_SETUP
-#line 455 "/vagrant/maplexer.l"
+#line 457 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_JOIN_ONE_TO_MANY); }
YY_BREAK
case 286:
YY_RULE_SETUP
-#line 456 "/vagrant/maplexer.l"
+#line 458 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_ORACLESPATIAL); }
YY_BREAK
case 287:
YY_RULE_SETUP
-#line 457 "/vagrant/maplexer.l"
+#line 459 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_PERCENTAGES); }
YY_BREAK
case 288:
YY_RULE_SETUP
-#line 458 "/vagrant/maplexer.l"
+#line 460 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SYMBOL_PIXMAP); }
YY_BREAK
case 289:
YY_RULE_SETUP
-#line 459 "/vagrant/maplexer.l"
+#line 461 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_PIXELS); }
YY_BREAK
case 290:
YY_RULE_SETUP
-#line 460 "/vagrant/maplexer.l"
+#line 462 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_POINT); }
YY_BREAK
case 291:
YY_RULE_SETUP
-#line 461 "/vagrant/maplexer.l"
+#line 463 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_POLYGON); }
YY_BREAK
case 292:
YY_RULE_SETUP
-#line 462 "/vagrant/maplexer.l"
+#line 464 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_POSTGIS); }
YY_BREAK
case 293:
YY_RULE_SETUP
-#line 463 "/vagrant/maplexer.l"
+#line 465 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_PLUGIN); }
YY_BREAK
case 294:
YY_RULE_SETUP
-#line 464 "/vagrant/maplexer.l"
+#line 466 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_QUERY); }
YY_BREAK
case 295:
YY_RULE_SETUP
-#line 465 "/vagrant/maplexer.l"
+#line 467 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_LAYER_RASTER); }
YY_BREAK
case 296:
YY_RULE_SETUP
-#line 466 "/vagrant/maplexer.l"
+#line 468 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_ALIGN_RIGHT); }
YY_BREAK
case 297:
YY_RULE_SETUP
-#line 467 "/vagrant/maplexer.l"
+#line 469 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_ROUND); }
YY_BREAK
case 298:
YY_RULE_SETUP
-#line 468 "/vagrant/maplexer.l"
+#line 470 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SELECTED); }
YY_BREAK
case 299:
YY_RULE_SETUP
-#line 469 "/vagrant/maplexer.l"
+#line 471 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SYMBOL_SIMPLE); }
YY_BREAK
case 300:
YY_RULE_SETUP
-#line 470 "/vagrant/maplexer.l"
+#line 472 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SINGLE); }
YY_BREAK
case 301:
YY_RULE_SETUP
-#line 471 "/vagrant/maplexer.l"
+#line 473 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SMALL); }
YY_BREAK
case 302:
YY_RULE_SETUP
-#line 472 "/vagrant/maplexer.l"
+#line 474 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_SQUARE); }
YY_BREAK
case 303:
YY_RULE_SETUP
-#line 473 "/vagrant/maplexer.l"
+#line 475 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SYMBOL_SVG); }
YY_BREAK
case 304:
YY_RULE_SETUP
-#line 474 "/vagrant/maplexer.l"
+#line 476 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(POLAROFFSET); }
YY_BREAK
case 305:
YY_RULE_SETUP
-#line 475 "/vagrant/maplexer.l"
+#line 477 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TINY); }
YY_BREAK
case 306:
YY_RULE_SETUP
-#line 476 "/vagrant/maplexer.l"
+#line 478 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CJC_TRIANGLE); }
YY_BREAK
case 307:
YY_RULE_SETUP
-#line 477 "/vagrant/maplexer.l"
+#line 479 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TRUE); }
YY_BREAK
case 308:
YY_RULE_SETUP
-#line 478 "/vagrant/maplexer.l"
+#line 480 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_TRUETYPE); }
YY_BREAK
case 309:
YY_RULE_SETUP
-#line 479 "/vagrant/maplexer.l"
+#line 481 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_UC); }
YY_BREAK
case 310:
YY_RULE_SETUP
-#line 480 "/vagrant/maplexer.l"
+#line 482 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_UL); }
YY_BREAK
case 311:
YY_RULE_SETUP
-#line 481 "/vagrant/maplexer.l"
+#line 483 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_UR); }
YY_BREAK
case 312:
YY_RULE_SETUP
-#line 482 "/vagrant/maplexer.l"
+#line 484 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_UNION); }
YY_BREAK
case 313:
YY_RULE_SETUP
-#line 483 "/vagrant/maplexer.l"
+#line 485 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_UVRASTER); }
YY_BREAK
case 314:
YY_RULE_SETUP
-#line 484 "/vagrant/maplexer.l"
+#line 486 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_CONTOUR); }
YY_BREAK
case 315:
YY_RULE_SETUP
-#line 485 "/vagrant/maplexer.l"
+#line 487 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_SYMBOL_VECTOR); }
YY_BREAK
case 316:
YY_RULE_SETUP
-#line 486 "/vagrant/maplexer.l"
+#line 488 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_WFS); }
YY_BREAK
case 317:
YY_RULE_SETUP
-#line 487 "/vagrant/maplexer.l"
+#line 489 "maplexer.l"
{ MS_LEXER_RETURN_TOKEN(MS_WMS); }
YY_BREAK
case 318:
YY_RULE_SETUP
-#line 489 "/vagrant/maplexer.l"
+#line 491 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4183,7 +4172,7 @@ YY_RULE_SETUP
YY_BREAK
case 319:
YY_RULE_SETUP
-#line 497 "/vagrant/maplexer.l"
+#line 499 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4197,7 +4186,7 @@ YY_RULE_SETUP
case 320:
/* rule 320 can match eol */
YY_RULE_SETUP
-#line 507 "/vagrant/maplexer.l"
+#line 509 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4209,7 +4198,7 @@ YY_RULE_SETUP
YY_BREAK
case 321:
YY_RULE_SETUP
-#line 516 "/vagrant/maplexer.l"
+#line 518 "maplexer.l"
{
/* attribute binding - shape (fixed value) */
return(MS_TOKEN_BINDING_SHAPE);
@@ -4217,7 +4206,7 @@ YY_RULE_SETUP
YY_BREAK
case 322:
YY_RULE_SETUP
-#line 520 "/vagrant/maplexer.l"
+#line 522 "maplexer.l"
{
/* attribute binding - map cellsize */
return(MS_TOKEN_BINDING_MAP_CELLSIZE);
@@ -4225,7 +4214,7 @@ YY_RULE_SETUP
YY_BREAK
case 323:
YY_RULE_SETUP
-#line 524 "/vagrant/maplexer.l"
+#line 526 "maplexer.l"
{
/* attribute binding - data cellsize */
return(MS_TOKEN_BINDING_DATA_CELLSIZE);
@@ -4234,7 +4223,7 @@ YY_RULE_SETUP
case 324:
/* rule 324 can match eol */
YY_RULE_SETUP
-#line 528 "/vagrant/maplexer.l"
+#line 530 "maplexer.l"
{
/* attribute binding - numeric (no quotes) */
msyytext++;
@@ -4248,7 +4237,7 @@ YY_RULE_SETUP
case 325:
/* rule 325 can match eol */
YY_RULE_SETUP
-#line 537 "/vagrant/maplexer.l"
+#line 539 "maplexer.l"
{
/* attribute binding - string (single or double quotes) */
msyytext+=2;
@@ -4262,7 +4251,7 @@ YY_RULE_SETUP
case 326:
/* rule 326 can match eol */
YY_RULE_SETUP
-#line 546 "/vagrant/maplexer.l"
+#line 548 "maplexer.l"
{
/* attribute binding - time */
msyytext+=2;
@@ -4275,7 +4264,7 @@ YY_RULE_SETUP
YY_BREAK
case 327:
YY_RULE_SETUP
-#line 556 "/vagrant/maplexer.l"
+#line 558 "maplexer.l"
{
MS_LEXER_STRING_REALLOC(msyystring_buffer, strlen(msyytext),
msyystring_buffer_size, msyystring_buffer_ptr);
@@ -4286,7 +4275,7 @@ YY_RULE_SETUP
YY_BREAK
case 328:
YY_RULE_SETUP
-#line 564 "/vagrant/maplexer.l"
+#line 566 "maplexer.l"
{
MS_LEXER_STRING_REALLOC(msyystring_buffer, strlen(msyytext),
msyystring_buffer_size, msyystring_buffer_ptr);
@@ -4298,7 +4287,7 @@ YY_RULE_SETUP
case 329:
/* rule 329 can match eol */
YY_RULE_SETUP
-#line 572 "/vagrant/maplexer.l"
+#line 574 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4311,7 +4300,7 @@ YY_RULE_SETUP
case 330:
/* rule 330 can match eol */
YY_RULE_SETUP
-#line 581 "/vagrant/maplexer.l"
+#line 583 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-2] = '\0';
@@ -4324,7 +4313,7 @@ YY_RULE_SETUP
case 331:
/* rule 331 can match eol */
YY_RULE_SETUP
-#line 590 "/vagrant/maplexer.l"
+#line 592 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4336,7 +4325,7 @@ YY_RULE_SETUP
YY_BREAK
case 332:
YY_RULE_SETUP
-#line 599 "/vagrant/maplexer.l"
+#line 601 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4348,7 +4337,7 @@ YY_RULE_SETUP
YY_BREAK
case 333:
YY_RULE_SETUP
-#line 608 "/vagrant/maplexer.l"
+#line 610 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4360,7 +4349,7 @@ YY_RULE_SETUP
YY_BREAK
case 334:
YY_RULE_SETUP
-#line 617 "/vagrant/maplexer.l"
+#line 619 "maplexer.l"
{
msyystring_return_state = MS_STRING;
msyystring_begin = msyytext[0];
@@ -4371,7 +4360,7 @@ YY_RULE_SETUP
YY_BREAK
case 335:
YY_RULE_SETUP
-#line 625 "/vagrant/maplexer.l"
+#line 627 "maplexer.l"
{
MS_LEXER_STRING_REALLOC(msyystring_buffer, msyystring_size,
msyystring_buffer_size, msyystring_buffer_ptr);
@@ -4404,7 +4393,7 @@ YY_RULE_SETUP
YY_BREAK
case 336:
YY_RULE_SETUP
-#line 655 "/vagrant/maplexer.l"
+#line 657 "maplexer.l"
{
MS_LEXER_STRING_REALLOC(msyystring_buffer, msyystring_size,
msyystring_buffer_size, msyystring_buffer_ptr);
@@ -4419,7 +4408,7 @@ YY_RULE_SETUP
case 337:
/* rule 337 can match eol */
YY_RULE_SETUP
-#line 666 "/vagrant/maplexer.l"
+#line 668 "maplexer.l"
{
char *yptr = msyytext;
while ( *yptr ) {
@@ -4433,7 +4422,7 @@ YY_RULE_SETUP
case 338:
/* rule 338 can match eol */
YY_RULE_SETUP
-#line 676 "/vagrant/maplexer.l"
+#line 678 "maplexer.l"
{
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
@@ -4462,7 +4451,7 @@ YY_RULE_SETUP
YY_BREAK
case 339:
YY_RULE_SETUP
-#line 702 "/vagrant/maplexer.l"
+#line 704 "maplexer.l"
{
msyystring_return_state = MS_TOKEN_LITERAL_STRING;
msyystring_begin = msyytext[0];
@@ -4473,7 +4462,7 @@ YY_RULE_SETUP
YY_BREAK
case 340:
YY_RULE_SETUP
-#line 710 "/vagrant/maplexer.l"
+#line 712 "maplexer.l"
{
MS_LEXER_STRING_REALLOC(msyystring_buffer, strlen(msyytext),
msyystring_buffer_size, msyystring_buffer_ptr);
@@ -4484,11 +4473,11 @@ YY_RULE_SETUP
case 341:
/* rule 341 can match eol */
YY_RULE_SETUP
-#line 717 "/vagrant/maplexer.l"
+#line 719 "maplexer.l"
{ msyylineno++; }
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 719 "/vagrant/maplexer.l"
+#line 721 "maplexer.l"
{
if( --include_stack_ptr < 0 )
return(EOF); /* end of main file */
@@ -4503,14 +4492,14 @@ case YY_STATE_EOF(INITIAL):
case 342:
/* rule 342 can match eol */
YY_RULE_SETUP
-#line 730 "/vagrant/maplexer.l"
+#line 732 "maplexer.l"
{
return(0);
}
YY_BREAK
case 343:
YY_RULE_SETUP
-#line 734 "/vagrant/maplexer.l"
+#line 736 "maplexer.l"
{
MS_LEXER_STRING_REALLOC(msyystring_buffer, strlen(msyytext),
msyystring_buffer_size, msyystring_buffer_ptr);
@@ -4520,15 +4509,15 @@ YY_RULE_SETUP
YY_BREAK
case 344:
YY_RULE_SETUP
-#line 740 "/vagrant/maplexer.l"
+#line 742 "maplexer.l"
{ return(msyytext[0]); }
YY_BREAK
case 345:
YY_RULE_SETUP
-#line 741 "/vagrant/maplexer.l"
+#line 743 "maplexer.l"
ECHO;
YY_BREAK
-#line 4532 "/vagrant/maplexer.c"
+#line 4521 "/Users/tbonfort/dev/mapserver/maplexer.c"
case YY_STATE_EOF(URL_VARIABLE):
case YY_STATE_EOF(URL_STRING):
case YY_STATE_EOF(EXPRESSION_STRING):
@@ -4718,7 +4707,7 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -4732,7 +4721,7 @@ static int yy_get_next_buffer (void)
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -4763,7 +4752,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -4873,7 +4862,7 @@ static int yy_get_next_buffer (void)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = (yy_n_chars) + 2;
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
@@ -4922,7 +4911,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -4946,7 +4935,7 @@ static int yy_get_next_buffer (void)
case EOB_ACT_END_OF_FILE:
{
if ( msyywrap( ) )
- return EOF;
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -5198,7 +5187,7 @@ void msyypop_buffer_state (void)
*/
static void msyyensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -5290,17 +5279,16 @@ YY_BUFFER_STATE msyy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to msyylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE msyy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE msyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n;
- int i;
+ yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -5382,7 +5370,7 @@ FILE *msyyget_out (void)
/** Get the length of the current token.
*
*/
-int msyyget_leng (void)
+yy_size_t msyyget_leng (void)
{
return msyyleng;
}
@@ -5530,7 +5518,7 @@ void msyyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 741 "/vagrant/maplexer.l"
+#line 743 "maplexer.l"
diff --git a/maplexer.l b/maplexer.l
index 6287453..c83801e 100644
--- a/maplexer.l
+++ b/maplexer.l
@@ -36,6 +36,8 @@
int msyylineno = 1;
#endif
+#define YY_NO_INPUT
+
int msyysource=MS_STRING_TOKENS;
double msyynumber;
int msyystate=MS_TOKENIZE_DEFAULT;
diff --git a/mapmssql2008.c b/mapmssql2008.c
index cea2026..904c3e3 100644
--- a/mapmssql2008.c
+++ b/mapmssql2008.c
@@ -2292,12 +2292,45 @@ int process_node(layerObj* layer, expressionObj *filter)
break;
case MS_TOKEN_LITERAL_TIME:
{
- char buffer[30];
- if(strftime(buffer,30,"'%Y-%m-%d %H:%M:%S'",&layerinfo->current_node->tokenval.tmval) == 0) {
- msSetError(MS_MISCERR, "Invalid time literal in expression", "msMSSQL2008LayerTranslateFilter()");
- return 0;
- }
- filter->native_string = msStringConcatenate(filter->native_string, buffer);
+ int resolution = msTimeGetResolution(layerinfo->current_node->tokensrc);
+ snippet = (char *) msSmallMalloc(128);
+ switch(resolution) {
+ case TIME_RESOLUTION_YEAR:
+ sprintf(snippet, "'%d'", (layerinfo->current_node->tokenval.tmval.tm_year+1900));
+ break;
+ case TIME_RESOLUTION_MONTH:
+ sprintf(snippet, "'%d-%02d-01'", (layerinfo->current_node->tokenval.tmval.tm_year+1900),
+ (layerinfo->current_node->tokenval.tmval.tm_mon+1));
+ break;
+ case TIME_RESOLUTION_DAY:
+ sprintf(snippet, "'%d-%02d-%02d'", (layerinfo->current_node->tokenval.tmval.tm_year+1900),
+ (layerinfo->current_node->tokenval.tmval.tm_mon+1),
+ layerinfo->current_node->tokenval.tmval.tm_mday);
+ break;
+ case TIME_RESOLUTION_HOUR:
+ sprintf(snippet, "'%d-%02d-%02d %02d:00'", (layerinfo->current_node->tokenval.tmval.tm_year+1900),
+ (layerinfo->current_node->tokenval.tmval.tm_mon+1),
+ layerinfo->current_node->tokenval.tmval.tm_mday,
+ layerinfo->current_node->tokenval.tmval.tm_hour);
+ break;
+ case TIME_RESOLUTION_MINUTE:
+ sprintf(snippet, "%d-%02d-%02d %02d:%02d'", (layerinfo->current_node->tokenval.tmval.tm_year+1900),
+ (layerinfo->current_node->tokenval.tmval.tm_mon+1),
+ layerinfo->current_node->tokenval.tmval.tm_mday,
+ layerinfo->current_node->tokenval.tmval.tm_hour,
+ layerinfo->current_node->tokenval.tmval.tm_min);
+ break;
+ case TIME_RESOLUTION_SECOND:
+ sprintf(snippet, "'%d-%02d-%02d %02d:%02d:%02d'", (layerinfo->current_node->tokenval.tmval.tm_year+1900),
+ (layerinfo->current_node->tokenval.tmval.tm_mon+1),
+ layerinfo->current_node->tokenval.tmval.tm_mday,
+ layerinfo->current_node->tokenval.tmval.tm_hour,
+ layerinfo->current_node->tokenval.tmval.tm_min,
+ layerinfo->current_node->tokenval.tmval.tm_sec);
+ break;
+ }
+ filter->native_string = msStringConcatenate(filter->native_string, snippet);
+ msFree(snippet);
}
break;
case MS_TOKEN_LITERAL_SHAPE:
diff --git a/mapobject.c b/mapobject.c
index 255b47c..8c5cdb5 100644
--- a/mapobject.c
+++ b/mapobject.c
@@ -29,6 +29,7 @@
****************************************************************************/
#include "mapserver.h"
+#include "mapows.h"
#ifdef USE_GDAL
# include "gdal.h"
diff --git a/mapogcfilter.c b/mapogcfilter.c
index 3d4bab8..50e2e7b 100644
--- a/mapogcfilter.c
+++ b/mapogcfilter.c
@@ -39,6 +39,7 @@
#include "mapserver.h"
#include "mapowscommon.h"
#include "maptime.h"
+#include "mapows.h"
static int FLTHasUniqueTopLevelDuringFilter(FilterEncodingNode *psFilterNode);
@@ -3537,7 +3538,7 @@ int FLTCheckFeatureIdFilters(FilterEncodingNode *psFilterNode,
if( pszDot - pszId != strlen(lp->name) ||
strncasecmp(pszId, lp->name, strlen(lp->name)) != 0 )
{
- msSetError(MS_MISCERR, "Feature id %s not consistant with feature type name %s.",
+ msSetError(MS_MISCERR, "Feature id %s not consistent with feature type name %s.",
"FLTPreParseFilterForAlias()", pszId, lp->name);
status = MS_FAILURE;
break;
diff --git a/mapogcfiltercommon.c b/mapogcfiltercommon.c
index a77b3e3..3105d3f 100644
--- a/mapogcfiltercommon.c
+++ b/mapogcfiltercommon.c
@@ -32,6 +32,7 @@
#include "mapogcfilter.h"
#include "mapserver.h"
+#include "mapows.h"
#include "mapowscommon.h"
#ifdef USE_OGR
diff --git a/mapogcsld.c b/mapogcsld.c
index af0cb76..a24dc4e 100644
--- a/mapogcsld.c
+++ b/mapogcsld.c
@@ -29,6 +29,7 @@
#include "mapogcsld.h"
#include "mapogcfilter.h"
#include "mapserver.h"
+#include "mapows.h"
#ifdef USE_OGR
#include "cpl_string.h"
@@ -159,8 +160,6 @@ int msSLDApplySLD(mapObj *map, char *psSLDXML, int iLayer, char *pszStyleLayerNa
char *pszTmp2 = NULL;
char *pszBuffer = NULL;
layerObj *lp = NULL;
- char *pszSqlExpression=NULL;
- FilterEncodingNode *psExpressionNode =NULL;
pasLayers = msSLDParseSLD(map, psSLDXML, &nLayers);
/* -------------------------------------------------------------------- */
@@ -2633,7 +2632,6 @@ int msSLDParseTextParams(CPLXMLNode *psRoot, layerObj *psLayer,
{
char szFontName[100];
double dfFontSize = 10;
- int bFontSet = 0;
CPLXMLNode *psLabel=NULL, *psFont=NULL;
CPLXMLNode *psCssParam = NULL;
@@ -2786,7 +2784,6 @@ int msSLDParseTextParams(CPLXMLNode *psRoot, layerObj *psLayer,
}
if ((msLookupHashTable(&(psLayer->map->fontset.fonts), szFontName) !=NULL)) {
- bFontSet = 1;
psLabelObj->font = msStrdup(szFontName);
}
}
diff --git a/mapogcsos.c b/mapogcsos.c
index df09261..f709c48 100644
--- a/mapogcsos.c
+++ b/mapogcsos.c
@@ -30,6 +30,7 @@
#define _GNU_SOURCE
#include "mapserver.h"
+#include "mapows.h"
#if defined(USE_SOS_SVR) && defined(USE_LIBXML2)
diff --git a/mapogr.cpp b/mapogr.cpp
index 1f21b29..1708d1c 100644
--- a/mapogr.cpp
+++ b/mapogr.cpp
@@ -32,6 +32,7 @@
#include "mapserver.h"
#include "mapproject.h"
#include "mapthread.h"
+#include "mapows.h"
#if defined(USE_OGR) || defined(USE_GDAL)
# include "gdal_version.h"
diff --git a/mapogroutput.c b/mapogroutput.c
index 3fac96f..770dd3f 100644
--- a/mapogroutput.c
+++ b/mapogroutput.c
@@ -31,6 +31,7 @@
#include "mapserver.h"
#include "mapproject.h"
#include "mapthread.h"
+#include "mapows.h"
#if defined(USE_OGR)
# define __USE_LARGEFILE64 1
@@ -524,6 +525,8 @@ static int msOGRWriteShape( layerObj *map_layer, OGRLayerH hOGRLayer,
return MS_FAILURE;
}
+#if defined(GDAL_COMPUTE_VERSION)
+#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,0,0)
/************************************************************************/
/* msOGRStdoutWriteFunction() */
/************************************************************************/
@@ -534,6 +537,8 @@ static size_t msOGRStdoutWriteFunction(const void* ptr, size_t size, size_t nmem
msIOContext *ioctx = (msIOContext*) stream;
return msIO_contextWrite(ioctx, ptr, size * nmemb ) / size;
}
+#endif
+#endif
/************************************************************************/
/* msOGROutputGetAdditonalFiles() */
diff --git a/maporaclespatial.c b/maporaclespatial.c
index 8da07ba..7ae8d3d 100644
--- a/maporaclespatial.c
+++ b/maporaclespatial.c
@@ -3486,7 +3486,7 @@ int msOracleSpatialLayerTranslateFilter(layerObj *layer, expressionObj *filter,
int nodeCount = 0;
- int function = 0, version = 0, dwithin = 0, regexp_like = 0, case_ins = 0;
+ int function = 0, version = 0, dwithin = 0, regexp_like = 0, case_ins = 0, ieq = 0;
char *table_name;
char *geom_column_name = NULL, *unique = NULL, *srid = NULL, *indexfield=NULL;
char *snippet = NULL;
@@ -3615,7 +3615,14 @@ int msOracleSpatialLayerTranslateFilter(layerObj *layer, expressionObj *filter,
sprintf(snippet, strtmpl, node->tokenval.strval); // TODO: escape strval
snippet = msReplaceSubstring(snippet,"'","''");
native_string = msStringConcatenate(native_string, "'");
+ if (ieq == MS_TRUE) {
+ native_string = msStringConcatenate(native_string, "^");
+ }
native_string = msStringConcatenate(native_string, snippet);
+ if (ieq == MS_TRUE) {
+ native_string = msStringConcatenate(native_string, "$");
+ ieq = MS_FALSE;
+ }
native_string = msStringConcatenate(native_string, "'");
msFree(snippet);
break;
@@ -3732,6 +3739,7 @@ int msOracleSpatialLayerTranslateFilter(layerObj *layer, expressionObj *filter,
msDebug("got a IEQ comparison\n");
regexp_like = MS_TRUE;
case_ins = MS_TRUE;
+ ieq = MS_TRUE;
native_string = msStringConcatenate(native_string, ", ");
break;
case MS_TOKEN_COMPARISON_RE:
diff --git a/mapoutput.c b/mapoutput.c
index 36297f1..bc409f9 100644
--- a/mapoutput.c
+++ b/mapoutput.c
@@ -29,6 +29,7 @@
#include <assert.h>
#include "mapserver.h"
+#include "mapows.h"
diff --git a/mapows.c b/mapows.c
index 617abc3..dd2d856 100644
--- a/mapows.c
+++ b/mapows.c
@@ -30,6 +30,7 @@
#include "mapserver.h"
#include "maptime.h"
#include "maptemplate.h"
+#include "mapows.h"
#if defined(USE_LIBXML2)
#include "maplibxml2.h"
diff --git a/mapows.h b/mapows.h
index 4d7f41f..b8be8cc 100644
--- a/mapows.h
+++ b/mapows.h
@@ -40,6 +40,15 @@
*/
#define OWS_DEFAULT_SCHEMAS_LOCATION "http://schemas.opengis.net"
+#if defined USE_LIBXML2 && defined USE_WFS_SVR
+#include<libxml/tree.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/*====================================================================
* mapows.c
*====================================================================*/
@@ -474,7 +483,6 @@ int msWFSException11(mapObj *map, const char *locator,
int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *wfsparams,
cgiRequestObj *req, owsRequestObj *ows_request);
#ifdef USE_LIBXML2
-#include<libxml/tree.h>
xmlNodePtr msWFSDumpLayer11(mapObj *map, layerObj *lp, xmlNsPtr psNsOws,
int nWFSVersion, const char* validate_language);
#endif
@@ -535,6 +543,9 @@ int msWCSDispatch(mapObj *map, cgiRequestObj *requestobj, owsRequestObj *ows_req
int msSOSDispatch(mapObj *map, cgiRequestObj *requestobj, owsRequestObj *ows_request); /* only 1 public function */
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
#endif /* MAPOWS_H */
diff --git a/mapparser.c b/mapparser.c
index fc88ad5..8af7606 100644
--- a/mapparser.c
+++ b/mapparser.c
@@ -164,7 +164,7 @@
/* Copy the first part of user declarations. */
-#line 5 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 5 "mapparser.y"
/* C declarations */
#include <stdio.h>
@@ -203,7 +203,7 @@ int yyerror(parseObj *, const char *);
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 30 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 30 "mapparser.y"
{
double dblval;
int intval;
@@ -212,7 +212,7 @@ typedef union YYSTYPE
shapeObj *shpval;
}
/* Line 193 of yacc.c. */
-#line 216 "/Users/sdlime/mapserver/mapserver/mapparser.c"
+#line 216 "/Users/tbonfort/dev/mapserver/mapparser.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -225,7 +225,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 229 "/Users/sdlime/mapserver/mapserver/mapparser.c"
+#line 229 "/Users/tbonfort/dev/mapserver/mapparser.c"
#ifdef short
# undef short
@@ -1692,7 +1692,7 @@ yyreduce:
switch (yyn)
{
case 3:
-#line 69 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 69 "mapparser.y"
{
switch(p->type) {
case(MS_PARSE_TYPE_BOOLEAN):
@@ -1709,7 +1709,7 @@ yyreduce:
break;
case 4:
-#line 82 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 82 "mapparser.y"
{
switch(p->type) {
case(MS_PARSE_TYPE_BOOLEAN):
@@ -1727,7 +1727,7 @@ yyreduce:
break;
case 5:
-#line 96 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 96 "mapparser.y"
{
switch(p->type) {
case(MS_PARSE_TYPE_BOOLEAN):
@@ -1744,7 +1744,7 @@ yyreduce:
break;
case 6:
-#line 109 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 109 "mapparser.y"
{
switch(p->type) {
case(MS_PARSE_TYPE_SHAPE):
@@ -1756,12 +1756,12 @@ yyreduce:
break;
case 8:
-#line 120 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 120 "mapparser.y"
{ (yyval.intval) = (yyvsp[(2) - (3)].intval); }
break;
case 9:
-#line 121 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 121 "mapparser.y"
{
(yyval.intval) = MS_FALSE;
if((yyvsp[(1) - (3)].intval) == (yyvsp[(3) - (3)].intval)) (yyval.intval) = MS_TRUE;
@@ -1769,7 +1769,7 @@ yyreduce:
break;
case 10:
-#line 125 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 125 "mapparser.y"
{
if((yyvsp[(1) - (3)].intval) == MS_TRUE)
(yyval.intval) = MS_TRUE;
@@ -1781,7 +1781,7 @@ yyreduce:
break;
case 11:
-#line 133 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 133 "mapparser.y"
{
if((yyvsp[(1) - (3)].intval) == MS_TRUE) {
if((yyvsp[(3) - (3)].intval) == MS_TRUE)
@@ -1794,7 +1794,7 @@ yyreduce:
break;
case 12:
-#line 142 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 142 "mapparser.y"
{
if((yyvsp[(1) - (3)].intval) == MS_TRUE)
(yyval.intval) = MS_TRUE;
@@ -1806,7 +1806,7 @@ yyreduce:
break;
case 13:
-#line 150 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 150 "mapparser.y"
{
if((yyvsp[(1) - (3)].intval) == MS_TRUE) {
if((yyvsp[(3) - (3)].dblval) != 0)
@@ -1819,7 +1819,7 @@ yyreduce:
break;
case 14:
-#line 159 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 159 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) != 0)
(yyval.intval) = MS_TRUE;
@@ -1831,7 +1831,7 @@ yyreduce:
break;
case 15:
-#line 167 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 167 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) != 0) {
if((yyvsp[(3) - (3)].intval) == MS_TRUE)
@@ -1844,7 +1844,7 @@ yyreduce:
break;
case 16:
-#line 176 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 176 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) != 0)
(yyval.intval) = MS_TRUE;
@@ -1856,7 +1856,7 @@ yyreduce:
break;
case 17:
-#line 184 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 184 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) != 0) {
if((yyvsp[(3) - (3)].dblval) != 0)
@@ -1869,17 +1869,17 @@ yyreduce:
break;
case 18:
-#line 193 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 193 "mapparser.y"
{ (yyval.intval) = !(yyvsp[(2) - (2)].intval); }
break;
case 19:
-#line 194 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 194 "mapparser.y"
{ (yyval.intval) = !(yyvsp[(2) - (2)].dblval); }
break;
case 20:
-#line 195 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 195 "mapparser.y"
{
ms_regex_t re;
@@ -1903,7 +1903,7 @@ yyreduce:
break;
case 21:
-#line 215 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 215 "mapparser.y"
{
ms_regex_t re;
@@ -1927,7 +1927,7 @@ yyreduce:
break;
case 22:
-#line 235 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 235 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) == (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -1937,7 +1937,7 @@ yyreduce:
break;
case 23:
-#line 241 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 241 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) != (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -1947,7 +1947,7 @@ yyreduce:
break;
case 24:
-#line 247 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 247 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) > (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -1957,7 +1957,7 @@ yyreduce:
break;
case 25:
-#line 253 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 253 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) < (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -1967,7 +1967,7 @@ yyreduce:
break;
case 26:
-#line 259 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 259 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) >= (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -1977,7 +1977,7 @@ yyreduce:
break;
case 27:
-#line 265 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 265 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) <= (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -1987,7 +1987,7 @@ yyreduce:
break;
case 28:
-#line 271 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 271 "mapparser.y"
{
if(strcmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) == 0)
(yyval.intval) = MS_TRUE;
@@ -1999,7 +1999,7 @@ yyreduce:
break;
case 29:
-#line 279 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 279 "mapparser.y"
{
if(strcmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) != 0)
(yyval.intval) = MS_TRUE;
@@ -2011,7 +2011,7 @@ yyreduce:
break;
case 30:
-#line 287 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 287 "mapparser.y"
{
if(strcmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) > 0)
(yyval.intval) = MS_TRUE;
@@ -2023,7 +2023,7 @@ yyreduce:
break;
case 31:
-#line 295 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 295 "mapparser.y"
{
if(strcmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) < 0)
(yyval.intval) = MS_TRUE;
@@ -2035,7 +2035,7 @@ yyreduce:
break;
case 32:
-#line 303 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 303 "mapparser.y"
{
if(strcmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) >= 0)
(yyval.intval) = MS_TRUE;
@@ -2047,7 +2047,7 @@ yyreduce:
break;
case 33:
-#line 311 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 311 "mapparser.y"
{
if(strcmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) <= 0)
(yyval.intval) = MS_TRUE;
@@ -2059,7 +2059,7 @@ yyreduce:
break;
case 34:
-#line 319 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 319 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) == 0)
(yyval.intval) = MS_TRUE;
@@ -2069,7 +2069,7 @@ yyreduce:
break;
case 35:
-#line 325 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 325 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) != 0)
(yyval.intval) = MS_TRUE;
@@ -2079,7 +2079,7 @@ yyreduce:
break;
case 36:
-#line 331 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 331 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) > 0)
(yyval.intval) = MS_TRUE;
@@ -2089,7 +2089,7 @@ yyreduce:
break;
case 37:
-#line 337 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 337 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) < 0)
(yyval.intval) = MS_TRUE;
@@ -2099,7 +2099,7 @@ yyreduce:
break;
case 38:
-#line 343 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 343 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) >= 0)
(yyval.intval) = MS_TRUE;
@@ -2109,7 +2109,7 @@ yyreduce:
break;
case 39:
-#line 349 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 349 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) <= 0)
(yyval.intval) = MS_TRUE;
@@ -2119,7 +2119,7 @@ yyreduce:
break;
case 40:
-#line 355 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 355 "mapparser.y"
{
char *delim, *bufferp;
@@ -2144,7 +2144,7 @@ yyreduce:
break;
case 41:
-#line 376 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 376 "mapparser.y"
{
char *delim,*bufferp;
@@ -2168,7 +2168,7 @@ yyreduce:
break;
case 42:
-#line 396 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 396 "mapparser.y"
{
if((yyvsp[(1) - (3)].dblval) == (yyvsp[(3) - (3)].dblval))
(yyval.intval) = MS_TRUE;
@@ -2178,7 +2178,7 @@ yyreduce:
break;
case 43:
-#line 402 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 402 "mapparser.y"
{
if(strcasecmp((yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)) == 0)
(yyval.intval) = MS_TRUE;
@@ -2190,7 +2190,7 @@ yyreduce:
break;
case 44:
-#line 410 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 410 "mapparser.y"
{
if(msTimeCompare(&((yyvsp[(1) - (3)].tmval)), &((yyvsp[(3) - (3)].tmval))) == 0)
(yyval.intval) = MS_TRUE;
@@ -2200,7 +2200,7 @@ yyreduce:
break;
case 45:
-#line 416 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 416 "mapparser.y"
{
int rval;
rval = msGEOSEquals((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2215,7 +2215,7 @@ yyreduce:
break;
case 46:
-#line 427 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 427 "mapparser.y"
{
int rval;
rval = msGEOSEquals((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2230,7 +2230,7 @@ yyreduce:
break;
case 47:
-#line 438 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 438 "mapparser.y"
{
int rval;
rval = msGEOSIntersects((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2245,7 +2245,7 @@ yyreduce:
break;
case 48:
-#line 449 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 449 "mapparser.y"
{
int rval;
rval = msGEOSIntersects((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2260,7 +2260,7 @@ yyreduce:
break;
case 49:
-#line 460 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 460 "mapparser.y"
{
int rval;
rval = msGEOSDisjoint((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2275,7 +2275,7 @@ yyreduce:
break;
case 50:
-#line 471 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 471 "mapparser.y"
{
int rval;
rval = msGEOSDisjoint((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2290,7 +2290,7 @@ yyreduce:
break;
case 51:
-#line 482 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 482 "mapparser.y"
{
int rval;
rval = msGEOSTouches((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2305,7 +2305,7 @@ yyreduce:
break;
case 52:
-#line 493 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 493 "mapparser.y"
{
int rval;
rval = msGEOSTouches((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2320,7 +2320,7 @@ yyreduce:
break;
case 53:
-#line 504 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 504 "mapparser.y"
{
int rval;
rval = msGEOSOverlaps((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2335,7 +2335,7 @@ yyreduce:
break;
case 54:
-#line 515 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 515 "mapparser.y"
{
int rval;
rval = msGEOSOverlaps((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2350,7 +2350,7 @@ yyreduce:
break;
case 55:
-#line 526 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 526 "mapparser.y"
{
int rval;
rval = msGEOSCrosses((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2365,7 +2365,7 @@ yyreduce:
break;
case 56:
-#line 537 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 537 "mapparser.y"
{
int rval;
rval = msGEOSCrosses((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2380,7 +2380,7 @@ yyreduce:
break;
case 57:
-#line 548 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 548 "mapparser.y"
{
int rval;
rval = msGEOSWithin((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2395,7 +2395,7 @@ yyreduce:
break;
case 58:
-#line 559 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 559 "mapparser.y"
{
int rval;
rval = msGEOSWithin((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2410,7 +2410,7 @@ yyreduce:
break;
case 59:
-#line 570 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 570 "mapparser.y"
{
int rval;
rval = msGEOSContains((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2425,7 +2425,7 @@ yyreduce:
break;
case 60:
-#line 581 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 581 "mapparser.y"
{
int rval;
rval = msGEOSContains((yyvsp[(1) - (3)].shpval), (yyvsp[(3) - (3)].shpval));
@@ -2440,7 +2440,7 @@ yyreduce:
break;
case 61:
-#line 592 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 592 "mapparser.y"
{
double d;
d = msGEOSDistance((yyvsp[(3) - (8)].shpval), (yyvsp[(5) - (8)].shpval));
@@ -2454,7 +2454,7 @@ yyreduce:
break;
case 62:
-#line 602 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 602 "mapparser.y"
{
double d;
d = msGEOSDistance((yyvsp[(3) - (8)].shpval), (yyvsp[(5) - (8)].shpval));
@@ -2468,32 +2468,32 @@ yyreduce:
break;
case 64:
-#line 615 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 615 "mapparser.y"
{ (yyval.dblval) = (yyvsp[(2) - (3)].dblval); }
break;
case 65:
-#line 616 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 616 "mapparser.y"
{ (yyval.dblval) = (yyvsp[(1) - (3)].dblval) + (yyvsp[(3) - (3)].dblval); }
break;
case 66:
-#line 617 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 617 "mapparser.y"
{ (yyval.dblval) = (yyvsp[(1) - (3)].dblval) - (yyvsp[(3) - (3)].dblval); }
break;
case 67:
-#line 618 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 618 "mapparser.y"
{ (yyval.dblval) = (yyvsp[(1) - (3)].dblval) * (yyvsp[(3) - (3)].dblval); }
break;
case 68:
-#line 619 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 619 "mapparser.y"
{ (yyval.dblval) = (int)(yyvsp[(1) - (3)].dblval) % (int)(yyvsp[(3) - (3)].dblval); }
break;
case 69:
-#line 620 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 620 "mapparser.y"
{
if((yyvsp[(3) - (3)].dblval) == 0.0) {
yyerror(p, "Division by zero.");
@@ -2504,22 +2504,22 @@ yyreduce:
break;
case 70:
-#line 627 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 627 "mapparser.y"
{ (yyval.dblval) = (yyvsp[(2) - (2)].dblval); }
break;
case 71:
-#line 628 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 628 "mapparser.y"
{ (yyval.dblval) = pow((yyvsp[(1) - (3)].dblval), (yyvsp[(3) - (3)].dblval)); }
break;
case 72:
-#line 629 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 629 "mapparser.y"
{ (yyval.dblval) = strlen((yyvsp[(3) - (4)].strval)); }
break;
case 73:
-#line 630 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 630 "mapparser.y"
{
if((yyvsp[(3) - (4)].shpval)->type != MS_SHAPE_POLYGON) {
yyerror(p, "Area can only be computed for polygon shapes.");
@@ -2531,17 +2531,17 @@ yyreduce:
break;
case 74:
-#line 638 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 638 "mapparser.y"
{ (yyval.dblval) = (MS_NINT((yyvsp[(3) - (6)].dblval)/(yyvsp[(5) - (6)].dblval)))*(yyvsp[(5) - (6)].dblval); }
break;
case 76:
-#line 642 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 642 "mapparser.y"
{ (yyval.shpval) = (yyvsp[(2) - (3)].shpval); }
break;
case 77:
-#line 643 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 643 "mapparser.y"
{
shapeObj *s;
s = msGEOSBuffer((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].dblval));
@@ -2555,7 +2555,7 @@ yyreduce:
break;
case 78:
-#line 653 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 653 "mapparser.y"
{
shapeObj *s;
s = msGEOSDifference((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].shpval));
@@ -2569,7 +2569,7 @@ yyreduce:
break;
case 79:
-#line 663 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 663 "mapparser.y"
{
shapeObj *s;
s = msGEOSSimplify((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].dblval));
@@ -2583,7 +2583,7 @@ yyreduce:
break;
case 80:
-#line 673 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 673 "mapparser.y"
{
shapeObj *s;
s = msGEOSTopologyPreservingSimplify((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].dblval));
@@ -2597,7 +2597,7 @@ yyreduce:
break;
case 81:
-#line 683 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 683 "mapparser.y"
{
shapeObj *s;
s = msGeneralize((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].dblval));
@@ -2611,7 +2611,7 @@ yyreduce:
break;
case 82:
-#line 693 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 693 "mapparser.y"
{
shapeObj *s;
s = msSmoothShapeSIA((yyvsp[(3) - (4)].shpval), 3, 1, NULL);
@@ -2625,7 +2625,7 @@ yyreduce:
break;
case 83:
-#line 703 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 703 "mapparser.y"
{
shapeObj *s;
s = msSmoothShapeSIA((yyvsp[(3) - (6)].shpval), (yyvsp[(5) - (6)].dblval), 1, NULL);
@@ -2639,7 +2639,7 @@ yyreduce:
break;
case 84:
-#line 713 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 713 "mapparser.y"
{
shapeObj *s;
s = msSmoothShapeSIA((yyvsp[(3) - (8)].shpval), (yyvsp[(5) - (8)].dblval), (yyvsp[(7) - (8)].dblval), NULL);
@@ -2653,7 +2653,7 @@ yyreduce:
break;
case 85:
-#line 723 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 723 "mapparser.y"
{
shapeObj *s;
s = msSmoothShapeSIA((yyvsp[(3) - (10)].shpval), (yyvsp[(5) - (10)].dblval), (yyvsp[(7) - (10)].dblval), (yyvsp[(9) - (10)].strval));
@@ -2668,7 +2668,7 @@ yyreduce:
break;
case 86:
-#line 734 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 734 "mapparser.y"
{
#ifdef USE_V8_MAPSCRIPT
shapeObj *s;
@@ -2688,12 +2688,12 @@ yyreduce:
break;
case 88:
-#line 753 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 753 "mapparser.y"
{ (yyval.strval) = (yyvsp[(2) - (3)].strval); }
break;
case 89:
-#line 754 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 754 "mapparser.y"
{
(yyval.strval) = (char *)malloc(strlen((yyvsp[(1) - (3)].strval)) + strlen((yyvsp[(3) - (3)].strval)) + 1);
sprintf((yyval.strval), "%s%s", (yyvsp[(1) - (3)].strval), (yyvsp[(3) - (3)].strval)); free((yyvsp[(1) - (3)].strval)); free((yyvsp[(3) - (3)].strval));
@@ -2701,7 +2701,7 @@ yyreduce:
break;
case 90:
-#line 758 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 758 "mapparser.y"
{
(yyval.strval) = (char *) malloc(strlen((yyvsp[(5) - (6)].strval)) + 64); /* Plenty big? Should use snprintf below... */
sprintf((yyval.strval), (yyvsp[(5) - (6)].strval), (yyvsp[(3) - (6)].dblval));
@@ -2709,7 +2709,7 @@ yyreduce:
break;
case 91:
-#line 762 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 762 "mapparser.y"
{
(yyvsp[(3) - (4)].strval) = msCommifyString((yyvsp[(3) - (4)].strval));
(yyval.strval) = (yyvsp[(3) - (4)].strval);
@@ -2717,7 +2717,7 @@ yyreduce:
break;
case 92:
-#line 766 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 766 "mapparser.y"
{
msStringToUpper((yyvsp[(3) - (4)].strval));
(yyval.strval) = (yyvsp[(3) - (4)].strval);
@@ -2725,7 +2725,7 @@ yyreduce:
break;
case 93:
-#line 770 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 770 "mapparser.y"
{
msStringToLower((yyvsp[(3) - (4)].strval));
(yyval.strval) = (yyvsp[(3) - (4)].strval);
@@ -2733,7 +2733,7 @@ yyreduce:
break;
case 94:
-#line 774 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 774 "mapparser.y"
{
msStringInitCap((yyvsp[(3) - (4)].strval));
(yyval.strval) = (yyvsp[(3) - (4)].strval);
@@ -2741,7 +2741,7 @@ yyreduce:
break;
case 95:
-#line 778 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 778 "mapparser.y"
{
msStringFirstCap((yyvsp[(3) - (4)].strval));
(yyval.strval) = (yyvsp[(3) - (4)].strval);
@@ -2749,13 +2749,13 @@ yyreduce:
break;
case 97:
-#line 785 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 785 "mapparser.y"
{ (yyval.tmval) = (yyvsp[(2) - (3)].tmval); }
break;
/* Line 1267 of yacc.c. */
-#line 2759 "/Users/sdlime/mapserver/mapserver/mapparser.c"
+#line 2759 "/Users/tbonfort/dev/mapserver/mapparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2969,7 +2969,7 @@ yyreturn:
}
-#line 788 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 788 "mapparser.y"
/*
diff --git a/mapparser.h b/mapparser.h
index 0dbfec8..d8a29b1 100644
--- a/mapparser.h
+++ b/mapparser.h
@@ -138,7 +138,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 30 "/Users/sdlime/mapserver/mapserver/mapparser.y"
+#line 30 "mapparser.y"
{
double dblval;
int intval;
@@ -147,7 +147,7 @@ typedef union YYSTYPE
shapeObj *shpval;
}
/* Line 1529 of yacc.c. */
-#line 151 "/Users/sdlime/mapserver/mapserver/mapparser.h"
+#line 151 "/Users/tbonfort/dev/mapserver/mapparser.h"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
diff --git a/mappool.c b/mappool.c
index ac2cd29..bee68e9 100644
--- a/mappool.c
+++ b/mappool.c
@@ -149,7 +149,7 @@ typedef struct {
int lifespan;
int ref_count;
- int thread_id;
+ void* thread_id;
int debug;
time_t last_used;
diff --git a/mappostgis.c b/mappostgis.c
index 9e5d9aa..33094d2 100644
--- a/mappostgis.c
+++ b/mappostgis.c
@@ -64,6 +64,7 @@
#include "mapserver.h"
#include "maptime.h"
#include "mappostgis.h"
+#include "mapows.h"
#define FP_EPSILON 1e-12
#define FP_EQ(a, b) (fabs((a)-(b)) < FP_EPSILON)
@@ -3580,9 +3581,6 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
#ifdef USE_POSTGIS
tokenListNodeObjPtr node = NULL;
- int resolution; /* date/time resolution */
- int noDate;
-
char *snippet = NULL;
char *native_string = NULL;
char *strtmpl = NULL;
diff --git a/mapquery.c b/mapquery.c
index 5ebe478..184b83b 100644
--- a/mapquery.c
+++ b/mapquery.c
@@ -664,7 +664,7 @@ int msQueryByFilter(mapObj *map)
layerObj *lp;
- char status, eval;
+ char status;
char *old_filteritem=NULL;
expressionObj old_filter;
@@ -696,8 +696,6 @@ int msQueryByFilter(mapObj *map)
start = stop = map->query.layer;
for(l=start; l>=stop; l--) {
- eval = MS_TRUE; /* evaluate the filter inside within this function */
-
lp = (GET_LAYER(map, l));
if (map->query.maxfeatures == 0)
break; /* nothing else to do */
@@ -744,8 +742,6 @@ int msQueryByFilter(mapObj *map)
msInitExpression(&old_filter);
msCopyExpression(&old_filter, &lp->filter);
- if(msLayerSupportsCommonFilters(lp)) eval = MS_FALSE;
-
/*
** Set the lp->filter and lp->filteritem (may need to merge). Remember filters are *always* MapServer syntax.
*/
diff --git a/maprendering.c b/maprendering.c
index 2a24985..4a50d62 100644
--- a/maprendering.c
+++ b/maprendering.c
@@ -1023,7 +1023,8 @@ int msDrawTextSymbol(mapObj *map, imageObj *image, pointObj labelPnt, textSymbol
c = &ts->label->color;
if(MS_VALID_COLOR(ts->label->outlinecolor))
oc = &ts->label->outlinecolor;
- ow = ts->label->outlinewidth * (ts->textpath->glyph_size / ts->label->size);
+ ow = MS_NINT((double)ts->label->outlinewidth * ((double)ts->textpath->glyph_size / (double)ts->label->size));
+ msDebug("setting outlinewidth to %d (%d, %d, %d)\n",ow,ts->label->outlinewidth, ts->textpath->glyph_size, ts->label->size);
if(!renderer->renderGlyphs) return MS_FAILURE;
return renderer->renderGlyphs(image,ts->textpath,c,oc,ow);
diff --git a/mapscript/php/color.c b/mapscript/php/color.c
index 1a6cbaf..bc86f3b 100644
--- a/mapscript/php/color.c
+++ b/mapscript/php/color.c
@@ -46,6 +46,14 @@ ZEND_BEGIN_ARG_INFO_EX(color_setRGB_args, 0, 0, 3)
ZEND_ARG_INFO(0, red)
ZEND_ARG_INFO(0, green)
ZEND_ARG_INFO(0, blue)
+ZEND_ARG_INFO(0, alpha)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(color_setHex_args, 0, 0, 1)
+ZEND_ARG_INFO(0, rgba)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(color_toHex_args, 0, 0, 0)
ZEND_END_ARG_INFO()
/* {{{ proto void __construct()
@@ -110,17 +118,17 @@ PHP_METHOD(colorObj, __set)
}
-/* {{{ proto int color.setRGB(int R, int G, int B)
+/* {{{ proto int color.setRGB(int R, int G, int B, int A = 255)
Set new RGB color. */
PHP_METHOD(colorObj, setRGB)
{
zval *zobj = getThis();
- long red, green, blue;
+ long red, green, blue, alpha = 255;
php_color_object *php_color;
PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll",
- &red, &green, &blue) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll|l",
+ &red, &green, &blue, &alpha) == FAILURE) {
PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
return;
}
@@ -129,17 +137,95 @@ PHP_METHOD(colorObj, setRGB)
php_color = (php_color_object *) zend_object_store_get_object(zobj TSRMLS_CC);
- MS_INIT_COLOR(*(php_color->color), red, green, blue,255);
+ MS_INIT_COLOR(*(php_color->color), red, green, blue, alpha);
RETURN_LONG(MS_SUCCESS);
}
/* }}} */
+/* {{{ proto int color.setHex(string hex)
+ Set new RGB(A) color from hex string. */
+PHP_METHOD(colorObj, setHex)
+{
+ zval *zobj = getThis();
+ char *hex;
+ long hex_len = 0, red, green, blue, alpha = 255;
+ php_color_object *php_color;
+
+ PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ &hex, &hex_len) == FAILURE) {
+ PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
+ return;
+ }
+ PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
+
+ if ((hex_len == 7 || hex_len == 9) && hex[0] == '#') {
+ red = msHexToInt(hex + 1);
+ green = msHexToInt(hex + 3);
+ blue = msHexToInt(hex + 5);
+ if (hex_len == 9) {
+ alpha = msHexToInt(hex + 7);
+ }
+
+ if (red > 255 || green > 255 || blue > 255 || alpha > 255) {
+ mapscript_throw_exception("Invalid color index." TSRMLS_CC);
+ RETURN_LONG(MS_FAILURE);
+ }
+
+ php_color = (php_color_object *) zend_object_store_get_object(zobj TSRMLS_CC);
+
+ MS_INIT_COLOR(*(php_color->color), red, green, blue, alpha);
+
+ RETURN_LONG(MS_SUCCESS);
+ } else {
+ mapscript_throw_exception("Invalid hex color string." TSRMLS_CC);
+ RETURN_LONG(MS_FAILURE);
+ }
+}
+/* }}} */
+
+/* {{{ proto string color.toHex()
+ Get hex string #rrggbb[aa]. */
+PHP_METHOD(colorObj, toHex)
+{
+ char *hex;
+ zval *zobj = getThis();
+ php_color_object *php_color;
+ colorObj *color;
+
+ php_color = (php_color_object *) zend_object_store_get_object(zobj TSRMLS_CC);
+ color = php_color->color;
+
+ if (color->red < 0 || color->green < 0 || color->blue < 0) {
+ mapscript_throw_exception("Can't express invalid color as hex." TSRMLS_CC);
+ return;
+ }
+
+ if (color->alpha == 255) {
+ hex = msSmallMalloc(8);
+ snprintf(hex, 8, "#%02x%02x%02x",
+ color->red, color->green, color->blue);
+ } else if (color->alpha >= 0) {
+ hex = msSmallMalloc(10);
+ snprintf(hex, 10, "#%02x%02x%02x%02x",
+ color->red, color->green, color->blue, color->alpha);
+ } else {
+ mapscript_throw_exception("Can't express color with invalid alpha as hex." TSRMLS_CC);
+ return;
+ }
+
+ RETURN_STRINGL(hex, strlen(hex), 0);
+}
+/* }}} */
+
zend_function_entry color_functions[] = {
PHP_ME(colorObj, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
PHP_ME(colorObj, __get, color___get_args, ZEND_ACC_PUBLIC)
PHP_ME(colorObj, __set, color___set_args, ZEND_ACC_PUBLIC)
- PHP_ME(colorObj, setRGB, color_setRGB_args, ZEND_ACC_PUBLIC) {
+ PHP_ME(colorObj, setRGB, color_setRGB_args, ZEND_ACC_PUBLIC)
+ PHP_ME(colorObj, setHex, color_setHex_args, ZEND_ACC_PUBLIC)
+ PHP_ME(colorObj, toHex, color_toHex_args, ZEND_ACC_PUBLIC) {
NULL, NULL, NULL
}
};
diff --git a/mapscript/php/image.c b/mapscript/php/image.c
index b89fb96..f284e59 100644
--- a/mapscript/php/image.c
+++ b/mapscript/php/image.c
@@ -175,7 +175,6 @@ PHP_METHOD(imageObj, saveWebImage)
PHP_METHOD(imageObj, pasteImage)
{
long transparent=-1, dstx=0, dsty=0, angle=0;
- int angleSet=MS_FALSE;
zval *zimage;
zval *zobj = getThis();
php_image_object *php_image, *php_imageSrc;
@@ -192,10 +191,8 @@ PHP_METHOD(imageObj, pasteImage)
}
PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
- if (ZEND_NUM_ARGS() == 3) {
+ if (ZEND_NUM_ARGS() == 3)
mapscript_report_php_error(E_WARNING, "dstX parameter given but not dstY" TSRMLS_CC);
- } else
- angleSet = MS_TRUE;
php_image = (php_image_object *) zend_object_store_get_object(zobj TSRMLS_CC);
php_imageSrc = (php_image_object *) zend_object_store_get_object(zimage TSRMLS_CC);
@@ -210,8 +207,14 @@ PHP_METHOD(imageObj, pasteImage)
renderer = MS_IMAGE_RENDERER(php_image->image);
memset(&rb,0,sizeof(rasterBufferObj));
- renderer->getRasterBufferHandle(php_imageSrc->image, &rb);
- renderer->mergeRasterBuffer(php_image->image, &rb, 1.0, 0, 0, dstx, dsty, rb.width, rb.height);
+ if(MS_SUCCESS != renderer->getRasterBufferHandle(php_imageSrc->image, &rb)) {
+ mapscript_throw_exception("PasteImage failed to extract rasterbuffer handle" TSRMLS_CC);
+ return;
+ }
+ if(MS_SUCCESS != renderer->mergeRasterBuffer(php_image->image, &rb, 1.0, 0, 0, dstx, dsty, rb.width, rb.height)) {
+ mapscript_throw_exception("PasteImage failed to merge raster buffer" TSRMLS_CC);
+ return;
+ }
/* Look for r,g,b in color table and make it transparent.
* will return -1 if there is no exact match which will result in
diff --git a/mapscript/php/label.c b/mapscript/php/label.c
index 0df54ec..9fab6ec 100644
--- a/mapscript/php/label.c
+++ b/mapscript/php/label.c
@@ -175,7 +175,6 @@ PHP_METHOD(labelObj, __set)
{
char *property;
long property_len = 0;
- long unused;
zval *value;
zval *zobj = getThis();
php_label_object *php_label;
@@ -192,7 +191,6 @@ PHP_METHOD(labelObj, __set)
IF_SET_STRING("font", php_label->label->font, value)
else IF_SET_STRING("encoding", php_label->label->encoding, value)
- else IF_SET_LONG("type", unused, value)
else IF_SET_LONG("shadowsizex", php_label->label->shadowsizex, value)
else IF_SET_LONG("shadowsizey", php_label->label->shadowsizey, value)
else IF_SET_DOUBLE("size", php_label->label->size, value)
diff --git a/mapscript/php/line.c b/mapscript/php/line.c
index 9aa4620..cf73316 100644
--- a/mapscript/php/line.c
+++ b/mapscript/php/line.c
@@ -124,8 +124,6 @@ PHP_METHOD(lineObj, __set)
char *property;
long property_len = 0;
zval *value;
- zval *zobj = getThis();
- php_line_object *php_line;
PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz",
@@ -135,8 +133,6 @@ PHP_METHOD(lineObj, __set)
}
PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
- php_line = (php_line_object *) zend_object_store_get_object(zobj TSRMLS_CC);
-
if (STRING_EQUAL("numpoints", property)) {
mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property);
} else {
diff --git a/mapscript/php/mapscript_i.c b/mapscript/php/mapscript_i.c
index 48f94ba..7980e8d 100644
--- a/mapscript/php/mapscript_i.c
+++ b/mapscript/php/mapscript_i.c
@@ -34,6 +34,7 @@
/* grab mapserver declarations to wrap
*/
#include "../../mapserver.h"
+#include "../../mapows.h"
#include "../../maperror.h"
#include "../../mapprimitive.h"
#include "../../mapsymbol.h"
@@ -1553,7 +1554,9 @@ int rectObj_draw(rectObj *self, mapObj *map, layerObj *layer,
shape.text = strdup(text);
}
- msDrawShape(map, layer, &shape, img, -1, MS_DRAWMODE_FEATURES|MS_DRAWMODE_LABELS);
+ if(MS_SUCCESS != msDrawShape(map, layer, &shape, img, -1, MS_DRAWMODE_FEATURES|MS_DRAWMODE_LABELS)) {
+ /* error message has been set already */
+ }
msFreeShape(&shape);
@@ -2016,6 +2019,7 @@ imageObj *symbolObj_getImage(symbolObj *self, outputFormatObj *input_format)
imageObj *image = NULL;
outputFormatObj *format = NULL;
rendererVTableObj *renderer = NULL;
+ int retval;
if (self->type != MS_SYMBOL_PIXMAP) {
msSetError(MS_SYMERR, "Can't return image from non-pixmap symbol",
@@ -2026,9 +2030,7 @@ imageObj *symbolObj_getImage(symbolObj *self, outputFormatObj *input_format)
if (input_format) {
format = input_format;
} else {
- format = msCreateDefaultOutputFormat(NULL, "GD/GIF", "gdgif");
- if (format == NULL)
- format = msCreateDefaultOutputFormat(NULL, "GD/PNG", "gdpng");
+ format = msCreateDefaultOutputFormat(NULL, "AGG/PNG", "png");
if (format)
msInitializeRendererVTable(format);
@@ -2045,8 +2047,15 @@ imageObj *symbolObj_getImage(symbolObj *self, outputFormatObj *input_format)
if (self->pixmap_buffer) {
image = msImageCreate(self->pixmap_buffer->width, self->pixmap_buffer->height, format, NULL, NULL,
MS_DEFAULT_RESOLUTION, MS_DEFAULT_RESOLUTION, NULL);
- renderer->mergeRasterBuffer(image, self->pixmap_buffer, 1.0, 0, 0, 0, 0,
+ if(!image) {
+ return NULL;
+ }
+ retval = renderer->mergeRasterBuffer(image, self->pixmap_buffer, 1.0, 0, 0, 0, 0,
self->pixmap_buffer->width, self->pixmap_buffer->height);
+ if(retval != MS_SUCCESS) {
+ msFreeImage(image);
+ return NULL;
+ }
}
return image;
@@ -2069,7 +2078,8 @@ int symbolObj_setImage(symbolObj *self, imageObj *image)
return MS_FAILURE;
}
self->type = MS_SYMBOL_PIXMAP;
- renderer->getRasterBufferCopy(image, self->pixmap_buffer);
+ if(renderer->getRasterBufferCopy(image, self->pixmap_buffer) != MS_SUCCESS)
+ return MS_FAILURE;
return MS_SUCCESS;
}
diff --git a/mapscript/php/owsrequest.c b/mapscript/php/owsrequest.c
index f01d361..c28c953 100644
--- a/mapscript/php/owsrequest.c
+++ b/mapscript/php/owsrequest.c
@@ -130,8 +130,6 @@ PHP_METHOD(OWSRequestObj, __set)
char *property;
long property_len = 0;
zval *value;
- zval *zobj = getThis();
- php_owsrequest_object *php_owsrequest;
PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz",
@@ -141,8 +139,6 @@ PHP_METHOD(OWSRequestObj, __set)
}
PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
- php_owsrequest = (php_owsrequest_object *) zend_object_store_get_object(zobj TSRMLS_CC);
-
if ( (STRING_EQUAL("numparams", property)) ||
(STRING_EQUAL("type", property)) ||
(STRING_EQUAL("contenttype", property)) ||
@@ -383,12 +379,11 @@ char *owsrequest_getenv(const char *name, void *thread_context)
HashTable *cookies;
char *string_key = NULL, *cookie_tmp;
ulong num_key;
- int numElements, i = 0;
+ int i = 0;
TSRMLS_FETCH_FROM_CTX(thread_context);
if (STRING_EQUAL(name, "HTTP_COOKIE")) {
cookies = PG(http_globals)[TRACK_VARS_COOKIE]->value.ht;
- numElements = zend_hash_num_elements(cookies);
MAKE_STD_ZVAL(cookie_result);
ZVAL_STRING(cookie_result, "",1);
for(zend_hash_internal_pointer_reset(cookies);
diff --git a/mapscript/php/php_mapscript.c b/mapscript/php/php_mapscript.c
index b83f00d..dfd397a 100644
--- a/mapscript/php/php_mapscript.c
+++ b/mapscript/php/php_mapscript.c
@@ -1196,7 +1196,7 @@ PHP_MINIT_FUNCTION(mapscript)
REGISTER_LONG_CONSTANT("MS_DEBUGLEVEL_VVV", MS_DEBUGLEVEL_VVV, const_flag);
REGISTER_LONG_CONSTANT("MS_DEFAULT_CGI_PARAMS", MS_DEFAULT_CGI_PARAMS, const_flag);
REGISTER_LONG_CONSTANT("MS_DEFAULT_LABEL_PRIORITY", MS_DEFAULT_LABEL_PRIORITY, const_flag);
- REGISTER_LONG_CONSTANT("MS_ERROR_LANGUAGE", MS_ERROR_LANGUAGE, const_flag);
+ REGISTER_STRING_CONSTANT("MS_ERROR_LANGUAGE", MS_ERROR_LANGUAGE, const_flag);
REGISTER_LONG_CONSTANT("MS_FILE_MAP", MS_FILE_MAP, const_flag);
REGISTER_LONG_CONSTANT("MS_FILE_SYMBOL", MS_FILE_SYMBOL, const_flag);
REGISTER_LONG_CONSTANT("MS_GEOS_BEYOND", MS_GEOS_BEYOND, const_flag);
@@ -1301,7 +1301,7 @@ PHP_MINIT_FUNCTION(mapscript)
PHP_MSHUTDOWN_FUNCTION(mapscript)
{
/* Cleanup MapServer resources */
- msCleanup(0);
+ msCleanup();
return SUCCESS;
}
diff --git a/mapscript/php/php_mapscript.h b/mapscript/php/php_mapscript.h
index 207c674..d961fb9 100644
--- a/mapscript/php/php_mapscript.h
+++ b/mapscript/php/php_mapscript.h
@@ -57,6 +57,7 @@
#include "../../maptemplate.h"
#include "../../mapogcsld.h"
+#include "../../mapows.h"
#define MAPSCRIPT_VERSION "($Revision$ $Date$)"
diff --git a/mapscript/php/php_mapscript_util.c b/mapscript/php/php_mapscript_util.c
index 8e831b1..fc681bd 100644
--- a/mapscript/php/php_mapscript_util.c
+++ b/mapscript/php/php_mapscript_util.c
@@ -37,7 +37,9 @@ zend_object_value mapscript_object_new(zend_object *zobj,
void (*zend_objects_free_object) TSRMLS_DC)
{
zend_object_value retval;
+#if PHP_VERSION_ID < 50399
zval *temp;
+#endif
zobj->ce = ce;
ALLOC_HASHTABLE(zobj->properties);
@@ -59,7 +61,9 @@ zend_object_value mapscript_object_new_ex(zend_object *zobj,
zend_object_handlers *object_handlers TSRMLS_DC)
{
zend_object_value retval;
+#if PHP_VERSION_ID < 50399
zval *temp;
+#endif
zobj->ce = ce;
ALLOC_HASHTABLE(zobj->properties);
diff --git a/mapscript/php/result.c b/mapscript/php/result.c
index 3c18b1c..994b059 100644
--- a/mapscript/php/result.c
+++ b/mapscript/php/result.c
@@ -104,8 +104,6 @@ PHP_METHOD(resultObj, __set)
char *property;
long property_len = 0;
zval *value;
- zval *zobj = getThis();
- php_result_object *php_result;
PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz",
@@ -115,8 +113,6 @@ PHP_METHOD(resultObj, __set)
}
PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
- php_result = (php_result_object *) zend_object_store_get_object(zobj TSRMLS_CC);
-
if ( (STRING_EQUAL("shapeindex", property)) ||
(STRING_EQUAL("tileindex", property)) ||
(STRING_EQUAL("resultindex", property)) ||
diff --git a/mapscript/php/shapefile.c b/mapscript/php/shapefile.c
index 7b442a8..89aceff 100644
--- a/mapscript/php/shapefile.c
+++ b/mapscript/php/shapefile.c
@@ -134,8 +134,6 @@ PHP_METHOD(shapeFileObj, __set)
char *property;
long property_len = 0;
zval *value;
- zval *zobj = getThis();
- php_shapefile_object *php_shapefile;
PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz",
@@ -145,8 +143,6 @@ PHP_METHOD(shapeFileObj, __set)
}
PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
- php_shapefile = (php_shapefile_object *) zend_object_store_get_object(zobj TSRMLS_CC);
-
if ( (STRING_EQUAL("numshapes", property)) ||
(STRING_EQUAL("type", property)) ||
(STRING_EQUAL("source", property)) ||
diff --git a/mapscript/swiginc/color.i b/mapscript/swiginc/color.i
index c68eca2..8b57dba 100644
--- a/mapscript/swiginc/color.i
+++ b/mapscript/swiginc/color.i
@@ -61,31 +61,34 @@
free(self);
}
- int setRGB(int red, int green, int blue)
+ int setRGB(int red, int green, int blue, int alpha = 255)
{
/* Check colors */
- if (red > 255 || green > 255 || blue > 255) {
+ if (red > 255 || green > 255 || blue > 255 || alpha > 255) {
msSetError(MS_MISCERR, "Invalid color index.", "setRGB()");
return MS_FAILURE;
}
- MS_INIT_COLOR(*self, red, green, blue, 255);
+ MS_INIT_COLOR(*self, red, green, blue, alpha);
return MS_SUCCESS;
}
-
+
int setHex(char *psHexColor)
{
- int red, green, blue;
- if (psHexColor && strlen(psHexColor)== 7 && psHexColor[0] == '#') {
+ int red, green, blue, alpha = 255;
+ if (psHexColor && (strlen(psHexColor) == 7 || strlen(psHexColor) == 9) && psHexColor[0] == '#') {
red = msHexToInt(psHexColor+1);
green = msHexToInt(psHexColor+3);
blue= msHexToInt(psHexColor+5);
- if (red > 255 || green > 255 || blue > 255) {
+ if (strlen(psHexColor) == 9) {
+ alpha = msHexToInt(psHexColor+7);
+ }
+ if (red > 255 || green > 255 || blue > 255 || alpha > 255) {
msSetError(MS_MISCERR, "Invalid color index.", "setHex()");
return MS_FAILURE;
}
- MS_INIT_COLOR(*self, red, green, blue, 255);
+ MS_INIT_COLOR(*self, red, green, blue, alpha);
return MS_SUCCESS;
}
else {
@@ -97,7 +100,7 @@
%newobject toHex;
char *toHex()
{
- char hexcolor[8] = "";
+ char *hexcolor;
if (!self)
{
@@ -111,9 +114,20 @@
"toHex()");
return NULL;
}
- snprintf(hexcolor, 8, "#%02x%02x%02x",
- self->red, self->green, self->blue);
- return strdup(hexcolor);
+ if (self->alpha == 255) {
+ hexcolor = msSmallMalloc(8);
+ snprintf(hexcolor, 8, "#%02x%02x%02x",
+ self->red, self->green, self->blue);
+ } else if (self->alpha >= 0) {
+ hexcolor = msSmallMalloc(10);
+ snprintf(hexcolor, 10, "#%02x%02x%02x%02x",
+ self->red, self->green, self->blue, self->alpha);
+ } else {
+ msSetError(MS_MISCERR, "Can't express color with invalid alpha as hex",
+ "toHex()");
+ return NULL;
+ }
+ return hexcolor;
}
}
diff --git a/mapscript/swiginc/layer.i b/mapscript/swiginc/layer.i
index 62ca4e8..07a20aa 100644
--- a/mapscript/swiginc/layer.i
+++ b/mapscript/swiginc/layer.i
@@ -223,6 +223,11 @@
shape->type = self->type; /* is this right? */
retval = msLayerGetShape(self, shape, record);
+ if(retval != MS_SUCCESS) {
+ msFreeShape(shape);
+ free(shape);
+ return NULL;
+ } else
return shape;
}
diff --git a/mapscript/swiginc/mapzoom.i b/mapscript/swiginc/mapzoom.i
index 1f06db9..0f81e0c 100644
--- a/mapscript/swiginc/mapzoom.i
+++ b/mapscript/swiginc/mapzoom.i
@@ -206,7 +206,6 @@
double dfNewScale;
double dfDeltaExt;
double dfMiddleX, dfMiddleY;
- double dX, dY;
int bMaxExtSet;
bMaxExtSet = 0;
@@ -264,8 +263,6 @@
dfDeltaX = poGeorefExt->maxx - poGeorefExt->minx;
dfDeltaY = poGeorefExt->maxy - poGeorefExt->miny;
- dX = dfDeltaX/((double)width);
- dY = dfDeltaY/((double)height);
oNewGeorefExt.minx = Pix2Georef((int)poPixRect->minx, 0, width, poGeorefExt->minx, poGeorefExt->maxx, 0);
oNewGeorefExt.maxx = Pix2Georef((int)poPixRect->maxx, 0, width, poGeorefExt->minx, poGeorefExt->maxx, 0);
diff --git a/mapscript/swiginc/rect.i b/mapscript/swiginc/rect.i
index c3fabf4..b5529cd 100644
--- a/mapscript/swiginc/rect.i
+++ b/mapscript/swiginc/rect.i
@@ -86,6 +86,7 @@
int classindex, char *text)
{
shapeObj shape;
+ int ret;
msInitShape(&shape);
msRectToPolygon(*self, &shape);
@@ -94,11 +95,11 @@
shape.text = strdup(text);
}
- msDrawShape(map, layer, &shape, image, -1, MS_DRAWMODE_FEATURES|MS_DRAWMODE_LABELS);
+ ret = msDrawShape(map, layer, &shape, image, -1, MS_DRAWMODE_FEATURES|MS_DRAWMODE_LABELS);
msFreeShape(&shape);
- return MS_SUCCESS;
+ return ret;
}
%newobject getCenter;
diff --git a/mapscript/swiginc/symbol.i b/mapscript/swiginc/symbol.i
index de48621..2441fae 100644
--- a/mapscript/swiginc/symbol.i
+++ b/mapscript/swiginc/symbol.i
@@ -135,8 +135,18 @@
{
image = msImageCreate(self->pixmap_buffer->width, self->pixmap_buffer->height, format, NULL, NULL,
MS_DEFAULT_RESOLUTION, MS_DEFAULT_RESOLUTION, NULL);
- renderer->mergeRasterBuffer(image, self->pixmap_buffer, 1.0, 0, 0, 0, 0,
- self->pixmap_buffer->width, self->pixmap_buffer->height);
+ if(!image) {
+ msSetError(MS_IMGERR, "Could not create image",
+ "getImage()");
+ return NULL;
+ }
+ if(MS_SUCCESS != renderer->mergeRasterBuffer(image, self->pixmap_buffer, 1.0, 0, 0, 0, 0,
+ self->pixmap_buffer->width, self->pixmap_buffer->height)) {
+ msSetError(MS_IMGERR, "Could not merge symbol image",
+ "getImage()");
+ msFreeImage(image);
+ return NULL;
+ }
}
return image;
@@ -159,9 +169,7 @@
return MS_FAILURE;
}
self->type = MS_SYMBOL_PIXMAP;
- renderer->getRasterBufferCopy(image, self->pixmap_buffer);
-
- return MS_SUCCESS;
+ return renderer->getRasterBufferCopy(image, self->pixmap_buffer);
}
}
diff --git a/mapserv.c b/mapserv.c
index d8e5e28..4ba2539 100644
--- a/mapserv.c
+++ b/mapserv.c
@@ -53,7 +53,7 @@ void msCleanupOnSignal( int nInData )
/* normal stdio functions. */
msIO_installHandlers( NULL, NULL, NULL );
msIO_fprintf( stderr, "In msCleanupOnSignal.\n" );
- msCleanup(1);
+ msCleanup();
exit(0);
}
#endif
@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
/* -------------------------------------------------------------------- */
if( msSetup() != MS_SUCCESS ) {
msCGIWriteError(mapserv);
- msCleanup(0);
+ msCleanup();
exit(0);
}
@@ -301,7 +301,7 @@ end_request:
(execendtime.tv_sec+execendtime.tv_usec/1.0e6)-
(execstarttime.tv_sec+execstarttime.tv_usec/1.0e6) );
}
- msCleanup(0);
+ msCleanup();
#ifdef _WIN32
/* flush pending writes to stdout */
diff --git a/mapserver.h b/mapserver.h
index ec91380..0526c00 100644
--- a/mapserver.h
+++ b/mapserver.h
@@ -1969,7 +1969,7 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
MS_DLL_EXPORT int msSaveImage(mapObj *map, imageObj *img, char *filename);
MS_DLL_EXPORT void msFreeImage(imageObj *img);
MS_DLL_EXPORT int msSetup(void);
- MS_DLL_EXPORT void msCleanup(int signal);
+ MS_DLL_EXPORT void msCleanup(void);
MS_DLL_EXPORT mapObj *msLoadMapFromString(char *buffer, char *new_mappath);
/* Function prototypes, not wrapable */
@@ -2702,7 +2702,7 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
MS_DLL_EXPORT int *msAllocateValidClassGroups(layerObj *lp, int *nclasses);
MS_DLL_EXPORT void msFreeRasterBuffer(rasterBufferObj *b);
- MS_DLL_EXPORT int msSetLayerOpacity(layerObj *layer, int opacity);
+ MS_DLL_EXPORT void msSetLayerOpacity(layerObj *layer, int opacity);
void msMapSetLanguageSpecificConnection(mapObj* map, const char* validated_language);
MS_DLL_EXPORT shapeObj* msGeneralize(shapeObj * shape, double tolerance);
@@ -2806,12 +2806,6 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
const char *pszEntryPoint);
/* ==================================================================== */
- /* include definitions from mapows.h */
- /* ==================================================================== */
-#include "mapows.h"
-
-
- /* ==================================================================== */
/* prototypes for functions in mapgeos.c */
/* ==================================================================== */
MS_DLL_EXPORT void msGEOSSetup(void);
diff --git a/mapservutil.c b/mapservutil.c
index c74b996..6b21676 100644
--- a/mapservutil.c
+++ b/mapservutil.c
@@ -31,6 +31,7 @@
#include "mapserver.h"
#include "mapserv.h"
#include "maptime.h"
+#include "mapows.h"
/*
** Enumerated types, keep the query modes in sequence and at the end of the enumeration (mode enumeration is in maptemplate.h).
diff --git a/mapshape.c b/mapshape.c
index 174407c..75ab867 100644
--- a/mapshape.c
+++ b/mapshape.c
@@ -37,6 +37,7 @@
#include <limits.h>
#include <assert.h>
#include "mapserver.h"
+#include "mapows.h"
#if defined(USE_GDAL) || defined(USE_OGR)
#include <cpl_conv.h>
diff --git a/mapsymbol.c b/mapsymbol.c
index 6258ab2..e8029a1 100644
--- a/mapsymbol.c
+++ b/mapsymbol.c
@@ -35,6 +35,7 @@
#include "mapcopy.h"
#include "mapthread.h"
#include "fontcache.h"
+#include "mapows.h"
diff --git a/maptemplate.c b/maptemplate.c
index d7b37f1..6488292 100644
--- a/maptemplate.c
+++ b/maptemplate.c
@@ -31,6 +31,7 @@
#include "maphash.h"
#include "mapserver.h"
#include "maptile.h"
+#include "mapows.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3922,18 +3923,8 @@ static char *processLine(mapservObj *mapserv, char *instr, FILE *stream, int mod
outstr = msReplaceSubstring(outstr, "[lrn]", repstr);
outstr = msReplaceSubstring(outstr, "[cl]", mapserv->resultlayer->name); /* current layer name */
/* if(resultlayer->description) outstr = msReplaceSubstring(outstr, "[cd]", resultlayer->description); */ /* current layer description */
- }
-
- if(mode != QUERY) {
- if(processResultSetTag(mapserv, &outstr, stream) != MS_SUCCESS) {
- msFree(outstr);
- return(NULL);
- }
- }
- if(mode == QUERY) { /* return shape and/or values */
-
- /* allow layer metadata access in a query template, within the context of a query no layer name is necessary */
+ /* allow layer metadata access when there is a current result layer (implicitly a query template) */
if(&(mapserv->resultlayer->metadata) && strstr(outstr, "[metadata_")) {
for(i=0; i<MS_HASHSIZE; i++) {
if(mapserv->resultlayer->metadata.items[i] != NULL) {
@@ -3949,6 +3940,14 @@ static char *processLine(mapservObj *mapserv, char *instr, FILE *stream, int mod
}
}
}
+ }
+
+ if(mode != QUERY) {
+ if(processResultSetTag(mapserv, &outstr, stream) != MS_SUCCESS) {
+ msFree(outstr);
+ return(NULL);
+ }
+ } else { /* return shape and/or values */
snprintf(repstr, sizeof(repstr), "%f %f", (mapserv->resultshape.bounds.maxx + mapserv->resultshape.bounds.minx)/2, (mapserv->resultshape.bounds.maxy + mapserv->resultshape.bounds.miny)/2);
outstr = msReplaceSubstring(outstr, "[shpmid]", repstr);
diff --git a/mapthread.c b/mapthread.c
index 9dec10f..28bd708 100644
--- a/mapthread.c
+++ b/mapthread.c
@@ -185,10 +185,10 @@ void msThreadInit()
/* msGetThreadId() */
/************************************************************************/
-int msGetThreadId()
+void* msGetThreadId()
{
- return (int) pthread_self();
+ return pthread_self();
}
/************************************************************************/
@@ -273,10 +273,10 @@ void msThreadInit()
/* msGetThreadId() */
/************************************************************************/
-int msGetThreadId()
+void* msGetThreadId()
{
- return (int) GetCurrentThreadId();
+ return GetCurrentThreadId();
}
/************************************************************************/
diff --git a/mapthread.h b/mapthread.h
index f0087e5..d4d82f0 100644
--- a/mapthread.h
+++ b/mapthread.h
@@ -36,7 +36,7 @@ extern "C" {
#ifdef USE_THREAD
void msThreadInit(void);
- int msGetThreadId(void);
+ void* msGetThreadId(void);
void msAcquireLock(int);
void msReleaseLock(int);
#else
diff --git a/maputil.c b/maputil.c
index fe7a2d7..e00681b 100644
--- a/maputil.c
+++ b/maputil.c
@@ -37,6 +37,7 @@
#include "maptime.h"
#include "mapthread.h"
#include "mapcopy.h"
+#include "mapows.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
# include <windows.h>
@@ -1923,7 +1924,7 @@ int msSetup()
#include "maplibxml2.h"
#endif
#endif
-void msCleanup(int signal)
+void msCleanup()
{
msForceTmpFileBase( NULL );
msConnPoolFinalCleanup();
@@ -2161,7 +2162,6 @@ void msHSLtoRGB(double h, double s, double l, colorObj *rgb) {
*/
int msCheckParentPointer(void* p, char *objname)
{
- char* fmt="The %s parent object is null";
char* msg=NULL;
if (p == NULL) {
if(objname != NULL) {
@@ -2615,7 +2615,7 @@ shapeObj* msGeneralize(shapeObj *shape, double tolerance)
return newShape;
}
-int msSetLayerOpacity(layerObj *layer, int opacity) {
+void msSetLayerOpacity(layerObj *layer, int opacity) {
if(!layer->compositer) {
layer->compositer = msSmallMalloc(sizeof(LayerCompositer));
initLayerCompositer(layer->compositer);
diff --git a/mapwcs.c b/mapwcs.c
index 3d5180e..380b6b2 100644
--- a/mapwcs.c
+++ b/mapwcs.c
@@ -30,6 +30,7 @@
#include "mapserver.h"
#include "maperror.h"
#include "mapthread.h"
+#include "mapows.h"
#include <assert.h>
diff --git a/mapwcs11.c b/mapwcs11.c
index 0385f52..8dbe948 100644
--- a/mapwcs11.c
+++ b/mapwcs11.c
@@ -33,6 +33,7 @@
#include "mapserver.h"
#include "maperror.h"
#include "mapthread.h"
+#include "mapows.h"
#include "mapwcs.h"
diff --git a/mapwcs20.c b/mapwcs20.c
index 95351b8..ac2fb89 100644
--- a/mapwcs20.c
+++ b/mapwcs20.c
@@ -36,6 +36,7 @@
#include "mapserver.h"
#include "maperror.h"
#include "mapthread.h"
+#include "mapows.h"
#include "mapwcs.h"
#include <float.h>
#include "gdal.h"
diff --git a/mapwfs.c b/mapwfs.c
index 0b28233..3a52863 100644
--- a/mapwfs.c
+++ b/mapwfs.c
@@ -28,6 +28,7 @@
****************************************************************************/
#include "mapserver.h"
+#include "mapows.h"
@@ -995,6 +996,26 @@ static void msWFSWriteGeometryElement(FILE *stream, gmlGeometryListObj *geometry
return;
}
+static OWSGMLVersion msWFSGetGMLVersionFromSchemaVersion(WFSSchemaVersion outputformat)
+{
+ switch( outputformat )
+ {
+ case OWS_DEFAULT_SCHEMA:
+ return OWS_GML2;
+ case OWS_SFE_SCHEMA:
+ return OWS_GML3;
+ case OWS_GML32_SFE_SCHEMA:
+ return OWS_GML32;
+ }
+ return OWS_GML2;
+}
+
+static void msWFSSchemaWriteGeometryElement(FILE *stream, gmlGeometryListObj *geometryList, WFSSchemaVersion outputformat, const char *tab)
+{
+ OWSGMLVersion gmlversion = msWFSGetGMLVersionFromSchemaVersion(outputformat);
+ return msWFSWriteGeometryElement(stream,geometryList,gmlversion,tab);
+}
+
static const char* msWFSMapServTypeToXMLType(const char* type)
{
const char *element_type = "string";
@@ -1153,7 +1174,7 @@ static const char* msWFSGetGMLNamespaceURI(WFSSchemaVersion outputformat)
return "http://unknown";
}
-static const char* msWFSGetGMLNamespaceURIFromGMLVersion(WFSSchemaVersion outputformat)
+static const char* msWFSGetGMLNamespaceURIFromGMLVersion(OWSGMLVersion outputformat)
{
switch( outputformat )
{
@@ -1167,20 +1188,6 @@ static const char* msWFSGetGMLNamespaceURIFromGMLVersion(WFSSchemaVersion output
return "http://unknown";
}
-static OWSGMLVersion msWFSGetGMLVersionFromSchemaVersion(WFSSchemaVersion outputformat)
-{
- switch( outputformat )
- {
- case OWS_DEFAULT_SCHEMA:
- return OWS_GML2;
- case OWS_SFE_SCHEMA:
- return OWS_GML3;
- case OWS_GML32_SFE_SCHEMA:
- return OWS_GML32;
- }
- return OWS_GML2;
-}
-
static void msWFS_NS_printf(const char* prefix, const char* uri)
{
if( prefix == NULL )
@@ -1488,7 +1495,7 @@ this request. Check wfs/ows_enable_request settings.", "msWFSDescribeFeatureType
msIO_printf(" <sequence>\n");
/* write the geometry schema element(s) */
- msWFSWriteGeometryElement(stdout, geometryList, outputformat, " ");
+ msWFSSchemaWriteGeometryElement(stdout, geometryList, outputformat, " ");
/* write the constant-based schema elements */
for(k=0; k<constantList->numconstants; k++) {
@@ -2059,7 +2066,7 @@ static int msWFSRunFilter(mapObj* map,
/*preparse the filter for gml aliases*/
FLTPreParseFilterForAliasAndGroup(psNode, map, lp->index, "G");
- /* Check that FeatureId filters are consistant with the active layer */
+ /* Check that FeatureId filters are consistent with the active layer */
if( FLTCheckFeatureIdFilters(psNode, map, lp->index) == MS_FAILURE)
{
FLTFreeFilterEncodingNode( psNode );
diff --git a/mapwms.c b/mapwms.c
index 17a3a09..578c71e 100644
--- a/mapwms.c
+++ b/mapwms.c
@@ -35,6 +35,7 @@
#include "mapgml.h"
#include <ctype.h>
#include "maptemplate.h"
+#include "mapows.h"
#include "mapogcsld.h"
#include "mapogcfilter.h"
@@ -777,7 +778,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
const char *wms_request, owsRequestObj *ows_request)
{
int i, adjust_extent = MS_FALSE, nonsquare_enabled = MS_FALSE;
- int iUnits = -1;
int nLayerOrder = 0;
int transparent = MS_NOOVERRIDE;
int bbox_pixel_is_point = MS_FALSE;
@@ -1309,7 +1309,7 @@ this request. Check wms/ows_enable_request settings.",
** Validate first against epsg in the map and if no matching srs is found
** validate all layers requested.
*/
- if (epsgbuf != NULL && strlen(epsgbuf) > 1) {
+ if (epsgbuf[0] && epsgbuf[1]) { /*at least 2 chars*/
epsgvalid = MS_FALSE;
projstring = msOWSGetEPSGProj(&(map->projection), &(map->web.metadata),
"MO", MS_FALSE);
@@ -1452,9 +1452,10 @@ this request. Check wms/ows_enable_request settings.",
if (nTmp != 0)
return msWMSException(map, nVersion, NULL, wms_exception_format);
- iUnits = GetMapserverUnitUsingProj(&(map->projection));
- if (iUnits != -1)
- map->units = iUnits;
+ nTmp = GetMapserverUnitUsingProj(&(map->projection));
+ if( nTmp != -1 ) {
+ map->units = nTmp;
+ }
}
if (sld_url || sld_body) {
diff --git a/mapwmslayer.c b/mapwmslayer.c
index 9ba8f24..42a44f1 100644
--- a/mapwmslayer.c
+++ b/mapwmslayer.c
@@ -30,6 +30,7 @@
#include "mapserver.h"
#include "maperror.h"
#include "mapogcsld.h"
+#include "mapows.h"
#include <time.h>
#include <ctype.h>
diff --git a/renderers/agg/src/agg_font_freetype.cpp b/renderers/agg/src/agg_font_freetype.cpp
index 0663861..3e7d6fb 100644
--- a/renderers/agg/src/agg_font_freetype.cpp
+++ b/renderers/agg/src/agg_font_freetype.cpp
@@ -411,7 +411,7 @@ namespace mapserver
Scanline& sl,
ScanlineStorage& storage)
{
- int i;
+ unsigned int i;
const int8u* buf = (const int8u*)bitmap.buffer;
int pitch = bitmap.pitch;
sl.reset(x, x + bitmap.width);
@@ -426,7 +426,7 @@ namespace mapserver
{
sl.reset_spans();
bitset_iterator bits(buf, 0);
- int j;
+ unsigned int j;
for(j = 0; j < bitmap.width; j++)
{
if(bits.bit()) sl.add_cell(x + j, cover_full);
@@ -452,7 +452,7 @@ namespace mapserver
Scanline& sl,
ScanlineStorage& storage)
{
- int i, j;
+ unsigned int i, j;
const int8u* buf = (const int8u*)bitmap.buffer;
int pitch = bitmap.pitch;
sl.reset(x, x + bitmap.width);
diff --git a/scripts/vagrant/mapserver.sh b/scripts/vagrant/mapserver.sh
index 38e84d3..0d2d465 100755
--- a/scripts/vagrant/mapserver.sh
+++ b/scripts/vagrant/mapserver.sh
@@ -25,7 +25,7 @@ yacc -d -omapparser.c mapparser.y
cd build_vagrant
cmake -G "Unix Makefiles" -DWITH_CLIENT_WMS=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_PHP=1 \
- -DWITH_PYTHON=1 -DWITH_JAVA=0 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=0 \
+ -DWITH_PYTHON=1 -DWITH_JAVA=0 -DWITH_THREAD_SAFETY=1 \
-DWITH_FCGI=0 -DWITH_EXEMPI=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_FRIBIDI=1 -DWITH_HARFBUZZ=1 \
..
diff --git a/shp2img.c b/shp2img.c
index 23bc436..3d13c47 100644
--- a/shp2img.c
+++ b/shp2img.c
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
/* Use MS_ERRORFILE and MS_DEBUGLEVEL env vars if set */
if ( msDebugInitFromEnv() != MS_SUCCESS ) {
msWriteError(stderr);
- msCleanup(0);
+ msCleanup();
exit(1);
}
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
map = msLoadMap(argv[i+1], NULL);
if(!map) {
msWriteError(stderr);
- msCleanup(0);
+ msCleanup();
exit(1);
}
msApplyDefaultSubstitutions(map);
@@ -138,7 +138,7 @@ int main(int argc, char *argv[])
if(!map) {
fprintf(stderr, "Mapfile (-m) option not specified.\n");
- msCleanup(0);
+ msCleanup();
exit(1);
}
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
if( argc <= i+4 ) {
fprintf( stderr,
"Argument -e needs 4 space separated numbers as argument.\n" );
- msCleanup(0);
+ msCleanup();
exit(1);
}
map->extent.minx = atof(argv[i+1]);
@@ -267,7 +267,7 @@ int main(int argc, char *argv[])
}
if (layer_found==0) {
fprintf(stderr, "Layer (-l) \"%s\" not found\n", layers[j]);
- msCleanup(0);
+ msCleanup();
exit(1);
}
}
@@ -299,7 +299,7 @@ int main(int argc, char *argv[])
msWriteError(stderr);
msFreeMap(map);
- msCleanup(0);
+ msCleanup();
exit(1);
}
@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
(requeststarttime.tv_sec+requeststarttime.tv_usec/1.0e6) );
}
- msCleanup(0);
+ msCleanup();
} /* for(draws=0; draws<iterations; draws++) { */
return(0);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapserver.git
More information about the Pkg-grass-devel
mailing list