Prechádzať zdrojové kódy

raster3dlib: doxygenize close.c
Rast3d_close_cell() ranamed to Rast3d_close()


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47594 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 13 rokov pred
rodič
commit
491e01ffd5

+ 1 - 1
include/raster3ddefs.h

@@ -73,7 +73,7 @@ int Rast3d_write_cats(const char *, struct Categories *);
 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 *);

+ 2 - 2
lib/gpde/N_arrays_io.c

@@ -360,7 +360,7 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
     }
 
     /* 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 @@ void N_write_array_3d_to_rast3d(N_array_3d * array, char *name, int mask)
     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;

+ 1 - 1
lib/ogsf/gvl_file.c

@@ -467,7 +467,7 @@ void *open_g3d_file(const char *filename, IFLAG * type, double *min,
 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);

+ 1 - 1
lib/raster3d/cache1.c

@@ -158,7 +158,7 @@ void *Rast3d_cache_new_read(int nofElts, int sizeOfElts, int nofNames,
 			 read_fn * eltLoadFun, void *eltLoadFunData)
 {
     return Rast3d_cache_new(nofElts, sizeOfElts, nofNames,
-			 cache_dummy_fun, NULL, eltLoadFun, eltLoadFunData);
+			    cache_dummy_fun, NULL, eltLoadFun, eltLoadFunData);
 }
 
 /*---------------------------------------------------------------------------*/

+ 2 - 2
lib/raster3d/changeprecision.c

@@ -71,6 +71,6 @@ void Rast3d_change_precision(void *map, int precision, const char *nameOut)
 	    }
 
     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");
 }

+ 2 - 2
lib/raster3d/changetype.c

@@ -76,6 +76,6 @@ void Rast3d_change_type(void *map, const char *nameOut)
 
     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");
 }

+ 51 - 48
lib/raster3d/close.c

@@ -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 @@ static int Rast3d_closeNew(RASTER3D_Map * map)
     /*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 @@ static int Rast3d_closeNew(RASTER3D_Map * map)
     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 @@ static int Rast3d_closeNew(RASTER3D_Map * map)
     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 @@ static int Rast3d_closeCellNew(RASTER3D_Map * map)
     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.
- */
-
-int Rast3d_close_cell(RASTER3D_Map * map)
+  \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
+
+  \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 @@ int Rast3d_close_cell(RASTER3D_Map * map)
 
     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 @@ int Rast3d_close_cell(RASTER3D_Map * map)
 			     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;
 }

+ 4 - 4
lib/raster3d/filecompare.c

@@ -425,8 +425,8 @@ Rast3d_compare_files(const char *f1, const char *mapset1, const char *f2,
 
     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 @@ Rast3d_compare_files(const char *f1, const char *mapset1, const char *f2,
     }
 
     printf("Files are identical up to precision.\n");
-    Rast3d_close_cell(map);
-    Rast3d_close_cell(map2);
+    Rast3d_close(map);
+    Rast3d_close(map2);
 }

+ 1 - 1
lib/raster3d/mask.c

@@ -41,7 +41,7 @@ int Rast3d_mask_close()
 
     Rast3d_maskMapExistsVar = 0;
 
-    if (!Rast3d_close_cell(Rast3d_maskMap)) {
+    if (!Rast3d_close(Rast3d_maskMap)) {
 	Rast3d_error("Rast3d_mask_close: error closing mask");
 
 	return 0;

+ 3 - 3
lib/raster3d/retile.c

@@ -54,7 +54,7 @@ retileNocache(void *map, const char *nameOut, int tileX, int tileY, int tileZ)
     G_percent(1, 1, 1);
         
     Rast3d_free_tiles(data);
-    Rast3d_close_cell(map2);
+    Rast3d_close(map2);
 }
 
 /*---------------------------------------------------------------------------*/
@@ -140,6 +140,6 @@ Rast3d_retile(void *map, const char *nameOut, int tileX, int tileY, int tileZ)
     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");
 }

+ 1 - 1
lib/raster3d/test/test_coordinate_transform.c

@@ -143,7 +143,7 @@ int test_coordinate_transform(void)
         sum++;
     }
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_coordinate_transform");
     

+ 3 - 3
lib/raster3d/test/test_put_get_value.c

@@ -182,7 +182,7 @@ int test_put_get_value_dcell(void)
         sum++;
     }
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_put_get_value_dcell");
     
@@ -304,7 +304,7 @@ int test_put_get_value_fcell(void)
         sum++;
     }
     
-    Rast3d_close_cell(map);
+    Rast3d_close(map);
     
     G_remove("grid3", "test_put_get_value_fcell");
     
@@ -435,7 +435,7 @@ int test_put_get_value_resampling(void)
     
     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");
     

+ 2 - 2
lib/raster3d/volume.c

@@ -260,8 +260,8 @@ Rast3d_make_aligned_volume_file(void *map, const char *fileName,
 	}
     }
 
-    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);
 }

+ 1 - 1
raster/r.colors/stats.c

@@ -152,6 +152,6 @@ void get_fp_stats(const char *name, const char *mapset,
 	if(dcell)
     	    G_free(dcell);
     } else {
-        Rast3d_close_cell(map3d);
+        Rast3d_close(map3d);
     }
 }

+ 3 - 3
raster/r.mapcalc/map3.c

@@ -366,7 +366,7 @@ static void close_map(map * m)
     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 @@ int map_type(const char *name, int mod)
 				     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 close_output_map(int fd)
 {
     void *handle = omaps[fd];
 
-    if (!Rast3d_close_cell(handle))
+    if (!Rast3d_close(handle))
 	G_fatal_error(_("Unable to close output raster map"));
 }
 

+ 2 - 2
raster/r.to.rast3/main.c

@@ -55,7 +55,7 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
     /* 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 @@ int main(int argc, char *argv[])
     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;

+ 2 - 2
raster/r.to.rast3elev/main.c

@@ -132,7 +132,7 @@ void fatal_error(Database db, char *errorMsg)
     /* 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 @@ int main(int argc, char *argv[])
     /* 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");

+ 2 - 2
raster/r.univar/r3.univar_main.c

@@ -311,9 +311,9 @@ int main(int argc, char *argv[])
     }
 
     /* 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)

+ 2 - 2
raster3d/r3.cross.rast/main.c

@@ -51,7 +51,7 @@ void fatal_error(void *map, int elevfd, int outfd, char *errorMsg)
     /* 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 @@ int main(int argc, char *argv[])
     }
 
     /* 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);
 

+ 1 - 1
raster3d/r3.gwflow/main.c

@@ -415,7 +415,7 @@ write_result(N_array_3d * status, N_array_3d * phead_start,
     /* 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;

+ 2 - 2
raster3d/r3.in.ascii/main.c

@@ -62,7 +62,7 @@ void fatalError(char *errorMsg)
 {
     if (map != NULL) {
         /* should unopen map here! */
-        Rast3d_close_cell(map);
+        Rast3d_close(map);
     }
 
     Rast3d_fatal_error(errorMsg);
@@ -359,7 +359,7 @@ int main(int argc, char *argv[])
     /*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 */

+ 1 - 1
raster3d/r3.in.v5d/main.c

@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
 
     convert(input, &region, convertNull, nullValue);
 
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
 	fatalError(_("Error closing 3d raster map"));
     map = NULL;
 

+ 1 - 1
raster3d/r3.info/r3.info.main.c

@@ -485,7 +485,7 @@ int main(int argc, char *argv[])
     }
 
     /*Close the opened map */
-    if (!Rast3d_close_cell(g3map))
+    if (!Rast3d_close(g3map))
 	G_fatal_error(_("Unable to close 3D raster map <%s>"), name);
 
 

+ 2 - 2
raster3d/r3.mask/main.c

@@ -112,9 +112,9 @@ static void makeMask(char *name, d_Mask * maskRules)
     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);
 }
 

+ 1 - 1
raster3d/r3.mkdspf/main.c

@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
 	fprintf(stderr, "\n");
 
     /* tries to write a header! */
-    Rast3d_close_cell(g3map);
+    Rast3d_close(g3map);
 
     fclose(Headfax.dspfoutfp);
 

+ 2 - 2
raster3d/r3.null/main.c

@@ -164,9 +164,9 @@ modifyNull(char *name, d_Mask * maskRules, int changeNull, double newNullVal)
     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"));
 }
 

+ 2 - 2
raster3d/r3.out.ascii/main.c

@@ -58,7 +58,7 @@ void fatalError(char *errorMsg)
 {
     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 @@ int main(int argc, char *argv[])
     }
 
     /* Close files and exit */
-    if (!Rast3d_close_cell(map))
+    if (!Rast3d_close(map))
         fatalError(_("Error closing 3d raster map"));
 
     if (output)

+ 2 - 2
raster3d/r3.out.v5d/main.c

@@ -50,7 +50,7 @@ void fatalError(char *errorMsg)
 {
     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 @@ int main(int argc, char *argv[])
     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;

+ 1 - 1
raster3d/r3.out.vtk/errorHandling.c

@@ -61,7 +61,7 @@ int CloseInputRasterMap(int fd)
 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;
 	}

+ 3 - 3
raster3d/r3.out.vtk/main.c

@@ -248,7 +248,7 @@ void open_write_rgb_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
                         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 @@ void open_write_vector_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
             }
 
             /* 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 @@ int main(int argc, char *argv[])
             }
 
             /* 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);

+ 2 - 2
raster3d/r3.retile/main.c

@@ -50,7 +50,7 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
 
     /* 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 @@ int main(int argc, char *argv[])
     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;

+ 2 - 2
raster3d/r3.to.rast/main.c

@@ -51,7 +51,7 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
 
     /* 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 @@ int main(int argc, char *argv[])
         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;

+ 1 - 1
vector/v.to.rast3/main.c

@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
 
     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);

+ 7 - 7
vector/v.vol.rst/user1.c

@@ -464,7 +464,7 @@ int OUTGR()
 	}
 
 	/* 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 @@ int OUTGR()
 	}
 
 	/* 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 @@ int OUTGR()
 	}
 
 	/* 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 @@ int OUTGR()
 	}
 
 	/* 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 @@ int OUTGR()
 	}
 
 	/* 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 @@ int OUTGR()
 	}
 
 	/* 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 @@ int OUTGR()
 	}
 
 	/* 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);
 	}