[GRASS-SVN] r49886 - in grass/trunk/raster/r.li: r.li.cwed r.li.daemon r.li.dominance r.li.edgedensity r.li.mpa r.li.mps r.li.padcv r.li.padrange r.li.padsd r.li.patchdensity r.li.patchnum r.li.pielou r.li.renyi r.li.richness r.li.shannon r.li.shape r.li.simpson

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 23 10:30:40 EST 2011


Author: mmetz
Date: 2011-12-23 07:30:40 -0800 (Fri, 23 Dec 2011)
New Revision: 49886

Modified:
   grass/trunk/raster/r.li/r.li.cwed/cwed.c
   grass/trunk/raster/r.li/r.li.daemon/daemon.c
   grass/trunk/raster/r.li/r.li.daemon/daemon.h
   grass/trunk/raster/r.li/r.li.daemon/index.h
   grass/trunk/raster/r.li/r.li.daemon/list.c
   grass/trunk/raster/r.li/r.li.daemon/list.h
   grass/trunk/raster/r.li/r.li.daemon/worker.c
   grass/trunk/raster/r.li/r.li.dominance/dominance.c
   grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c
   grass/trunk/raster/r.li/r.li.mpa/mpa.c
   grass/trunk/raster/r.li/r.li.mps/mps.c
   grass/trunk/raster/r.li/r.li.padcv/padcv.c
   grass/trunk/raster/r.li/r.li.padrange/padrange.c
   grass/trunk/raster/r.li/r.li.padsd/padsd.c
   grass/trunk/raster/r.li/r.li.patchdensity/main.c
   grass/trunk/raster/r.li/r.li.patchnum/main.c
   grass/trunk/raster/r.li/r.li.pielou/pielou.c
   grass/trunk/raster/r.li/r.li.renyi/renyi.c
   grass/trunk/raster/r.li/r.li.richness/richness.c
   grass/trunk/raster/r.li/r.li.shannon/shannon.c
   grass/trunk/raster/r.li/r.li.shape/main.c
   grass/trunk/raster/r.li/r.li.simpson/simpson.c
Log:
avoid bad typedef practice

Modified: grass/trunk/raster/r.li/r.li.cwed/cwed.c
===================================================================
--- grass/trunk/raster/r.li/r.li.cwed/cwed.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.cwed/cwed.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -26,11 +26,11 @@
 #define _PRES 1
 #define _ERR -1
 
-int calculate(int fd, area_des ad, Coppie * cc, long totCoppie,
+int calculate(int fd, struct area_entry *ad, Coppie * cc, long totCoppie,
 	      double *result);
-int calculateD(int fd, area_des ad, Coppie * cc, long totCoppie,
+int calculateD(int fd, struct area_entry *ad, Coppie * cc, long totCoppie,
 	       double *result);
-int calculateF(int fd, area_des ad, Coppie * cc, long totCoppie,
+int calculateF(int fd, struct area_entry *ad, Coppie * cc, long totCoppie,
 	       double *result);
 
 int main(int argc, char *argv[])
@@ -83,7 +83,7 @@
 }
 
 
-int contrastWeightedEdgeDensity(int fd, char **par, area_des ad,
+int contrastWeightedEdgeDensity(int fd, char **par, struct area_entry *ad,
 				double *result)
 {
     double indice = 0;		/* the result */
@@ -294,7 +294,7 @@
 
 
 
-int calculate(int fd, area_des ad, Coppie * cc, long totCoppie,
+int calculate(int fd, struct area_entry *ad, Coppie * cc, long totCoppie,
 	      double *result)
 {
 
@@ -436,7 +436,7 @@
 }
 
 
-int calculateD(int fd, area_des ad, Coppie * cc, long totCoppie,
+int calculateD(int fd, struct area_entry *ad, Coppie * cc, long totCoppie,
 	       double *result)
 {
 
@@ -572,7 +572,7 @@
 
 
 
-int calculateF(int fd, area_des ad, Coppie * cc, long totCoppie,
+int calculateF(int fd, struct area_entry *ad, Coppie * cc, long totCoppie,
 	       double *result)
 {
 

Modified: grass/trunk/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/daemon.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.daemon/daemon.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -41,26 +41,26 @@
 #define random rand
 #endif
 
-int calculateIndex(char *file, int f(int, char **, area_des, double *),
+int calculateIndex(char *file, int f(int, char **, struct area_entry *, double *),
 		   char **parameters, char *raster, char *output)
 {
 
     char pathSetup[GPATH_MAX], out[GPATH_MAX], parsed;
     char *random_access_name;
     struct History history;
-    g_areas g;
+    struct g_area *g;
     int res;
     int i, doneDir, mv_fd, random_access;
 
     /*int mv_rows, mv_cols; */
-    list l;
+    struct list *l;
     msg m, doneJob;
 
     /* int perc=0; */
 
-    g = (g_areas) G_malloc(sizeof(struct generatore));
+    g = (struct g_area *) G_malloc(sizeof(struct g_area));
     g->maskname = NULL;
-    l = (list) G_malloc(sizeof(struct lista));
+    l = (struct list*) G_malloc(sizeof(struct list));
     l->head = NULL;
     l->tail = NULL;
     l->size = 0;
@@ -181,7 +181,7 @@
 }
 
 
-int parseSetup(char *path, list l, g_areas g, char *raster)
+int parseSetup(char *path, struct list *l, struct g_area *g, char *raster)
 {
     STRUCT_STAT s;
     struct Cell_head cellhd;
@@ -376,7 +376,7 @@
     return ERROR;
 }
 
-int disposeAreas(list l, g_areas g, char *def)
+int disposeAreas(struct list *l, struct g_area *g, char *def)
 {
     char *token;
 
@@ -515,7 +515,7 @@
 }
 
 
-int next_Area(int parsed, list l, g_areas g, msg * m)
+int next_Area(int parsed, struct list *l, struct g_area *g, msg * m)
 {
     if (parsed == NORMAL) {
 	if (l->size == 0)
@@ -571,7 +571,7 @@
 }
 
 
-int raster_Output(int fd, int aid, g_areas g, double res)
+int raster_Output(int fd, int aid, struct g_area *g, double res)
 {
     double toPut = res;
     off_t offset = (off_t) aid * sizeof(double);
@@ -588,7 +588,7 @@
 }
 
 
-int write_raster(int mv_fd, int random_access, g_areas g)
+int write_raster(int mv_fd, int random_access, struct g_area *g)
 {
     int i = 0, j = 0, letti = 0;
     double *file_buf;

Modified: grass/trunk/raster/r.li/r.li.daemon/daemon.h
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/daemon.h	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.daemon/daemon.h	2011-12-23 15:30:40 UTC (rev 49886)
@@ -119,11 +119,9 @@
     char *mask_name;
 };
 
-typedef struct area_entry *area_des;
 
 
 
-
 /**
  * \brief applies the f index once for every
  * area defined in setup file
@@ -134,7 +132,7 @@
  * \return 1  otherwise
  */
 
-int calculateIndex(char *file, int f(int, char **, area_des, double *),
+int calculateIndex(char *file, int f(int, char **, struct area_entry *, double *),
 		   char **parameters, char *raster, char *output);
 
 /**
@@ -150,7 +148,7 @@
  * be written in normal way
  * \return MVWIN if a new raster file had to be created
  */
-int parseSetup(char *path, list l, g_areas g, char *raster);
+int parseSetup(char *path, struct list *l, struct g_area *g, char *raster);
 
 /**
  * \description dispose sample areas if configuration file have
@@ -164,7 +162,7 @@
  * be written in normal way
  * \return MVWIN if a new raster file had to be created
  */
-int disposeAreas(list l, g_areas g, char *def);
+int disposeAreas(struct list *l, struct g_area *g, char *def);
 
 /**
  * \brief generate the next area to analyze
@@ -175,7 +173,7 @@
  * \return 1 if the area is generated
  * \return 0 if there isn't another area
  */
-int next_Area(int parsed, list l, g_areas g, msg * m);
+int next_Area(int parsed, struct list *l, struct g_area *g, msg * m);
 
 /**
  * \brief writes output in a file
@@ -201,7 +199,7 @@
  * \param f the function used for index computing
  * \param result where to put the result of index computing
  */
-void worker_init(char *raster, int f(int, char **, area_des, double *),
+void worker_init(char *raster, int f(int, char **, struct area_entry *, double *),
 		 char **parameters);
 void worker_process(msg * ret, msg * m);
 void worker_end(void);
@@ -223,7 +221,7 @@
   * \param res the result to be written
   * \return 0 on error, 1 if done
   */
-int raster_Output(int fd, int aid, g_areas g, double res);
+int raster_Output(int fd, int aid, struct g_area *g, double res);
 
  /**
   * \brief calculates a simple index for code debugging
@@ -233,7 +231,7 @@
   * \param result where to return result
   * \return 0 on error, 1 otherwise
   */
-int simple_index(int fd, char **par, area_des ad, double *result);
+int simple_index(int fd, char **par, struct area_entry * ad, double *result);
 
  /**
   * \brief copy the content of regular file random access 
@@ -243,7 +241,7 @@
   * \param g the mv window generator
   * \return 0 on error, 1 otherwise
   */
-int write_raster(int mv_fd, int random_access, g_areas g);
+int write_raster(int mv_fd, int random_access, struct g_area *g);
 
  /**
   * \brief get a cell raster row using the memory menager
@@ -251,7 +249,7 @@
   * \param row identifier of row to get
   * \param ad area descriptor of current sample area
   */
-CELL *RLI_get_cell_raster_row(int fd, int row, area_des ad);
+CELL *RLI_get_cell_raster_row(int fd, int row, struct area_entry * ad);
 
  /**
   * \brief get a dcell raster row using the memory menager
@@ -259,7 +257,7 @@
   * \param row identifier of row to get
   * \param ad area descriptor of current sample area
   */
-DCELL *RLI_get_dcell_raster_row(int fd, int row, area_des ad);
+DCELL *RLI_get_dcell_raster_row(int fd, int row, struct area_entry * ad);
 
  /**
   * \brief get a fcell raster row using the memory menager
@@ -267,6 +265,6 @@
   * \param row identifier of row to get
   * \param ad area descriptor of current sample area
   */
-FCELL *RLI_get_fcell_raster_row(int fd, int row, area_des ad);
+FCELL *RLI_get_fcell_raster_row(int fd, int row, struct area_entry * ad);
 
 #include "index.h"

Modified: grass/trunk/raster/r.li/r.li.daemon/index.h
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/index.h	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.daemon/index.h	2011-12-23 15:30:40 UTC (rev 49886)
@@ -26,25 +26,25 @@
   * \brief calculate patch density index on selected area
   * the abstract function is patch_density= patch_number / area
   */
-int patch_density(int fd, char **par, area_des ad, double *result);
+int patch_density(int fd, char **par, struct area_entry *ad, double *result);
 
-int patch_number(int fd, char **par, area_des ad, double *result);
-int shape_index(int fd, char **par, area_des ad, double *result);
-int shannon(int fd, char **par, area_des ad, double *result);
+int patch_number(int fd, char **par, struct area_entry *ad, double *result);
+int shape_index(int fd, char **par, struct area_entry *ad, double *result);
+int shannon(int fd, char **par, struct area_entry *ad, double *result);
 
-int pielou(int fd, char **par, area_des ad, double *result);
-int renyi(int fd, char **par, area_des ad, double *result);
+int pielou(int fd, char **par, struct area_entry *ad, double *result);
+int renyi(int fd, char **par, struct area_entry *ad, double *result);
 
-int simpson(int fd, char **par, area_des ad, double *result);
-int meanPatchSize(int fd, char **par, area_des ad, double *result);
-int meanPixelAttribute(int fd, char **par, area_des ad, double *result);
-int contrastWeightedEdgeDensity(int fd, char **par, area_des ad,
+int simpson(int fd, char **par, struct area_entry *ad, double *result);
+int meanPatchSize(int fd, char **par, struct area_entry *ad, double *result);
+int meanPixelAttribute(int fd, char **par, struct area_entry *ad, double *result);
+int contrastWeightedEdgeDensity(int fd, char **par, struct area_entry *ad,
 				double *result);
-int edgedensity(int fd, char **valore, area_des ad, double *result);
-int patchAreaDistributionCV(int fd, char **par, area_des ad, double *result);
-int patchAreaDistributionMN(int fd, char **par, area_des ad, double *result);
-int patchAreaDistributionSD(int fd, char **par, area_des ad, double *result);
-int patchAreaDistributionRANGE(int fd, char **par, area_des ad,
+int edgedensity(int fd, char **valore, struct area_entry *ad, double *result);
+int patchAreaDistributionCV(int fd, char **par, struct area_entry *ad, double *result);
+int patchAreaDistributionMN(int fd, char **par, struct area_entry *ad, double *result);
+int patchAreaDistributionSD(int fd, char **par, struct area_entry *ad, double *result);
+int patchAreaDistributionRANGE(int fd, char **par, struct area_entry *ad,
 			       double *result);
-int dominance(int fd, char **par, area_des ad, double *result);
-int richness(int fd, char **par, area_des ad, double *result);
+int dominance(int fd, char **par, struct area_entry *ad, double *result);
+int richness(int fd, char **par, struct area_entry *ad, double *result);

Modified: grass/trunk/raster/r.li/r.li.daemon/list.c
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/list.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.daemon/list.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -25,11 +25,11 @@
  * \param l list where to insert
  * \param mess the message to insert
  */
-void insertNode(list l, msg mess)
+void insertNode(struct list *l, msg mess)
 {
-    node new;
+    struct node *new;
 
-    new = G_malloc(sizeof(struct nodoLista));
+    new = G_malloc(sizeof(struct node));
     new->m = G_malloc(sizeof(msg));
 
     if (new != NULL) {
@@ -56,20 +56,20 @@
  *\brief remove a node from list
  * \param list where to remove
  */
-void removeNode(list l)
+void removeNode(struct list *l)
 {
     if (l->head == NULL) {
 	return;
     }
     if (l->head->next == NULL) {
-	node tmp = l->head;
+	struct node *tmp = l->head;
 
 	l->head = NULL;
 	free(tmp);
 	l->size--;
     }
     else {
-	node tmp = l->head;
+	struct node *tmp = l->head;
 
 	l->head = l->head->next;
 	l->head->prev = NULL;
@@ -83,7 +83,7 @@
  * \param gen area generator to use
  * \param msg next area message
  */
-int next(g_areas gen, msg * toReturn)
+int next(struct g_area *gen, msg *toReturn)
 {
 
     if (gen->cl > gen->cols)

Modified: grass/trunk/raster/r.li/r.li.daemon/list.h
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/list.h	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.daemon/list.h	2011-12-23 15:30:40 UTC (rev 49886)
@@ -27,10 +27,10 @@
  * \member next the next item in list
  * \member m the content of list node
  */
-struct nodoLista
+struct node
 {
-    struct nodoLista *prev;
-    struct nodoLista *next;
+    struct node *prev;
+    struct node *next;
     msg *m;
 };
 
@@ -42,29 +42,26 @@
  * \member tail last item in list
  * \member size number of items in list
  */
-struct lista
+struct list
 {
-    struct nodoLista *head;
-    struct nodoLista *tail;
+    struct node *head;
+    struct node *tail;
     int size;
 };
 
-typedef struct nodoLista *node;
 
-typedef struct lista *list;
-
 /**
  * \brief insert a item in list
  * \param l list where to put items
  * \param mess the message to insert
  */
-void insertNode(list l, msg m);
+void insertNode(struct list *l, msg m);
 
 /**
  * \brief remove head item
  * \param l list where to remove
  */
-void removeNode(list l);
+void removeNode(struct list *l);
 
  /**
   * \brief struct for runtime area generation
@@ -80,7 +77,7 @@
   * \param sf_y y coordinate of sample frame
   * \param maskname name of mask for the area
   */
-struct generatore
+struct g_area
 {
     int dist;
     int add_row;
@@ -97,11 +94,9 @@
     char *maskname;
 };
 
-typedef struct generatore *g_areas;
-
 /**
  * \brief runtime area generation
  * \param gen area generator to use
  * \param msg next area message
  */
-int next(g_areas gen, msg * toReturn);
+int next(struct g_area *gen, msg *toReturn);

Modified: grass/trunk/raster/r.li/r.li.daemon/worker.c
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/worker.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.daemon/worker.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -41,7 +41,7 @@
 static int fd, aid;
 static int erease_mask = 0, data_type = 0;
 static int cache_rows, used = 0;
-static area_des ad;
+static struct area_entry * ad;
 static double result;
 static struct Cell_head hd;
 static cell_manager cm;
@@ -49,9 +49,9 @@
 static fcell_manager fm;
 static char *raster;
 static char **parameters;
-static int (*func) (int, char **, area_des, double *);
+static int (*func) (int, char **, struct area_entry *, double *);
 
-void worker_init(char *r, int f(int, char **, area_des, double *), char **p)
+void worker_init(char *r, int f(int, char **, struct area_entry *, double *), char **p)
 {
     cm = G_malloc(sizeof(struct cell_memory_entry));
     fm = G_malloc(sizeof(struct fcell_memory_entry));
@@ -246,7 +246,7 @@
     return G_store(tmp_file);
 }
 
-CELL *RLI_get_cell_raster_row(int fd, int row, area_des ad)
+CELL *RLI_get_cell_raster_row(int fd, int row, struct area_entry *ad)
 {
     int hash;
 
@@ -261,7 +261,7 @@
 
 }
 
-DCELL *RLI_get_dcell_raster_row(int fd, int row, area_des ad)
+DCELL *RLI_get_dcell_raster_row(int fd, int row, struct area_entry *ad)
 {
     int hash;
 
@@ -276,7 +276,7 @@
 
 }
 
-FCELL *RLI_get_fcell_raster_row(int fd, int row, area_des ad)
+FCELL *RLI_get_fcell_raster_row(int fd, int row, struct area_entry *ad)
 {
     int hash;
 

Modified: grass/trunk/raster/r.li/r.li.dominance/dominance.c
===================================================================
--- grass/trunk/raster/r.li/r.li.dominance/dominance.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.dominance/dominance.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -25,9 +25,9 @@
 #include "../r.li.daemon/daemon.h"
 
 
-int calculate(int fd, area_des ad, double *result);
-int calculateD(int fd, area_des ad, double *result);
-int calculateF(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -64,7 +64,7 @@
 }
 
 
-int dominance(int fd, char **par, area_des ad, double *result)
+int dominance(int fd, char **par, struct area_entry *ad, double *result)
 {
 
     int ris = RLI_OK;
@@ -108,7 +108,7 @@
 }
 
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
 
     CELL *buf;
@@ -320,7 +320,7 @@
 
 
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
 
     DCELL *buf;
@@ -524,7 +524,7 @@
 }
 
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
 
     FCELL *buf;

Modified: grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c
===================================================================
--- grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -22,9 +22,9 @@
 #include "../r.li.daemon/avl.h"
 #include "../r.li.daemon/daemon.h"
 
-int calculate(int fd, area_des ad, char **valore, double *result);
-int calculateD(int fd, area_des ad, char **valore, double *result);
-int calculateF(int fd, area_des ad, char **valore, double *result);
+int calculate(int fd, struct area_entry *ad, char **valore, double *result);
+int calculateD(int fd, struct area_entry *ad, char **valore, double *result);
+int calculateF(int fd, struct area_entry *ad, char **valore, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -77,7 +77,7 @@
 
 }
 
-int edgedensity(int fd, char **valore, area_des ad, double *result)
+int edgedensity(int fd, char **valore, struct area_entry *ad, double *result)
 {
     struct Cell_head hd;
     int ris = -1;
@@ -118,7 +118,7 @@
 
 
 
-int calculate(int fd, area_des ad, char **valore, double *result)
+int calculate(int fd, struct area_entry *ad, char **valore, double *result)
 {
     double indice = 0;
     double e = 0;
@@ -380,7 +380,7 @@
     return RLI_OK;
 }
 
-int calculateD(int fd, area_des ad, char **valore, double *result)
+int calculateD(int fd, struct area_entry *ad, char **valore, double *result)
 {
     double indice = 0;
     double e = 0;
@@ -646,7 +646,7 @@
     return RLI_OK;
 }
 
-int calculateF(int fd, area_des ad, char **valore, double *result)
+int calculateF(int fd, struct area_entry *ad, char **valore, double *result)
 {
     double indice = 0;
     double e = 0;

Modified: grass/trunk/raster/r.li/r.li.mpa/mpa.c
===================================================================
--- grass/trunk/raster/r.li/r.li.mpa/mpa.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.mpa/mpa.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -23,9 +23,9 @@
 #include "../r.li.daemon/daemon.h"
 
 
-int calculate(int fd, area_des ad, double *result);
-int calculateD(int fd, area_des ad, double *result);
-int calculateF(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -63,7 +63,7 @@
 }
 
 
-int meanPixelAttribute(int fd, char **par, area_des ad, double *result)
+int meanPixelAttribute(int fd, char **par, struct area_entry *ad, double *result)
 {
     int ris = 0;
     double indice = 0;
@@ -106,7 +106,7 @@
 
 
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
     CELL *buf;
 
@@ -170,7 +170,7 @@
     return RLI_OK;
 }
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
     DCELL *buf;
 
@@ -235,7 +235,7 @@
     return RLI_OK;
 }
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
     FCELL *buf;
 

Modified: grass/trunk/raster/r.li/r.li.mps/mps.c
===================================================================
--- grass/trunk/raster/r.li/r.li.mps/mps.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.mps/mps.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -23,9 +23,9 @@
 #include "../r.li.daemon/daemon.h"
 
 
-int calculate(int fd, area_des ad, struct Cell_head hd, double *result);
-int calculateD(int fd, area_des ad, struct Cell_head hd, double *result);
-int calculateF(int fd, area_des ad, struct Cell_head hd, double *result);
+int calculate(int fd, struct area_entry *ad, struct Cell_head hd, double *result);
+int calculateD(int fd, struct area_entry *ad, struct Cell_head hd, double *result);
+int calculateF(int fd, struct area_entry *ad, struct Cell_head hd, double *result);
 
 
 int main(int argc, char *argv[])
@@ -63,7 +63,7 @@
 
 
 
-int meanPatchSize(int fd, char **par, area_des ad, double *result)
+int meanPatchSize(int fd, char **par, struct area_entry *ad, double *result)
 {
 
     int ris = 0;
@@ -104,7 +104,7 @@
 }
 
 
-int calculate(int fd, area_des ad, struct Cell_head hd, double *result)
+int calculate(int fd, struct area_entry *ad, struct Cell_head hd, double *result)
 {
     CELL *buf;
     CELL *buf_sup;
@@ -476,7 +476,7 @@
 }
 
 
-int calculateD(int fd, area_des ad, struct Cell_head hd, double *result)
+int calculateD(int fd, struct area_entry *ad, struct Cell_head hd, double *result)
 {
     DCELL *buf;
     DCELL *buf_sup;
@@ -845,7 +845,7 @@
 }
 
 
-int calculateF(int fd, area_des ad, struct Cell_head hd, double *result)
+int calculateF(int fd, struct area_entry *ad, struct Cell_head hd, double *result)
 {
     FCELL *buf;
     FCELL *buf_sup;

Modified: grass/trunk/raster/r.li/r.li.padcv/padcv.c
===================================================================
--- grass/trunk/raster/r.li/r.li.padcv/padcv.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.padcv/padcv.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -23,9 +23,9 @@
 #include "../r.li.daemon/GenericCell.h"
 #include "../r.li.daemon/daemon.h"
 
-int calculate(int fd, area_des ad, double *result);
-int calculateD(int fd, area_des ad, double *result);
-int calculateF(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -58,7 +58,7 @@
 			  raster->answer, output->answer);
 }
 
-int patchAreaDistributionCV(int fd, char **par, area_des ad, double *result)
+int patchAreaDistributionCV(int fd, char **par, struct area_entry *ad, double *result)
 {
     double indice = 0;
     struct Cell_head hd;
@@ -100,7 +100,7 @@
     return RLI_OK;
 }
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
     CELL *buf;
     CELL *buf_sup;
@@ -498,7 +498,7 @@
     return RLI_OK;
 }
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
     DCELL *buf;
     DCELL *buf_sup;
@@ -892,7 +892,7 @@
     return RLI_OK;
 }
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
     FCELL *buf;
     FCELL *buf_sup;

Modified: grass/trunk/raster/r.li/r.li.padrange/padrange.c
===================================================================
--- grass/trunk/raster/r.li/r.li.padrange/padrange.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.padrange/padrange.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -23,9 +23,9 @@
 #include "../r.li.daemon/GenericCell.h"
 #include "../r.li.daemon/daemon.h"
 
-int calculate(int fd, area_des ad, double *result);
-int calculateD(int fd, area_des ad, double *result);
-int calculateF(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -58,7 +58,7 @@
 			  raster->answer, output->answer);
 }
 
-int patchAreaDistributionRANGE(int fd, char **par, area_des ad,
+int patchAreaDistributionRANGE(int fd, char **par, struct area_entry *ad,
 			       double *result)
 {
     double indice = 0;
@@ -101,7 +101,7 @@
 }
 
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
 
     CELL *buf;
@@ -511,7 +511,7 @@
 
 
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
     DCELL *buf;
     DCELL *buf_sup;
@@ -894,7 +894,7 @@
 
 
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
     FCELL *buf;
     FCELL *buf_sup;

Modified: grass/trunk/raster/r.li/r.li.padsd/padsd.c
===================================================================
--- grass/trunk/raster/r.li/r.li.padsd/padsd.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.padsd/padsd.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -22,9 +22,9 @@
 #include "../r.li.daemon/avlID.h"
 #include "../r.li.daemon/GenericCell.h"
 #include "../r.li.daemon/daemon.h"
-int calculate(int fd, area_des ad, double *result);
-int calculateD(int fd, area_des ad, double *result);
-int calculateF(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 int main(int argc, char *argv[])
 {
     struct Option *raster, *conf, *output;
@@ -56,7 +56,7 @@
 			  raster->answer, output->answer);
 }
 
-int patchAreaDistributionSD(int fd, char **par, area_des ad, double *result)
+int patchAreaDistributionSD(int fd, char **par, struct area_entry *ad, double *result)
 {
     double indice = 0;
     struct Cell_head hd;
@@ -98,7 +98,7 @@
     return RLI_OK;
 }
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
     CELL *buf;
     CELL *buf_sup;
@@ -497,7 +497,7 @@
 
 
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
     DCELL *buf;
     DCELL *buf_sup;
@@ -889,7 +889,7 @@
     return RLI_OK;
 }
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
     FCELL *buf;
     FCELL *buf_sup;

Modified: grass/trunk/raster/r.li/r.li.patchdensity/main.c
===================================================================
--- grass/trunk/raster/r.li/r.li.patchdensity/main.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.patchdensity/main.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -49,7 +49,7 @@
 
     output = G_define_standard_option(G_OPT_R_OUTPUT);
 
-	/** add other options for index parameters here */
+	/**add other options for index parameters here */
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -60,7 +60,7 @@
 }
 
 
-int patch_density(int fd, char **par, area_des ad, double *result)
+int patch_density(int fd, char **par, struct area_entry *ad, double *result)
 {
     CELL *buf, *sup;
     int count = 0, i, j, connected = 0, complete_line = 1, other_above = 0;
@@ -195,7 +195,7 @@
 
     area = (((EW_DIST1 + EW_DIST2) / 2) / hd.cols) *
 	(((NS_DIST1 + NS_DIST2) / 2) / hd.rows) *
-	(ad->rl * ad->cl - null_count);
+	(ad->rl *ad->cl - null_count);
 
     if (area != 0)
 	*result = (count / area) * 1000000;

Modified: grass/trunk/raster/r.li/r.li.patchnum/main.c
===================================================================
--- grass/trunk/raster/r.li/r.li.patchnum/main.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.patchnum/main.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -59,7 +59,7 @@
 
 }
 
-int patch_number(int fd, char **par, area_des ad, double *result)
+int patch_number(int fd, char **par, struct area_entry *ad, double *result)
 {
     CELL *buf, *sup;
     int count = 0, i, j, connected = 0, complete_line = 1, other_above = 0;

Modified: grass/trunk/raster/r.li/r.li.pielou/pielou.c
===================================================================
--- grass/trunk/raster/r.li/r.li.pielou/pielou.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.pielou/pielou.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -26,11 +26,11 @@
 #include "../r.li.daemon/avl.h"
 #include "../r.li.daemon/daemon.h"
 
-int calculate(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
 
-int calculateD(int fd, area_des ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
 
-int calculateF(int fd, area_des ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 
 /*This function is used to sort the values in the moving window */
 static int cmp(const void *pa, const void *pb)
@@ -80,7 +80,7 @@
 
 }
 
-int pielou(int fd, char **par, area_des ad, double *result)
+int pielou(int fd, char **par, struct area_entry *ad, double *result)
 {
 
     int ris = RLI_OK;
@@ -123,7 +123,7 @@
 }
 
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
 
     CELL *buf;
@@ -148,7 +148,7 @@
     double t;
     double logaritmo;
 
-    /* add to compute the number of class */
+    /*add to compute the number of class */
     long *array_copy;
     int totNumClass = 1;
     double logTotNumClass;
@@ -356,7 +356,7 @@
 
 
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
 
     DCELL *buf;
@@ -585,7 +585,7 @@
 }
 
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
 
     FCELL *buf;

Modified: grass/trunk/raster/r.li/r.li.renyi/renyi.c
===================================================================
--- grass/trunk/raster/r.li/r.li.renyi/renyi.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.renyi/renyi.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -26,11 +26,11 @@
 #include "../r.li.daemon/avl.h"
 #include "../r.li.daemon/daemon.h"
 
-double calculate(area_des ad, int fd, char **par, double *result);
+double calculate(struct area_entry *ad, int fd, char **par, double *result);
 
-double calculateD(area_des ad, int fd, char **par, double *result);
+double calculateD(struct area_entry *ad, int fd, char **par, double *result);
 
-double calculateF(area_des ad, int fd, char **par, double *result);
+double calculateF(struct area_entry *ad, int fd, char **par, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -87,7 +87,7 @@
 
 }
 
-int renyi(int fd, char **par, area_des ad, double *result)
+int renyi(int fd, char **par, struct area_entry *ad, double *result)
 {
 
     int ris = RLI_OK;
@@ -131,7 +131,7 @@
 
 
 
-double calculate(area_des ad, int fd, char **par, double *result)
+double calculate(struct area_entry *ad, int fd, char **par, double *result)
 {
 
     CELL *buf;
@@ -329,7 +329,7 @@
 }
 
 
-double calculateD(area_des ad, int fd, char **par, double *result)
+double calculateD(struct area_entry *ad, int fd, char **par, double *result)
 {
     DCELL *buf;
     DCELL corrCell;
@@ -526,7 +526,7 @@
 
 
 
-double calculateF(area_des ad, int fd, char **par, double *result)
+double calculateF(struct area_entry *ad, int fd, char **par, double *result)
 {
     FCELL *buf;
     FCELL corrCell;

Modified: grass/trunk/raster/r.li/r.li.richness/richness.c
===================================================================
--- grass/trunk/raster/r.li/r.li.richness/richness.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.richness/richness.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -23,9 +23,9 @@
 #include "../r.li.daemon/avl.h"
 #include "../r.li.daemon/daemon.h"
 
-double calculate(area_des ad, int fd, double *result);
-double calculateD(area_des ad, int fd, double *result);
-double calculateF(area_des ad, int fd, double *result);
+double calculate(struct area_entry *ad, int fd, double *result);
+double calculateD(struct area_entry *ad, int fd, double *result);
+double calculateF(struct area_entry *ad, int fd, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -61,7 +61,7 @@
 
 }
 
-int dominance(int fd, char **par, area_des ad, double *result)
+int dominance(int fd, char **par, struct area_entry *ad, double *result)
 {
     int ris = RLI_OK;
     double indice = 0;
@@ -104,7 +104,7 @@
 
 
 
-double calculate(area_des ad, int fd, double *result)
+double calculate(struct area_entry *ad, int fd, double *result)
 {
     CELL *buf;
     CELL corrCell;
@@ -263,7 +263,7 @@
 }
 
 
-double calculateD(area_des ad, int fd, double *result)
+double calculateD(struct area_entry *ad, int fd, double *result)
 {
     DCELL *buf;
     DCELL corrCell;
@@ -425,7 +425,7 @@
 
 
 
-double calculateF(area_des ad, int fd, double *result)
+double calculateF(struct area_entry *ad, int fd, double *result)
 {
     FCELL *buf;
     FCELL corrCell;

Modified: grass/trunk/raster/r.li/r.li.shannon/shannon.c
===================================================================
--- grass/trunk/raster/r.li/r.li.shannon/shannon.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.shannon/shannon.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -22,9 +22,9 @@
 #include "../r.li.daemon/avl.h"
 #include "../r.li.daemon/daemon.h"
 
-int calculate(int fd, area_des ad, double *result);
-int calculateD(int fd, area_des ad, double *result);
-int calculateF(int fd, area_des ad, double *result);
+int calculate(int fd, struct area_entry *ad, double *result);
+int calculateD(int fd, struct area_entry *ad, double *result);
+int calculateF(int fd, struct area_entry *ad, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -61,7 +61,7 @@
 }
 
 
-int shannon(int fd, char **par, area_des ad, double *result)
+int shannon(int fd, char **par, struct area_entry * ad, double *result)
 {
 
     int ris = RLI_OK;
@@ -104,7 +104,7 @@
 }
 
 
-int calculate(int fd, area_des ad, double *result)
+int calculate(int fd, struct area_entry *ad, double *result)
 {
 
     CELL *buf;
@@ -312,7 +312,7 @@
 
 
 
-int calculateD(int fd, area_des ad, double *result)
+int calculateD(int fd, struct area_entry *ad, double *result)
 {
 
     DCELL *buf;
@@ -515,7 +515,7 @@
 }
 
 
-int calculateF(int fd, area_des ad, double *result)
+int calculateF(int fd, struct area_entry *ad, double *result)
 {
 
     FCELL *buf;

Modified: grass/trunk/raster/r.li/r.li.shape/main.c
===================================================================
--- grass/trunk/raster/r.li/r.li.shape/main.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.shape/main.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -58,7 +58,7 @@
 
 }
 
-int shape_index(int fd, char **par, area_des ad, double *result)
+int shape_index(int fd, char **par, struct area_entry *ad, double *result)
 {
 
 

Modified: grass/trunk/raster/r.li/r.li.simpson/simpson.c
===================================================================
--- grass/trunk/raster/r.li/r.li.simpson/simpson.c	2011-12-23 15:14:35 UTC (rev 49885)
+++ grass/trunk/raster/r.li/r.li.simpson/simpson.c	2011-12-23 15:30:40 UTC (rev 49886)
@@ -23,9 +23,9 @@
 #include "../r.li.daemon/avl.h"
 #include "../r.li.daemon/daemon.h"
 
-double calculate(area_des ad, int fd, double *result);
-double calculateD(area_des ad, int fd, double *result);
-double calculateF(area_des ad, int fd, double *result);
+double calculate(struct area_entry *ad, int fd, double *result);
+double calculateD(struct area_entry *ad, int fd, double *result);
+double calculateF(struct area_entry *ad, int fd, double *result);
 
 int main(int argc, char *argv[])
 {
@@ -61,7 +61,7 @@
 
 }
 
-int simpson(int fd, char **par, area_des ad, double *result)
+int simpson(int fd, char **par, struct area_entry *ad, double *result)
 {
     int ris = RLI_OK;
     double indice = 0;
@@ -104,7 +104,7 @@
 
 
 
-double calculate(area_des ad, int fd, double *result)
+double calculate(struct area_entry *ad, int fd, double *result)
 {
     CELL *buf;
     CELL corrCell;
@@ -294,7 +294,7 @@
 }
 
 
-double calculateD(area_des ad, int fd, double *result)
+double calculateD(struct area_entry *ad, int fd, double *result)
 {
     DCELL *buf;
     DCELL corrCell;
@@ -483,7 +483,7 @@
 
 
 
-double calculateF(area_des ad, int fd, double *result)
+double calculateF(struct area_entry *ad, int fd, double *result)
 {
     FCELL *buf;
     FCELL corrCell;



More information about the grass-commit mailing list