[Mapserver-dev] copyProperty in mapserver

Mladen Turk mturk at apache.org
Mon May 31 05:04:05 EDT 2004


This is a multi-part message in MIME format.

------=_NextPart_000_007A_01C446FE.F95F5AF0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_001_007B_01C446FE.F95F5AF0"


------=_NextPart_001_007B_01C446FE.F95F5AF0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

Here is the patched mapcopy.c, that uses few macros instead copyProperty
functions.

I'm sending the complete file instead the patch, cause it's quite a large one
:)
Also, I've moved msCopySymbol and msCopySymbolSet from mapsymbol.c so that the
new macros can be used (IMO those functions belongs in the mapcopy anyhow), so
if applied those functions has to be removed from mapsymbol.c.

I've tested them and AFAICT there are no memory leaks, nor heap corruption
caused by copyStringProperty used in the previous implementation.

MT.

------=_NextPart_001_007B_01C446FE.F95F5AF0
Content-Type: text/plain;
	name="mapcopy.c.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="mapcopy.c.txt"

/**********************************************************************=0A=
 * =0A=
 * $Id: mapcopy.c,v 1.24 2004/04/29 17:29:44 sean Exp $=0A=
 *=0A=
 * Project: MapServer=0A=
 * Purpose: Functions to allow copying/cloning of maps=0A=
 * Author:  Sean Gillies, sgillies at frii.com=0A=
 *=0A=
 * Notes: These functions are not in mapfile.c because that file is =0A=
 * cumbersome enough as it is.  There is agreement that this code and=0A=
 * that in mapfile.c should eventually be split up by object into =0A=
 * mapobj.c, layerobj.c, etc.  Or something like that.  =0A=
 *=0A=
 * Unit tests are written in Python using PyUnit and are in=0A=
 * mapscript/python/tests/testCopyMap.py.  The tests can be =0A=
 * executed from the python directory as=0A=
 *=0A=
 *   python2 tests/testCopyMap.py=0A=
 *=0A=
 * I just find Python to be very handy for unit testing, that's all.=0A=
 *=0A=
 *********************************************************************/=0A=
=0A=
#include <assert.h>=0A=
#include "map.h"=0A=
#include "mapsymbol.h"=0A=
=0A=
/***********************************************************************=0A=
 * Make the CVS Id available in mapcopy.o through 'strings'            *=0A=
 **********************************************************************/=0A=
=0A=
#ifndef DISABLE_CVSID=0A=
#  define CPL_CVSID(string)     static char cpl_cvsid[] =3D string; \=0A=
static char *cvsid_aw() { return( cvsid_aw() ? ((char *) NULL) : =
cpl_cvsid ); }=0A=
#else=0A=
#  define CPL_CVSID(string)=0A=
#endif=0A=
=0A=
CPL_CVSID("$Id: mapcopy.c,v 1.24 2004/04/29 17:29:44 sean Exp $");=0A=
=0A=
/*=0A=
 * struct assignment helper.=0A=
 */=0A=
#define MS_COPYSTELEM(name) (dst)->##name =3D (src)->##name=0A=
=0A=
#define MS_MACROBEGIN              do {=0A=
#define MS_MACROEND                } while (0) =0A=
=0A=
#define MS_COPYRECT(dst, src)       \=0A=
    MS_MACROBEGIN                   \=0A=
        (dst)->minx =3D (src)->minx;  \=0A=
        (dst)->miny =3D (src)->miny;  \=0A=
        (dst)->maxx =3D (src)->maxx;  \=0A=
        (dst)->maxy =3D (src)->maxy;  \=0A=
    MS_MACROEND=0A=
=0A=
#define MS_COPYPOINT(dst, src)      \=0A=
    MS_MACROBEGIN                   \=0A=
        (dst)->x =3D (src)->x;        \=0A=
        (dst)->y =3D (src)->y;        \=0A=
        (dst)->m =3D (src)->m;        \=0A=
    MS_MACROEND=0A=
=0A=
#define MS_COPYCOLOR(dst, src)      \=0A=
    MS_MACROBEGIN                   \=0A=
        (dst)->pen   =3D (src)->pen;  \=0A=
        (dst)->red   =3D (src)->red;  \=0A=
        (dst)->green =3D (src)->green;\=0A=
        (dst)->blue  =3D (src)->blue; \=0A=
    MS_MACROEND=0A=
=0A=
#define MS_COPYSTRING(dst, src)     \=0A=
    MS_MACROBEGIN                   \=0A=
        if ((dst) !=3D NULL)          \=0A=
            msFree((dst));          \=0A=
        if ((src) !=3D NULL)          \=0A=
            (dst) =3D strdup((src));  \=0A=
        else                        \=0A=
            (dst) =3D NULL;           \=0A=
    MS_MACROEND=0A=
=0A=
=0A=
/***********************************************************************=0A=
 * msCopyProjection()                                                  *=0A=
 *                                                                     *=0A=
 * Copy a projectionObj                                                *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyProjection(projectionObj *dst, projectionObj *src) {=0A=
=0A=
#ifdef USE_PROJ=0A=
    int i;=0A=
    dst->numargs =3D src->numargs;=0A=
    for (i =3D 0; i < dst->numargs; i++) {=0A=
        MS_COPYSTRING(dst->args[i], src->args[i]);=0A=
    }=0A=
    if (dst->numargs !=3D 0) {=0A=
        if (msProcessProjection(dst) !=3D MS_SUCCESS)=0A=
            return MS_FAILURE;=0A=
=0A=
    }=0A=
#endif=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyLine()                                                        *=0A=
 *                                                                     *=0A=
 * Copy a lineObj, using msCopyPoint()                                 *=0A=
 **********************************************************************/=0A=
int msCopyLine(lineObj *dst, lineObj *src) {=0A=
  =0A=
    int i;=0A=
=0A=
    dst->numpoints =3D src->numpoints;=0A=
    for (i =3D 0; i < dst->numpoints; i++) {=0A=
        MS_COPYPOINT(&(dst->point[i]), &(src->point[i]));=0A=
    }=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyShape()                                                       *=0A=
 *                                                                     *=0A=
 * Copy a shapeObj, using msCopyLine(), msCopyRect()                   *=0A=
 * Not completely implemented or tested.                               *=0A=
 **********************************************************************/=0A=
/*=0A=
int msCopyShapeObj(shapeObj *dst, shapeObj *src) {=0A=
  int i;=0A=
  copyProperty(&(dst->numlines), &(src->numlines), sizeof(int));=0A=
  for (i =3D 0; i < dst->numlines; i++) {=0A=
    msCopyLine(&(dst->line[i]), &(src->line[i]));=0A=
  }=0A=
  msCopyRect(&(dst->bounds), &(src->bounds));=0A=
  copyProperty(&(dst->type), &(src->type), sizeof(int));=0A=
  copyProperty(&(dst->index), &(src->index), sizeof(long));=0A=
  copyProperty(&(dst->tileindex), &(src->tileindex), sizeof(int));=0A=
  copyProperty(&(dst->classindex), &(src->classindex), sizeof(int));=0A=
  copyStringPropertyRealloc(&(dst->text), src->text);=0A=
  copyProperty(&(dst->numvalues), &(src->numvalues), sizeof(int));=0A=
  for (i =3D 0; i < dst->numvalues; i++) {=0A=
    copyStringPropertyRealloc(&(dst->values[i]), src->values[i]);=0A=
  }=0A=
=0A=
  return(0);=0A=
}=0A=
*/=0A=
=0A=
/**********************************************************************=0A=
 * msCopyItem()                                                        *=0A=
 *                                                                     *=0A=
 * Copy an itemObj                                                     *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyItem(itemObj *dst, itemObj *src) {=0A=
    =0A=
    MS_COPYSTRING(dst->name, src->name);=0A=
    MS_COPYSTELEM(type);=0A=
    MS_COPYSTELEM(index);=0A=
    MS_COPYSTELEM(size);=0A=
    MS_COPYSTELEM(numdecimals);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyHashTable()                                                   *=0A=
 *                                                                     *=0A=
 * Copy a hashTableObj, using msInsertHashTable()                      *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyHashTable(hashTableObj dst, hashTableObj src) {=0A=
    const char *key=3DNULL;=0A=
    while (1) {=0A=
        key =3D msNextKeyFromHashTable(src, key);=0A=
        if (!key) =0A=
            break;=0A=
        else =0A=
            msInsertHashTable(dst, key, msLookupHashTable(src, key));=0A=
    }=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyFontSet()                                                     *=0A=
 *                                                                     *=0A=
 * Copy a fontSetObj, using msCreateHashTable() and msCopyHashTable()  *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyFontSet(fontSetObj *dst, fontSetObj *src, mapObj *map)=0A=
{=0A=
=0A=
    MS_COPYSTRING(dst->filename, src->filename);=0A=
    MS_COPYSTELEM(numfonts);=0A=
    if (src->fonts) {=0A=
        if (!dst->fonts)=0A=
            dst->fonts =3D msCreateHashTable();=0A=
        if (msCopyHashTable(dst->fonts, src->fonts) !=3D MS_SUCCESS)=0A=
            return MS_FAILURE;=0A=
    }=0A=
=0A=
    dst->map =3D map;=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyExpression(                                                   *=0A=
 *                                                                     *=0A=
 * Copy an expressionObj, but only its string and type                 *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyExpression(expressionObj *dst, expressionObj *src)=0A=
{=0A=
    MS_COPYSTRING(dst->string, src->string);=0A=
    MS_COPYSTELEM(type);=0A=
    dst->compiled =3D MS_FALSE;=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyJoin()                                                        *=0A=
 *                                                                     *=0A=
 * Copy a joinObj                                                      *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyJoin(joinObj *dst, joinObj *src)=0A=
{=0A=
    int i;=0A=
    MS_COPYSTRING(dst->name, src->name);=0A=
=0A=
    // not sure it makes sense to copy the values (or the items for that =
matter) since=0A=
    // since they are runtime additions to the mapfile, probably should =
be NULL with numitems=3D0=0A=
    MS_COPYSTELEM(numitems);=0A=
    for (i =3D 0; i < dst->numitems; i++) {=0A=
        MS_COPYSTRING(dst->items[i], src->items[i]);=0A=
        MS_COPYSTRING(dst->values[i], src->values[i]);  =0A=
    }=0A=
=0A=
    MS_COPYSTRING(dst->table, src->table);=0A=
    MS_COPYSTRING(dst->from, src->from);=0A=
    MS_COPYSTRING(dst->to, src->to);=0A=
    MS_COPYSTRING(dst->header, src->header);=0A=
#ifndef __cplusplus=0A=
    MS_COPYSTRING(dst->template, src->template);=0A=
#else=0A=
    MS_COPYSTRING(dst->_template, src->_template);=0A=
#endif=0A=
    MS_COPYSTRING(dst->footer, src->footer);=0A=
    dst->type =3D src->type;=0A=
    MS_COPYSTRING(dst->connection, src->connection);=0A=
=0A=
    MS_COPYSTELEM(connectiontype);=0A=
=0A=
    // TODO: need to handle joininfo (probably should be just set to =
NULL)=0A=
    dst->joininfo =3D NULL;=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyQueryMap()                                                    *=0A=
 *                                                                     *=0A=
 * Copy a queryMapObj, using msCopyColor()                             *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyQueryMap(queryMapObj *dst, queryMapObj *src) =0A=
{=0A=
    MS_COPYSTELEM(height);=0A=
    MS_COPYSTELEM(width);=0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(style);=0A=
    MS_COPYCOLOR(&(dst->color), &(src->color));=0A=
=0A=
  return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyLabel()                                                       *=0A=
 *                                                                     *=0A=
 * Copy a labelObj, using msCopyColor()                                *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyLabel(labelObj *dst, labelObj *src) =0A=
{=0A=
=0A=
    MS_COPYSTRING(dst->font, src->font);=0A=
    MS_COPYSTELEM(type);=0A=
=0A=
    MS_COPYCOLOR(&(dst->color), &(src->color));=0A=
    MS_COPYCOLOR(&(dst->outlinecolor), &(src->outlinecolor));=0A=
    MS_COPYCOLOR(&(dst->shadowcolor), &(src->shadowcolor));=0A=
=0A=
    MS_COPYSTELEM(shadowsizex);=0A=
    MS_COPYSTELEM(shadowsizey);=0A=
=0A=
    MS_COPYCOLOR(&(dst->backgroundcolor), &(src->backgroundcolor));=0A=
    MS_COPYCOLOR(&(dst->backgroundshadowcolor), =
&(src->backgroundshadowcolor));=0A=
=0A=
    MS_COPYSTELEM(backgroundshadowsizex);=0A=
    MS_COPYSTELEM(backgroundshadowsizey);=0A=
    MS_COPYSTELEM(size);=0A=
    MS_COPYSTELEM(sizescaled);=0A=
    MS_COPYSTELEM(minsize);=0A=
    MS_COPYSTELEM(maxsize);=0A=
    MS_COPYSTELEM(position);=0A=
    MS_COPYSTELEM(offsetx);=0A=
    MS_COPYSTELEM(offsety);=0A=
    MS_COPYSTELEM(angle);=0A=
    MS_COPYSTELEM(autoangle);=0A=
    MS_COPYSTELEM(buffer);=0A=
    MS_COPYSTELEM(antialias);=0A=
    MS_COPYSTELEM(wrap);=0A=
    MS_COPYSTELEM(minfeaturesize);=0A=
=0A=
    MS_COPYSTELEM(autominfeaturesize);=0A=
=0A=
    MS_COPYSTELEM(mindistance);=0A=
    MS_COPYSTELEM(partials);=0A=
    MS_COPYSTELEM(force);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyWeb()                                                         *=0A=
 *                                                                     *=0A=
 * Copy webObj, using msCopyRect(), msCreateHashTable(), and           *=0A=
 * msCopyHashTable()                                                   *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyWeb(webObj *dst, webObj *src, mapObj *map) =0A=
{=0A=
=0A=
    MS_COPYSTRING(dst->log, src->log);=0A=
    MS_COPYSTRING(dst->imagepath, src->imagepath);=0A=
    MS_COPYSTRING(dst->imageurl, src->imageurl);=0A=
    dst->map =3D map;=0A=
#ifndef __cplusplus=0A=
    MS_COPYSTRING(dst->template, src->template);=0A=
#else=0A=
    MS_COPYSTRING(dst->_template, src->_template);=0A=
#endif=0A=
    MS_COPYSTRING(dst->header, src->header);=0A=
    MS_COPYSTRING(dst->footer, src->footer);=0A=
    MS_COPYSTRING(dst->empty, src->empty);=0A=
    MS_COPYSTRING(dst->error, src->error);=0A=
=0A=
    MS_COPYRECT(&(dst->extent), &(src->extent));=0A=
=0A=
    MS_COPYSTELEM(minscale);=0A=
    MS_COPYSTELEM(maxscale);=0A=
    MS_COPYSTRING(dst->mintemplate, src->mintemplate);=0A=
    MS_COPYSTRING(dst->maxtemplate, src->maxtemplate);=0A=
=0A=
    if (src->metadata) {=0A=
        dst->metadata =3D msCreateHashTable();=0A=
        if (msCopyHashTable((dst->metadata), (src->metadata)) !=3D =
MS_SUCCESS)=0A=
            return MS_FAILURE;=0A=
    }=0A=
=0A=
    return MS_SUCCESS ;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyStyle()                                                       *=0A=
 *                                                                     *=0A=
 * Copy a styleObj, using msCopyColor()                                *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyStyle(styleObj *dst, styleObj *src) =0A=
{=0A=
=0A=
    MS_COPYCOLOR(&(dst->color), &(src->color));=0A=
    MS_COPYCOLOR(&(dst->outlinecolor),&(src->outlinecolor));=0A=
    MS_COPYCOLOR(&(dst->backgroundcolor), &(src->backgroundcolor));=0A=
    MS_COPYSTRING(dst->symbolname, src->symbolname);=0A=
=0A=
    MS_COPYSTELEM(symbol);=0A=
    MS_COPYSTELEM(size);=0A=
    MS_COPYSTELEM(sizescaled);=0A=
    MS_COPYSTELEM(minsize);=0A=
    MS_COPYSTELEM(maxsize);=0A=
    MS_COPYSTELEM(offsetx);=0A=
    MS_COPYSTELEM(offsety);=0A=
    MS_COPYSTELEM(isachild);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyClass()                                                       *=0A=
 *                                                                     *=0A=
 * Copy a classObj, using msCopyExpression(), msCopyStyle(),           *=0A=
 * msCopyLabel(), msCreateHashTable(), msCopyHashTable()               *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyClass(classObj *dst, classObj *src, layerObj *layer) =0A=
{=0A=
    int i, return_value;=0A=
=0A=
    return_value =3D =
msCopyExpression(&(dst->expression),&(src->expression));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy expression.", =
"msCopyClass()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(numstyles);=0A=
=0A=
    for (i =3D 0; i < dst->numstyles; i++) {=0A=
        if (msCopyStyle(&(dst->styles[i]), &(src->styles[i])) !=3D =
MS_SUCCESS) {=0A=
            msSetError(MS_MEMERR, "Failed to copy style.", =
"msCopyClass()");=0A=
            return MS_FAILURE;=0A=
        }=0A=
    }=0A=
=0A=
    if (msCopyLabel(&(dst->label), &(src->label)) !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy label.", "msCopyClass()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    MS_COPYSTRING(dst->keyimage, src->keyimage);=0A=
    MS_COPYSTRING(dst->name, src->name);=0A=
    MS_COPYSTRING(dst->title, src->title);=0A=
=0A=
    if (msCopyExpression(&(dst->text), &(src->text)) !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy text.", "msCopyClass()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
#ifndef __cplusplus=0A=
    MS_COPYSTRING(dst->template, src->template);=0A=
#else=0A=
    MS_COPYSTRING(dst->_template, src->_template);=0A=
#endif=0A=
    MS_COPYSTELEM(type);=0A=
=0A=
    if (src->metadata !=3D NULL) {=0A=
        dst->metadata =3D msCreateHashTable();=0A=
        msCopyHashTable(dst->metadata, src->metadata);=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(minscale);=0A=
    MS_COPYSTELEM(maxscale);=0A=
    MS_COPYSTELEM(layer);=0A=
    MS_COPYSTELEM(debug);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyLabelCacheMember()                                            *=0A=
 *                                                                     *=0A=
 * Copy a labelCacheMemberObj using msCopyStyle(), msCopyPoint()       *=0A=
 *                                                                     *=0A=
 * Note: since it seems most users will want to clone maps rather than *=0A=
 * make exact copies, this method might not get much use.              *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyLabelCacheMember(labelCacheMemberObj *dst,=0A=
                           labelCacheMemberObj *src)=0A=
{=0A=
    int i;=0A=
=0A=
    MS_COPYSTRING(dst->string, src->string);=0A=
    MS_COPYSTELEM(featuresize);=0A=
    MS_COPYSTELEM(numstyles);=0A=
=0A=
    for (i =3D 0; i < dst->numstyles; i++) {=0A=
        msCopyStyle(&(dst->styles[i]), &(src->styles[i]));=0A=
    }=0A=
=0A=
    msCopyLabel(&(dst->label), &(src->label));=0A=
    MS_COPYSTELEM(layerindex);=0A=
    MS_COPYSTELEM(classindex);=0A=
    MS_COPYSTELEM(tileindex);=0A=
    MS_COPYSTELEM(shapeindex);=0A=
    MS_COPYPOINT(&(dst->point), &(src->point));=0A=
    //msCopyShape(&(dst->poly), &(src->poly));=0A=
    MS_COPYSTELEM(status);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyMarkerCacheMember()                                           *=0A=
 *                                                                     *=0A=
 * Copy a markerCacheMemberObj                                         *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyMarkerCacheMember(markerCacheMemberObj *dst,=0A=
                            markerCacheMemberObj *src) =0A=
{  =0A=
    MS_COPYSTELEM(id);=0A=
  =0A=
    //msCopyShape(&(dst->poly), &(src->poly));=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyLabelCache()                                                  *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyLabelCache(labelCacheObj *dst, labelCacheObj *src) =0A=
{=0A=
    int i;=0A=
    MS_COPYSTELEM(numlabels);=0A=
    for (i =3D 0; i < dst->numlabels; i++) {=0A=
        msCopyLabelCacheMember(&(dst->labels[i]), &(src->labels[i]));=0A=
    }=0A=
    MS_COPYSTELEM(cachesize);=0A=
    MS_COPYSTELEM(nummarkers);=0A=
    for (i =3D 0; i < dst->nummarkers; i++) {=0A=
        msCopyMarkerCacheMember(&(dst->markers[i]), &(src->markers[i]));=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(markercachesize);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyMarkerCacheMember()                                           *=0A=
 *                                                                     *=0A=
 * Copy a markerCacheMemberObj                                         *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyResultCacheMember(resultCacheMemberObj *dst,=0A=
                            resultCacheMemberObj *src)=0A=
{=0A=
    MS_COPYSTELEM(shapeindex);=0A=
    MS_COPYSTELEM(tileindex);=0A=
    MS_COPYSTELEM(classindex);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyResultCache()                                                 *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyResultCache(resultCacheObj *dst, resultCacheObj *src) =0A=
{=0A=
    int i;=0A=
    MS_COPYSTELEM(cachesize);=0A=
    MS_COPYSTELEM(numresults);=0A=
    for (i =3D 0; i < dst->numresults; i++) {=0A=
        msCopyResultCacheMember(&(dst->results[i]), &(src->results[i]));=0A=
    }=0A=
    MS_COPYRECT(&(dst->bounds), &(src->bounds));=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyReferenceMap()                                                *=0A=
 *                                                                     *=0A=
 * Copy a referenceMapObj using mapfile.c:initReferenceMap(),          *=0A=
 * msCopyRect(), msCopyColor()                                         *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyReferenceMap(referenceMapObj *dst, referenceMapObj *src,=0A=
                       mapObj *map)=0A=
{=0A=
=0A=
    initReferenceMap(dst);=0A=
=0A=
    MS_COPYRECT(&(dst->extent), &(src->extent));=0A=
=0A=
    MS_COPYSTELEM(height);=0A=
    MS_COPYSTELEM(width);=0A=
=0A=
=0A=
    MS_COPYCOLOR(&(dst->color), &(src->color));=0A=
    MS_COPYCOLOR(&(dst->outlinecolor),&(src->outlinecolor));=0A=
    MS_COPYSTRING(dst->image, src->image);=0A=
=0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(marker);=0A=
    MS_COPYSTRING(dst->markername, src->markername);=0A=
    MS_COPYSTELEM(markersize);=0A=
    MS_COPYSTELEM(minboxsize);=0A=
    MS_COPYSTELEM(maxboxsize);=0A=
    dst->map =3D map;=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyScalebar()                                                    *=0A=
 *                                                                     *=0A=
 * Copy a scalebarObj, using initScalebar(), msCopyColor(),            *=0A=
 * and msCopyLabel()                                                   *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyScalebar(scalebarObj *dst, scalebarObj *src)=0A=
{=0A=
=0A=
    initScalebar(dst);=0A=
=0A=
    MS_COPYCOLOR(&(dst->imagecolor), &(src->imagecolor));=0A=
    MS_COPYSTELEM(height);=0A=
    MS_COPYSTELEM(width);=0A=
    MS_COPYSTELEM(style);=0A=
    MS_COPYSTELEM(intervals);=0A=
=0A=
    if (msCopyLabel(&(dst->label), &(src->label)) !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy =
label.","msCopyScalebar()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    MS_COPYCOLOR(&(dst->color), &(src->color));=0A=
    MS_COPYCOLOR(&(dst->backgroundcolor), &(src->backgroundcolor));=0A=
=0A=
    MS_COPYCOLOR(&(dst->outlinecolor), &(src->outlinecolor));=0A=
=0A=
    MS_COPYSTELEM(units);=0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(position);=0A=
    MS_COPYSTELEM(transparent);=0A=
    MS_COPYSTELEM(interlace);=0A=
    MS_COPYSTELEM(postlabelcache);=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyLegend()                                                      *=0A=
 *                                                                     *=0A=
 * Copy a legendObj, using msCopyColor()                               *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyLegend(legendObj *dst, legendObj *src, mapObj *map)=0A=
{=0A=
    int return_value;=0A=
=0A=
    MS_COPYCOLOR(&(dst->imagecolor), &(src->imagecolor));=0A=
=0A=
    return_value =3D msCopyLabel(&(dst->label), &(src->label));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy label.",=0A=
            "msCopyLegend()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(keysizex);=0A=
    MS_COPYSTELEM(keysizey);=0A=
    MS_COPYSTELEM(keyspacingx);=0A=
    MS_COPYSTELEM(keyspacingy);=0A=
=0A=
    MS_COPYCOLOR(&(dst->outlinecolor),&(src->outlinecolor));=0A=
=0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(height);=0A=
    MS_COPYSTELEM(width);=0A=
    MS_COPYSTELEM(position);=0A=
    MS_COPYSTELEM(transparent);=0A=
    MS_COPYSTELEM(interlace);=0A=
    MS_COPYSTELEM(postlabelcache);=0A=
=0A=
#ifndef __cplusplus=0A=
    MS_COPYSTRING(dst->template, src->template);=0A=
#else=0A=
    MS_COPYSTRING(dst->_template, src->_template);=0A=
#endif=0A=
    dst->map =3D map;=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyLayer()                                                       *=0A=
 *                                                                     *=0A=
 * Copy a layerObj, using mapfile.c:initClass(), msCopyClass(),        *=0A=
 * msCopyColor(), msCopyProjection(), msSHPOpenFile(),                 *=0A=
 * msCreateHashTable(), msCopyHashTable(), msCopyExpression()          *=0A=
 *                                                                     *=0A=
 * As it stands, we are not copying a layer's resultcache              *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyLayer(layerObj *dst, layerObj *src)=0A=
{=0A=
    int i, return_value;=0A=
    featureListNodeObjPtr current;=0A=
    //  char szPath[MS_MAXPATHLEN];=0A=
=0A=
    MS_COPYSTELEM(index);=0A=
    MS_COPYSTRING(dst->classitem, src->classitem);=0A=
=0A=
    MS_COPYSTELEM(classitemindex);=0A=
    MS_COPYSTELEM(numclasses);=0A=
=0A=
    for (i =3D 0; i < dst->numclasses; i++) {=0A=
#ifndef __cplusplus=0A=
        initClass(&(dst->class[i]));=0A=
=0A=
        return_value =3D msCopyClass(&(dst->class[i]), &(src->class[i]), =
dst);=0A=
        if (return_value !=3D MS_SUCCESS) {=0A=
            msSetError(MS_MEMERR, "Failed to copy class.", =
"msCopyLayer()");=0A=
            return MS_FAILURE;=0A=
        }=0A=
#else=0A=
        initClass(&(dst->_class[i]));=0A=
=0A=
        return_value =3D msCopyClass(&(dst->_class[i]), =
&(src->_class[i]), dst);=0A=
        if (return_value !=3D MS_SUCCESS) {=0A=
            msSetError(MS_MEMERR, "Failed to copy _class.", =
"msCopyLayer()");=0A=
            return MS_FAILURE;=0A=
        }=0A=
#endif=0A=
    }=0A=
    MS_COPYSTRING(dst->header, src->header);=0A=
    MS_COPYSTRING(dst->footer, src->footer);=0A=
#ifndef __cplusplus=0A=
    MS_COPYSTRING(dst->template, src->template);=0A=
#else=0A=
    MS_COPYSTRING(dst->_template, src->_template);=0A=
#endif=0A=
=0A=
    //copyProperty(&(dst->resultcache), &(src->resultcache),=0A=
    //sizeof(resultCacheObj *));=0A=
    //=0A=
    MS_COPYSTRING(dst->name, src->name); =0A=
    MS_COPYSTRING(dst->group, src->group); =0A=
    MS_COPYSTRING(dst->data, src->data); =0A=
    =0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(type);=0A=
    MS_COPYSTELEM(annotate);=0A=
    MS_COPYSTELEM(tolerance);=0A=
    MS_COPYSTELEM(toleranceunits);=0A=
    MS_COPYSTELEM(symbolscale);=0A=
    MS_COPYSTELEM(scalefactor);=0A=
    MS_COPYSTELEM(minscale);=0A=
    MS_COPYSTELEM(maxscale);=0A=
=0A=
    MS_COPYSTELEM(labelminscale);=0A=
    MS_COPYSTELEM(labelmaxscale);=0A=
=0A=
    MS_COPYSTELEM(sizeunits);=0A=
    MS_COPYSTELEM(maxfeatures);=0A=
=0A=
    MS_COPYCOLOR(&(dst->offsite), &(src->offsite));=0A=
=0A=
    MS_COPYSTELEM(transform);=0A=
    MS_COPYSTELEM(labelcache);=0A=
    MS_COPYSTELEM(postlabelcache); =0A=
=0A=
    MS_COPYSTRING(dst->labelitem, src->labelitem);=0A=
    MS_COPYSTRING(dst->labelsizeitem, src->labelsizeitem);=0A=
    MS_COPYSTRING(dst->labelangleitem, src->labelangleitem);=0A=
=0A=
    MS_COPYSTELEM(labelitemindex);=0A=
    MS_COPYSTELEM(labelsizeitemindex);=0A=
    MS_COPYSTELEM(labelangleitemindex);=0A=
=0A=
    MS_COPYSTRING(dst->tileitem, src->tileitem);=0A=
    MS_COPYSTELEM(tileitemindex);=0A=
=0A=
    MS_COPYSTRING(dst->tileindex, src->tileindex); =0A=
=0A=
    return_value =3D =
msCopyProjection(&(dst->projection),&(src->projection));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy projection.", =
"msCopyLayer()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(project); =0A=
    MS_COPYSTELEM(units); =0A=
=0A=
    current =3D src->features;=0A=
    while(current !=3D NULL) {=0A=
        insertFeatureList(&(dst->features), &(current->shape));=0A=
        current =3D current->next;=0A=
    }=0A=
=0A=
    MS_COPYSTRING(dst->connection, src->connection);=0A=
    MS_COPYSTELEM(connectiontype);=0A=
    MS_COPYSTELEM(sameconnection);=0A=
=0A=
    //msSHPOpenFile(&(dst->shpfile), "rb", msBuildPath(szPath, =
src->map->shapepath, src->data));=0A=
    //msSHPOpenFile(&(dst->tileshpfile), "rb", msBuildPath(szPath, =
src->map->shapepath, src->tileindex));=0A=
=0A=
    MS_COPYSTELEM(layerinfo);=0A=
    MS_COPYSTELEM(ogrlayerinfo); =0A=
    MS_COPYSTELEM(wfslayerinfo);=0A=
    MS_COPYSTELEM(numitems);=0A=
=0A=
    for (i =3D 0; i < dst->numitems; i++) {=0A=
        MS_COPYSTRING(dst->items[i], src->items[i]);=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(iteminfo);=0A=
=0A=
    return_value =3D msCopyExpression(&(dst->filter), &(src->filter));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy filter.", "msCopyLayer()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    MS_COPYSTRING(dst->filteritem, src->filteritem);=0A=
    MS_COPYSTELEM(filteritemindex);=0A=
=0A=
    MS_COPYSTRING(dst->styleitem, src->styleitem); =0A=
    MS_COPYSTELEM(styleitemindex);=0A=
=0A=
    MS_COPYSTRING(dst->requires, src->requires); =0A=
    MS_COPYSTRING(dst->labelrequires, src->labelrequires);=0A=
=0A=
    if (src->metadata) {=0A=
        dst->metadata =3D msCreateHashTable();=0A=
        msCopyHashTable((dst->metadata), (src->metadata));=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(transparency);=0A=
    MS_COPYSTELEM(dump);=0A=
    MS_COPYSTELEM(debug);=0A=
    MS_COPYSTELEM(numprocessing);=0A=
=0A=
    for (i =3D 0; i < dst->numprocessing; i++) {=0A=
        MS_COPYSTRING(dst->processing[i], src->processing[i]);=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(numjoins);=0A=
=0A=
    for (i =3D 0; i < dst->numprocessing; i++) {=0A=
        return_value =3D msCopyJoin(&(dst->joins[i]), &(src->joins[i]));=0A=
        if (return_value !=3D MS_SUCCESS)=0A=
            return MS_FAILURE;=0A=
    }=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopySymbol()                                                      *=0A=
 *                                                                     *=0A=
 * Copy a symbolObj, using mapfile.c:initSymbol(), msCopyPoint()       *=0A=
 * gdImageCreate(), gdImageCopy()                                      *=0A=
 **********************************************************************/=0A=
=0A=
int msCopySymbol(symbolObj *dst, symbolObj *src, mapObj *map) =0A=
{=0A=
    int i;=0A=
=0A=
    initSymbol(dst);=0A=
=0A=
    MS_COPYSTRING(dst->name, src->name);=0A=
    MS_COPYSTELEM(type);=0A=
    MS_COPYSTELEM(inmapfile);=0A=
    dst->map =3D map;=0A=
    MS_COPYSTELEM(sizex);=0A=
    MS_COPYSTELEM(sizey);=0A=
=0A=
    for (i=3D0; i < MS_MAXVECTORPOINTS; i++) {=0A=
        MS_COPYPOINT(&(dst->points[i]), &(src->points[i]));=0A=
    }=0A=
=0A=
    MS_COPYSTELEM(numpoints);=0A=
    MS_COPYSTELEM(filled);=0A=
    MS_COPYSTELEM(stylelength);=0A=
=0A=
    memcpy(&(dst->style), &(src->style), sizeof(int) * =
MS_MAXSTYLELENGTH);=0A=
=0A=
    //gdImagePtr img;=0A=
    if (src->img) {=0A=
        if (dst->img) {=0A=
            gdFree(dst->img);=0A=
        }=0A=
        dst->img =3D gdImageCreate(src->img->sx, src->img->sy);=0A=
        gdImageCopy(dst->img, src->img, 0, 0, 0, 0,=0A=
                    src->img->sx, src->img->sy);=0A=
    }=0A=
=0A=
    MS_COPYSTRING(dst->imagepath, src->imagepath);=0A=
    MS_COPYSTELEM(transparent);=0A=
=0A=
    MS_COPYSTELEM(transparentcolor);=0A=
=0A=
    MS_COPYSTRING(dst->character, src->character);=0A=
    MS_COPYSTELEM(antialias);=0A=
    MS_COPYSTRING(dst->font, src->font);=0A=
    MS_COPYSTELEM(gap);=0A=
    MS_COPYSTELEM(position);=0A=
    MS_COPYSTELEM(linecap);=0A=
    MS_COPYSTELEM(linejoin);=0A=
=0A=
    MS_COPYSTELEM(linejoinmaxsize);=0A=
=0A=
    return MS_SUCCESS;=0A=
} =0A=
=0A=
/***********************************************************************=0A=
* msCopySymbolSet()                                                   *=0A=
*                                                                     *=0A=
* Copy a symbolSetObj using msCopyFontSet(), msCopySymbol()           *=0A=
**********************************************************************/=0A=
=0A=
int msCopySymbolSet(symbolSetObj *dst, symbolSetObj *src, mapObj *map)=0A=
{=0A=
    int i, return_value;=0A=
=0A=
    MS_COPYSTRING(dst->filename, src->filename);=0A=
    MS_COPYSTELEM(map);=0A=
=0A=
    dst->fontset =3D &(map->fontset);=0A=
=0A=
    /*if (msCopyFontSet(dst->fontset, src->fontset, map) !=3D =
MS_SUCCESS) {=0A=
    msSetError(MS_MEMERR,"Failed to copy fontset.","msCopySymbolSet()");=0A=
    return(MS_FAILURE);=0A=
    }*/=0A=
=0A=
    MS_COPYSTELEM(numsymbols);=0A=
=0A=
    for (i =3D 0; i < dst->numsymbols; i++) {=0A=
        return_value =3D msCopySymbol(&(dst->symbol[i]), =
&(src->symbol[i]), map);=0A=
        if (return_value !=3D MS_SUCCESS) {=0A=
            msSetError(MS_MEMERR,"Failed to copy =
symbol.","msCopySymbolSet()");=0A=
            return MS_FAILURE;=0A=
        }=0A=
    }=0A=
#if 0=0A=
    /* No need to copy the imagecache cause the images have diferent =
pointers=0A=
    * Perhaps the image reference can be used so that images don't get =
copyied=0A=
    */=0A=
    MS_COPYSTELEM(imagecachesize);=0A=
=0A=
    // I have a feeling that the code below is not quite right - Sean=0A=
    memcpy(&(dst->imagecache), &(src->imagecache), sizeof(struct =
imageCacheObj));=0A=
#endif=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=
/***********************************************************************=0A=
 * msCopyMap()                                                         *=0A=
 *                                                                     *=0A=
 * Copy a mapObj, using mapfile.c:initLayer(), msCopyLayer(),          *=0A=
=0A=
 * msCopyLegend(), msCopyScalebar(), msCopyProjection()                *=0A=
 * msCopyOutputFormat(), msCopyWeb(), msCopyReferenceMap()             *=0A=
 **********************************************************************/=0A=
=0A=
int msCopyMap(mapObj *dst, mapObj *src)=0A=
{=0A=
    int i, return_value;=0A=
    outputFormatObj *format;=0A=
=0A=
    MS_COPYSTRING(dst->name, src->name); =0A=
    MS_COPYSTELEM(status);=0A=
    MS_COPYSTELEM(height);=0A=
    MS_COPYSTELEM(width);=0A=
    MS_COPYSTELEM(numlayers);=0A=
=0A=
    for (i =3D 0; i < dst->numlayers; i++) {=0A=
        initLayer(&(dst->layers[i]), dst);=0A=
=0A=
        return_value =3D msCopyLayer(&(dst->layers[i]), =
&(src->layers[i]));=0A=
        if (return_value !=3D MS_SUCCESS) {=0A=
            msSetError(MS_MEMERR, "Failed to copy layer.", =
"msCopyMap()");=0A=
            return MS_FAILURE;=0A=
        }=0A=
    }=0A=
    =0A=
    return_value =3D msCopyFontSet(&(dst->fontset), &(src->fontset), =
dst);=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy fontset.", "msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
    =0A=
    return_value =3D msCopySymbolSet(&(dst->symbolset), =
&(src->symbolset), dst);=0A=
    if(return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy symbolset.", =
"msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    //msCopyLabelCache(&(dst->labelcache), &(src->labelcache));=0A=
    MS_COPYSTELEM(transparent);=0A=
    MS_COPYSTELEM(interlace);=0A=
    MS_COPYSTELEM(imagequality);=0A=
=0A=
    MS_COPYRECT(&(dst->extent), &(src->extent));=0A=
=0A=
    MS_COPYSTELEM(cellsize);=0A=
    MS_COPYSTELEM(units);=0A=
    MS_COPYSTELEM(scale);=0A=
    MS_COPYSTELEM(resolution);=0A=
    MS_COPYSTRING(dst->shapepath, src->shapepath); =0A=
    MS_COPYSTRING(dst->mappath, src->mappath); =0A=
=0A=
    MS_COPYCOLOR(&(dst->imagecolor), &(src->imagecolor));=0A=
=0A=
    /* clear existing destination format list */=0A=
    if( dst->outputformat && --dst->outputformat->refcount < 1 )=0A=
    {=0A=
        msFreeOutputFormat( dst->outputformat );=0A=
        dst->outputformat =3D NULL;=0A=
    }=0A=
=0A=
    for(i=3D0; i < dst->numoutputformats; i++ ) {=0A=
        if( --dst->outputformatlist[i]->refcount < 1 )=0A=
            msFreeOutputFormat( dst->outputformatlist[i] );=0A=
    }=0A=
    if( dst->outputformatlist !=3D NULL )=0A=
        msFree( dst->outputformatlist );=0A=
    dst->outputformatlist =3D NULL;=0A=
    dst->outputformat =3D NULL;=0A=
    dst->numoutputformats =3D 0;=0A=
=0A=
    for (i =3D 0; i < src->numoutputformats; i++)=0A=
        msAppendOutputFormat( dst, =0A=
        msCloneOutputFormat( src->outputformatlist[i]) );=0A=
=0A=
    // set the active output format=0A=
    MS_COPYSTRING(dst->imagetype, src->imagetype); =0A=
    format =3D msSelectOutputFormat( dst, dst->imagetype );=0A=
    msApplyOutputFormat(&(dst->outputformat), format, MS_NOOVERRIDE, =0A=
        MS_NOOVERRIDE, MS_NOOVERRIDE );=0A=
=0A=
    return_value =3D =
msCopyProjection(&(dst->projection),&(src->projection));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy projection.", =
"msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    /*return_value =3D msCopyProjection(&(dst->latlon), &(src->latlon));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
    msSetError(MS_MEMERR, "Failed to copy latlon.", "msCopyMap()");=0A=
    return MS_FAILURE;=0A=
    }*/=0A=
=0A=
    return_value =3D =
msCopyReferenceMap(&(dst->reference),&(src->reference),=0A=
        dst);=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy reference.", =
"msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    return_value =3D msCopyScalebar(&(dst->scalebar), &(src->scalebar));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy scalebar.", "msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    return_value =3D msCopyLegend(&(dst->legend), &(src->legend),dst);=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy legend.", "msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    return_value =3D msCopyQueryMap(&(dst->querymap), &(src->querymap));=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy querymap.", "msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    return_value =3D msCopyWeb(&(dst->web), &(src->web), dst);=0A=
    if (return_value !=3D MS_SUCCESS) {=0A=
        msSetError(MS_MEMERR, "Failed to copy web.", "msCopyMap()");=0A=
        return MS_FAILURE;=0A=
    }=0A=
=0A=
    for (i =3D 0; i < dst->numlayers; i++) {=0A=
        MS_COPYSTELEM(layerorder[i]);=0A=
    }=0A=
    MS_COPYSTELEM(debug);=0A=
    MS_COPYSTRING(dst->datapattern, src->datapattern);=0A=
    MS_COPYSTRING(dst->templatepattern, src->templatepattern);   =0A=
=0A=
    if( msCopyHashTable( dst->configoptions, src->configoptions ) !=3D =
MS_SUCCESS )=0A=
        return MS_FAILURE;=0A=
=0A=
    return MS_SUCCESS;=0A=
}=0A=
=0A=

------=_NextPart_001_007B_01C446FE.F95F5AF0--

------=_NextPart_000_007A_01C446FE.F95F5AF0
Content-Type: application/x-pkcs7-signature;
	name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="smime.p7s"

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJADCCAogw
ggHxoAMCAQICAwxGPTANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh
d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt
YWlsIElzc3VpbmcgQ0EwHhcNMDQwNTA4MTc0OTIyWhcNMDUwNTA4MTc0OTIyWjBpMR8wHQYDVQQD
ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSUwIwYJKoZIhvcNAQkBFhZtbGFkZW4udHVya0BnaXNk
YXRhLmhyMR8wHQYJKoZIhvcNAQkBFhBtdHVya0BhcGFjaGUub3JnMIGfMA0GCSqGSIb3DQEBAQUA
A4GNADCBiQKBgQDDFpTL3QpMpzZNX4hMRwNoTAcJtSF18PnJf3oUryvGmggiy9cbJAuScvfVku2R
DDeBdJaVqDb83nYQydW6JvZI7m2oKApNRV9veadN/T7Fq81QcSBAQgXRyNWCMyl832zOxDrZNchH
kgQzkm67IMHXxDd8LYAxAj8eFFLuV+g29QIDAQABo0UwQzAzBgNVHREELDAqgRZtbGFkZW4udHV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