[mapserver-commits] r7745 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Jun 25 10:07:49 EDT 2008
Author: Assefa
Date: 2008-06-25 10:07:49 -0400 (Wed, 25 Jun 2008)
New Revision: 7745
Modified:
trunk/mapserver/mapraster.c
trunk/mapserver/mapshape.c
Log:
Correct windows build. Changes related to bug #2369
Modified: trunk/mapserver/mapraster.c
===================================================================
--- trunk/mapserver/mapraster.c 2008-06-25 06:57:01 UTC (rev 7744)
+++ trunk/mapserver/mapraster.c 2008-06-25 14:07:49 UTC (rev 7745)
@@ -1211,6 +1211,8 @@
rectObj searchrect;
gdImagePtr img;
char *pszTmp = NULL;
+ char tiAbsFilePath[MS_MAXPATHLEN];
+ char *tiAbsDirPath = NULL;
if(layer->debug > 0 || map->debug > 1)
msDebug( "msDrawRasterLayerLow(%s): entering.\n", layer->name );
@@ -1409,10 +1411,9 @@
#endif
*/
- char tiAbsFilePath[MS_MAXPATHLEN];
msBuildPath(tiAbsFilePath, map->mappath, layer->tileindex); /* absolute path to tileindex file */
- char *tiAbsDirPath = msGetPath(tiAbsFilePath); /* tileindex file's directory */
+ tiAbsDirPath = msGetPath(tiAbsFilePath); /* tileindex file's directory */
msBuildPath3(szPath, tiAbsDirPath, map->shapepath, filename);
Modified: trunk/mapserver/mapshape.c
===================================================================
--- trunk/mapserver/mapshape.c 2008-06-25 06:57:01 UTC (rev 7744)
+++ trunk/mapserver/mapshape.c 2008-06-25 14:07:49 UTC (rev 7745)
@@ -1799,9 +1799,10 @@
void msTileIndexAbsoluteDir(char *tiFileAbsDir, layerObj *layer)
{
char tiFileAbsPath[MS_MAXPATHLEN];
-
+ char *tiFileAbsDirTmp=NULL;
+
msBuildPath(tiFileAbsPath, layer->map->mappath, layer->tileindex); /* absolute path to tileindex file */
- char *tiFileAbsDirTmp = msGetPath(tiFileAbsPath); /* tileindex file's directory */
+ tiFileAbsDirTmp = msGetPath(tiFileAbsPath); /* tileindex file's directory */
strncpy(tiFileAbsDir, tiFileAbsDirTmp, MS_MAXPATHLEN);
free(tiFileAbsDirTmp);
}
@@ -1810,6 +1811,7 @@
{
int i;
char *filename, tilename[MS_MAXPATHLEN], szPath[MS_MAXPATHLEN];
+ char tiFileAbsDir[MS_MAXPATHLEN];
msTiledSHPLayerInfo *tSHP=NULL;
@@ -1859,7 +1861,6 @@
if((layer->tileitemindex = msDBFGetItemIndex(tSHP->tileshpfile->hDBF, layer->tileitem)) == -1) return(MS_FAILURE);
- char tiFileAbsDir[MS_MAXPATHLEN];
msTileIndexAbsoluteDir(tiFileAbsDir, layer);
/* position the source at the FIRST tile to use as a template, this is so the functions that fill the iteminfo array have something to work from */
@@ -1898,6 +1899,7 @@
{
int i, status;
char *filename, tilename[MS_MAXPATHLEN], szPath[MS_MAXPATHLEN];
+ char tiFileAbsDir[MS_MAXPATHLEN];
msTiledSHPLayerInfo *tSHP=NULL;
@@ -1920,7 +1922,6 @@
status= msLayerWhichShapes(tlp, rect);
if(status != MS_SUCCESS) return(status); /* could be MS_DONE or MS_FAILURE */
- char tiFileAbsDir[MS_MAXPATHLEN];
msTileIndexAbsoluteDir(tiFileAbsDir, layer);
msInitShape(&tshape);
@@ -1971,7 +1972,6 @@
status = msShapefileWhichShapes(tSHP->tileshpfile, rect, layer->debug);
if(status != MS_SUCCESS) return(status); /* could be MS_DONE or MS_FAILURE */
- char tiFileAbsDir[MS_MAXPATHLEN];
msTileIndexAbsoluteDir(tiFileAbsDir, layer);
/* position the source at the FIRST shapefile */
@@ -2029,6 +2029,7 @@
int i, status, filter_passed = MS_FALSE;
char *filename, tilename[MS_MAXPATHLEN], szPath[MS_MAXPATHLEN];
char **values=NULL;
+ char tiFileAbsDir[MS_MAXPATHLEN];
msTiledSHPLayerInfo *tSHP=NULL;
@@ -2042,7 +2043,6 @@
return(MS_FAILURE);
}
- char tiFileAbsDir[MS_MAXPATHLEN];
msTileIndexAbsoluteDir(tiFileAbsDir, layer);
do {
@@ -2188,6 +2188,7 @@
char *filename, tilename[MS_MAXPATHLEN], szPath[MS_MAXPATHLEN];
msTiledSHPLayerInfo *tSHP=NULL;
+ char tiFileAbsDir[MS_MAXPATHLEN];
if ( msCheckParentPointer(layer->map,"map")==MS_FAILURE )
return MS_FAILURE;
@@ -2214,7 +2215,6 @@
/* open the shapefile, since a specific tile was request an error should be generated if that tile does not exist */
if(strlen(filename) == 0) return(MS_FAILURE);
- char tiFileAbsDir[MS_MAXPATHLEN];
msTileIndexAbsoluteDir(tiFileAbsDir, layer);
msBuildPath3(szPath, tiFileAbsDir, layer->map->shapepath, filename);
More information about the mapserver-commits
mailing list