Преглед на файлове

rasterlib: fns from color_rule_get.c renamed, see
http://trac.osgeo.org/grass/wiki/Grass7/RasterLib


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38115 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa преди 16 години
родител
ревизия
46a1e3048a
променени са 4 файла, в които са добавени 14 реда и са изтрити 16 реда
  1. 1 1
      include/raster.h
  2. 11 13
      lib/raster/color_rule_get.c
  3. 1 1
      raster/r.colors.out/main.c
  4. 1 1
      raster/r.out.gdal/export_band.c

+ 1 - 1
include/raster.h

@@ -201,7 +201,7 @@ int Rast_add_modular_color_rule(const void *, int, int, int,
 
 /* color_rule_get.c */
 int Rast_colors_count(const struct Colors *);
-int Rast_get_f_color_rule(DCELL *, unsigned char *, unsigned char *,
+int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *,
 		       unsigned char *, DCELL *, unsigned char *,
 		       unsigned char *, unsigned char *,
 		       const struct Colors *, int);

+ 11 - 13
lib/raster/color_rule_get.c

@@ -1,17 +1,14 @@
-
-/**
- * \file color_rule_get.c
+/*!
+ * \file raster/color_rule_get.c
  *
  * \brief Raster Library - Get color rules.
  *
- * (C) 2001-2008 by the GRASS Development Team
+ * (C) 2001-2009 by the GRASS Development Team
  *
- * This program is free software under the GNU General Public License 
+ * This program is free software under the GNU General Public License
  * (>=v2). Read the file COPYING that comes with GRASS for details.
  *
- * \author GRASS GIS Development Team
- *
- * \date 1999-2008
+ * \author Original author CERL
  */
 
 #include <grass/gis.h>
@@ -52,7 +49,8 @@ int Rast_colors_count(const struct Colors *colors)
 /*! 
    \brief Get color rule from both modular and fixed rules
 
-   Rules are returned in the order as stored in the table (i.e. unexpected, high values first)
+   Rules are returned in the order as stored in the table
+   (i.e. unexpected, high values first)
 
    \param val1 color value
    \param[out] r1,g1,b1 color value
@@ -64,10 +62,10 @@ int Rast_colors_count(const struct Colors *colors)
    \return 0 success 
    \return 1 index out of range  
  */
-int Rast_get_f_color_rule(DCELL * val1, unsigned char *r1, unsigned char *g1,
-		       unsigned char *b1, DCELL * val2, unsigned char *r2,
-		       unsigned char *g2, unsigned char *b2,
-		       const struct Colors *colors, int rule)
+int Rast_get_fp_color_rule(DCELL * val1, unsigned char *r1, unsigned char *g1,
+			   unsigned char *b1, DCELL * val2, unsigned char *r2,
+			   unsigned char *g2, unsigned char *b2,
+			   const struct Colors *colors, int rule)
 {
     int index = -1;
     int found = 0;

+ 1 - 1
raster/r.colors.out/main.c

@@ -119,7 +119,7 @@ int main(int argc, char **argv)
 	    DCELL val1, val2;
 	    unsigned char r1, g1, b1, r2, g2, b2;
 
-	    Rast_get_f_color_rule(
+	    Rast_get_fp_color_rule(
 		&val1, &r1, &g1, &b1,
 		&val2, &r2, &g2, &b2,
 		&colors, count - 1 - i);

+ 1 - 1
raster/r.out.gdal/export_band.c

@@ -164,7 +164,7 @@ int export_band(GDALDatasetH hMEMDS, GDALDataType export_datatype, int band,
 	    DCELL val1, val2;
 	    unsigned char r1, g1, b1, r2, g2, b2;
 
-	    Rast_get_f_color_rule(&val1, &r1, &g1, &b1, &val2, &r2, &g2, &b2,
+	    Rast_get_fp_color_rule(&val1, &r1, &g1, &b1, &val2, &r2, &g2, &b2,
 			       &sGrassColors, i);