[GRASS-SVN] r47512 - grass/trunk/lib/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 9 16:30:34 EDT 2011


Author: martinl
Date: 2011-08-09 13:30:34 -0700 (Tue, 09 Aug 2011)
New Revision: 47512

Modified:
   grass/trunk/lib/raster/color_init.c
Log:
rasterlib: simplify Rast_init_colors()
	   doxygen updates


Modified: grass/trunk/lib/raster/color_init.c
===================================================================
--- grass/trunk/lib/raster/color_init.c	2011-08-09 18:07:37 UTC (rev 47511)
+++ grass/trunk/lib/raster/color_init.c	2011-08-09 20:30:34 UTC (rev 47512)
@@ -1,50 +1,32 @@
 /*!
- * \file raster/color_init.c
- *
- * \brief Raster Library - Initialize Colors structure
- *
- * (C) 2001-2009 by the GRASS Development Team
- *
- * This program is free software under the GNU General Public License
- * (>=v2). Read the file COPYING that comes with GRASS for details.
- *
- * \author Original author CERL
- */
+  \file lib/raster/color_init.c
+  
+  \brief Raster Library - Initialize Colors structure
+  
+  (C) 2001-2009 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public License
+  (>=v2). Read the file COPYING that comes with GRASS for details.
+  
+  \author Original author CERL
+*/
 
 #include <grass/gis.h>
 #include <grass/raster.h>
 
 /*!
- * \brief Initialize color structure
- *
- * The <i>colors</i> structure is initialized for subsequent calls
- * to Rast_add_c_color_rule() and Rast_set_c_color().
- *
- * \param colors pointer to Colors structure
- */
+  \brief Initialize color structure
+  
+  The <i>colors</i> structure is initialized for subsequent calls
+  to Rast_add_c_color_rule() and Rast_set_c_color().
+ 
+  \param colors pointer to Colors structure
+*/
 void Rast_init_colors(struct Colors *colors)
 {
-    colors->version = 0;
-    colors->null_set = 0;
-    colors->undef_set = 0;
-    colors->shift = 0.0;
-    colors->invert = 0;
-    colors->cmin = 0;
-    colors->is_float = 0;
+    G_zero(colors, sizeof(struct Colors));
+    
     colors->cmax = -1;
-    colors->fixed.min = 0;
     colors->fixed.max = -1;
-    colors->fixed.rules = NULL;
-    colors->fixed.n_rules = 0;
-    colors->fixed.lookup.active = 0;
-    colors->fixed.fp_lookup.active = 0;
-    colors->fixed.fp_lookup.nalloc = 0;
-    colors->modular.min = 0;
     colors->modular.max = -1;
-    colors->modular.rules = NULL;
-    colors->modular.n_rules = 0;
-    colors->modular.lookup.active = 0;
-    colors->modular.fp_lookup.active = 0;
-    colors->modular.fp_lookup.nalloc = 0;
-    colors->organizing = 0;
 }



More information about the grass-commit mailing list