[GRASS-SVN] r47594 - in grass/trunk: include lib/gpde lib/ogsf lib/raster3d lib/raster3d/test raster/r.colors raster/r.mapcalc raster/r.to.rast3 raster/r.to.rast3elev raster/r.univar raster3d/r3.cross.rast raster3d/r3.gwflow raster3d/r3.in.ascii raster3d/r3.in.v5d raster3d/r3.info raster3d/r3.mask raster3d/r3.mkdspf raster3d/r3.null raster3d/r3.out.ascii raster3d/r3.out.v5d raster3d/r3.out.vtk raster3d/r3.retile raster3d/r3.to.rast vector/v.to.rast3 vector/v.vol.rst

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 12 04:47:59 EDT 2011


Author: martinl
Date: 2011-08-12 01:47:59 -0700 (Fri, 12 Aug 2011)
New Revision: 47594

Modified:
   grass/trunk/include/raster3ddefs.h
   grass/trunk/lib/gpde/N_arrays_io.c
   grass/trunk/lib/ogsf/gvl_file.c
   grass/trunk/lib/raster3d/cache1.c
   grass/trunk/lib/raster3d/changeprecision.c
   grass/trunk/lib/raster3d/changetype.c
   grass/trunk/lib/raster3d/close.c
   grass/trunk/lib/raster3d/filecompare.c
   grass/trunk/lib/raster3d/mask.c
   grass/trunk/lib/raster3d/retile.c
   grass/trunk/lib/raster3d/test/test_coordinate_transform.c
   grass/trunk/lib/raster3d/test/test_put_get_value.c
   grass/trunk/lib/raster3d/volume.c
   grass/trunk/raster/r.colors/stats.c
   grass/trunk/raster/r.mapcalc/map3.c
   grass/trunk/raster/r.to.rast3/main.c
   grass/trunk/raster/r.to.rast3elev/main.c
   grass/trunk/raster/r.univar/r3.univar_main.c
   grass/trunk/raster3d/r3.cross.rast/main.c
   grass/trunk/raster3d/r3.gwflow/main.c
   grass/trunk/raster3d/r3.in.ascii/main.c
   grass/trunk/raster3d/r3.in.v5d/main.c
   grass/trunk/raster3d/r3.info/r3.info.main.c
   grass/trunk/raster3d/r3.mask/main.c
   grass/trunk/raster3d/r3.mkdspf/main.c
   grass/trunk/raster3d/r3.null/main.c
   grass/trunk/raster3d/r3.out.ascii/main.c
   grass/trunk/raster3d/r3.out.v5d/main.c
   grass/trunk/raster3d/r3.out.vtk/errorHandling.c
   grass/trunk/raster3d/r3.out.vtk/main.c
   grass/trunk/raster3d/r3.retile/main.c
   grass/trunk/raster3d/r3.to.rast/main.c
   grass/trunk/vector/v.to.rast3/main.c
   grass/trunk/vector/v.vol.rst/user1.c
Log:
raster3dlib: doxygenize close.c
	     Rast3d_close_cell() ranamed to Rast3d_close()


Modified: grass/trunk/include/raster3ddefs.h
===================================================================
--- grass/trunk/include/raster3ddefs.h	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/include/raster3ddefs.h	2011-08-12 08:47:59 UTC (rev 47594)
@@ -73,7 +73,7 @@
 int Rast3d_read_cats(const char *, const char *, struct Categories *);
 
 /* g3dclose.c */
-int Rast3d_close_cell(RASTER3D_Map *);
+int Rast3d_close(RASTER3D_Map *);
 
 /* g3dcolor.c */
 int Rast3d_remove_color(const char *);

Modified: grass/trunk/lib/gpde/N_arrays_io.c
===================================================================
--- grass/trunk/lib/gpde/N_arrays_io.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/gpde/N_arrays_io.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -360,7 +360,7 @@
     }
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	Rast3d_fatal_error(map, NULL, 0, _("Error closing g3d file"));
 
     return data;
@@ -460,7 +460,7 @@
     if (!Rast3d_flush_all_tiles(map))
 	Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	Rast3d_fatal_error(map, NULL, 0, _("Error closing g3d file"));
 
     return;

Modified: grass/trunk/lib/ogsf/gvl_file.c
===================================================================
--- grass/trunk/lib/ogsf/gvl_file.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/ogsf/gvl_file.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -467,7 +467,7 @@
 int close_g3d_file(void *map)
 {
     /* close opened g3d file */
-    if (Rast3d_close_cell((RASTER3D_Map *) map) != 1) {
+    if (Rast3d_close((RASTER3D_Map *) map) != 1) {
 	G_warning(_("Unable to close 3D raster map <%s>"),
 		  ((RASTER3D_Map *) map)->fileName);
 	return (-1);

Modified: grass/trunk/lib/raster3d/cache1.c
===================================================================
--- grass/trunk/lib/raster3d/cache1.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/cache1.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -158,7 +158,7 @@
 			 read_fn * eltLoadFun, void *eltLoadFunData)
 {
     return Rast3d_cache_new(nofElts, sizeOfElts, nofNames,
-			 cache_dummy_fun, NULL, eltLoadFun, eltLoadFunData);
+			    cache_dummy_fun, NULL, eltLoadFun, eltLoadFunData);
 }
 
 /*---------------------------------------------------------------------------*/

Modified: grass/trunk/lib/raster3d/changeprecision.c
===================================================================
--- grass/trunk/lib/raster3d/changeprecision.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/changeprecision.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -71,6 +71,6 @@
 	    }
 
     Rast3d_free_tiles(data);
-    if (!Rast3d_close_cell(map2))
-	Rast3d_fatal_error("Rast3d_change_precision: error in Rast3d_close_cell");
+    if (!Rast3d_close(map2))
+	Rast3d_fatal_error("Rast3d_change_precision: error in Rast3d_close");
 }

Modified: grass/trunk/lib/raster3d/changetype.c
===================================================================
--- grass/trunk/lib/raster3d/changetype.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/changetype.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -76,6 +76,6 @@
 
     Rast3d_free_tiles(data);
     Rast3d_free_tiles(data2);
-    if (!Rast3d_close_cell(map2))
-	Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_close_cell");
+    if (!Rast3d_close(map2))
+	Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_close");
 }

Modified: grass/trunk/lib/raster3d/close.c
===================================================================
--- grass/trunk/lib/raster3d/close.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/close.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -1,3 +1,17 @@
+/*!
+  \file lib/raster3d/close.c
+  
+  \brief 3D Raster Library - Close 3D raster file
+ 
+  (C) 1999-2009, 2011 by the GRASS Development Team
+  
+  This program is free software under the GNU General Public
+  License (>=v2). Read the file COPYING that comes with GRASS
+  for details.
+  
+  \author USACERL and many others
+*/
+
 #ifdef __MINGW32__
 #  include <windows.h>
 #endif
@@ -7,12 +21,11 @@
 #include <unistd.h>
 
 #include <grass/raster.h>
+#include <grass/glocale.h>
 
 #include "raster3d_intern.h"
 
-/*---------------------------------------------------------------------------*/
-
-static int Rast3d_closeNew(RASTER3D_Map * map)
+static int close_new(RASTER3D_Map * map)
 {
     char path[GPATH_MAX];
     struct Categories cats;
@@ -31,10 +44,9 @@
     /*Use the G3d function to write the history file,
      * otherwise the path is wrong */
     if (!Rast3d_write_history(map->fileName, &hist)) {
-	Rast3d_error("Rast3d_closeNew: can't write raster3d history");
+	G_warning(_("Unable to write history for 3D raster map <%s>"), map);
     }
 
-
     Rast3d_range_write(map);
 
     close(map->data_fd);
@@ -47,9 +59,8 @@
     if (link(map->tempName, path) < 0) {
 #endif
 	if (rename(map->tempName, path)) {
-	    Rast3d_error
-		("Rast3d_closeNew: can't move temp raster map %s\nto 3d data file %s",
-		 map->tempName, path);
+	    G_warning(_("Unable to move temp raster map <%s> to 3d data file <%s>"),
+		      map->tempName, path);
 	    return 0;
 	}
     }
@@ -59,20 +70,18 @@
     return 1;
 }
 
-/*---------------------------------------------------------------------------*/
-
-static int Rast3d_closeCellNew(RASTER3D_Map * map)
+static int close_cell_new(RASTER3D_Map * map)
 {
     long ltmp;
 
     if (map->useCache)
 	if (!Rast3d_flush_all_tiles(map)) {
-	    Rast3d_error("Rast3d_closeCellNew: error in Rast3d_flush_all_tiles");
+	    G_warning(_("Unable to flush all tiles"));
 	    return 0;
 	}
 
     if (!Rast3d_flush_index(map)) {
-	Rast3d_error("Rast3d_closeCellNew: error in Rast3d_flush_index");
+	G_warning(_("Unable to flush index"));
 	return 0;
     }
 
@@ -82,79 +91,72 @@
     if (lseek(map->data_fd,
 	      (long)(map->offset - sizeof(int) - sizeof(long)),
 	      SEEK_SET) == -1) {
-	Rast3d_error("Rast3d_closeCellNew: can't position file");
+	G_warning(_("Unable to position file"));
 	return 0;
     }
 
     if (!Rast3d_write_ints(map->data_fd, map->useXdr, &(map->indexNbytesUsed), 1)) {
-	Rast3d_error("Rast3d_closeCellNew: can't write header");
+	G_warning(_("Unable to write header for 3D raster map <%s>"), map);
 	return 0;
     }
 
     Rast3d_long_encode(&(map->indexOffset), (unsigned char *)&ltmp, 1);
     if (write(map->data_fd, &ltmp, sizeof(long)) != sizeof(long)) {
-	Rast3d_error("Rast3d_closeCellNew: can't write header");
+	G_warning(_("Unable to write header for 3D raster map <%s>"), map);
 	return 0;
     }
 
-    if (!Rast3d_closeNew(map) != 0) {
-	Rast3d_error("Rast3d_closeCellNew: error in Rast3d_closeNew");
+    if (!close_new(map) != 0) {
+	G_warning(_("Unable to create 3D raster map <%s>"), map);
 	return 0;
     }
 
     return 1;
 }
 
-/*---------------------------------------------------------------------------*/
-
-static int Rast3d_closeOld(RASTER3D_Map * map)
+static int close_old(RASTER3D_Map * map)
 {
     if (close(map->data_fd) != 0) {
-	Rast3d_error("Rast3d_closeOld: could not close file");
+	G_warning(_("Unable to close 3D raster map <%s>"), map);
 	return 0;
     }
 
     return 1;
 }
 
-/*---------------------------------------------------------------------------*/
-
-static int Rast3d_closeCellOld(RASTER3D_Map * map)
+static int close_cell_old(RASTER3D_Map * map)
 {
-    if (!Rast3d_closeOld(map) != 0) {
-	Rast3d_error("Rast3d_closeCellOld: error in Rast3d_closeOld");
+    if (!close_old(map) != 0) {
+	G_warning(_("Unable to close 3D raster map <%s>"), map);
 	return 0;
     }
 
     return 1;
 }
 
-/*---------------------------------------------------------------------------*/
-
-
 /*!
- * \brief 
- *
- * Closes g3d-file. If <em>map</em> is new
- * and cache-mode is used for <em>map</em> then every tile which is not flushed
- * before closing is flushed.  
- *
- *  \param map
- *  \return 1 ... if successful,
- *          0 ...  otherwise.
- */
+  \brief Close 3D raster map files
+  
+  Closes g3d-file. If <em>map</em> is new and cache-mode is used for
+  <em>map</em> then every tile which is not flushed before closing is
+  flushed.
+  
+  \param map name of 3D raster map
 
-int Rast3d_close_cell(RASTER3D_Map * map)
+  \return 1 success
+  \return 0 failure
+*/
+int Rast3d_close(RASTER3D_Map * map)
 {
     if (map->operation == RASTER3D_WRITE_DATA) {
-	if (!Rast3d_closeCellNew(map)) {
-	    Rast3d_error("Rast3d_close_cell: error in Rast3d_closeCellNew");
+	if (!close_cell_new(map)) {
+	    G_warning(_("Unable to create 3D raster map <%s>"), map);
 	    return 0;
 	}
     }
     else {
-	if (!Rast3d_closeCellOld(map) != 0) {
-	    Rast3d_error("Rast3d_close_cell: error in Rast3d_closeCellOld");
+	if (!close_cell_old(map) != 0) {
+	    G_warning(_("Unable to close 3D raster map <%s>"), map);
 	    return 0;
 	}
     }
@@ -164,7 +166,7 @@
 
     if (map->useCache) {
 	if (!Rast3d_dispose_cache(map)) {
-	    Rast3d_error("Rast3d_close_cell: error in Rast3d_dispose_cache");
+	    G_warning(_("Error in cache"));
 	    return 0;
 	}
     }
@@ -186,11 +188,12 @@
 			     map->compression, map->useRle, map->useLzw,
 			     map->precision, map->offset, map->useXdr,
 			     map->hasIndex, map->unit)) {
-	    Rast3d_error("Rast3d_close_cell: error in Rast3d_write_header");
+	    G_warning(_("Unable to write header for 3D raster map <%s>"), map);
 	    return 0;
 	}
 
     Rast3d_free(map->unit);
     Rast3d_free(map);
+    
     return 1;
 }

Modified: grass/trunk/lib/raster3d/filecompare.c
===================================================================
--- grass/trunk/lib/raster3d/filecompare.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/filecompare.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -425,8 +425,8 @@
 
     if ((!Rast3d_tile_use_cache_map(map)) || (!Rast3d_tile_use_cache_map(map2))) {
 	compareFilesNocache(map, map2);
-	Rast3d_close_cell(map);
-	Rast3d_close_cell(map2);
+	Rast3d_close(map);
+	Rast3d_close(map2);
 	return;
     }
 
@@ -488,6 +488,6 @@
     }
 
     printf("Files are identical up to precision.\n");
-    Rast3d_close_cell(map);
-    Rast3d_close_cell(map2);
+    Rast3d_close(map);
+    Rast3d_close(map2);
 }

Modified: grass/trunk/lib/raster3d/mask.c
===================================================================
--- grass/trunk/lib/raster3d/mask.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/mask.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -41,7 +41,7 @@
 
     Rast3d_maskMapExistsVar = 0;
 
-    if (!Rast3d_close_cell(Rast3d_maskMap)) {
+    if (!Rast3d_close(Rast3d_maskMap)) {
 	Rast3d_error("Rast3d_mask_close: error closing mask");
 
 	return 0;

Modified: grass/trunk/lib/raster3d/retile.c
===================================================================
--- grass/trunk/lib/raster3d/retile.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/retile.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -54,7 +54,7 @@
     G_percent(1, 1, 1);
         
     Rast3d_free_tiles(data);
-    Rast3d_close_cell(map2);
+    Rast3d_close(map2);
 }
 
 /*---------------------------------------------------------------------------*/
@@ -140,6 +140,6 @@
     G_percent(1, 1, 1);
     if (!Rast3d_flush_all_tiles(map2))
 	Rast3d_fatal_error("Rast3d_retile: error in Rast3d_flush_all_tiles");
-    if (!Rast3d_close_cell(map2))
-	Rast3d_fatal_error("Rast3d_retile: error in Rast3d_close_cell");
+    if (!Rast3d_close(map2))
+	Rast3d_fatal_error("Rast3d_retile: error in Rast3d_close");
 }

Modified: grass/trunk/lib/raster3d/test/test_coordinate_transform.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_coordinate_transform.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/test/test_coordinate_transform.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -143,7 +143,7 @@
         sum++;
     }
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_coordinate_transform");
     

Modified: grass/trunk/lib/raster3d/test/test_put_get_value.c
===================================================================
--- grass/trunk/lib/raster3d/test/test_put_get_value.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/test/test_put_get_value.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -182,7 +182,7 @@
         sum++;
     }
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_put_get_value_dcell");
     
@@ -304,7 +304,7 @@
         sum++;
     }
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_put_get_value_fcell");
     
@@ -435,7 +435,7 @@
     
     sum += test_resampling_dcell(map, north, east, top, col, row, depth, 2);
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_put_get_value_dcell");
     

Modified: grass/trunk/lib/raster3d/volume.c
===================================================================
--- grass/trunk/lib/raster3d/volume.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/lib/raster3d/volume.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -260,8 +260,8 @@
 	}
     }
 
-    if (!Rast3d_close_cell(mapVolume))
-	Rast3d_fatal_error("Rast3d_make_aligned_volume_file: error in Rast3d_close_cell");
+    if (!Rast3d_close(mapVolume))
+	Rast3d_fatal_error("Rast3d_make_aligned_volume_file: error in Rast3d_close");
 
     Rast3d_free(volumeBuf);
 }

Modified: grass/trunk/raster/r.colors/stats.c
===================================================================
--- grass/trunk/raster/r.colors/stats.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster/r.colors/stats.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -152,6 +152,6 @@
 	if(dcell)
     	    G_free(dcell);
     } else {
-        Rast3d_close_cell(map3d);
+        Rast3d_close(map3d);
     }
 }

Modified: grass/trunk/raster/r.mapcalc/map3.c
===================================================================
--- grass/trunk/raster/r.mapcalc/map3.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster/r.mapcalc/map3.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -366,7 +366,7 @@
     if (!m->handle)
 	return;
 
-    if (!Rast3d_close_cell(m->handle))
+    if (!Rast3d_close(m->handle))
 	G_fatal_error(_("Unable to close raster map <%s@%s>"),
 		      m->name, m->mapset);
 
@@ -401,7 +401,7 @@
 				     RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
 	    result = (Rast3d_file_type_map(handle) == FCELL_TYPE)
 		? FCELL_TYPE : DCELL_TYPE;
-	    Rast3d_close_cell(handle);
+	    Rast3d_close(handle);
 	}
 	else
 	    result = -1;
@@ -607,7 +607,7 @@
 {
     void *handle = omaps[fd];
 
-    if (!Rast3d_close_cell(handle))
+    if (!Rast3d_close(handle))
 	G_fatal_error(_("Unable to close output raster map"));
 }
 

Modified: grass/trunk/raster/r.to.rast3/main.c
===================================================================
--- grass/trunk/raster/r.to.rast3/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster/r.to.rast3/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -55,7 +55,7 @@
     /* Close files and exit */
     if (map != NULL) {
         /* should unopen map here! but this functionality is not jet implemented */
-        if (!Rast3d_close_cell(map))
+        if (!Rast3d_close(map))
             Rast3d_fatal_error(_("Could not close the map"));
     }
 
@@ -322,7 +322,7 @@
     if (!Rast3d_flush_all_tiles(map))
         Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         Rast3d_fatal_error(_("Error closing 3d raster map"));
 
     map = NULL;

Modified: grass/trunk/raster/r.to.rast3elev/main.c
===================================================================
--- grass/trunk/raster/r.to.rast3elev/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster/r.to.rast3elev/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -132,7 +132,7 @@
     /* Close files and exit */
     if (db.map != NULL) {
         /* should unopen map here! but this functionality is not jet implemented */
-        if (!Rast3d_close_cell(db.map))
+        if (!Rast3d_close(db.map))
             Rast3d_fatal_error(_("Could not close the map"));
     }
 
@@ -497,7 +497,7 @@
     /* Flush all tile */
     if (!Rast3d_flush_all_tiles(db.map))
         Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
-    if (!Rast3d_close_cell(db.map))
+    if (!Rast3d_close(db.map))
         Rast3d_fatal_error(_("Error closing 3d raster map"));
 
     G_debug(2, "\nDone\n");

Modified: grass/trunk/raster/r.univar/r3.univar_main.c
===================================================================
--- grass/trunk/raster/r.univar/r3.univar_main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster/r.univar/r3.univar_main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -311,9 +311,9 @@
     }
 
     /* close maps */
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     if (zone_info.n_zones)
-	Rast3d_close_cell(zmap);
+	Rast3d_close(zmap);
 
     /* create the output */
     if (param.table->answer)

Modified: grass/trunk/raster3d/r3.cross.rast/main.c
===================================================================
--- grass/trunk/raster3d/r3.cross.rast/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.cross.rast/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -51,7 +51,7 @@
     /* Close files and exit */
 
     if (map != NULL) {
-        if (!Rast3d_close_cell(map))
+        if (!Rast3d_close(map))
             Rast3d_fatal_error(_("Could not close RASTER3D map"));
     }
 
@@ -338,7 +338,7 @@
     }
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         Rast3d_fatal_error(_("Could not close RASTER3D map <%s>"),
                        param.input->answer);
 

Modified: grass/trunk/raster3d/r3.gwflow/main.c
===================================================================
--- grass/trunk/raster3d/r3.gwflow/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.gwflow/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -415,7 +415,7 @@
     /* Flush all tile */
     if (!Rast3d_flush_all_tiles(map))
 	Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	Rast3d_fatal_error(map, NULL, 0, _("Error closing g3d file"));
 
     return;

Modified: grass/trunk/raster3d/r3.in.ascii/main.c
===================================================================
--- grass/trunk/raster3d/r3.in.ascii/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.in.ascii/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -62,7 +62,7 @@
 {
     if (map != NULL) {
         /* should unopen map here! */
-        Rast3d_close_cell(map);
+        Rast3d_close(map);
     }
 
     Rast3d_fatal_error(errorMsg);
@@ -359,7 +359,7 @@
     /*Create the new RASTER3D Map */
     asciiToG3d(fp, &region, convertNull, nullValue);
 
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         fatalError(_("Error closing new 3d raster map"));
 
     /* write input name to map history */

Modified: grass/trunk/raster3d/r3.in.v5d/main.c
===================================================================
--- grass/trunk/raster3d/r3.in.v5d/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.in.v5d/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -218,7 +218,7 @@
 
     convert(input, &region, convertNull, nullValue);
 
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	fatalError(_("Error closing 3d raster map"));
     map = NULL;
 

Modified: grass/trunk/raster3d/r3.info/r3.info.main.c
===================================================================
--- grass/trunk/raster3d/r3.info/r3.info.main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.info/r3.info.main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -485,7 +485,7 @@
     }
 
     /*Close the opened map */
-    if (!Rast3d_close_cell(g3map))
+    if (!Rast3d_close(g3map))
 	G_fatal_error(_("Unable to close 3D raster map <%s>"), name);
 
 

Modified: grass/trunk/raster3d/r3.mask/main.c
===================================================================
--- grass/trunk/raster3d/r3.mask/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.mask/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -112,9 +112,9 @@
     Rast3d_autolock_off(mask);
     Rast3d_unlock_all(mask);
 
-    if (!Rast3d_close_cell(mask))
+    if (!Rast3d_close(mask))
 	Rast3d_fatal_error(_("Unable to close 3D raster mask file"));
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	Rast3d_fatal_error(_("Unable to close raster map <%s>"), name);
 }
 

Modified: grass/trunk/raster3d/r3.mkdspf/main.c
===================================================================
--- grass/trunk/raster3d/r3.mkdspf/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.mkdspf/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -227,7 +227,7 @@
 	fprintf(stderr, "\n");
 
     /* tries to write a header! */
-    Rast3d_close_cell(g3map);
+    Rast3d_close(g3map);
 
     fclose(Headfax.dspfoutfp);
 

Modified: grass/trunk/raster3d/r3.null/main.c
===================================================================
--- grass/trunk/raster3d/r3.null/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.null/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -164,9 +164,9 @@
     Rast3d_autolock_off(mapOut);
     Rast3d_unlock_all(mapOut);
 
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	Rast3d_fatal_error(_("Unable to close raster map"));
-    if (!Rast3d_close_cell(mapOut))
+    if (!Rast3d_close(mapOut))
 	Rast3d_fatal_error(_("modifyNull: Unable to close tmp file"));
 }
 

Modified: grass/trunk/raster3d/r3.out.ascii/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.ascii/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.out.ascii/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -58,7 +58,7 @@
 {
     if (map != NULL) {
         /* should unopen map here! */
-        if (!Rast3d_close_cell(map))
+        if (!Rast3d_close(map))
             fatalError(_("Error closing 3d raster map"));
 
     }
@@ -367,7 +367,7 @@
     }
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         fatalError(_("Error closing 3d raster map"));
 
     if (output)

Modified: grass/trunk/raster3d/r3.out.v5d/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.v5d/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.out.v5d/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -50,7 +50,7 @@
 {
     if (map != NULL) {
 	/* should unopen map here! */
-	if (!Rast3d_close_cell(map))
+	if (!Rast3d_close(map))
 	    fatalError("Error closing 3d raster map");
     }
 
@@ -327,7 +327,7 @@
     convert(output, region.rows, region.cols, region.depths, trueCoords);
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	fatalError(_("Error closing 3d raster map"));
 
     map = NULL;

Modified: grass/trunk/raster3d/r3.out.vtk/errorHandling.c
===================================================================
--- grass/trunk/raster3d/r3.out.vtk/errorHandling.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.out.vtk/errorHandling.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -61,7 +61,7 @@
 int close_input_raster3d_map(void *map)
 {
     if (map != NULL) {
-	if (!Rast3d_close_cell(map)) {
+	if (!Rast3d_close(map)) {
 	    G_warning(_("unable to close input 3d raster map"));
 	    return 1;
 	}

Modified: grass/trunk/raster3d/r3.out.vtk/main.c
===================================================================
--- grass/trunk/raster3d/r3.out.vtk/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.out.vtk/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -248,7 +248,7 @@
                         Rast3d_mask_off(maprgb);
             }
             /* Close the 3d raster map */
-            if (!Rast3d_close_cell(maprgb)) {
+            if (!Rast3d_close(maprgb)) {
                 fatal_error(_("Error closing g3d rgb map."), in);
             }
 
@@ -334,7 +334,7 @@
             }
 
             /* Close the 3d raster map */
-            if (!Rast3d_close_cell(mapvect)) {
+            if (!Rast3d_close(mapvect)) {
                 fatal_error(_("Error closing g3d vector map."), in);
             }
             /*Set the pointer to null so we know later that these files are already closed */
@@ -535,7 +535,7 @@
             }
 
             /* Close the 3d raster map */
-            if (!Rast3d_close_cell(in->map)) {
+            if (!Rast3d_close(in->map)) {
                 in->map = NULL;
                 fatal_error(_("Error closing 3d raster map, the VTK file may be incomplete."),
                             in);

Modified: grass/trunk/raster3d/r3.retile/main.c
===================================================================
--- grass/trunk/raster3d/r3.retile/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.retile/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -50,7 +50,7 @@
 
     /* Close files and exit */
     if (map != NULL) {
-        if (!Rast3d_close_cell(map))
+        if (!Rast3d_close(map))
             Rast3d_fatal_error(_("Unable to close the 3d raster map"));
     }
 
@@ -149,7 +149,7 @@
     Rast3d_retile(map, param.output->answer, tileX, tileY, tileZ);
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         fatal_error(map, NULL, 0, _("Error closing 3d raster map"));
 
     map = NULL;

Modified: grass/trunk/raster3d/r3.to.rast/main.c
===================================================================
--- grass/trunk/raster3d/r3.to.rast/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/raster3d/r3.to.rast/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -51,7 +51,7 @@
 
     /* Close files and exit */
     if (map != NULL) {
-        if (!Rast3d_close_cell(map))
+        if (!Rast3d_close(map))
             Rast3d_fatal_error(_("Unable to close 3Draster map"));
     }
 
@@ -378,7 +378,7 @@
         G_free(fd);
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         fatal_error(map, NULL, 0, _("Error closing 3d raster map"));
 
     map = NULL;

Modified: grass/trunk/vector/v.to.rast3/main.c
===================================================================
--- grass/trunk/vector/v.to.rast3/main.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/vector/v.to.rast3/main.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -150,7 +150,7 @@
 
     Vect_close(&Map);
 
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	G_fatal_error(_("Unable to close new 3d raster map"));
     
     exit(EXIT_SUCCESS);

Modified: grass/trunk/vector/v.vol.rst/user1.c
===================================================================
--- grass/trunk/vector/v.vol.rst/user1.c	2011-08-12 08:32:30 UTC (rev 47593)
+++ grass/trunk/vector/v.vol.rst/user1.c	2011-08-12 08:47:59 UTC (rev 47594)
@@ -464,7 +464,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf1) == 0) {
+	if (Rast3d_close(cf1) == 0) {
 	    sprintf(buff, "Error closing output file %s ", outz);
 	    clean_fatal_error(buff);
 	}
@@ -514,7 +514,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf2) == 0) {
+	if (Rast3d_close(cf2) == 0) {
 	    sprintf(buff, "Error closing output file %s ", gradient);
 	    clean_fatal_error(buff);
 	}
@@ -564,7 +564,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf3) == 0) {
+	if (Rast3d_close(cf3) == 0) {
 	    sprintf(buff, "Error closing output file %s ", aspect1);
 	    clean_fatal_error(buff);
 	}
@@ -614,7 +614,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf4) == 0) {
+	if (Rast3d_close(cf4) == 0) {
 	    sprintf(buff, "Error closing output file %s ", aspect2);
 	    clean_fatal_error(buff);
 	}
@@ -664,7 +664,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf5) == 0) {
+	if (Rast3d_close(cf5) == 0) {
 	    sprintf(buff, "Error closing output file %s ", ncurv);
 	    clean_fatal_error(buff);
 	}
@@ -714,7 +714,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf6) == 0) {
+	if (Rast3d_close(cf6) == 0) {
 	    sprintf(buff, "Error closing output file %s ", gcurv);
 	    clean_fatal_error(buff);
 	}
@@ -764,7 +764,7 @@
 	}
 
 	/* Close the file */
-	if (Rast3d_close_cell(cf7) == 0) {
+	if (Rast3d_close(cf7) == 0) {
 	    sprintf(buff, "Error closing output file %s ", mcurv);
 	    clean_fatal_error(buff);
 	}



More information about the grass-commit mailing list