[GRASS-SVN] r38632 - grass/trunk/raster/r.drain

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 7 11:26:24 EDT 2009


Author: mmetz
Date: 2009-08-07 11:26:24 -0400 (Fri, 07 Aug 2009)
New Revision: 38632

Modified:
   grass/trunk/raster/r.drain/filldir.c
   grass/trunk/raster/r.drain/main.c
   grass/trunk/raster/r.drain/resolve.c
   grass/trunk/raster/r.drain/tinf.c
   grass/trunk/raster/r.drain/tinf.h
Log:
LFS-safe r.drain

Modified: grass/trunk/raster/r.drain/filldir.c
===================================================================
--- grass/trunk/raster/r.drain/filldir.c	2009-08-07 14:56:54 UTC (rev 38631)
+++ grass/trunk/raster/r.drain/filldir.c	2009-08-07 15:26:24 UTC (rev 38632)
@@ -1,3 +1,5 @@
+#include <grass/config.h>
+#include <sys/types.h>
 #include <stdlib.h>
 #include <math.h>
 #include <limits.h>
@@ -34,7 +36,8 @@
 void build_one_row(int i, int nl, int ns, struct band3 *bnd, CELL * dir,
 		   struct metrics m)
 {
-    int j, offset, inc;
+    int j, inc;
+    off_t offset;
     CELL sdir;
     double slope;
     char *center;
@@ -97,7 +100,7 @@
 
 void filldir(int fe, int fd, int nl, struct band3 *bnd, struct metrics *m)
 {
-    int i, bufsz;
+    int i, bufsz;  /* use off_t bufsz for large files ? MM */
     CELL *dir;
 
     /* determine the flow direction in each cell.  On outer rows and columns

Modified: grass/trunk/raster/r.drain/main.c
===================================================================
--- grass/trunk/raster/r.drain/main.c	2009-08-07 14:56:54 UTC (rev 38631)
+++ grass/trunk/raster/r.drain/main.c	2009-08-07 15:26:24 UTC (rev 38632)
@@ -25,6 +25,7 @@
  *
  *****************************************************************************/
 
+#include <grass/config.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -87,7 +88,8 @@
 
     struct point *list;
     struct point *thispoint;
-    int ival, bsz, start_row, start_col, mode;
+    int ival, start_row, start_col, mode;
+    off_t bsz;
     int costmode = 0;
     double east, north, val;
     struct point *drain(int, struct point *, int, int);

Modified: grass/trunk/raster/r.drain/resolve.c
===================================================================
--- grass/trunk/raster/r.drain/resolve.c	2009-08-07 14:56:54 UTC (rev 38631)
+++ grass/trunk/raster/r.drain/resolve.c	2009-08-07 15:26:24 UTC (rev 38632)
@@ -1,3 +1,4 @@
+#include <grass/config.h>
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>

Modified: grass/trunk/raster/r.drain/tinf.c
===================================================================
--- grass/trunk/raster/r.drain/tinf.c	2009-08-07 14:56:54 UTC (rev 38631)
+++ grass/trunk/raster/r.drain/tinf.c	2009-08-07 15:26:24 UTC (rev 38632)
@@ -1,3 +1,4 @@
+#include <grass/config.h>
 /* #include <limits.h> */
 #include <float.h>
 #include <math.h>

Modified: grass/trunk/raster/r.drain/tinf.h
===================================================================
--- grass/trunk/raster/r.drain/tinf.h	2009-08-07 14:56:54 UTC (rev 38631)
+++ grass/trunk/raster/r.drain/tinf.h	2009-08-07 15:26:24 UTC (rev 38632)
@@ -94,7 +94,7 @@
 struct band3
 {
     int ns;			/* samples per line */
-    int sz;			/* bytes per line */
+    off_t sz;			/* bytes per line */
     char *b[3];			/* pointers to start of each line */
 };
 



More information about the grass-commit mailing list