[GRASS-SVN] r47673 - in
grass/branches/releasebranch_6_4/raster/r.li: r.li.cwed
r.li.daemon r.li.edgedensity r.li.mpa r.li.padcv
r.li.padrange r.li.padsd r.li.pielou r.li.renyi
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 16 10:08:37 EDT 2011
Author: neteler
Date: 2011-08-16 07:08:37 -0700 (Tue, 16 Aug 2011)
New Revision: 47673
Modified:
grass/branches/releasebranch_6_4/raster/r.li/r.li.cwed/cwed.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/avl.h
grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/index.h
grass/branches/releasebranch_6_4/raster/r.li/r.li.edgedensity/edgedensity.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.mpa/mpa.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.padcv/padcv.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.padrange/padrange.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.padsd/padsd.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.pielou/pielou.c
grass/branches/releasebranch_6_4/raster/r.li/r.li.renyi/renyi.c
Log:
code layout fixes with indent
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.cwed/cwed.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.cwed/cwed.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.cwed/cwed.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -434,7 +434,7 @@
G_free(mask_corr);
G_free(mask_sup);
}
-
+
G_free(buf_sup);
return RLI_OK;
}
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/avl.h
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/avl.h 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/avl.h 2011-08-16 14:08:37 UTC (rev 47673)
@@ -14,7 +14,7 @@
typedef struct avl_node
{
- generic_cell key; /* key field is a CELL or a DCELL or a FCELL */
+ generic_cell key; /* key field is a CELL or a DCELL or a FCELL */
long counter; /* data */
struct avl_node *father;
struct avl_node *right_child;
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -104,8 +104,9 @@
/* strip off leading path if present */
char testpath[GPATH_MAX];
+
sprintf(testpath, "%s%s", G_home(), "/.r.li/history/");
- if(strncmp(file, testpath, strlen(testpath)) == 0)
+ if (strncmp(file, testpath, strlen(testpath)) == 0)
file += strlen(testpath);
/* TODO: check if this path is portable */
@@ -137,8 +138,7 @@
doneDir = G_mkdir(out);
if (doneDir == -1 && errno != EEXIST)
- G_fatal_error(_("Cannot create %s/.r.li/ directory"),
- G_home());
+ G_fatal_error(_("Cannot create %s/.r.li/ directory"), G_home());
sprintf(out, "%s/.r.li/output", G_home());
doneDir = G_mkdir(out);
if (doneDir == -1 && errno != EEXIST)
@@ -240,13 +240,11 @@
wait(&status);
if (!(WIFEXITED(status)))
- G_warning(
- _("r.li.worker (pid %i) exited with abnormal status: %i"),
- donePid, status);
+ G_warning(_("r.li.worker (pid %i) exited with abnormal status: %i"),
+ donePid, status);
else
- G_verbose_message(
- _("r.li.worker (pid %i) terminated successfully"),
- donePid);
+ G_verbose_message(_("r.li.worker (pid %i) terminated successfully"),
+ donePid);
/* remove pipe */
if (close(child[j].channel) != 0)
@@ -265,13 +263,11 @@
wait(&status);
if (!(WIFEXITED(status)))
- G_warning(
- _("r.li.worker (pid %i) exited with abnormal status: %i"),
- child[i].pid, status);
+ G_warning(_("r.li.worker (pid %i) exited with abnormal status: %i"),
+ child[i].pid, status);
else
- G_verbose_message(
- _("r.li.worker (pid %i) terminated successfully"),
- child[i].pid);
+ G_verbose_message(_("r.li.worker (pid %i) terminated successfully"),
+ child[i].pid);
/* remove pipe */
if (close(child[i].channel) != 0)
@@ -406,7 +402,7 @@
}
} while ((token = strtok(NULL, " ")) != NULL &&
- strcmp(token, "SAMPLEAREA") == 0);
+ strcmp(token, "SAMPLEAREA") == 0);
close(setup);
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/index.h
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/index.h 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/index.h 2011-08-16 14:08:37 UTC (rev 47673)
@@ -5,7 +5,7 @@
*
* \author Claudio Porta, Lucio Davide Spano, Serena Pallecchi students of Computer Science University of Pisa (Italy)
* Commission from Faunalia Pontedera (PI) www.faunalia.it
- * Luca Delucchi and Duccio Rocchini, Fondazione Edmund Mach, Italy: r.li.pielou, r.li.renyi
+ * Luca Delucchi and Duccio Rocchini, Fondazione Edmund Mach, Italy: r.li.pielou, r.li.renyi
*
*
* This program is free software under the GPL (>=v2)
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.edgedensity/edgedensity.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.edgedensity/edgedensity.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.edgedensity/edgedensity.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -380,7 +380,7 @@
G_free(mask_inf);
G_free(mask_corr);
}
-
+
G_free(buf_sup);
return RLI_OK;
}
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.mpa/mpa.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.mpa/mpa.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.mpa/mpa.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -173,6 +173,7 @@
}
return RLI_OK;
}
+
int calculateD(int fd, area_des ad, double *result)
{
DCELL *buf;
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.padcv/padcv.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.padcv/padcv.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.padcv/padcv.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -51,6 +51,7 @@
return calculateIndex(conf->answer, patchAreaDistributionCV, NULL,
raster->answer, output->answer);
}
+
int patchAreaDistributionCV(int fd, char **par, area_des ad, double *result)
{
char *mapset;
@@ -94,6 +95,7 @@
*result = indice;
return RLI_OK;
}
+
int calculate(int fd, area_des ad, double *result)
{
CELL *buf;
@@ -491,6 +493,7 @@
G_free(buf_sup);
return RLI_OK;
}
+
int calculateD(int fd, area_des ad, double *result)
{
DCELL *buf;
@@ -884,6 +887,7 @@
*result = indice;
return RLI_OK;
}
+
int calculateF(int fd, area_des ad, double *result)
{
FCELL *buf;
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.padrange/padrange.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.padrange/padrange.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.padrange/padrange.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -51,6 +51,7 @@
return calculateIndex(conf->answer, patchAreaDistributionRANGE, NULL,
raster->answer, output->answer);
}
+
int patchAreaDistributionRANGE(int fd, char **par, area_des ad,
double *result)
{
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.padsd/padsd.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.padsd/padsd.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.padsd/padsd.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -49,6 +49,7 @@
return calculateIndex(conf->answer, patchAreaDistributionSD, NULL,
raster->answer, output->answer);
}
+
int patchAreaDistributionSD(int fd, char **par, area_des ad, double *result)
{
char *mapset;
@@ -92,6 +93,7 @@
*result = indice;
return RLI_OK;
}
+
int calculate(int fd, area_des ad, double *result)
{
CELL *buf;
@@ -882,6 +884,7 @@
*result = indice;
return RLI_OK;
}
+
int calculateF(int fd, area_des ad, double *result)
{
FCELL *buf;
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.pielou/pielou.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.pielou/pielou.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.pielou/pielou.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -390,6 +390,7 @@
AVL_table *array;
generic_cell cc;
generic_cell cc_passage; /*add to compute the number of class */
+
cc.t = DCELL_TYPE;
/* open mask if needed */
@@ -612,6 +613,7 @@
AVL_table *array;
generic_cell cc;
generic_cell cc_passage;
+
cc.t = FCELL_TYPE;
/* open mask if needed */
Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.renyi/renyi.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.renyi/renyi.c 2011-08-16 11:48:40 UTC (rev 47672)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.renyi/renyi.c 2011-08-16 14:08:37 UTC (rev 47673)
@@ -156,6 +156,7 @@
avl_tree albero = NULL;
AVL_table *array;
generic_cell uc;
+
uc.t = CELL_TYPE;
/* open mask if needed */
@@ -302,7 +303,7 @@
for (i = 0; i < m; i++) {
t = (double)(array[i]->tot);
p = t / area;
- G_debug(1,"Valore p: %g, valore pow: %g",p,pow(p,alpha_double));
+ G_debug(1, "Valore p: %g, valore pow: %g", p, pow(p, alpha_double));
somma = somma + pow(p, alpha_double);
}
@@ -347,6 +348,7 @@
avl_tree albero = NULL;
AVL_table *array;
generic_cell uc;
+
uc.t = DCELL_TYPE;
/* open mask if needed */
@@ -494,7 +496,7 @@
for (i = 0; i < m; i++) {
t = (double)(array[i]->tot);
p = t / area;
- G_debug(1,"Valore p: %g, valore pow: %g",p,pow(p,alpha_double));
+ G_debug(1, "Valore p: %g, valore pow: %g", p, pow(p, alpha_double));
somma = somma + pow(p, alpha_double);
}
@@ -541,6 +543,7 @@
avl_tree albero = NULL;
AVL_table *array;
generic_cell uc;
+
uc.t = FCELL_TYPE;
/* open mask if needed */
@@ -691,7 +694,7 @@
for (i = 0; i < m; i++) {
t = (double)(array[i]->tot);
p = t / area;
- G_debug(1,"Valore p: %g, valore pow: %g",p,pow(p,alpha_double));
+ G_debug(1, "Valore p: %g, valore pow: %g", p, pow(p, alpha_double));
somma = somma + pow(p, alpha_double);
}
More information about the grass-commit
mailing list