[GRASS-SVN] r32529 - in grass/trunk: lib/gis raster/r.mapcalc raster/r.resamp.stats raster/r.series

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 4 18:33:45 EDT 2008


Author: glynn
Date: 2008-08-04 18:33:45 -0400 (Mon, 04 Aug 2008)
New Revision: 32529

Modified:
   grass/trunk/lib/gis/named_colr.c
   grass/trunk/lib/gis/proj3.c
   grass/trunk/raster/r.mapcalc/function.c
   grass/trunk/raster/r.resamp.stats/main.c
   grass/trunk/raster/r.series/main.c
Log:
Fix formatting of array initialisers


Modified: grass/trunk/lib/gis/named_colr.c
===================================================================
--- grass/trunk/lib/gis/named_colr.c	2008-08-04 22:32:56 UTC (rev 32528)
+++ grass/trunk/lib/gis/named_colr.c	2008-08-04 22:33:45 UTC (rev 32529)
@@ -7,24 +7,23 @@
     const char *name;
     float r, g, b;
 } colors[] = {
-    {
-    "white", 1.00, 1.00, 1.00}, {
-    "black", 0.00, 0.00, 0.00}, {
-    "red", 1.00, 0.00, 0.00}, {
-    "green", 0.00, 1.00, 0.00}, {
-    "blue", 0.00, 0.00, 1.00}, {
-    "yellow", 1.00, 1.00, 0.00}, {
-    "magenta", 1.00, 0.00, 1.00}, {
-    "cyan", 0.00, 1.00, 1.00}, {
-    "aqua", 0.00, 0.75, 0.75}, {
-    "grey", 0.75, 0.75, 0.75}, {
-    "gray", 0.75, 0.75, 0.75}, {
-    "orange", 1.00, 0.50, 0.00}, {
-    "brown", 0.75, 0.50, 0.25}, {
-    "purple", 0.50, 0.00, 1.00}, {
-    "violet", 0.50, 0.00, 1.00}, {
-    "indigo", 0.00, 0.50, 1.00}, {
-    "", 0.00, 0.00, 0.00}	/* do not modify this line */
+    {"white",  1.00, 1.00, 1.00},
+    {"black",  0.00, 0.00, 0.00},
+    {"red",    1.00, 0.00, 0.00},
+    {"green",  0.00, 1.00, 0.00},
+    {"blue",   0.00, 0.00, 1.00},
+    {"yellow", 1.00, 1.00, 0.00},
+    {"magenta",1.00, 0.00, 1.00},
+    {"cyan",   0.00, 1.00, 1.00},
+    {"aqua",   0.00, 0.75, 0.75},
+    {"grey",   0.75, 0.75, 0.75},
+    {"gray",   0.75, 0.75, 0.75},
+    {"orange", 1.00, 0.50, 0.00},
+    {"brown",  0.75, 0.50, 0.25},
+    {"purple", 0.50, 0.00, 1.00},
+    {"violet", 0.50, 0.00, 1.00},
+    {"indigo", 0.00, 0.50, 1.00},
+    {"",       0.00, 0.00, 0.00}	/* do not modify this line */
 };
 
 int G_color_values(const char *name, float *r, float *g, float *b)

Modified: grass/trunk/lib/gis/proj3.c
===================================================================
--- grass/trunk/lib/gis/proj3.c	2008-08-04 22:32:56 UTC (rev 32528)
+++ grass/trunk/lib/gis/proj3.c	2008-08-04 22:33:45 UTC (rev 32529)
@@ -89,12 +89,11 @@
 	char *unit;
 	double factor;
     } table[] = {
-	{
-	"unit", 1.0}, {
-	"meter", 1.0}, {
-	"foot", .3048}, {
-	"inch", .0254}, {
-	NULL, 0.0}
+	{"unit",  1.0},
+	{"meter", 1.0},
+	{"foot", .3048},
+	{"inch", .0254},
+	{NULL, 0.0}
     };
 
     factor = 0.0;

Modified: grass/trunk/raster/r.mapcalc/function.c
===================================================================
--- grass/trunk/raster/r.mapcalc/function.c	2008-08-04 22:32:56 UTC (rev 32528)
+++ grass/trunk/raster/r.mapcalc/function.c	2008-08-04 22:33:45 UTC (rev 32529)
@@ -8,139 +8,81 @@
 #include "func_proto.h"
 
 func_desc func_descs[] = {
-    {"add", c_binop, f_add}
-    ,
-    {"sub", c_binop, f_sub}
-    ,
-    {"mul", c_binop, f_mul}
-    ,
-    {"div", c_binop, f_div}
-    ,
-    {"mod", c_binop, f_mod}
-    ,
-    {"pow", c_binop, f_pow}
-    ,
+    {"add", c_binop, f_add},
+    {"sub", c_binop, f_sub},
+    {"mul", c_binop, f_mul},
+    {"div", c_binop, f_div},
+    {"mod", c_binop, f_mod},
+    {"pow", c_binop, f_pow},
 
-    {"neg", c_unop, f_neg}
-    ,
-    {"abs", c_unop, f_abs}
-    ,
+    {"neg", c_unop, f_neg},
+    {"abs", c_unop, f_abs},
 
-    {"gt", c_cmpop, f_gt}
-    ,
-    {"ge", c_cmpop, f_ge}
-    ,
-    {"lt", c_cmpop, f_lt}
-    ,
-    {"le", c_cmpop, f_le}
-    ,
-    {"eq", c_cmpop, f_eq}
-    ,
-    {"ne", c_cmpop, f_ne}
-    ,
+    {"gt", c_cmpop, f_gt},
+    {"ge", c_cmpop, f_ge},
+    {"lt", c_cmpop, f_lt},
+    {"le", c_cmpop, f_le},
+    {"eq", c_cmpop, f_eq},
+    {"ne", c_cmpop, f_ne},
 
-    {"and", c_logop, f_and}
-    ,
-    {"or", c_logop, f_or}
-    ,
+    {"and", c_logop, f_and},
+    {"or", c_logop, f_or},
 
-    {"and2", c_logop, f_and2}
-    ,
-    {"or2", c_logop, f_or2}
-    ,
+    {"and2", c_logop, f_and2},
+    {"or2", c_logop, f_or2},
 
-    {"not", c_not, f_not}
-    ,
+    {"not", c_not, f_not},
 
-    {"bitand", c_logop, f_bitand}
-    ,
-    {"bitor", c_logop, f_bitor}
-    ,
-    {"xor", c_logop, f_bitxor}
-    ,
-    {"shiftl", c_logop, f_shiftl}
-    ,
-    {"shiftr", c_logop, f_shiftr}
-    ,
-    {"shiftru", c_logop, f_shiftru}
-    ,
+    {"bitand", c_logop, f_bitand},
+    {"bitor", c_logop, f_bitor},
+    {"xor", c_logop, f_bitxor},
+    {"shiftl", c_logop, f_shiftl},
+    {"shiftr", c_logop, f_shiftr},
+    {"shiftru", c_logop, f_shiftru},
 
-    {"bitnot", c_not, f_bitnot}
-    ,
+    {"bitnot", c_not, f_bitnot},
 
-    {"sqrt", c_double1, f_sqrt}
-    ,
-    {"sin", c_double1, f_sin}
-    ,
-    {"cos", c_double1, f_cos}
-    ,
-    {"tan", c_double1, f_tan}
-    ,
-    {"acos", c_double1, f_acos}
-    ,
-    {"asin", c_double1, f_asin}
-    ,
+    {"sqrt", c_double1, f_sqrt},
+    {"sin", c_double1, f_sin},
+    {"cos", c_double1, f_cos},
+    {"tan", c_double1, f_tan},
+    {"acos", c_double1, f_acos},
+    {"asin", c_double1, f_asin},
 
-    {"exp", c_double12, f_exp}
-    ,
-    {"log", c_double12, f_log}
-    ,
-    {"atan", c_double12, f_atan}
-    ,
+    {"exp", c_double12, f_exp},
+    {"log", c_double12, f_log},
+    {"atan", c_double12, f_atan},
 
-    {"int", c_int, f_int}
-    ,
-    {"float", c_float, f_float}
-    ,
-    {"double", c_double, f_double}
-    ,
-    {"round", c_round, f_round}
-    ,
+    {"int", c_int, f_int},
+    {"float", c_float, f_float},
+    {"double", c_double, f_double},
+    {"round", c_round, f_round},
 
-    {"eval", c_eval, f_eval}
-    ,
-    {"if", c_if, f_if}
-    ,
-    {"isnull", c_isnull, f_isnull}
-    ,
+    {"eval", c_eval, f_eval},
+    {"if", c_if, f_if},
+    {"isnull", c_isnull, f_isnull},
 
-    {"max", c_varop, f_max}
-    ,
-    {"min", c_varop, f_min}
-    ,
-    {"median", c_varop, f_median}
-    ,
-    {"mode", c_varop, f_mode}
-    ,
+    {"max", c_varop, f_max},
+    {"min", c_varop, f_min},
+    {"median", c_varop, f_median},
+    {"mode", c_varop, f_mode},
 
-    {"graph", c_graph, f_graph}
-    ,
+    {"graph", c_graph, f_graph},
 
-    {"rand", c_binop, f_rand}
-    ,
+    {"rand", c_binop, f_rand},
 
-    {"null", c_int0, f_null}
-    ,
+    {"null", c_int0, f_null},
 
-    {"col", c_int0, f_col}
-    ,
-    {"row", c_int0, f_row}
-    ,
-    {"depth", c_int0, f_depth}
-    ,
+    {"col", c_int0, f_col},
+    {"row", c_int0, f_row},
+    {"depth", c_int0, f_depth},
 
-    {"x", c_double0, f_x}
-    ,
-    {"y", c_double0, f_y}
-    ,
-    {"z", c_double0, f_z}
-    ,
-    {"ewres", c_double0, f_ewres}
-    ,
-    {"nsres", c_double0, f_nsres}
-    ,
-    {"tbres", c_double0, f_tbres}
-    ,
+    {"x", c_double0, f_x},
+    {"y", c_double0, f_y},
+    {"z", c_double0, f_z},
+    {"ewres", c_double0, f_ewres},
+    {"nsres", c_double0, f_nsres},
+    {"tbres", c_double0, f_tbres},
     {NULL}
 };
 

Modified: grass/trunk/raster/r.resamp.stats/main.c
===================================================================
--- grass/trunk/raster/r.resamp.stats/main.c	2008-08-04 22:32:56 UTC (rev 32528)
+++ grass/trunk/raster/r.resamp.stats/main.c	2008-08-04 22:33:45 UTC (rev 32529)
@@ -27,19 +27,18 @@
     char *name;			/* method name */
     char *text;			/* menu display - full description */
 } menu[] = {
-    {
-    c_ave, w_ave, "average", "average (mean) value"}, {
-    c_median, w_median, "median", "median value"}, {
-    c_mode, w_mode, "mode", "most frequently occuring value"}, {
-    c_min, NULL, "minimum", "lowest value"}, {
-    c_max, NULL, "maximum", "highest value"}, {
-    c_quart1, w_quart1, "quart1", "first quartile"}, {
-    c_quart3, w_quart3, "quart3", "third quartile"}, {
-    c_perc90, w_perc90, "perc90", "ninetieth percentile"}, {
-    c_sum, w_sum, "sum", "sum of values"}, {
-    c_var, w_var, "variance", "variance value"}, {
-    c_stddev, w_stddev, "stddev", "standard deviation"}, {
-    NULL, NULL, NULL}
+    {c_ave,    w_ave,    "average",  "average (mean) value"},
+    {c_median, w_median, "median",   "median value"},
+    {c_mode,   w_mode,   "mode",     "most frequently occuring value"},
+    {c_min,    NULL,     "minimum",  "lowest value"},
+    {c_max,    NULL,     "maximum",  "highest value"},
+    {c_quart1, w_quart1, "quart1",   "first quartile"},
+    {c_quart3, w_quart3, "quart3",   "third quartile"},
+    {c_perc90, w_perc90, "perc90",   "ninetieth percentile"},
+    {c_sum,    w_sum,    "sum",      "sum of values"},
+    {c_var,    w_var,    "variance", "variance value"},
+    {c_stddev, w_stddev, "stddev",   "standard deviation"},
+    {NULL, NULL, NULL}
 };
 
 static char *build_method_list(void)

Modified: grass/trunk/raster/r.series/main.c
===================================================================
--- grass/trunk/raster/r.series/main.c	2008-08-04 22:32:56 UTC (rev 32528)
+++ grass/trunk/raster/r.series/main.c	2008-08-04 22:33:45 UTC (rev 32529)
@@ -28,30 +28,28 @@
     char *name;			/* method name */
     char *text;			/* menu display - full description */
 } menu[] = {
-    {
-    c_ave, 0, "average", "average value"}, {
-    c_count, 1, "count", "count of non-NULL cells"}, {
-    c_median, 0, "median", "median value"}, {
-    c_mode, 0, "mode", "most frequently occuring value"}, {
-    c_min, 0, "minimum", "lowest value"}, {
-    c_minx, 1, "min_raster", "raster with lowest value"}, {
-    c_max, 0, "maximum", "highest value"}, {
-    c_maxx, 1, "max_raster", "raster with highest value"}, {
-    c_stddev, 0, "stddev", "standard deviation"}, {
-    c_range, 0, "range", "range of values"}, {
-    c_sum, 0, "sum", "sum of values"}, {
-    c_var, 0, "variance", "statistical variance"}, {
-    c_divr, 1, "diversity", "number of different values"}, {
-    c_reg_m, 0, "slope", "linear regression slope"}, {
-    c_reg_c, 0, "offset", "linear regression offset"}, {
-    c_reg_r2, 0, "detcoeff",
-	    "linear regression coefficient of determination"}, {
-    c_quart1, 0, "quart1", "first quartile"}, {
-    c_quart3, 0, "quart3", "third quartile"}, {
-    c_perc90, 0, "perc90", "ninetieth percentile"}, {
-    c_skew, 0, "skewness", "skewness"}, {
-    c_kurt, 0, "kurtosis", "kurtosis"}, {
-    NULL, 0, NULL, NULL}
+    {c_ave,    0, "average",    "average value"},
+    {c_count,  1, "count",      "count of non-NULL cells"},
+    {c_median, 0, "median",     "median value"},
+    {c_mode,   0, "mode",       "most frequently occuring value"},
+    {c_min,    0, "minimum",    "lowest value"},
+    {c_minx,   1, "min_raster", "raster with lowest value"},
+    {c_max,    0, "maximum",    "highest value"},
+    {c_maxx,   1, "max_raster", "raster with highest value"},
+    {c_stddev, 0, "stddev",     "standard deviation"},
+    {c_range,  0, "range",      "range of values"},
+    {c_sum,    0, "sum",        "sum of values"},
+    {c_var,    0, "variance",   "statistical variance"},
+    {c_divr,   1, "diversity",  "number of different values"},
+    {c_reg_m,  0, "slope",      "linear regression slope"},
+    {c_reg_c,  0, "offset",     "linear regression offset"},
+    {c_reg_r2, 0, "detcoeff",   "linear regression coefficient of determination"},
+    {c_quart1, 0, "quart1",     "first quartile"},
+    {c_quart3, 0, "quart3",     "third quartile"},
+    {c_perc90, 0, "perc90",     "ninetieth percentile"},
+    {c_skew,   0, "skewness",   "skewness"},
+    {c_kurt,   0, "kurtosis",   "kurtosis"},
+    {NULL,     0, NULL,         NULL}
 };
 
 struct input



More information about the grass-commit mailing list