[mapserver-commits] r10116 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sat Apr 24 13:31:23 EDT 2010


Author: sdlime
Date: 2010-04-24 13:31:23 -0400 (Sat, 24 Apr 2010)
New Revision: 10116

Modified:
   trunk/mapserver/mapfile.c
Log:
Starting to add helper functions for mapfile writing...

Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c	2010-04-24 17:24:24 UTC (rev 10115)
+++ trunk/mapserver/mapfile.c	2010-04-24 17:31:23 UTC (rev 10116)
@@ -433,12 +433,19 @@
 }
 #endif
 
+/*
+** Helper functions for writing mapfiles.
+*/
+static void writeNumber(double *d, FILE *stream, char *name, char *tab) {
+  fprintf(stream, "%s%s %g\n", tab, name, *d);
+}
+
 static void writeColor(colorObj *color, FILE *stream, char *name, char *tab) {
   if(MS_VALID_COLOR(*color))
     fprintf(stream, "%s%s %d %d %d\n", tab, name, color->red, color->green, color->blue);
 }
 
-static void writeColorRange(colorObj *mincolor,colorObj *maxcolor, FILE *stream, char *name, char *tab) {
+static void writeColorRange(colorObj *mincolor, colorObj *maxcolor, FILE *stream, char *name, char *tab) {
   if(MS_VALID_COLOR(*mincolor) && MS_VALID_COLOR(*maxcolor))
     fprintf(stream, "%s%s %d %d %d  %d %d %d\n", tab, name, mincolor->red, mincolor->green, mincolor->blue,
 	    maxcolor->red, maxcolor->green, maxcolor->blue);



More information about the mapserver-commits mailing list