Skip to content

Commit

Permalink
Merge branch 'branch-6-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Oct 2, 2012
2 parents 30ceb0c + 5553e9c commit b8f75e5
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 28 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ mapscript/python/build/
mapscript/python/mapscript.py
mapscript/python/mapscript_wrap.c
mapscript/php/php_mapscript.la
mapscript/java/edu
mapscript/java/javamapscript_wrap.c
mapscript/java/libjavamapscript.la
mapscript/java/mapscript.jar
mapscript/perl/MYMETA.yml
mapscript/perl/Makefile.old
mapscriptvars
mapserv
mapserver-config
Expand Down
8 changes: 4 additions & 4 deletions maperror.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ extern "C" {
#define MS_DLL_EXPORT
#endif

typedef struct error_obj {
typedef struct errorObj {
int code;
char routine[ROUTINELENGTH];
char message[MESSAGELENGTH];
int isreported;
#ifndef SWIG
struct error_obj *next;
struct errorObj *next;
#endif
} errorObj;

Expand All @@ -120,8 +120,8 @@ extern "C" {
MS_DLL_EXPORT char *msGetErrorCodeString(int code);
MS_DLL_EXPORT char *msAddErrorDisplayString(char *source, errorObj *error);

struct map_obj;
MS_DLL_EXPORT void msWriteErrorImage(struct map_obj *map, char *filename, int blank);
struct mapObj;
MS_DLL_EXPORT void msWriteErrorImage(struct mapObj *map, char *filename, int blank);

#endif /* SWIG */

Expand Down
5 changes: 3 additions & 2 deletions mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2941,13 +2941,14 @@ void writeStyle(FILE *stream, int indent, styleObj *style)
writeNumber(stream, indent, "INITIALGAP", -1, style->initialgap);

if(style->_geomtransform.type != MS_GEOMTRANSFORM_NONE) {
writeKeyword(stream, indent, "GEOMTRANSFORM", style->_geomtransform.type, 6,
writeKeyword(stream, indent, "GEOMTRANSFORM", style->_geomtransform.type, 7,
MS_GEOMTRANSFORM_BBOX, "\"bbox\"",
MS_GEOMTRANSFORM_END, "\"end\"",
MS_GEOMTRANSFORM_LABELPOINT, "\"labelpnt\"",
MS_GEOMTRANSFORM_LABELPOLY, "\"labelpoly\"",
MS_GEOMTRANSFORM_START, "\"start\"",
MS_GEOMTRANSFORM_VERTICES, "\"vertices\""
MS_GEOMTRANSFORM_VERTICES, "\"vertices\"",
MS_GEOMTRANSFORM_CENTROID, "\"centroid\""
);
}

Expand Down
6 changes: 3 additions & 3 deletions mapprimitive.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,14 +1709,14 @@ void msPolylineLabelPointLineString(shapeObj *p, int min_length, int repeat_dist

if(anglemode != MS_NONE) {
theta = atan2(p->line[i].point[j].x - p->line[i].point[j-1].x, p->line[i].point[j].y - p->line[i].point[j-1].y);
if(anglemode == MS_AUTO) {
if(anglemode == MS_AUTO2) {
*(*angles)[index] = (MS_RAD_TO_DEG*theta) - 90;
} else { /* AUTO, FOLLOW */
if(p->line[i].point[j-1].x < p->line[i].point[j].x) { /* i.e. to the left */
*(*angles)[index] = (MS_RAD_TO_DEG*theta) - 90;
} else {
*(*angles)[index] = (MS_RAD_TO_DEG*theta) + 90;
}
} else { /* AUTO2 */
*(*angles)[index] = (MS_RAD_TO_DEG*theta) - 90;
}
}

Expand Down
4 changes: 2 additions & 2 deletions mapscript/java/javamodule.i
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ RFC-24 implementation follows
return clazz;
}

%typemap(javacode) layerObj %{
%typemap(javacode) struct layerObj %{
/* parent reference, RFC-24 item 3.2 */
mapObj map=null;
%}

%typemap(javacode) classObj %{
%typemap(javacode) struct classObj %{
/* parent reference, RFC-24 item 3.2 */
layerObj layer=null;
%}
2 changes: 1 addition & 1 deletion mapscript/mapscript.i
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#endif

#ifdef SWIGJAVA
%ignore layer_obj::extent;
%ignore layerObj::extent;
#endif

%{
Expand Down
3 changes: 2 additions & 1 deletion mapscript/ruby/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
$CFLAGS = ""
$CPPFLAGS = make_inc + " -idirafter $(rubylibdir)/$(arch) " + make_define
$LDFLAGS += " -fPIC"
$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver " + make_static_libs
#$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver " + make_static_libs
$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver "

# if the source file 'mapscript_wrap.c' is missing nothing works
# this is a workaround !!
Expand Down
24 changes: 13 additions & 11 deletions mapserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ typedef ms_uint32 * ms_bitarray;
extern "C" {
#endif

// hide from swig or ruby will choke on the __FUNCTION__ name
#ifndef SWIG
/* Memory allocation check utility */

#ifndef __FUNCTION__
# define __FUNCTION__ "MapServer"
#endif
#endif

#define MS_CHECK_ALLOC(var, size, retval) \
if (!var) { \
Expand Down Expand Up @@ -599,7 +601,7 @@ extern "C" {
#endif

#ifndef SWIG
struct map_obj *map;
struct mapObj *map;
#endif
} fontSetObj;

Expand Down Expand Up @@ -832,7 +834,7 @@ extern "C" {
#ifdef SWIG
%immutable;
#endif /* SWIG */
struct map_obj *map;
struct mapObj *map;
#ifdef SWIG
%mutable;
#endif /* SWIG */
Expand Down Expand Up @@ -1056,7 +1058,7 @@ extern "C" {
/* basic symbolization and classification information */
/************************************************************************/

typedef struct class_obj {
typedef struct classObj {
#ifndef SWIG
expressionObj expression; /* the expression to be matched */
#endif
Expand Down Expand Up @@ -1112,7 +1114,7 @@ extern "C" {
%immutable;
#endif /* SWIG */
int refcount;
struct layer_obj *layer;
struct layerObj *layer;
#ifdef SWIG
%mutable;
#endif /* SWIG */
Expand Down Expand Up @@ -1255,7 +1257,7 @@ extern "C" {
#ifndef SWIG
int refcount;
symbolObj** symbol;
struct map_obj *map;
struct mapObj *map;
fontSetObj *fontset; /* a pointer to the main mapObj version */
struct imageCacheObj *imagecache;
#endif /* not SWIG */
Expand All @@ -1279,7 +1281,7 @@ extern "C" {
#ifdef SWIG
%immutable;
#endif /* SWIG */
struct map_obj *map;
struct mapObj *map;
#ifdef SWIG
%mutable;
#endif /* SWIG */
Expand Down Expand Up @@ -1340,7 +1342,7 @@ extern "C" {
#ifdef SWIG
%immutable;
#endif /* SWIG */
struct map_obj *map;
struct mapObj *map;
#ifdef SWIG
%mutable;
#endif /* SWIG */
Expand Down Expand Up @@ -1443,7 +1445,7 @@ extern "C" {
/* base unit of a map. */
/************************************************************************/

typedef struct layer_obj {
typedef struct layerObj {

char *classitem; /* .DBF item to be used for symbol lookup */

Expand All @@ -1467,7 +1469,7 @@ extern "C" {
int numclasses;
int maxclasses;
int index;
struct map_obj *map;
struct mapObj *map;
#ifdef SWIG
%mutable;
#endif /* SWIG */
Expand Down Expand Up @@ -1615,7 +1617,7 @@ extern "C" {
/************************************************************************/

/* MAP OBJECT - */
typedef struct map_obj { /* structure for a map */
typedef struct mapObj { /* structure for a map */
char *name; /* small identifier for naming etc. */
int status; /* is map creation on or off */
int height, width;
Expand Down
2 changes: 1 addition & 1 deletion mapsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ typedef struct {
/*
** Pointer to his map
*/
struct map_obj *map;
struct mapObj *map;
#endif /* SWIG */
/*
** MS_SYMBOL_VECTOR and MS_SYMBOL_ELLIPSE options
Expand Down
2 changes: 1 addition & 1 deletion maptemplate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ static int processDateTag(char **line)
tagArgs=NULL;

if((*line)[tagOffset] != '\0')
tagStart = findTag(*line+tagOffset+1, "shpxy");
tagStart = findTag(*line+tagOffset+1, "date");
else
tagStart = NULL;
}
Expand Down
4 changes: 2 additions & 2 deletions mapwms.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,10 +857,10 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,

layers = msStringSplit(values[i], ',', &numlayers);
if (layers==NULL || strlen(values[i]) <=0 || numlayers < 1) {
msFreeCharArray(layers,numlayers);
msFree(layerOrder);
numlayers = 0;
if (sld_url == NULL && sld_body == NULL) {
msFreeCharArray(layers,numlayers);
msFree(layerOrder);
msSetError(MS_WMSERR, "At least one layer name required in LAYERS.",
"msWMSLoadGetMapParams()");
return msWMSException(map, nVersion, NULL, wms_exception_format);
Expand Down

0 comments on commit b8f75e5

Please sign in to comment.