瀏覽代碼

raster3dlib: change camelCase to underscores in the function names

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47593 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 年之前
父節點
當前提交
e5d95157da
共有 91 個文件被更改,包括 1689 次插入1689 次删除
  1. 2 2
      general/g.region/main.c
  2. 196 196
      include/raster3ddefs.h
  3. 8 8
      lib/gpde/N_arrays.c
  4. 10 10
      lib/gpde/N_arrays_calc.c
  5. 33 33
      lib/gpde/N_arrays_io.c
  6. 1 1
      lib/gpde/N_geom.c
  7. 2 2
      lib/gpde/test/test_arrays.c
  8. 2 2
      lib/gpde/test/test_geom.c
  9. 2 2
      lib/ogsf/GVL2.c
  10. 1 1
      lib/ogsf/Gvl3.c
  11. 11 11
      lib/ogsf/gvl_file.c
  12. 21 21
      lib/raster3d/cache.c
  13. 7 7
      lib/raster3d/cache1.c
  14. 4 4
      lib/raster3d/cachehash.c
  15. 2 2
      lib/raster3d/cats.c
  16. 28 28
      lib/raster3d/changeprecision.c
  17. 28 28
      lib/raster3d/changetype.c
  18. 16 16
      lib/raster3d/close.c
  19. 4 4
      lib/raster3d/color.c
  20. 57 57
      lib/raster3d/defaults.c
  21. 12 12
      lib/raster3d/doubleio.c
  22. 4 4
      lib/raster3d/error.c
  23. 56 56
      lib/raster3d/filecompare.c
  24. 35 35
      lib/raster3d/fpcompress.c
  25. 34 34
      lib/raster3d/fpxdr.c
  26. 22 22
      lib/raster3d/getblock.c
  27. 27 27
      lib/raster3d/getvalue.c
  28. 36 36
      lib/raster3d/header.c
  29. 16 16
      lib/raster3d/headerinfo.c
  30. 4 4
      lib/raster3d/history.c
  31. 17 17
      lib/raster3d/index.c
  32. 12 12
      lib/raster3d/intio.c
  33. 16 16
      lib/raster3d/keys.c
  34. 4 4
      lib/raster3d/long.c
  35. 1 1
      lib/raster3d/mapset.c
  36. 39 39
      lib/raster3d/mask.c
  37. 9 9
      lib/raster3d/misc.c
  38. 2 2
      lib/raster3d/null.c
  39. 49 49
      lib/raster3d/open.c
  40. 24 24
      lib/raster3d/open2.c
  41. 10 10
      lib/raster3d/param.c
  42. 19 19
      lib/raster3d/putvalue.c
  43. 4 4
      lib/raster3d/range.c
  44. 2 2
      lib/raster3d/raster3d_intern.h
  45. 19 19
      lib/raster3d/region.c
  46. 9 9
      lib/raster3d/resample.c
  47. 43 43
      lib/raster3d/retile.c
  48. 6 6
      lib/raster3d/rle.c
  49. 26 26
      lib/raster3d/test/test_coordinate_transform.c
  50. 1 1
      lib/raster3d/test/test_main.c
  51. 49 49
      lib/raster3d/test/test_put_get_value.c
  52. 7 7
      lib/raster3d/tilealloc.c
  53. 15 15
      lib/raster3d/tileio.c
  54. 16 16
      lib/raster3d/tilemath.c
  55. 5 5
      lib/raster3d/tilenull.c
  56. 61 61
      lib/raster3d/tileread.c
  57. 55 55
      lib/raster3d/tilewrite.c
  58. 32 32
      lib/raster3d/volume.c
  59. 9 9
      lib/raster3d/window.c
  60. 9 9
      lib/raster3d/windowio.c
  61. 5 5
      lib/raster3d/writeascii.c
  62. 2 2
      raster/r.colors.out/raster3d_main.c
  63. 5 5
      raster/r.colors/edit_colors.c
  64. 5 5
      raster/r.colors/stats.c
  65. 28 28
      raster/r.mapcalc/map3.c
  66. 23 23
      raster/r.to.rast3/main.c
  67. 26 26
      raster/r.to.rast3elev/main.c
  68. 21 21
      raster/r.univar/r3.univar_main.c
  69. 20 20
      raster3d/r3.cross.rast/main.c
  70. 16 16
      raster3d/r3.gwflow/main.c
  71. 22 22
      raster3d/r3.in.ascii/main.c
  72. 8 8
      raster3d/r3.in.v5d/main.c
  73. 6 6
      raster3d/r3.info/r3.info.main.c
  74. 33 33
      raster3d/r3.mask/main.c
  75. 7 7
      raster3d/r3.mkdspf/main.c
  76. 1 1
      raster3d/r3.mkdspf/r3_data.c
  77. 36 36
      raster3d/r3.null/main.c
  78. 19 19
      raster3d/r3.out.ascii/main.c
  79. 12 12
      raster3d/r3.out.v5d/main.c
  80. 3 3
      raster3d/r3.out.vtk/errorHandling.c
  81. 34 34
      raster3d/r3.out.vtk/main.c
  82. 11 11
      raster3d/r3.out.vtk/writeVTKData.c
  83. 11 11
      raster3d/r3.retile/main.c
  84. 3 3
      raster3d/r3.showdspf/main_ogl.c
  85. 1 1
      raster3d/r3.showdspf/r3_data.c
  86. 14 14
      raster3d/r3.stats/main.c
  87. 29 29
      raster3d/r3.to.rast/main.c
  88. 1 1
      vector/v.colors/main.c
  89. 6 6
      vector/v.to.rast3/main.c
  90. 2 2
      vector/v.vol.rst/main.c
  91. 28 28
      vector/v.vol.rst/user1.c

+ 2 - 2
general/g.region/main.c

@@ -488,11 +488,11 @@ int main(int argc, char *argv[])
 	if ((mapset = G_find_grid3(name, "")) == NULL)
 	if ((mapset = G_find_grid3(name, "")) == NULL)
 	    G_fatal_error(_("3D raster map <%s> not found"), name);
 	    G_fatal_error(_("3D raster map <%s> not found"), name);
 
 
-	if (Rast3d_readRegionMap(name, mapset, &win) < 0)
+	if (Rast3d_read_region_map(name, mapset, &win) < 0)
 	    G_fatal_error(_("Unable to read header of 3D raster map <%s@%s>"),
 	    G_fatal_error(_("Unable to read header of 3D raster map <%s@%s>"),
 			  name, mapset);
 			  name, mapset);
 
 
-	Rast3d_regionToCellHead(&win, &window);
+	Rast3d_region_to_cell_head(&win, &window);
     }
     }
 
 
     /* vect= */
     /* vect= */

+ 196 - 196
include/raster3ddefs.h

@@ -5,8 +5,8 @@
 void Rast3d_cache_reset(RASTER3D_cache *);
 void Rast3d_cache_reset(RASTER3D_cache *);
 void Rast3d_cache_dispose(RASTER3D_cache *);
 void Rast3d_cache_dispose(RASTER3D_cache *);
 void *Rast3d_cache_new(int, int, int, write_fn *, void *, read_fn *, void *);
 void *Rast3d_cache_new(int, int, int, write_fn *, void *, read_fn *, void *);
-void Rast3d_cache_set_removeFun(RASTER3D_cache *, write_fn *, void *);
-void Rast3d_cache_set_loadFun(RASTER3D_cache *, read_fn *, void *);
+void Rast3d_cache_set_remove_fun(RASTER3D_cache *, write_fn *, void *);
+void Rast3d_cache_set_load_fun(RASTER3D_cache *, read_fn *, void *);
 void *Rast3d_cache_new_read(int, int, int, read_fn *, void *);
 void *Rast3d_cache_new_read(int, int, int, read_fn *, void *);
 int Rast3d_cache_lock(RASTER3D_cache *, int);
 int Rast3d_cache_lock(RASTER3D_cache *, int);
 void Rast3d_cache_lock_intern(RASTER3D_cache *, int);
 void Rast3d_cache_lock_intern(RASTER3D_cache *, int);
@@ -15,7 +15,7 @@ int Rast3d_cache_unlock_all(RASTER3D_cache *);
 int Rast3d_cache_lock_all(RASTER3D_cache *);
 int Rast3d_cache_lock_all(RASTER3D_cache *);
 void Rast3d_cache_autolock_on(RASTER3D_cache *);
 void Rast3d_cache_autolock_on(RASTER3D_cache *);
 void Rast3d_cache_autolock_off(RASTER3D_cache *);
 void Rast3d_cache_autolock_off(RASTER3D_cache *);
-void Rast3d_cache_set_minUnlock(RASTER3D_cache *, int);
+void Rast3d_cache_set_min_unlock(RASTER3D_cache *, int);
 int Rast3d_cache_remove_elt(RASTER3D_cache *, int);
 int Rast3d_cache_remove_elt(RASTER3D_cache *, int);
 int Rast3d_cache_flush(RASTER3D_cache *, int);
 int Rast3d_cache_flush(RASTER3D_cache *, int);
 int Rast3d_cache_remove_all(RASTER3D_cache *);
 int Rast3d_cache_remove_all(RASTER3D_cache *);
@@ -34,13 +34,13 @@ void Rast3d_cache_hash_load_name(Rast3d_cache_hash *, int, int);
 int Rast3d_cache_hash_name2index(Rast3d_cache_hash *, int);
 int Rast3d_cache_hash_name2index(Rast3d_cache_hash *, int);
 
 
 /* changeprecision.c */
 /* changeprecision.c */
-void Rast3d_changePrecision(void *, int, const char *);
+void Rast3d_change_precision(void *, int, const char *);
 
 
 /* changetype.c */
 /* changetype.c */
-void Rast3d_changeType(void *, const char *);
+void Rast3d_change_type(void *, const char *);
 
 
 /* filecompare.c */
 /* filecompare.c */
-void Rast3d_compareFiles(const char *, const char *, const char *, const char *);
+void Rast3d_compare_files(const char *, const char *, const char *, const char *);
 
 
 /* filename.c */
 /* filename.c */
 void Rast3d_filename(char *, const char *, const char *, const char *);
 void Rast3d_filename(char *, const char *, const char *, const char *);
@@ -49,14 +49,14 @@ void Rast3d_filename(char *, const char *, const char *, const char *);
 char *G_find_grid3(const char *, const char *);
 char *G_find_grid3(const char *, const char *);
 
 
 /* fpcompress.c */
 /* fpcompress.c */
-void G_fpcompress_printBinary(char *, int);
-void G_fpcompress_dissectXdrDouble(unsigned char *);
-int G_fpcompress_writeXdrNums(int, char *, int, int, char *, int, int, int);
-int G_fpcompress_writeXdrFloats(int, char *, int, int, char *, int, int);
-int G_fpcompress_writeXdrDouble(int, char *, int, int, char *, int, int);
-int G_fpcompress_readXdrNums(int, char *, int, int, int, char *, int);
-int G_fpcompress_readXdrFloats(int, char *, int, int, int, char *);
-int G_fpcompress_readXdrDoubles(int, char *, int, int, int, char *);
+void Rast3d_fpcompress_print_binary(char *, int);
+void Rast3d_fpcompress_dissect_xdr_double(unsigned char *);
+int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int, int, int);
+int Rast3d_fpcompress_write_xdr_floats(int, char *, int, int, char *, int, int);
+int Rast3d_fpcompress_write_xdr_double(int, char *, int, int, char *, int, int);
+int Rast3d_fpcompress_read_xdr_nums(int, char *, int, int, int, char *, int);
+int Rast3d_fpcompress_read_xdr_floats(int, char *, int, int, int, char *);
+int Rast3d_fpcompress_read_xdr_doubles(int, char *, int, int, int, char *);
 
 
 /* g3dalloc.c */
 /* g3dalloc.c */
 void *Rast3d_malloc(int);
 void *Rast3d_malloc(int);
@@ -64,104 +64,104 @@ void *Rast3d_realloc(void *, int);
 void Rast3d_free(void *);
 void Rast3d_free(void *);
 
 
 /* g3dcache.c */
 /* g3dcache.c */
-int Rast3d_initCache(RASTER3D_Map *, int);
-int Rast3d_disposeCache(RASTER3D_Map *);
-int Rast3d_flushAllTiles(RASTER3D_Map *);
+int Rast3d_init_cache(RASTER3D_Map *, int);
+int Rast3d_dispose_cache(RASTER3D_Map *);
+int Rast3d_flush_all_tiles(RASTER3D_Map *);
 
 
 /* g3dcats.c */
 /* g3dcats.c */
-int Rast3d_writeCats(const char *, struct Categories *);
-int Rast3d_readCats(const char *, const char *, struct Categories *);
+int Rast3d_write_cats(const char *, struct Categories *);
+int Rast3d_read_cats(const char *, const char *, struct Categories *);
 
 
 /* g3dclose.c */
 /* g3dclose.c */
-int Rast3d_closeCell(RASTER3D_Map *);
+int Rast3d_close_cell(RASTER3D_Map *);
 
 
 /* g3dcolor.c */
 /* g3dcolor.c */
-int Rast3d_removeColor(const char *);
-int Rast3d_readColors(const char *, const char *, struct Colors *);
-int Rast3d_writeColors(const char *, const char *, struct Colors *);
+int Rast3d_remove_color(const char *);
+int Rast3d_read_colors(const char *, const char *, struct Colors *);
+int Rast3d_write_colors(const char *, const char *, struct Colors *);
 
 
 /* g3ddefaults.c */
 /* g3ddefaults.c */
-void Rast3d_setCompressionMode(int, int, int, int);
-void Rast3d_getCompressionMode(int *, int *, int *, int *);
-void Rast3d_setCacheSize(int);
-int Rast3d_getCacheSize(void);
-void Rast3d_setCacheLimit(int);
-int Rast3d_getCacheLimit(void);
-void Rast3d_setFileType(int);
-int Rast3d_getFileType(void);
-void Rast3d_setTileDimension(int, int, int);
-void Rast3d_getTileDimension(int *, int *, int *);
-void Rast3d_setErrorFun(void (*)(const char *));
-void Rast3d_setUnit(const char *);
-void Rast3d_initDefaults(void);
+void Rast3d_set_compression_mode(int, int, int, int);
+void Rast3d_get_compression_mode(int *, int *, int *, int *);
+void Rast3d_set_cache_size(int);
+int Rast3d_get_cache_size(void);
+void Rast3d_set_cache_limit(int);
+int Rast3d_get_cache_limit(void);
+void Rast3d_set_file_type(int);
+int Rast3d_get_file_type(void);
+void Rast3d_set_tile_dimension(int, int, int);
+void Rast3d_get_tile_dimension(int *, int *, int *);
+void Rast3d_set_error_fun(void (*)(const char *));
+void Rast3d_set_unit(const char *);
+void Rast3d_init_defaults(void);
 
 
 /* g3ddoubleio.c */
 /* g3ddoubleio.c */
-int Rast3d_writeDoubles(int, int, const double *, int);
-int Rast3d_readDoubles(int, int, double *, int);
+int Rast3d_write_doubles(int, int, const double *, int);
+int Rast3d_read_doubles(int, int, double *, int);
 
 
 /* g3derror.c */
 /* g3derror.c */
-void Rast3d_skipError(const char *);
-void Rast3d_printError(const char *);
-void Rast3d_fatalError(const char *, ...) __attribute__ ((format(printf, 1, 2)))
+void Rast3d_skip_error(const char *);
+void Rast3d_print_error(const char *);
+void Rast3d_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
     __attribute__ ((noreturn));
     __attribute__ ((noreturn));
-void Rast3d_fatalError_noargs(const char *) __attribute__ ((noreturn));
+void Rast3d_fatal_error_noargs(const char *) __attribute__ ((noreturn));
 void Rast3d_error(const char *, ...) __attribute__ ((format(printf, 1, 2)));
 void Rast3d_error(const char *, ...) __attribute__ ((format(printf, 1, 2)));
 
 
 /* g3dfpxdr.c */
 /* g3dfpxdr.c */
-int Rast3d_isXdrNullNum(const void *, int);
-int Rast3d_isXdrNullFloat(const float *);
-int Rast3d_isXdrNullDouble(const double *);
-void Rast3d_setXdrNullNum(void *, int);
-void Rast3d_setXdrNullDouble(double *);
-void Rast3d_setXdrNullFloat(float *);
-int Rast3d_initFpXdr(RASTER3D_Map *, int);
-int Rast3d_initCopyToXdr(RASTER3D_Map *, int);
-int Rast3d_copyToXdr(const void *, int);
-int Rast3d_initCopyFromXdr(RASTER3D_Map *, int);
-int Rast3d_copyFromXdr(int, void *);
+int Rast3d_is_xdr_null_num(const void *, int);
+int Rast3d_is_xdr_null_float(const float *);
+int Rast3d_is_xdr_null_double(const double *);
+void Rast3d_set_xdr_null_num(void *, int);
+void Rast3d_set_xdr_null_double(double *);
+void Rast3d_set_xdr_null_float(float *);
+int Rast3d_init_fp_xdr(RASTER3D_Map *, int);
+int Rast3d_init_copy_to_xdr(RASTER3D_Map *, int);
+int Rast3d_copy_to_xdr(const void *, int);
+int Rast3d_init_copy_from_xdr(RASTER3D_Map *, int);
+int Rast3d_copy_from_xdr(int, void *);
 
 
 /* g3dhistory.c */
 /* g3dhistory.c */
-int Rast3d_writeHistory(const char *, struct History *);
-int Rast3d_readHistory(const char *, const char *, struct History *);
+int Rast3d_write_history(const char *, struct History *);
+int Rast3d_read_history(const char *, const char *, struct History *);
 
 
 /* g3dintio.c */
 /* g3dintio.c */
-int Rast3d_writeInts(int, int, const int *, int);
-int Rast3d_readInts(int, int, int *, int);
+int Rast3d_write_ints(int, int, const int *, int);
+int Rast3d_read_ints(int, int, int *, int);
 
 
 /* g3dkeys.c */
 /* g3dkeys.c */
-int Rast3d_keyGetInt(struct Key_Value *, const char *, int *);
-int Rast3d_keyGetDouble(struct Key_Value *, const char *, double *);
-int Rast3d_keyGetString(struct Key_Value *, const char *, char **);
-int Rast3d_keyGetValue(struct Key_Value *, const char *, char *, char *, int,
+int Rast3d_key_get_int(struct Key_Value *, const char *, int *);
+int Rast3d_key_get_double(struct Key_Value *, const char *, double *);
+int Rast3d_key_get_string(struct Key_Value *, const char *, char **);
+int Rast3d_key_get_value(struct Key_Value *, const char *, char *, char *, int,
 		    int, int *);
 		    int, int *);
-int Rast3d_keySetInt(struct Key_Value *, const char *, const int *);
-int Rast3d_keySetDouble(struct Key_Value *, const char *, const double *);
-int Rast3d_keySetString(struct Key_Value *, const char *, char *const *);
-int Rast3d_keySetValue(struct Key_Value *, const char *, const char *,
+int Rast3d_key_set_int(struct Key_Value *, const char *, const int *);
+int Rast3d_key_set_double(struct Key_Value *, const char *, const double *);
+int Rast3d_key_set_string(struct Key_Value *, const char *, char *const *);
+int Rast3d_key_set_value(struct Key_Value *, const char *, const char *,
 		    const char *, int, int, const int *);
 		    const char *, int, int, const int *);
 /* g3dlong.c */
 /* g3dlong.c */
-int Rast3d_longEncode(long *, unsigned char *, int);
-void Rast3d_longDecode(unsigned char *, long *, int, int);
+int Rast3d_long_encode(long *, unsigned char *, int);
+void Rast3d_long_decode(unsigned char *, long *, int, int);
 
 
 /* g3dmapset.c */
 /* g3dmapset.c */
-void Rast3d_makeMapsetMapDirectory(const char *);
+void Rast3d_make_mapset_map_directory(const char *);
 
 
 /* g3dmask.c */
 /* g3dmask.c */
-int Rast3d_maskClose(void);
-int Rast3d_maskFileExists(void);
-int Rast3d_maskOpenOld(void);
-int Rast3d_maskReopen(int);
-int Rast3d_isMasked(RASTER3D_Map *, int, int, int);
-void Rast3d_maskNum(RASTER3D_Map *, int, int, int, void *, int);
-void Rast3d_maskFloat(RASTER3D_Map *, int, int, int, float *);
-void Rast3d_maskDouble(RASTER3D_Map *, int, int, int, double *);
-void Rast3d_maskTile(RASTER3D_Map *, int, void *, int);
-void Rast3d_maskOn(RASTER3D_Map *);
-void Rast3d_maskOff(RASTER3D_Map *);
-int Rast3d_maskIsOn(RASTER3D_Map *);
-int Rast3d_maskIsOff(RASTER3D_Map *);
-const char *Rast3d_maskFile(void);
-int Rast3d_maskMapExists(void);
+int Rast3d_mask_close(void);
+int Rast3d_mask_file_exists(void);
+int Rast3d_mask_open_old(void);
+int Rast3d_mask_reopen(int);
+int Rast3d_is_masked(RASTER3D_Map *, int, int, int);
+void Rast3d_mask_num(RASTER3D_Map *, int, int, int, void *, int);
+void Rast3d_mask_float(RASTER3D_Map *, int, int, int, float *);
+void Rast3d_mask_double(RASTER3D_Map *, int, int, int, double *);
+void Rast3d_mask_tile(RASTER3D_Map *, int, void *, int);
+void Rast3d_mask_on(RASTER3D_Map *);
+void Rast3d_mask_off(RASTER3D_Map *);
+int Rast3d_mask_is_on(RASTER3D_Map *);
+int Rast3d_mask_is_off(RASTER3D_Map *);
+const char *Rast3d_mask_file(void);
+int Rast3d_mask_map_exists(void);
 
 
 /* maskfn.c */
 /* maskfn.c */
 int Rast3d_mask_d_select(DCELL *, d_Mask *);
 int Rast3d_mask_d_select(DCELL *, d_Mask *);
@@ -169,192 +169,192 @@ DCELL Rast3d_mask_match_d_interval(DCELL, d_Interval *);
 void Rast3d_parse_vallist(char **, d_Mask **);
 void Rast3d_parse_vallist(char **, d_Mask **);
 
 
 /* g3dmisc.c */
 /* g3dmisc.c */
-int Rast3d_g3dType2cellType(int);
-void Rast3d_copyFloat2Double(const float *, int, double *, int, int);
-void Rast3d_copyDouble2Float(const double *, int, float *, int, int);
-void Rast3d_copyValues(const void *, int, int, void *, int, int, int);
+int Rast3d_g3d_type2cell_type(int);
+void Rast3d_copy_float2Double(const float *, int, double *, int, int);
+void Rast3d_copy_double2Float(const double *, int, float *, int, int);
+void Rast3d_copy_values(const void *, int, int, void *, int, int, int);
 int Rast3d_length(int);
 int Rast3d_length(int);
-int Rast3d_externLength(int);
+int Rast3d_extern_length(int);
 
 
 /* g3dnull.c */
 /* g3dnull.c */
-int Rast3d_isNullValueNum(const void *, int);
-void Rast3d_setNullValue(void *, int, int);
+int Rast3d_is_null_value_num(const void *, int);
+void Rast3d_set_null_value(void *, int, int);
 
 
 /* g3dopen2.c */
 /* g3dopen2.c */
-void *Rast3d_openNewParam(const char *, int , int, RASTER3D_Region *, int, int, int, int, int, int, int);
+void *Rast3d_open_new_param(const char *, int , int, RASTER3D_Region *, int, int, int, int, int, int, int);
 /* g3dopen.c */
 /* g3dopen.c */
-void *Rast3d_openCellOldNoHeader(const char *, const char *);
-void *Rast3d_openCellOld(const char *, const char *, RASTER3D_Region *, int, int);
-void *Rast3d_openCellNew(const char *, int, int, RASTER3D_Region *);
-void *Rast3d_openNewOptTileSize(const char *, int , RASTER3D_Region * , int , int );
+void *Rast3d_open_cell_old_no_header(const char *, const char *);
+void *Rast3d_open_cell_old(const char *, const char *, RASTER3D_Region *, int, int);
+void *Rast3d_open_cell_new(const char *, int, int, RASTER3D_Region *);
+void *Rast3d_open_new_opt_tile_size(const char *, int , RASTER3D_Region * , int , int );
 
 
 /* g3dparam.c */
 /* g3dparam.c */
-void Rast3d_setStandard3dInputParams(void);
-int Rast3d_getStandard3dParams(int *, int *, int *, int *, int *, int *, int *,
+void Rast3d_set_standard3d_input_params(void);
+int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *, int *, int *,
 			    int *, int *, int *, int *, int *);
 			    int *, int *, int *, int *, int *);
-void Rast3d_setWindowParams(void);
-char *Rast3d_getWindowParams(void);
+void Rast3d_set_window_params(void);
+char *Rast3d_get_window_params(void);
 
 
 /* g3drange.c */
 /* g3drange.c */
-void Rast3d_range_updateFromTile(RASTER3D_Map *, const void *, int, int, int, int,
+void Rast3d_range_update_from_tile(RASTER3D_Map *, const void *, int, int, int, int,
 			      int, int, int, int);
 			      int, int, int, int);
-int Rast3d_readRange(const char *, const char *, struct FPRange *);
+int Rast3d_read_range(const char *, const char *, struct FPRange *);
 int Rast3d_range_load(RASTER3D_Map *);
 int Rast3d_range_load(RASTER3D_Map *);
 void Rast3d_range_min_max(RASTER3D_Map *, double *, double *);
 void Rast3d_range_min_max(RASTER3D_Map *, double *, double *);
 int Rast3d_range_write(RASTER3D_Map *);
 int Rast3d_range_write(RASTER3D_Map *);
 int Rast3d_range_init(RASTER3D_Map *);
 int Rast3d_range_init(RASTER3D_Map *);
 
 
 /* g3dregion.c */
 /* g3dregion.c */
-void Rast3d_getRegionValue(RASTER3D_Map *, double, double, double, void *, int);
-void Rast3d_adjustRegion(RASTER3D_Region *);
-void Rast3d_regionCopy(RASTER3D_Region *, RASTER3D_Region *);
-void Rast3d_incorporate2dRegion(struct Cell_head *, RASTER3D_Region *);
-void Rast3d_regionFromToCellHead(struct Cell_head *, RASTER3D_Region *);
-void Rast3d_adjustRegionRes(RASTER3D_Region *);
-void Rast3d_extract2dRegion(RASTER3D_Region *, struct Cell_head *);
-void Rast3d_regionToCellHead(RASTER3D_Region *, struct Cell_head *);
-int Rast3d_readRegionMap(const char *, const char *, RASTER3D_Region *);
-int Rast3d_isValidLocation(RASTER3D_Region *, double, double, double);
+void Rast3d_get_region_value(RASTER3D_Map *, double, double, double, void *, int);
+void Rast3d_adjust_region(RASTER3D_Region *);
+void Rast3d_region_copy(RASTER3D_Region *, RASTER3D_Region *);
+void Rast3d_incorporate2d_region(struct Cell_head *, RASTER3D_Region *);
+void Rast3d_region_from_to_cell_head(struct Cell_head *, RASTER3D_Region *);
+void Rast3d_adjust_region_res(RASTER3D_Region *);
+void Rast3d_extract2d_region(RASTER3D_Region *, struct Cell_head *);
+void Rast3d_region_to_cell_head(RASTER3D_Region *, struct Cell_head *);
+int Rast3d_read_region_map(const char *, const char *, RASTER3D_Region *);
+int Rast3d_is_valid_location(RASTER3D_Region *, double, double, double);
 void Rast3d_location2coord(RASTER3D_Region *, double, double, double, int *, int *, int *);
 void Rast3d_location2coord(RASTER3D_Region *, double, double, double, int *, int *, int *);
 void Rast3d_location2coord2(RASTER3D_Region *, double, double, double, int *, int *, int *);
 void Rast3d_location2coord2(RASTER3D_Region *, double, double, double, int *, int *, int *);
 void Rast3d_coord2location(RASTER3D_Region *, double, double, double, double *, double *, double *);
 void Rast3d_coord2location(RASTER3D_Region *, double, double, double, double *, double *, double *);
 /* g3dresample.c */
 /* g3dresample.c */
-void Rast3d_nearestNeighbor(RASTER3D_Map *, int, int, int, void *, int);
-void Rast3d_setResamplingFun(RASTER3D_Map *, void (*)());
-void Rast3d_getResamplingFun(RASTER3D_Map *, void (**)());
-void Rast3d_getNearestNeighborFunPtr(void (**)());
+void Rast3d_nearest_neighbor(RASTER3D_Map *, int, int, int, void *, int);
+void Rast3d_set_resampling_fun(RASTER3D_Map *, void (*)());
+void Rast3d_get_resampling_fun(RASTER3D_Map *, void (**)());
+void Rast3d_get_nearest_neighbor_fun_ptr(void (**)());
 
 
 /* g3dvolume.c */
 /* g3dvolume.c */
-void Rast3d_getVolumeA(void *, double[2][2][2][3], int, int, int, void *, int);
-void Rast3d_getVolume(void *, double, double, double, double, double, double,
+void Rast3d_get_volume_a(void *, double[2][2][2][3], int, int, int, void *, int);
+void Rast3d_get_volume(void *, double, double, double, double, double, double,
 		   double, double, double, double, double, double, int, int,
 		   double, double, double, double, double, double, int, int,
 		   int, void *, int);
 		   int, void *, int);
-void Rast3d_getAlignedVolume(void *, double, double, double, double, double,
+void Rast3d_get_aligned_volume(void *, double, double, double, double, double,
 			  double, int, int, int, void *, int);
 			  double, int, int, int, void *, int);
-void Rast3d_makeAlignedVolumeFile(void *, const char *, double, double, double,
+void Rast3d_make_aligned_volume_file(void *, const char *, double, double, double,
 			       double, double, double, int, int, int);
 			       double, double, double, int, int, int);
 /* g3dwindow.c */
 /* g3dwindow.c */
-void Rast3d_getValue(RASTER3D_Map *, int, int, int, void *, int);
-float Rast3d_getFloat(RASTER3D_Map *, int, int, int);
-double Rast3d_getDouble(RASTER3D_Map *, int, int, int);
-void Rast3d_getWindowValue(RASTER3D_Map *, double, double, double, void *, int);
+void Rast3d_get_value(RASTER3D_Map *, int, int, int, void *, int);
+float Rast3d_get_float(RASTER3D_Map *, int, int, int);
+double Rast3d_get_double(RASTER3D_Map *, int, int, int);
+void Rast3d_get_window_value(RASTER3D_Map *, double, double, double, void *, int);
 
 
 
 
-RASTER3D_Region *Rast3d_windowPtr(void);
-void Rast3d_setWindow(RASTER3D_Region *);
-void Rast3d_setWindowMap(RASTER3D_Map *, RASTER3D_Region *);
-void Rast3d_getWindow(RASTER3D_Region *);
+RASTER3D_Region *Rast3d_window_ptr(void);
+void Rast3d_set_window(RASTER3D_Region *);
+void Rast3d_set_window_map(RASTER3D_Map *, RASTER3D_Region *);
+void Rast3d_get_window(RASTER3D_Region *);
 
 
 /* g3dwindowio.c */
 /* g3dwindowio.c */
-void Rast3d_useWindowParams(void);
-int Rast3d_readWindow(RASTER3D_Region *, const char *);
+void Rast3d_use_window_params(void);
+int Rast3d_read_window(RASTER3D_Region *, const char *);
 
 
 /* int Rast3d_writeWindow (RASTER3D_Region *, char *); */
 /* int Rast3d_writeWindow (RASTER3D_Region *, char *); */
 /* getblock.c */
 /* getblock.c */
-void Rast3d_getBlockNocache(RASTER3D_Map *, int, int, int, int, int, int, void *,
+void Rast3d_get_block_nocache(RASTER3D_Map *, int, int, int, int, int, int, void *,
 			 int);
 			 int);
-void Rast3d_getBlock(RASTER3D_Map *, int, int, int, int, int, int, void *, int);
+void Rast3d_get_block(RASTER3D_Map *, int, int, int, int, int, int, void *, int);
 
 
 /* header.c */
 /* header.c */
-int Rast3d_readHeader(RASTER3D_Map *, int *, int *, double *, double *, double *,
+int Rast3d_read_header(RASTER3D_Map *, int *, int *, double *, double *, double *,
 		   double *, double *, double *, int *, int *, int *,
 		   double *, double *, double *, int *, int *, int *,
 		   double *, double *, double *, int *, int *, int *, int *,
 		   double *, double *, double *, int *, int *, int *, int *,
 		   int *, int *, int *, int *, int *, int *, int *, char **);
 		   int *, int *, int *, int *, int *, int *, int *, char **);
-int Rast3d_writeHeader(RASTER3D_Map *, int, int, double, double, double, double,
+int Rast3d_write_header(RASTER3D_Map *, int, int, double, double, double, double,
 		    double, double, int, int, int, double, double, double,
 		    double, double, int, int, int, double, double, double,
 		    int, int, int, int, int, int, int, int, int, int, int,
 		    int, int, int, int, int, int, int, int, int, int, int,
 		    char *);
 		    char *);
-int Rast3d_cacheSizeEncode(int, int);
-int Rast3d__computeCacheSize(RASTER3D_Map *, int);
-int Rast3d_fillHeader(RASTER3D_Map *, int, int, int, int, int, int, int, int, int,
+int Rast3d_cache_size_encode(int, int);
+int Rast3d__compute_cache_size(RASTER3D_Map *, int);
+int Rast3d_fill_header(RASTER3D_Map *, int, int, int, int, int, int, int, int, int,
 		   int, int, int, int, int, int, int, double, double, double,
 		   int, int, int, int, int, int, int, double, double, double,
 		   double, double, double, int, int, int, double, double,
 		   double, double, double, int, int, int, double, double,
 		   double, char *);
 		   double, char *);
 /* headerinfo.c */
 /* headerinfo.c */
-void Rast3d_getCoordsMap(RASTER3D_Map *, int *, int *, int *);
-void Rast3d_getCoordsMapWindow(RASTER3D_Map *, int *, int *, int *);
-void Rast3d_getNofTilesMap(RASTER3D_Map *, int *, int *, int *);
-void Rast3d_getRegionMap(RASTER3D_Map *, double *, double *, double *, double *,
+void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *);
+void Rast3d_get_coords_map_window(RASTER3D_Map *, int *, int *, int *);
+void Rast3d_get_nof_tiles_map(RASTER3D_Map *, int *, int *, int *);
+void Rast3d_get_region_map(RASTER3D_Map *, double *, double *, double *, double *,
 		      double *, double *);
 		      double *, double *);
-void Rast3d_getWindowMap(RASTER3D_Map *, double *, double *, double *, double *,
+void Rast3d_get_window_map(RASTER3D_Map *, double *, double *, double *, double *,
 		      double *, double *);
 		      double *, double *);
-void Rast3d_getTileDimensionsMap(RASTER3D_Map *, int *, int *, int *);
-int Rast3d_tileTypeMap(RASTER3D_Map *);
-int Rast3d_fileTypeMap(RASTER3D_Map *);
-int Rast3d_tilePrecisionMap(RASTER3D_Map *);
-int Rast3d_tileUseCacheMap(RASTER3D_Map *);
-void Rast3d_printHeader(RASTER3D_Map *);
-void Rast3d_getRegionStructMap(RASTER3D_Map *, RASTER3D_Region *);
+void Rast3d_get_tile_dimensions_map(RASTER3D_Map *, int *, int *, int *);
+int Rast3d_tile_type_map(RASTER3D_Map *);
+int Rast3d_file_type_map(RASTER3D_Map *);
+int Rast3d_tile_precision_map(RASTER3D_Map *);
+int Rast3d_tile_use_cache_map(RASTER3D_Map *);
+void Rast3d_print_header(RASTER3D_Map *);
+void Rast3d_get_region_struct_map(RASTER3D_Map *, RASTER3D_Region *);
 
 
 /* index.c */
 /* index.c */
-int Rast3d_flushIndex(RASTER3D_Map *);
-int Rast3d_initIndex(RASTER3D_Map *, int);
+int Rast3d_flush_index(RASTER3D_Map *);
+int Rast3d_init_index(RASTER3D_Map *, int);
 
 
 /* retile.c */
 /* retile.c */
 void Rast3d_retile(void *, const char *, int, int, int);
 void Rast3d_retile(void *, const char *, int, int, int);
 
 
 /* rle.c */
 /* rle.c */
-int G_rle_count_only(char *, int, int);
-void G_rle_encode(char *, char *, int, int);
-void G_rle_decode(char *, char *, int, int, int *, int *);
+int Rast3d_rle_count_only(char *, int, int);
+void Rast3d_rle_encode(char *, char *, int, int);
+void Rast3d_rle_decode(char *, char *, int, int, int *, int *);
 
 
 /* tilealloc.c */
 /* tilealloc.c */
-void *Rast3d_allocTilesType(RASTER3D_Map *, int, int);
-void *Rast3d_allocTiles(RASTER3D_Map *, int);
-void Rast3d_freeTiles(void *);
+void *Rast3d_alloc_tiles_type(RASTER3D_Map *, int, int);
+void *Rast3d_alloc_tiles(RASTER3D_Map *, int);
+void Rast3d_free_tiles(void *);
 
 
 /* tileio.c */
 /* tileio.c */
-void *Rast3d_getTilePtr(RASTER3D_Map *, int);
-int Rast3d_tileLoad(RASTER3D_Map *, int);
-int Rast3d__removeTile(RASTER3D_Map *, int);
-float Rast3d_getFloatRegion(RASTER3D_Map *, int, int, int);
-double Rast3d_getDoubleRegion(RASTER3D_Map *, int, int, int);
-void Rast3d_getValueRegion(RASTER3D_Map *, int, int, int, void *, int);
+void *Rast3d_get_tile_ptr(RASTER3D_Map *, int);
+int Rast3d_tile_load(RASTER3D_Map *, int);
+int Rast3d__remove_tile(RASTER3D_Map *, int);
+float Rast3d_get_float_region(RASTER3D_Map *, int, int, int);
+double Rast3d_get_double_region(RASTER3D_Map *, int, int, int);
+void Rast3d_get_value_region(RASTER3D_Map *, int, int, int, void *, int);
 
 
 /* tilemath.c */
 /* tilemath.c */
-void Rast3d_computeOptimalTileDimension(RASTER3D_Region *, int, int *, int *, int *, int);
-void Rast3d_tileIndex2tile(RASTER3D_Map *, int, int *, int *, int *);
-int Rast3d_tile2tileIndex(RASTER3D_Map *, int, int, int);
-void Rast3d_tileCoordOrigin(RASTER3D_Map *, int, int, int, int *, int *, int *);
-void Rast3d_tileIndexOrigin(RASTER3D_Map *, int, int *, int *, int *);
-void Rast3d_coord2tileCoord(RASTER3D_Map *, int, int, int, int *, int *, int *, int *,
+void Rast3d_compute_optimal_tile_dimension(RASTER3D_Region *, int, int *, int *, int *, int);
+void Rast3d_tile_index2tile(RASTER3D_Map *, int, int *, int *, int *);
+int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int);
+void Rast3d_tile_coord_origin(RASTER3D_Map *, int, int, int, int *, int *, int *);
+void Rast3d_tile_index_origin(RASTER3D_Map *, int, int *, int *, int *);
+void Rast3d_coord2tile_coord(RASTER3D_Map *, int, int, int, int *, int *, int *, int *,
 			 int *, int *);
 			 int *, int *);
-void Rast3d_coord2tileIndex(RASTER3D_Map *, int, int, int, int *, int *);
-int Rast3d_coordInRange(RASTER3D_Map *, int, int, int);
-int Rast3d_tileIndexInRange(RASTER3D_Map *, int);
-int Rast3d_tileInRange(RASTER3D_Map *, int, int, int);
-int Rast3d_computeClippedTileDimensions(RASTER3D_Map *, int, int *, int *, int *,
+void Rast3d_coord2tile_index(RASTER3D_Map *, int, int, int, int *, int *);
+int Rast3d_coord_in_range(RASTER3D_Map *, int, int, int);
+int Rast3d_tile_index_in_range(RASTER3D_Map *, int);
+int Rast3d_tile_in_range(RASTER3D_Map *, int, int, int);
+int Rast3d_compute_clipped_tile_dimensions(RASTER3D_Map *, int, int *, int *, int *,
 				     int *, int *, int *);
 				     int *, int *, int *);
 
 
 /* tilenull.c */
 /* tilenull.c */
-void Rast3d_setNullTileType(RASTER3D_Map *, void *, int);
-void Rast3d_setNullTile(RASTER3D_Map *, void *);
+void Rast3d_set_null_tile_type(RASTER3D_Map *, void *, int);
+void Rast3d_set_null_tile(RASTER3D_Map *, void *);
 
 
 /* tileread.c */
 /* tileread.c */
-int Rast3d_readTile(RASTER3D_Map *, int, void *, int);
-int Rast3d_readTileFloat(RASTER3D_Map *, int, void *);
-int Rast3d_readTileDouble(RASTER3D_Map *, int, void *);
-int Rast3d_lockTile(RASTER3D_Map *, int);
-int Rast3d_unlockTile(RASTER3D_Map *, int);
-int Rast3d_unlockAll(RASTER3D_Map *);
-void Rast3d_autolockOn(RASTER3D_Map *);
-void Rast3d_autolockOff(RASTER3D_Map *);
-void Rast3d_minUnlocked(RASTER3D_Map *, int);
-int Rast3d_beginCycle(RASTER3D_Map *);
-int Rast3d_endCycle(RASTER3D_Map *);
+int Rast3d_read_tile(RASTER3D_Map *, int, void *, int);
+int Rast3d_read_tile_float(RASTER3D_Map *, int, void *);
+int Rast3d_read_tile_double(RASTER3D_Map *, int, void *);
+int Rast3d_lock_tile(RASTER3D_Map *, int);
+int Rast3d_unlock_tile(RASTER3D_Map *, int);
+int Rast3d_unlock_all(RASTER3D_Map *);
+void Rast3d_autolock_on(RASTER3D_Map *);
+void Rast3d_autolock_off(RASTER3D_Map *);
+void Rast3d_min_unlocked(RASTER3D_Map *, int);
+int Rast3d_begin_cycle(RASTER3D_Map *);
+int Rast3d_end_cycle(RASTER3D_Map *);
 
 
 /* tilewrite.c */
 /* tilewrite.c */
-int Rast3d_writeTile(RASTER3D_Map *, int, const void *, int);
-int Rast3d_writeTileFloat(RASTER3D_Map *, int, const void *);
-int Rast3d_writeTileDouble(RASTER3D_Map *, int, const void *);
-int Rast3d_flushTile(RASTER3D_Map *, int);
-int Rast3d_flushTileCube(RASTER3D_Map *, int, int, int, int, int, int);
-int Rast3d_flushTilesInCube(RASTER3D_Map *, int, int, int, int, int, int);
-int Rast3d_putFloat(RASTER3D_Map *, int, int, int, float);
-int Rast3d_putDouble(RASTER3D_Map *, int, int, int, double);
-int Rast3d_putValue(RASTER3D_Map *, int, int, int, const void *, int);
+int Rast3d_write_tile(RASTER3D_Map *, int, const void *, int);
+int Rast3d_write_tile_float(RASTER3D_Map *, int, const void *);
+int Rast3d_write_tile_double(RASTER3D_Map *, int, const void *);
+int Rast3d_flush_tile(RASTER3D_Map *, int);
+int Rast3d_flush_tile_cube(RASTER3D_Map *, int, int, int, int, int, int);
+int Rast3d_flush_tiles_in_cube(RASTER3D_Map *, int, int, int, int, int, int);
+int Rast3d_put_float(RASTER3D_Map *, int, int, int, float);
+int Rast3d_put_double(RASTER3D_Map *, int, int, int, double);
+int Rast3d_put_value(RASTER3D_Map *, int, int, int, const void *, int);
 
 
 /* writeascii.c */
 /* writeascii.c */
-void Rast3d_writeAscii(void *, const char *);
+void Rast3d_write_ascii(void *, const char *);
 
 
 #endif /* RASTER3DDEFS */
 #endif /* RASTER3DDEFS */

+ 8 - 8
lib/gpde/N_arrays.c

@@ -886,7 +886,7 @@ int N_is_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 	    G_debug(6,
 	    G_debug(6,
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    depth, row, col);
 		    depth, row, col);
-	    return Rast3d_isNullValueNum((void *)
+	    return Rast3d_is_null_value_num((void *)
 				      &(data->
 				      &(data->
 					fcell_array[depth *
 					fcell_array[depth *
 						    (data->rows_intern *
 						    (data->rows_intern *
@@ -898,7 +898,7 @@ int N_is_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 	    G_debug(6,
 	    G_debug(6,
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    depth, row, col);
 		    depth, row, col);
-	    return Rast3d_isNullValueNum((void *)
+	    return Rast3d_is_null_value_num((void *)
 				      &(data->
 				      &(data->
 					dcell_array[depth *
 					dcell_array[depth *
 						    (data->rows_intern *
 						    (data->rows_intern *
@@ -912,7 +912,7 @@ int N_is_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 	    G_debug(6,
 	    G_debug(6,
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    depth, row, col);
 		    depth, row, col);
-	    return Rast3d_isNullValueNum((void *)
+	    return Rast3d_is_null_value_num((void *)
 				      &(data->
 				      &(data->
 					fcell_array[(depth +
 					fcell_array[(depth +
 						     data->offset) *
 						     data->offset) *
@@ -928,7 +928,7 @@ int N_is_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 	    G_debug(6,
 	    G_debug(6,
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    "N_is_array_3d_value_null: null value is of type DCELL_TYPE at pos [%i][%i][%i]",
 		    depth, row, col);
 		    depth, row, col);
-	    return Rast3d_isNullValueNum((void *)
+	    return Rast3d_is_null_value_num((void *)
 				      &(data->
 				      &(data->
 					dcell_array[(depth +
 					dcell_array[(depth +
 						     data->offset) *
 						     data->offset) *
@@ -1082,7 +1082,7 @@ void N_put_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 
 
     if (data->offset == 0) {
     if (data->offset == 0) {
 	if (data->type == FCELL_TYPE && data->fcell_array != NULL) {
 	if (data->type == FCELL_TYPE && data->fcell_array != NULL) {
-	    Rast3d_setNullValue((void *)
+	    Rast3d_set_null_value((void *)
 			     &(data->
 			     &(data->
 			       fcell_array[depth *
 			       fcell_array[depth *
 					   (data->rows_intern *
 					   (data->rows_intern *
@@ -1091,7 +1091,7 @@ void N_put_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 			     FCELL_TYPE);
 			     FCELL_TYPE);
 	}
 	}
 	else if (data->type == DCELL_TYPE && data->dcell_array != NULL) {
 	else if (data->type == DCELL_TYPE && data->dcell_array != NULL) {
-	    Rast3d_setNullValue((void *)
+	    Rast3d_set_null_value((void *)
 			     &(data->
 			     &(data->
 			       dcell_array[depth *
 			       dcell_array[depth *
 					   (data->rows_intern *
 					   (data->rows_intern *
@@ -1102,7 +1102,7 @@ void N_put_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
     }
     }
     else {
     else {
 	if (data->type == FCELL_TYPE && data->fcell_array != NULL) {
 	if (data->type == FCELL_TYPE && data->fcell_array != NULL) {
-	    Rast3d_setNullValue((void *)
+	    Rast3d_set_null_value((void *)
 			     &(data->
 			     &(data->
 			       fcell_array[(depth +
 			       fcell_array[(depth +
 					    data->offset) *
 					    data->offset) *
@@ -1116,7 +1116,7 @@ void N_put_array_3d_value_null(N_array_3d * data, int col, int row, int depth)
 			     FCELL_TYPE);
 			     FCELL_TYPE);
 	}
 	}
 	else if (data->type == DCELL_TYPE && data->dcell_array != NULL) {
 	else if (data->type == DCELL_TYPE && data->dcell_array != NULL) {
-	    Rast3d_setNullValue((void *)
+	    Rast3d_set_null_value((void *)
 			     &(data->
 			     &(data->
 			       dcell_array[(depth +
 			       dcell_array[(depth +
 					    data->offset) *
 					    data->offset) *

+ 10 - 10
lib/gpde/N_arrays_calc.c

@@ -522,7 +522,7 @@ void N_copy_array_3d(N_array_3d * source, N_array_3d * target)
 	 i++) {
 	 i++) {
 	null = 0;
 	null = 0;
 	if (source->type == FCELL_TYPE) {
 	if (source->type == FCELL_TYPE) {
-	    if (Rast3d_isNullValueNum
+	    if (Rast3d_is_null_value_num
 		((void *)&(source->fcell_array[i]), FCELL_TYPE))
 		((void *)&(source->fcell_array[i]), FCELL_TYPE))
 		null = 1;
 		null = 1;
 
 
@@ -531,7 +531,7 @@ void N_copy_array_3d(N_array_3d * source, N_array_3d * target)
 	    }
 	    }
 	    if (target->type == DCELL_TYPE) {
 	    if (target->type == DCELL_TYPE) {
 		if (null)
 		if (null)
-		    Rast3d_setNullValue((void *)&(target->dcell_array[i]), 1,
+		    Rast3d_set_null_value((void *)&(target->dcell_array[i]), 1,
 				     DCELL_TYPE);
 				     DCELL_TYPE);
 		else
 		else
 		    target->dcell_array[i] = (double)source->fcell_array[i];
 		    target->dcell_array[i] = (double)source->fcell_array[i];
@@ -539,13 +539,13 @@ void N_copy_array_3d(N_array_3d * source, N_array_3d * target)
 
 
 	}
 	}
 	if (source->type == DCELL_TYPE) {
 	if (source->type == DCELL_TYPE) {
-	    if (Rast3d_isNullValueNum
+	    if (Rast3d_is_null_value_num
 		((void *)&(source->dcell_array[i]), DCELL_TYPE))
 		((void *)&(source->dcell_array[i]), DCELL_TYPE))
 		null = 1;
 		null = 1;
 
 
 	    if (target->type == FCELL_TYPE) {
 	    if (target->type == FCELL_TYPE) {
 		if (null)
 		if (null)
-		    Rast3d_setNullValue((void *)&(target->fcell_array[i]), 1,
+		    Rast3d_set_null_value((void *)&(target->fcell_array[i]), 1,
 				     FCELL_TYPE);
 				     FCELL_TYPE);
 		else
 		else
 		    target->fcell_array[i] = (float)source->dcell_array[i];
 		    target->fcell_array[i] = (float)source->dcell_array[i];
@@ -596,19 +596,19 @@ double N_norm_array_3d(N_array_3d * a, N_array_3d * b, int type)
 	v2 = 0.0;
 	v2 = 0.0;
 
 
 	if (a->type == FCELL_TYPE) {
 	if (a->type == FCELL_TYPE) {
-	    if (!Rast3d_isNullValueNum((void *)&(a->fcell_array[i]), FCELL_TYPE))
+	    if (!Rast3d_is_null_value_num((void *)&(a->fcell_array[i]), FCELL_TYPE))
 		v1 = (double)a->fcell_array[i];
 		v1 = (double)a->fcell_array[i];
 	}
 	}
 	if (a->type == DCELL_TYPE) {
 	if (a->type == DCELL_TYPE) {
-	    if (!Rast3d_isNullValueNum((void *)&(a->dcell_array[i]), DCELL_TYPE))
+	    if (!Rast3d_is_null_value_num((void *)&(a->dcell_array[i]), DCELL_TYPE))
 		v1 = (double)a->dcell_array[i];
 		v1 = (double)a->dcell_array[i];
 	}
 	}
 	if (b->type == FCELL_TYPE) {
 	if (b->type == FCELL_TYPE) {
-	    if (!Rast3d_isNullValueNum((void *)&(b->fcell_array[i]), FCELL_TYPE))
+	    if (!Rast3d_is_null_value_num((void *)&(b->fcell_array[i]), FCELL_TYPE))
 		v2 = (double)b->fcell_array[i];
 		v2 = (double)b->fcell_array[i];
 	}
 	}
 	if (b->type == DCELL_TYPE) {
 	if (b->type == DCELL_TYPE) {
-	    if (!Rast3d_isNullValueNum((void *)&(b->dcell_array[i]), DCELL_TYPE))
+	    if (!Rast3d_is_null_value_num((void *)&(b->dcell_array[i]), DCELL_TYPE))
 		v2 = (double)b->dcell_array[i];
 		v2 = (double)b->dcell_array[i];
 	}
 	}
 
 
@@ -859,7 +859,7 @@ int N_convert_array_3d_null_to_zero(N_array_3d * a)
     if (a->type == FCELL_TYPE)
     if (a->type == FCELL_TYPE)
 	for (i = 0; i < a->cols_intern * a->rows_intern * a->depths_intern;
 	for (i = 0; i < a->cols_intern * a->rows_intern * a->depths_intern;
 	     i++) {
 	     i++) {
-	    if (Rast3d_isNullValueNum((void *)&(a->fcell_array[i]), FCELL_TYPE)) {
+	    if (Rast3d_is_null_value_num((void *)&(a->fcell_array[i]), FCELL_TYPE)) {
 		a->fcell_array[i] = 0.0;
 		a->fcell_array[i] = 0.0;
 		count++;
 		count++;
 	    }
 	    }
@@ -868,7 +868,7 @@ int N_convert_array_3d_null_to_zero(N_array_3d * a)
     if (a->type == DCELL_TYPE)
     if (a->type == DCELL_TYPE)
 	for (i = 0; i < a->cols_intern * a->rows_intern * a->depths_intern;
 	for (i = 0; i < a->cols_intern * a->rows_intern * a->depths_intern;
 	     i++) {
 	     i++) {
-	    if (Rast3d_isNullValueNum((void *)&(a->dcell_array[i]), DCELL_TYPE)) {
+	    if (Rast3d_is_null_value_num((void *)&(a->dcell_array[i]), DCELL_TYPE)) {
 		a->dcell_array[i] = 0.0;
 		a->dcell_array[i] = 0.0;
 		count++;
 		count++;
 	    }
 	    }

+ 33 - 33
lib/gpde/N_arrays_io.c

@@ -242,7 +242,7 @@ void N_write_array_2d_to_rast(N_array_2d * array, char *name)
  * <br><br>
  * <br><br>
  *
  *
  * The new created or the provided array is returned.
  * The new created or the provided array is returned.
- * If the reading of the volume map fails, Rast3d_fatalError() will
+ * If the reading of the volume map fails, Rast3d_fatal_error() will
  * be invoked.
  * be invoked.
  *
  *
  * \param name * char - the name of an existing volume map
  * \param name * char - the name of an existing volume map
@@ -262,7 +262,7 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
 
 
 
 
     /*get the current region */
     /*get the current region */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     cols = region.cols;
     cols = region.cols;
     rows = region.rows;
     rows = region.rows;
@@ -270,17 +270,17 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
 
 
 
 
     if (NULL == G_find_grid3(name, ""))
     if (NULL == G_find_grid3(name, ""))
-	Rast3d_fatalError(_("Requested g3d map <%s> not found"), name);
+	Rast3d_fatal_error(_("Requested g3d map <%s> not found"), name);
 
 
     /*Open all maps with default region */
     /*Open all maps with default region */
     map =
     map =
-	Rast3d_openCellOld(name, G_find_grid3(name, ""), RASTER3D_DEFAULT_WINDOW,
+	Rast3d_open_cell_old(name, G_find_grid3(name, ""), RASTER3D_DEFAULT_WINDOW,
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Error opening g3d map <%s>"), name);
+	Rast3d_fatal_error(_("Error opening g3d map <%s>"), name);
 
 
-    type = Rast3d_tileTypeMap(map);
+    type = Rast3d_tile_type_map(map);
 
 
     /*if the array is NULL create a new one with the data type of the volume map */
     /*if the array is NULL create a new one with the data type of the volume map */
     /*the offset is 0 by default */
     /*the offset is 0 by default */
@@ -310,10 +310,10 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (mask) {
     if (mask) {
-	if (Rast3d_maskFileExists()) {
+	if (Rast3d_mask_file_exists()) {
 	    changemask = 0;
 	    changemask = 0;
-	    if (Rast3d_maskIsOff(map)) {
-		Rast3d_maskOn(map);
+	    if (Rast3d_mask_is_off(map)) {
+		Rast3d_mask_on(map);
 		changemask = 1;
 		changemask = 1;
 	    }
 	    }
 	}
 	}
@@ -324,7 +324,7 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
 	for (y = 0; y < rows; y++) {
 	for (y = 0; y < rows; y++) {
 	    for (x = 0; x < cols; x++) {
 	    for (x = 0; x < cols; x++) {
 		if (type == FCELL_TYPE) {
 		if (type == FCELL_TYPE) {
-		    Rast3d_getValue(map, x, y, z, &f1, type);
+		    Rast3d_get_value(map, x, y, z, &f1, type);
 		    if (Rast_is_f_null_value((void *)&f1)) {
 		    if (Rast_is_f_null_value((void *)&f1)) {
 			N_put_array_3d_value_null(data, x, y, z);
 			N_put_array_3d_value_null(data, x, y, z);
 		    }
 		    }
@@ -336,7 +336,7 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
 		    }
 		    }
 		}
 		}
 		else {
 		else {
-		    Rast3d_getValue(map, x, y, z, &d1, type);
+		    Rast3d_get_value(map, x, y, z, &d1, type);
 		    if (Rast_is_d_null_value((void *)&d1)) {
 		    if (Rast_is_d_null_value((void *)&d1)) {
 			N_put_array_3d_value_null(data, x, y, z);
 			N_put_array_3d_value_null(data, x, y, z);
 		    }
 		    }
@@ -354,14 +354,14 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
 
 
     /*We set the Mask off, if it was off before */
     /*We set the Mask off, if it was off before */
     if (mask) {
     if (mask) {
-	if (Rast3d_maskFileExists())
-	    if (Rast3d_maskIsOn(map) && changemask)
-		Rast3d_maskOff(map);
+	if (Rast3d_mask_file_exists())
+	    if (Rast3d_mask_is_on(map) && changemask)
+		Rast3d_mask_off(map);
     }
     }
 
 
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
-	Rast3d_fatalError(map, NULL, 0, _("Error closing g3d file"));
+    if (!Rast3d_close_cell(map))
+	Rast3d_fatal_error(map, NULL, 0, _("Error closing g3d file"));
 
 
     return data;
     return data;
 }
 }
@@ -372,7 +372,7 @@ N_array_3d *N_read_rast3d_to_array_3d(char *name, N_array_3d * array,
  * A new volume map is created with the same type as the N_array_3d.
  * A new volume map is created with the same type as the N_array_3d.
  * The current region is used to open the volume map.
  * The current region is used to open the volume map.
  * The N_array_3d must have the same size as the current region.
  * The N_array_3d must have the same size as the current region.
- * If the writing of the volume map fails, Rast3d_fatalError() will
+ * If the writing of the volume map fails, Rast3d_fatal_error() will
  * be invoked.
  * be invoked.
  *
  *
  *
  *
@@ -392,7 +392,7 @@ void N_write_array_3d_to_rast3d(N_array_3d * array, char *name, int mask)
     RASTER3D_Region region;
     RASTER3D_Region region;
 
 
     /*get the current region */
     /*get the current region */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     cols = region.cols;
     cols = region.cols;
     rows = region.rows;
     rows = region.rows;
@@ -412,21 +412,21 @@ void N_write_array_3d_to_rast3d(N_array_3d * array, char *name, int mask)
 
 
     /*Open the new map */
     /*Open the new map */
     if (type == DCELL_TYPE)
     if (type == DCELL_TYPE)
-        map = Rast3d_openNewOptTileSize(name, RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, 32);
+        map = Rast3d_open_new_opt_tile_size(name, RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, 32);
     else if (type == FCELL_TYPE)
     else if (type == FCELL_TYPE)
-        map = Rast3d_openNewOptTileSize(name, RASTER3D_USE_CACHE_XY, &region, FCELL_TYPE, 32);
+        map = Rast3d_open_new_opt_tile_size(name, RASTER3D_USE_CACHE_XY, &region, FCELL_TYPE, 32);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Error opening g3d map <%s>"), name);
+	Rast3d_fatal_error(_("Error opening g3d map <%s>"), name);
 
 
     G_message(_("Write 3d array to g3d map <%s>"), name);
     G_message(_("Write 3d array to g3d map <%s>"), name);
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (mask) {
     if (mask) {
-	if (Rast3d_maskFileExists()) {
+	if (Rast3d_mask_file_exists()) {
 	    changemask = 0;
 	    changemask = 0;
-	    if (Rast3d_maskIsOff(map)) {
-		Rast3d_maskOn(map);
+	    if (Rast3d_mask_is_off(map)) {
+		Rast3d_mask_on(map);
 		changemask = 1;
 		changemask = 1;
 	    }
 	    }
 	}
 	}
@@ -439,11 +439,11 @@ void N_write_array_3d_to_rast3d(N_array_3d * array, char *name, int mask)
 	    for (x = 0; x < cols; x++) {
 	    for (x = 0; x < cols; x++) {
 		if (type == FCELL_TYPE) {
 		if (type == FCELL_TYPE) {
 		    f1 = N_get_array_3d_f_value(data, x, y, z);
 		    f1 = N_get_array_3d_f_value(data, x, y, z);
-		    Rast3d_putFloat(map, x, y, z, f1);
+		    Rast3d_put_float(map, x, y, z, f1);
 		}
 		}
 		else if (type == DCELL_TYPE) {
 		else if (type == DCELL_TYPE) {
 		    d1 = N_get_array_3d_d_value(data, x, y, z);
 		    d1 = N_get_array_3d_d_value(data, x, y, z);
-		    Rast3d_putDouble(map, x, y, z, d1);
+		    Rast3d_put_double(map, x, y, z, d1);
 		}
 		}
 	    }
 	    }
 	}
 	}
@@ -451,17 +451,17 @@ void N_write_array_3d_to_rast3d(N_array_3d * array, char *name, int mask)
 
 
     /*We set the Mask off, if it was off before */
     /*We set the Mask off, if it was off before */
     if (mask) {
     if (mask) {
-	if (Rast3d_maskFileExists())
-	    if (Rast3d_maskIsOn(map) && changemask)
-		Rast3d_maskOff(map);
+	if (Rast3d_mask_file_exists())
+	    if (Rast3d_mask_is_on(map) && changemask)
+		Rast3d_mask_off(map);
     }
     }
 
 
     /* Flush all tile */
     /* Flush all tile */
-    if (!Rast3d_flushAllTiles(map))
-	Rast3d_fatalError("Error flushing tiles with Rast3d_flushAllTiles");
+    if (!Rast3d_flush_all_tiles(map))
+	Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
-	Rast3d_fatalError(map, NULL, 0, _("Error closing g3d file"));
+    if (!Rast3d_close_cell(map))
+	Rast3d_fatal_error(map, NULL, 0, _("Error closing g3d file"));
 
 
     return;
     return;
 }
 }

+ 1 - 1
lib/gpde/N_geom.c

@@ -90,7 +90,7 @@ N_geom_data *N_init_geom_data_3d(RASTER3D_Region * region3d, N_geom_data * geoda
 
 
 	/*convert the 3d into a 2d region and begin the area calculation */
 	/*convert the 3d into a 2d region and begin the area calculation */
 	G_get_set_window(&region2d);	/*this function is not thread safe */
 	G_get_set_window(&region2d);	/*this function is not thread safe */
-	Rast3d_regionToCellHead(region3d, &region2d);
+	Rast3d_region_to_cell_head(region3d, &region2d);
     }
     }
 
 
     return N_init_geom_data_2d(&region2d, geom);
     return N_init_geom_data_2d(&region2d, geom);

+ 2 - 2
lib/gpde/test/test_arrays.c

@@ -834,8 +834,8 @@ int test_array_3d(void)
     N_free_array_3d(data2);
     N_free_array_3d(data2);
 
 
     /*Set the defaults */
     /*Set the defaults */
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&region);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&region);
 
 
     data1 =
     data1 =
 	N_alloc_array_3d(region.cols, region.rows, region.depths, 0,
 	N_alloc_array_3d(region.cols, region.rows, region.depths, 0,

+ 2 - 2
lib/gpde/test/test_geom.c

@@ -60,10 +60,10 @@ int test_geom_data(void)
     G_get_set_window(&region2d);
     G_get_set_window(&region2d);
 
 
     /*Set the defaults */
     /*Set the defaults */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /*get the current region */
     /*get the current region */
-    Rast3d_getWindow(&region3d);
+    Rast3d_get_window(&region3d);
 
 
     geom = N_alloc_geom_data();
     geom = N_alloc_geom_data();
     if (!geom) {
     if (!geom) {

+ 2 - 2
lib/ogsf/GVL2.c

@@ -36,8 +36,8 @@ static double Region[6];
  */
  */
 void GVL_libinit(void)
 void GVL_libinit(void)
 {
 {
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&wind3);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&wind3);
 
 
     Region[0] = wind3.north;
     Region[0] = wind3.north;
     Region[1] = wind3.south;
     Region[1] = wind3.south;

+ 1 - 1
lib/ogsf/Gvl3.c

@@ -44,7 +44,7 @@ int Gvl_load_colors_data(void **color_data, const char *name)
     if (NULL == (colors = (struct Colors *)G_malloc(sizeof(struct Colors))))
     if (NULL == (colors = (struct Colors *)G_malloc(sizeof(struct Colors))))
 	return (-1);
 	return (-1);
 
 
-    if (0 > Rast3d_readColors(name, mapset, colors)) {
+    if (0 > Rast3d_read_colors(name, mapset, colors)) {
 	G_free(colors);
 	G_free(colors);
 	return (-1);
 	return (-1);
     }
     }

+ 11 - 11
lib/ogsf/gvl_file.c

@@ -431,7 +431,7 @@ void *open_g3d_file(const char *filename, IFLAG * type, double *min,
 
 
     /* open g3d file */
     /* open g3d file */
     map =
     map =
-	Rast3d_openCellOld(filename, mapset, RASTER3D_DEFAULT_WINDOW,
+	Rast3d_open_cell_old(filename, mapset, RASTER3D_DEFAULT_WINDOW,
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
     if (!map) {
     if (!map) {
 	G_warning(_("Unable to open 3D raster map <%s>"), filename);
 	G_warning(_("Unable to open 3D raster map <%s>"), filename);
@@ -447,7 +447,7 @@ void *open_g3d_file(const char *filename, IFLAG * type, double *min,
     Rast3d_range_min_max(map, min, max);
     Rast3d_range_min_max(map, min, max);
 
 
     /* get file data type */
     /* get file data type */
-    itype = Rast3d_fileTypeMap(map);
+    itype = Rast3d_file_type_map(map);
     if (itype == FCELL_TYPE)
     if (itype == FCELL_TYPE)
 	*type = VOL_DTYPE_FLOAT;
 	*type = VOL_DTYPE_FLOAT;
     if (itype == DCELL_TYPE)
     if (itype == DCELL_TYPE)
@@ -467,7 +467,7 @@ void *open_g3d_file(const char *filename, IFLAG * type, double *min,
 int close_g3d_file(void *map)
 int close_g3d_file(void *map)
 {
 {
     /* close opened g3d file */
     /* close opened g3d file */
-    if (Rast3d_closeCell((RASTER3D_Map *) map) != 1) {
+    if (Rast3d_close_cell((RASTER3D_Map *) map) != 1) {
 	G_warning(_("Unable to close 3D raster map <%s>"),
 	G_warning(_("Unable to close 3D raster map <%s>"),
 		  ((RASTER3D_Map *) map)->fileName);
 		  ((RASTER3D_Map *) map)->fileName);
 	return (-1);
 	return (-1);
@@ -492,12 +492,12 @@ int read_g3d_value(IFLAG type, void *map, int x, int y, int z, void *value)
     switch (type) {
     switch (type) {
 	/* float data type */
 	/* float data type */
     case (VOL_DTYPE_FLOAT):
     case (VOL_DTYPE_FLOAT):
-	*((float *)value) = Rast3d_getFloat(map, x, y, z);
+	*((float *)value) = Rast3d_get_float(map, x, y, z);
 	break;
 	break;
 
 
 	/* double data type */
 	/* double data type */
     case (VOL_DTYPE_DOUBLE):
     case (VOL_DTYPE_DOUBLE):
-	*((double *)value) = Rast3d_getDouble(map, x, y, z);
+	*((double *)value) = Rast3d_get_double(map, x, y, z);
 	break;
 	break;
 
 
 	/* unsupported data type */
 	/* unsupported data type */
@@ -529,7 +529,7 @@ int read_g3d_slice(IFLAG type, void *map, int level, void *data)
 	for (x = 0; x < Cols; x++) {
 	for (x = 0; x < Cols; x++) {
 	    for (y = 0; y < Rows; y++) {
 	    for (y = 0; y < Rows; y++) {
 		((float *)data)[x + y * Cols] =
 		((float *)data)[x + y * Cols] =
-		    Rast3d_getFloat(map, x, y, level);
+		    Rast3d_get_float(map, x, y, level);
 	    }
 	    }
 	}
 	}
 
 
@@ -540,7 +540,7 @@ int read_g3d_slice(IFLAG type, void *map, int level, void *data)
 	for (x = 0; x < Cols; x++) {
 	for (x = 0; x < Cols; x++) {
 	    for (y = 0; y < Rows; y++) {
 	    for (y = 0; y < Rows; y++) {
 		((double *)data)[x + y * Cols] =
 		((double *)data)[x + y * Cols] =
-		    Rast3d_getDouble(map, x, y, level);
+		    Rast3d_get_double(map, x, y, level);
 	    }
 	    }
 	}
 	}
 
 
@@ -575,7 +575,7 @@ int read_g3d_vol(IFLAG type, void *map, void *data)
 	    for (y = 0; y < Rows; y++) {
 	    for (y = 0; y < Rows; y++) {
 		for (z = 0; z < Depths; z++) {
 		for (z = 0; z < Depths; z++) {
 		    ((float *)data)[x + y * Cols + z * Rows * Cols] =
 		    ((float *)data)[x + y * Cols + z * Rows * Cols] =
-			Rast3d_getFloat(map, x, y, z);
+			Rast3d_get_float(map, x, y, z);
 		}
 		}
 	    }
 	    }
 	}
 	}
@@ -588,7 +588,7 @@ int read_g3d_vol(IFLAG type, void *map, void *data)
 	    for (y = 0; y < Rows; y++) {
 	    for (y = 0; y < Rows; y++) {
 		for (z = 0; z < Depths; z++) {
 		for (z = 0; z < Depths; z++) {
 		    ((double *)data)[x + y * Cols + z * Rows * Cols] =
 		    ((double *)data)[x + y * Cols + z * Rows * Cols] =
-			Rast3d_getDouble(map, x, y, z);
+			Rast3d_get_double(map, x, y, z);
 		}
 		}
 	    }
 	    }
 	}
 	}
@@ -618,12 +618,12 @@ int is_null_g3d_value(IFLAG type, void *value)
     switch (type) {
     switch (type) {
 	/* float data type */
 	/* float data type */
     case (VOL_DTYPE_FLOAT):
     case (VOL_DTYPE_FLOAT):
-	return Rast3d_isNullValueNum(value, FCELL_TYPE);
+	return Rast3d_is_null_value_num(value, FCELL_TYPE);
 	break;
 	break;
 
 
 	/* double data type */
 	/* double data type */
     case (VOL_DTYPE_DOUBLE):
     case (VOL_DTYPE_DOUBLE):
-	return Rast3d_isNullValueNum(value, DCELL_TYPE);
+	return Rast3d_is_null_value_num(value, DCELL_TYPE);
 	break;
 	break;
 
 
 	/* unsupported data type */
 	/* unsupported data type */

+ 21 - 21
lib/raster3d/cache.c

@@ -11,8 +11,8 @@ static int cacheRead_readFun(int tileIndex, void *tileBuf, void *closure)
 {
 {
     RASTER3D_Map *map = closure;
     RASTER3D_Map *map = closure;
 
 
-    if (!Rast3d_readTile(map, tileIndex, tileBuf, map->typeIntern)) {
-	Rast3d_error("cacheRead_readFun: error in Rast3d_readTile");
+    if (!Rast3d_read_tile(map, tileIndex, tileBuf, map->typeIntern)) {
+	Rast3d_error("cacheRead_readFun: error in Rast3d_read_tile");
 	return 0;
 	return 0;
     }
     }
     return 1;
     return 1;
@@ -62,8 +62,8 @@ static int cacheWrite_readFun(int tileIndex, void *tileBuf, void *closure)
     pos = map->index[tileIndex];
     pos = map->index[tileIndex];
 
 
     /* tile has already been flushed onto output file or does not exist yet */
     /* tile has already been flushed onto output file or does not exist yet */
-    if (pos >= -1) {		/* note, Rast3d_readTile takes care of the case pos == -1 */
-	Rast3d_readTile(map, tileIndex, tileBuf, map->typeIntern);
+    if (pos >= -1) {		/* note, Rast3d_read_tile takes care of the case pos == -1 */
+	Rast3d_read_tile(map, tileIndex, tileBuf, map->typeIntern);
 	return 1;
 	return 1;
     }
     }
 
 
@@ -212,18 +212,18 @@ static int initCacheWrite(RASTER3D_Map * map, int nCached)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_initCache(RASTER3D_Map * map, int nCached)
+int Rast3d_init_cache(RASTER3D_Map * map, int nCached)
 {
 {
     if (map->operation == RASTER3D_READ_DATA) {
     if (map->operation == RASTER3D_READ_DATA) {
 	if (!initCacheRead(map, nCached)) {
 	if (!initCacheRead(map, nCached)) {
-	    Rast3d_error("Rast3d_initCache: error in initCacheRead");
+	    Rast3d_error("Rast3d_init_cache: error in initCacheRead");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
     }
     }
 
 
     if (!initCacheWrite(map, nCached)) {
     if (!initCacheWrite(map, nCached)) {
-	Rast3d_error("Rast3d_initCache: error in initCacheWrite");
+	Rast3d_error("Rast3d_init_cache: error in initCacheWrite");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -240,18 +240,18 @@ static int disposeCacheRead(RASTER3D_Map * map)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_disposeCache(RASTER3D_Map * map)
+int Rast3d_dispose_cache(RASTER3D_Map * map)
 {
 {
     if (map->operation == RASTER3D_READ_DATA) {
     if (map->operation == RASTER3D_READ_DATA) {
 	if (!disposeCacheRead(map)) {
 	if (!disposeCacheRead(map)) {
-	    Rast3d_error("Rast3d_disposeCache: error in disposeCacheRead");
+	    Rast3d_error("Rast3d_dispose_cache: error in disposeCacheRead");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
     }
     }
 
 
     if (!disposeCacheWrite(map)) {
     if (!disposeCacheWrite(map)) {
-	Rast3d_error("Rast3d_disposeCache: error in disposeCacheWrite");
+	Rast3d_error("Rast3d_dispose_cache: error in disposeCacheWrite");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -265,8 +265,8 @@ static int cacheFlushFun(int tileIndex, const void *tileBuf, void *closure)
 {
 {
     RASTER3D_Map *map = closure;
     RASTER3D_Map *map = closure;
 
 
-    if (!Rast3d_writeTile(map, tileIndex, tileBuf, map->typeIntern)) {
-	Rast3d_error("cacheFlushFun: error in Rast3d_writeTile");
+    if (!Rast3d_write_tile(map, tileIndex, tileBuf, map->typeIntern)) {
+	Rast3d_error("cacheFlushFun: error in Rast3d_write_tile");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -275,21 +275,21 @@ static int cacheFlushFun(int tileIndex, const void *tileBuf, void *closure)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_flushAllTiles(RASTER3D_Map * map)
+int Rast3d_flush_all_tiles(RASTER3D_Map * map)
 {
 {
     int tileIndex, nBytes;
     int tileIndex, nBytes;
     long offs;
     long offs;
 
 
     if (map->operation == RASTER3D_READ_DATA) {
     if (map->operation == RASTER3D_READ_DATA) {
 	if (!Rast3d_cache_remove_all(map->cache)) {
 	if (!Rast3d_cache_remove_all(map->cache)) {
-	    Rast3d_error("Rast3d_flushAllTiles: error in Rast3d_cache_remove_all");
+	    Rast3d_error("Rast3d_flush_all_tiles: error in Rast3d_cache_remove_all");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
     }
     }
 
 
     /* make cache write into output file instead of cache file */
     /* make cache write into output file instead of cache file */
-    Rast3d_cache_set_removeFun(map->cache, cacheFlushFun, map);
+    Rast3d_cache_set_remove_fun(map->cache, cacheFlushFun, map);
 
 
     /* first flush all the tiles which are in the file cache */
     /* first flush all the tiles which are in the file cache */
 
 
@@ -299,32 +299,32 @@ int Rast3d_flushAllTiles(RASTER3D_Map * map)
 	offs = map->cachePosLast * (nBytes + sizeof(int)) + nBytes;
 	offs = map->cachePosLast * (nBytes + sizeof(int)) + nBytes;
 
 
 	if (lseek(map->cacheFD, offs, SEEK_SET) == -1) {
 	if (lseek(map->cacheFD, offs, SEEK_SET) == -1) {
-	    Rast3d_error("Rast3d_flushAllTiles: can't position file");
+	    Rast3d_error("Rast3d_flush_all_tiles: can't position file");
 	    return 0;
 	    return 0;
 	}
 	}
 	if (read(map->cacheFD, &tileIndex, sizeof(int)) != sizeof(int)) {
 	if (read(map->cacheFD, &tileIndex, sizeof(int)) != sizeof(int)) {
-	    Rast3d_error("Rast3d_flushAllTiles: can't read file");
+	    Rast3d_error("Rast3d_flush_all_tiles: can't read file");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!Rast3d_cache_load(map->cache, tileIndex)) {
 	if (!Rast3d_cache_load(map->cache, tileIndex)) {
-	    Rast3d_error("Rast3d_flushAllTiles: error in Rast3d_cache_load");
+	    Rast3d_error("Rast3d_flush_all_tiles: error in Rast3d_cache_load");
 	    return 0;
 	    return 0;
 	}
 	}
 	if (!Rast3d_cache_flush(map->cache, tileIndex)) {
 	if (!Rast3d_cache_flush(map->cache, tileIndex)) {
-	    Rast3d_error("Rast3d_flushAllTiles: error in Rast3d_cache_flush");
+	    Rast3d_error("Rast3d_flush_all_tiles: error in Rast3d_cache_flush");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
 
 
     /* then flush all the tiles which remain in the non-file cache */
     /* then flush all the tiles which remain in the non-file cache */
     if (!Rast3d_cache_flush_all(map->cache)) {
     if (!Rast3d_cache_flush_all(map->cache)) {
-	Rast3d_error("Rast3d_flushAllTiles: error in Rast3d_cache_flush_all");
+	Rast3d_error("Rast3d_flush_all_tiles: error in Rast3d_cache_flush_all");
 	return 0;
 	return 0;
     }
     }
 
 
     /* now the cache should write into the cache file again */
     /* now the cache should write into the cache file again */
-    Rast3d_cache_set_removeFun(map->cache, cacheWrite_writeFun, map);
+    Rast3d_cache_set_remove_fun(map->cache, cacheWrite_writeFun, map);
 
 
     return 1;
     return 1;
 }
 }

+ 7 - 7
lib/raster3d/cache1.c

@@ -135,7 +135,7 @@ void *Rast3d_cache_new(int nofElts, int sizeOfElts, int nofNames,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_cache_set_removeFun(RASTER3D_cache * c, int (*eltRemoveFun) (),
+Rast3d_cache_set_remove_fun(RASTER3D_cache * c, int (*eltRemoveFun) (),
 			void *eltRemoveFunData)
 			void *eltRemoveFunData)
 {
 {
     c->eltRemoveFun = eltRemoveFun;
     c->eltRemoveFun = eltRemoveFun;
@@ -145,7 +145,7 @@ Rast3d_cache_set_removeFun(RASTER3D_cache * c, int (*eltRemoveFun) (),
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_cache_set_loadFun(RASTER3D_cache * c, int (*eltLoadFun) (),
+Rast3d_cache_set_load_fun(RASTER3D_cache * c, int (*eltLoadFun) (),
 		      void *eltLoadFunData)
 		      void *eltLoadFunData)
 {
 {
     c->eltLoadFun = eltLoadFun;
     c->eltLoadFun = eltLoadFun;
@@ -166,7 +166,7 @@ void *Rast3d_cache_new_read(int nofElts, int sizeOfElts, int nofNames,
 static void cache_queue_dequeue(RASTER3D_cache * c, int index)
 static void cache_queue_dequeue(RASTER3D_cache * c, int index)
 {
 {
     if (IS_NOT_IN_QUEUE_ELT(index))
     if (IS_NOT_IN_QUEUE_ELT(index))
-	Rast3d_fatalError("cache_queue_dequeue: index not in queue");
+	Rast3d_fatal_error("cache_queue_dequeue: index not in queue");
 
 
     if (index == c->first)
     if (index == c->first)
 	c->first = c->next[index];
 	c->first = c->next[index];
@@ -186,18 +186,18 @@ static void cache_queue_dequeue(RASTER3D_cache * c, int index)
 static void cache_queue_enqueue(RASTER3D_cache * c, int left, int index)
 static void cache_queue_enqueue(RASTER3D_cache * c, int left, int index)
 {
 {
     if (IS_IN_QUEUE_ELT(index))
     if (IS_IN_QUEUE_ELT(index))
-	Rast3d_fatalError("cache_queue_enqueue: index already in queue");
+	Rast3d_fatal_error("cache_queue_enqueue: index already in queue");
 
 
     if (c->first == -1) {
     if (c->first == -1) {
 	if (left != c->last)
 	if (left != c->last)
-	    Rast3d_fatalError("cache_queue_enqueue: position out of range");
+	    Rast3d_fatal_error("cache_queue_enqueue: position out of range");
 
 
 	c->first = c->last = index;
 	c->first = c->last = index;
 	return;
 	return;
     }
     }
 
 
     if (IS_NOT_IN_QUEUE_ELT(left))
     if (IS_NOT_IN_QUEUE_ELT(left))
-	Rast3d_fatalError("cache_queue_enqueue: position not in queue");
+	Rast3d_fatal_error("cache_queue_enqueue: position not in queue");
 
 
 
 
     if (left == -1) {
     if (left == -1) {
@@ -359,7 +359,7 @@ void Rast3d_cache_autolock_off(RASTER3D_cache * c)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void Rast3d_cache_set_minUnlock(RASTER3D_cache * c, int nofMinUnLocked)
+void Rast3d_cache_set_min_unlock(RASTER3D_cache * c, int nofMinUnLocked)
 {
 {
     c->minUnlocked = nofMinUnLocked;
     c->minUnlocked = nofMinUnLocked;
 }
 }

+ 4 - 4
lib/raster3d/cachehash.c

@@ -77,10 +77,10 @@ void *Rast3d_cache_hash_new(int nofNames)
 void Rast3d_cache_hash_remove_name(Rast3d_cache_hash * h, int name)
 void Rast3d_cache_hash_remove_name(Rast3d_cache_hash * h, int name)
 {
 {
     if (name >= h->nofNames)
     if (name >= h->nofNames)
-	Rast3d_fatalError("Rast3d_cache_hash_remove_name: name out of range");
+	Rast3d_fatal_error("Rast3d_cache_hash_remove_name: name out of range");
 
 
     if (h->active[name] == 0)
     if (h->active[name] == 0)
-	Rast3d_fatalError("Rast3d_cache_hash_remove_name: name not in hashtable");
+	Rast3d_fatal_error("Rast3d_cache_hash_remove_name: name not in hashtable");
 
 
     h->active[name] = 0;
     h->active[name] = 0;
     if (name == h->lastName)
     if (name == h->lastName)
@@ -92,10 +92,10 @@ void Rast3d_cache_hash_remove_name(Rast3d_cache_hash * h, int name)
 void Rast3d_cache_hash_load_name(Rast3d_cache_hash * h, int name, int index)
 void Rast3d_cache_hash_load_name(Rast3d_cache_hash * h, int name, int index)
 {
 {
     if (name >= h->nofNames)
     if (name >= h->nofNames)
-	Rast3d_fatalError("Rast3d_cache_hash_load_name: name out of range");
+	Rast3d_fatal_error("Rast3d_cache_hash_load_name: name out of range");
 
 
     if (h->active[name] != 0)
     if (h->active[name] != 0)
-	Rast3d_fatalError("Rast3d_cache_hash_load_name: name already in hashtable");
+	Rast3d_fatal_error("Rast3d_cache_hash_load_name: name already in hashtable");
 
 
     h->index[name] = index;
     h->index[name] = index;
     h->active[name] = 1;
     h->active[name] = 1;

+ 2 - 2
lib/raster3d/cats.c

@@ -26,7 +26,7 @@
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_writeCats(const char *name, struct Categories *cats)
+int Rast3d_write_cats(const char *name, struct Categories *cats)
  /* adapted from Rast_write_cats */
  /* adapted from Rast_write_cats */
 {
 {
     FILE *fd;
     FILE *fd;
@@ -176,7 +176,7 @@ read_cats(const char *name, const char *mapset, struct Categories *pcats)
  */
  */
 
 
 int
 int
-Rast3d_readCats(const char *name, const char *mapset, struct Categories *pcats)
+Rast3d_read_cats(const char *name, const char *mapset, struct Categories *pcats)
  /* adapted from Rast_read_cats */
  /* adapted from Rast_read_cats */
 {
 {
     const char *type;
     const char *type;

+ 28 - 28
lib/raster3d/changeprecision.c

@@ -20,7 +20,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_changePrecision(void *map, int precision, const char *nameOut)
+void Rast3d_change_precision(void *map, int precision, const char *nameOut)
 {
 {
     void *map2;
     void *map2;
     int x, y, z, savePrecision, saveCompression, saveLzw, saveRle;
     int x, y, z, savePrecision, saveCompression, saveLzw, saveRle;
@@ -30,47 +30,47 @@ void Rast3d_changePrecision(void *map, int precision, const char *nameOut)
     int nx, ny, nz;
     int nx, ny, nz;
     int tileXsave, tileYsave, tileZsave, tileX, tileY, tileZ, saveType;
     int tileXsave, tileYsave, tileZsave, tileX, tileY, tileZ, saveType;
 
 
-    saveType = Rast3d_getFileType();
-    /*   Rast3d_setFileType (Rast3d_fileTypeMap (map)); */
-    Rast3d_getCompressionMode(&saveCompression, &saveLzw, &saveRle,
+    saveType = Rast3d_get_file_type();
+    /*   Rast3d_set_file_type (Rast3d_file_type_map (map)); */
+    Rast3d_get_compression_mode(&saveCompression, &saveLzw, &saveRle,
 			   &savePrecision);
 			   &savePrecision);
-    Rast3d_setCompressionMode(RASTER3D_COMPRESSION, saveLzw, saveRle, precision);
-    Rast3d_getTileDimension(&tileXsave, &tileYsave, &tileZsave);
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
-    Rast3d_setTileDimension(tileX, tileY, tileZ);
+    Rast3d_set_compression_mode(RASTER3D_COMPRESSION, saveLzw, saveRle, precision);
+    Rast3d_get_tile_dimension(&tileXsave, &tileYsave, &tileZsave);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
+    Rast3d_set_tile_dimension(tileX, tileY, tileZ);
 
 
-    typeIntern = Rast3d_tileTypeMap(map);
-    Rast3d_getRegionStructMap(map, &region);
+    typeIntern = Rast3d_tile_type_map(map);
+    Rast3d_get_region_struct_map(map, &region);
 
 
     map2 =
     map2 =
-	Rast3d_openCellNew(nameOut, typeIntern, RASTER3D_USE_CACHE_DEFAULT, &region);
+	Rast3d_open_cell_new(nameOut, typeIntern, RASTER3D_USE_CACHE_DEFAULT, &region);
     if (map2 == NULL)
     if (map2 == NULL)
-	Rast3d_fatalError("Rast3d_changePrecision: error in Rast3d_openCellNew");
+	Rast3d_fatal_error("Rast3d_change_precision: error in Rast3d_open_cell_new");
 
 
-    Rast3d_setFileType(saveType);
-    Rast3d_setCompressionMode(saveCompression, saveLzw, saveRle, savePrecision);
-    Rast3d_setTileDimension(tileXsave, tileYsave, tileZsave);
+    Rast3d_set_file_type(saveType);
+    Rast3d_set_compression_mode(saveCompression, saveLzw, saveRle, savePrecision);
+    Rast3d_set_tile_dimension(tileXsave, tileYsave, tileZsave);
 
 
-    data = Rast3d_allocTiles(map, 1);
+    data = Rast3d_alloc_tiles(map, 1);
     if (data == NULL)
     if (data == NULL)
-	Rast3d_fatalError("Rast3d_changePrecision: error in Rast3d_allocTiles");
-    Rast3d_getNofTilesMap(map2, &nx, &ny, &nz);
+	Rast3d_fatal_error("Rast3d_change_precision: error in Rast3d_alloc_tiles");
+    Rast3d_get_nof_tiles_map(map2, &nx, &ny, &nz);
 
 
     for (z = 0; z < nz; z++)
     for (z = 0; z < nz; z++)
 	for (y = 0; y < ny; y++)
 	for (y = 0; y < ny; y++)
 	    for (x = 0; x < nx; x++) {
 	    for (x = 0; x < nx; x++) {
-		if (!Rast3d_readTile(map, Rast3d_tile2tileIndex(map, x, y, z), data,
+		if (!Rast3d_read_tile(map, Rast3d_tile2tile_index(map, x, y, z), data,
 				  typeIntern))
 				  typeIntern))
-		    Rast3d_fatalError
-			("Rast3d_changePrecision: error in Rast3d_readTile");
-		if (!Rast3d_writeTile
-		    (map2, Rast3d_tile2tileIndex(map2, x, y, z), data,
+		    Rast3d_fatal_error
+			("Rast3d_change_precision: error in Rast3d_read_tile");
+		if (!Rast3d_write_tile
+		    (map2, Rast3d_tile2tile_index(map2, x, y, z), data,
 		     typeIntern))
 		     typeIntern))
-		    Rast3d_fatalError
-			("Rast3d_changePrecision: error in Rast3d_writeTile");
+		    Rast3d_fatal_error
+			("Rast3d_change_precision: error in Rast3d_write_tile");
 	    }
 	    }
 
 
-    Rast3d_freeTiles(data);
-    if (!Rast3d_closeCell(map2))
-	Rast3d_fatalError("Rast3d_changePrecision: error in Rast3d_closeCell");
+    Rast3d_free_tiles(data);
+    if (!Rast3d_close_cell(map2))
+	Rast3d_fatal_error("Rast3d_change_precision: error in Rast3d_close_cell");
 }
 }

+ 28 - 28
lib/raster3d/changetype.c

@@ -21,7 +21,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_changeType(void *map, const char *nameOut)
+void Rast3d_change_type(void *map, const char *nameOut)
 {
 {
     void *map2;
     void *map2;
     int x, y, z, saveType;
     int x, y, z, saveType;
@@ -31,51 +31,51 @@ void Rast3d_changeType(void *map, const char *nameOut)
     int tileX, tileY, tileZ, typeIntern, typeIntern2;
     int tileX, tileY, tileZ, typeIntern, typeIntern2;
     int tileXsave, tileYsave, tileZsave, nx, ny, nz;
     int tileXsave, tileYsave, tileZsave, nx, ny, nz;
 
 
-    saveType = Rast3d_getFileType();
-    Rast3d_setFileType(Rast3d_fileTypeMap(map) == FCELL_TYPE ?
+    saveType = Rast3d_get_file_type();
+    Rast3d_set_file_type(Rast3d_file_type_map(map) == FCELL_TYPE ?
 		    DCELL_TYPE : FCELL_TYPE);
 		    DCELL_TYPE : FCELL_TYPE);
-    Rast3d_getTileDimension(&tileXsave, &tileYsave, &tileZsave);
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
-    Rast3d_setTileDimension(tileX, tileY, tileZ);
+    Rast3d_get_tile_dimension(&tileXsave, &tileYsave, &tileZsave);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
+    Rast3d_set_tile_dimension(tileX, tileY, tileZ);
 
 
-    Rast3d_getRegionStructMap(map, &region);
+    Rast3d_get_region_struct_map(map, &region);
     map2 =
     map2 =
-	Rast3d_openCellNew(nameOut, FCELL_TYPE, RASTER3D_USE_CACHE_DEFAULT, &region);
+	Rast3d_open_cell_new(nameOut, FCELL_TYPE, RASTER3D_USE_CACHE_DEFAULT, &region);
 
 
     if (map2 == NULL)
     if (map2 == NULL)
-	Rast3d_fatalError("Rast3d_changeType: error in Rast3d_openCellNew");
+	Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_open_cell_new");
 
 
-    Rast3d_setFileType(saveType);
-    Rast3d_setTileDimension(tileXsave, tileYsave, tileZsave);
+    Rast3d_set_file_type(saveType);
+    Rast3d_set_tile_dimension(tileXsave, tileYsave, tileZsave);
 
 
-    data = Rast3d_allocTiles(map, 1);
+    data = Rast3d_alloc_tiles(map, 1);
     if (data == NULL)
     if (data == NULL)
-	Rast3d_fatalError("Rast3d_changeType: error in Rast3d_allocTiles");
-    data2 = Rast3d_allocTiles(map2, 1);
+	Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_alloc_tiles");
+    data2 = Rast3d_alloc_tiles(map2, 1);
     if (data2 == NULL)
     if (data2 == NULL)
-	Rast3d_fatalError("Rast3d_changeType: error in Rast3d_allocTiles");
+	Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_alloc_tiles");
 
 
-    Rast3d_getNofTilesMap(map2, &nx, &ny, &nz);
-    typeIntern = Rast3d_tileTypeMap(map);
-    typeIntern2 = Rast3d_tileTypeMap(map2);
+    Rast3d_get_nof_tiles_map(map2, &nx, &ny, &nz);
+    typeIntern = Rast3d_tile_type_map(map);
+    typeIntern2 = Rast3d_tile_type_map(map2);
     tileSize = tileX * tileY * tileZ;
     tileSize = tileX * tileY * tileZ;
 
 
     for (z = 0; z < nz; z++)
     for (z = 0; z < nz; z++)
 	for (y = 0; y < ny; y++)
 	for (y = 0; y < ny; y++)
 	    for (x = 0; x < nx; x++) {
 	    for (x = 0; x < nx; x++) {
-		if (!Rast3d_readTile(map, Rast3d_tile2tileIndex(map, x, y, z), data,
+		if (!Rast3d_read_tile(map, Rast3d_tile2tile_index(map, x, y, z), data,
 				  typeIntern))
 				  typeIntern))
-		    Rast3d_fatalError("Rast3d_changeType: error in Rast3d_readTile");
-		Rast3d_copyValues(data, 0, typeIntern, data2, 0, typeIntern2,
+		    Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_read_tile");
+		Rast3d_copy_values(data, 0, typeIntern, data2, 0, typeIntern2,
 			       tileSize);
 			       tileSize);
-		if (!Rast3d_writeTile
-		    (map2, Rast3d_tile2tileIndex(map2, x, y, z), data2,
+		if (!Rast3d_write_tile
+		    (map2, Rast3d_tile2tile_index(map2, x, y, z), data2,
 		     typeIntern2))
 		     typeIntern2))
-		    Rast3d_fatalError("Rast3d_changeType: error in Rast3d_writeTile");
+		    Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_write_tile");
 	    }
 	    }
 
 
-    Rast3d_freeTiles(data);
-    Rast3d_freeTiles(data2);
-    if (!Rast3d_closeCell(map2))
-	Rast3d_fatalError("Rast3d_changeType: error in Rast3d_closeCell");
+    Rast3d_free_tiles(data);
+    Rast3d_free_tiles(data2);
+    if (!Rast3d_close_cell(map2))
+	Rast3d_fatal_error("Rast3d_change_type: error in Rast3d_close_cell");
 }
 }

+ 16 - 16
lib/raster3d/close.c

@@ -18,11 +18,11 @@ static int Rast3d_closeNew(RASTER3D_Map * map)
     struct Categories cats;
     struct Categories cats;
     struct History hist;
     struct History hist;
 
 
-    Rast3d_removeColor(map->fileName);
+    Rast3d_remove_color(map->fileName);
 
 
     /* create empty cats file */
     /* create empty cats file */
     Rast_init_cats(NULL, &cats);
     Rast_init_cats(NULL, &cats);
-    Rast3d_writeCats(map->fileName, &cats);
+    Rast3d_write_cats(map->fileName, &cats);
     Rast_free_cats(&cats);
     Rast_free_cats(&cats);
 
 
     /*genrate the history file, use the normal G_ functions */
     /*genrate the history file, use the normal G_ functions */
@@ -30,7 +30,7 @@ static int Rast3d_closeNew(RASTER3D_Map * map)
     Rast_command_history(&hist);
     Rast_command_history(&hist);
     /*Use the G3d function to write the history file,
     /*Use the G3d function to write the history file,
      * otherwise the path is wrong */
      * otherwise the path is wrong */
-    if (!Rast3d_writeHistory(map->fileName, &hist)) {
+    if (!Rast3d_write_history(map->fileName, &hist)) {
 	Rast3d_error("Rast3d_closeNew: can't write raster3d history");
 	Rast3d_error("Rast3d_closeNew: can't write raster3d history");
     }
     }
 
 
@@ -66,13 +66,13 @@ static int Rast3d_closeCellNew(RASTER3D_Map * map)
     long ltmp;
     long ltmp;
 
 
     if (map->useCache)
     if (map->useCache)
-	if (!Rast3d_flushAllTiles(map)) {
-	    Rast3d_error("Rast3d_closeCellNew: error in Rast3d_flushAllTiles");
+	if (!Rast3d_flush_all_tiles(map)) {
+	    Rast3d_error("Rast3d_closeCellNew: error in Rast3d_flush_all_tiles");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
-    if (!Rast3d_flushIndex(map)) {
-	Rast3d_error("Rast3d_closeCellNew: error in Rast3d_flushIndex");
+    if (!Rast3d_flush_index(map)) {
+	Rast3d_error("Rast3d_closeCellNew: error in Rast3d_flush_index");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -86,12 +86,12 @@ static int Rast3d_closeCellNew(RASTER3D_Map * map)
 	return 0;
 	return 0;
     }
     }
 
 
-    if (!Rast3d_writeInts(map->data_fd, map->useXdr, &(map->indexNbytesUsed), 1)) {
+    if (!Rast3d_write_ints(map->data_fd, map->useXdr, &(map->indexNbytesUsed), 1)) {
 	Rast3d_error("Rast3d_closeCellNew: can't write header");
 	Rast3d_error("Rast3d_closeCellNew: can't write header");
 	return 0;
 	return 0;
     }
     }
 
 
-    Rast3d_longEncode(&(map->indexOffset), (unsigned char *)&ltmp, 1);
+    Rast3d_long_encode(&(map->indexOffset), (unsigned char *)&ltmp, 1);
     if (write(map->data_fd, &ltmp, sizeof(long)) != sizeof(long)) {
     if (write(map->data_fd, &ltmp, sizeof(long)) != sizeof(long)) {
 	Rast3d_error("Rast3d_closeCellNew: can't write header");
 	Rast3d_error("Rast3d_closeCellNew: can't write header");
 	return 0;
 	return 0;
@@ -144,17 +144,17 @@ static int Rast3d_closeCellOld(RASTER3D_Map * map)
  *          0 ...  otherwise.
  *          0 ...  otherwise.
  */
  */
 
 
-int Rast3d_closeCell(RASTER3D_Map * map)
+int Rast3d_close_cell(RASTER3D_Map * map)
 {
 {
     if (map->operation == RASTER3D_WRITE_DATA) {
     if (map->operation == RASTER3D_WRITE_DATA) {
 	if (!Rast3d_closeCellNew(map)) {
 	if (!Rast3d_closeCellNew(map)) {
-	    Rast3d_error("Rast3d_closeCell: error in Rast3d_closeCellNew");
+	    Rast3d_error("Rast3d_close_cell: error in Rast3d_closeCellNew");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
     else {
     else {
 	if (!Rast3d_closeCellOld(map) != 0) {
 	if (!Rast3d_closeCellOld(map) != 0) {
-	    Rast3d_error("Rast3d_closeCell: error in Rast3d_closeCellOld");
+	    Rast3d_error("Rast3d_close_cell: error in Rast3d_closeCellOld");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
@@ -163,8 +163,8 @@ int Rast3d_closeCell(RASTER3D_Map * map)
     Rast3d_free(map->tileLength);
     Rast3d_free(map->tileLength);
 
 
     if (map->useCache) {
     if (map->useCache) {
-	if (!Rast3d_disposeCache(map)) {
-	    Rast3d_error("Rast3d_closeCell: error in Rast3d_disposeCache");
+	if (!Rast3d_dispose_cache(map)) {
+	    Rast3d_error("Rast3d_close_cell: error in Rast3d_dispose_cache");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
@@ -172,7 +172,7 @@ int Rast3d_closeCell(RASTER3D_Map * map)
 	Rast3d_free(map->data);
 	Rast3d_free(map->data);
 
 
     if (map->operation == RASTER3D_WRITE_DATA)
     if (map->operation == RASTER3D_WRITE_DATA)
-	if (!Rast3d_writeHeader(map,
+	if (!Rast3d_write_header(map,
 			     map->region.proj, map->region.zone,
 			     map->region.proj, map->region.zone,
 			     map->region.north, map->region.south,
 			     map->region.north, map->region.south,
 			     map->region.east, map->region.west,
 			     map->region.east, map->region.west,
@@ -186,7 +186,7 @@ int Rast3d_closeCell(RASTER3D_Map * map)
 			     map->compression, map->useRle, map->useLzw,
 			     map->compression, map->useRle, map->useLzw,
 			     map->precision, map->offset, map->useXdr,
 			     map->precision, map->offset, map->useXdr,
 			     map->hasIndex, map->unit)) {
 			     map->hasIndex, map->unit)) {
-	    Rast3d_error("Rast3d_closeCell: error in Rast3d_writeHeader");
+	    Rast3d_error("Rast3d_close_cell: error in Rast3d_write_header");
 	    return 0;
 	    return 0;
 	}
 	}
 
 

+ 4 - 4
lib/raster3d/color.c

@@ -19,7 +19,7 @@ static int read_old_colors(FILE *, struct Colors *);
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_removeColor(const char *name)
+int Rast3d_remove_color(const char *name)
  /* adapted from G_remove_colr */
  /* adapted from G_remove_colr */
 {
 {
     return G_remove_misc(RASTER3D_DIRECTORY, RASTER3D_COLOR_ELEMENT, name);
     return G_remove_misc(RASTER3D_DIRECTORY, RASTER3D_COLOR_ELEMENT, name);
@@ -28,7 +28,7 @@ int Rast3d_removeColor(const char *name)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_readColors(const char *name, const char *mapset, struct Colors *colors)
+Rast3d_read_colors(const char *name, const char *mapset, struct Colors *colors)
  /* adapted from Rast_read_colors */
  /* adapted from Rast_read_colors */
 {
 {
     const char *err;
     const char *err;
@@ -41,7 +41,7 @@ Rast3d_readColors(const char *name, const char *mapset, struct Colors *colors)
 
 
     switch (read_colors(name, mapset, colors)) {
     switch (read_colors(name, mapset, colors)) {
     case -2:
     case -2:
-	if (Rast3d_readRange(name, mapset, &drange) >= 0) {
+	if (Rast3d_read_range(name, mapset, &drange) >= 0) {
 	    Rast_get_fp_range_min_max(&drange, &dmin, &dmax);
 	    Rast_get_fp_range_min_max(&drange, &dmin, &dmax);
 	    if (!Rast_is_d_null_value(&dmin) && !Rast_is_d_null_value(&dmax))
 	    if (!Rast_is_d_null_value(&dmin) && !Rast_is_d_null_value(&dmax))
 		Rast_make_rainbow_fp_colors(colors, dmin, dmax);
 		Rast_make_rainbow_fp_colors(colors, dmin, dmax);
@@ -324,7 +324,7 @@ static int read_old_colors(FILE * fd, struct Colors *colors)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_writeColors(const char *name, const char *mapset, struct Colors *colors)
+Rast3d_write_colors(const char *name, const char *mapset, struct Colors *colors)
  /* adapted from Rast_write_colors */
  /* adapted from Rast_write_colors */
 {
 {
     FILE *fd;
     FILE *fd;

+ 57 - 57
lib/raster3d/defaults.c

@@ -17,7 +17,7 @@
 #define RASTER3D_TILE_X_DEFAULT 16
 #define RASTER3D_TILE_X_DEFAULT 16
 #define RASTER3D_TILE_Y_DEFAULT 16
 #define RASTER3D_TILE_Y_DEFAULT 16
 #define RASTER3D_TILE_Z_DEFAULT 8
 #define RASTER3D_TILE_Z_DEFAULT 8
-#define RASTER3D_ERROR_FUN_DEFAULT Rast3d_skipError
+#define RASTER3D_ERROR_FUN_DEFAULT Rast3d_skip_error
 #define RASTER3D_UNIT_DEFAULT "none"
 #define RASTER3D_UNIT_DEFAULT "none"
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -82,10 +82,10 @@ char *g3d_unit_default = NULL;
  */
  */
 
 
 void
 void
-Rast3d_setCompressionMode(int doCompress, int doLzw, int doRle, int precision)
+Rast3d_set_compression_mode(int doCompress, int doLzw, int doRle, int precision)
 {
 {
     if ((doCompress != RASTER3D_NO_COMPRESSION) && (doCompress != RASTER3D_COMPRESSION))
     if ((doCompress != RASTER3D_NO_COMPRESSION) && (doCompress != RASTER3D_COMPRESSION))
-	Rast3d_fatalError("Rast3d_setCompressionMode: wrong value for doCompress.");
+	Rast3d_fatal_error("Rast3d_set_compression_mode: wrong value for doCompress.");
 
 
     g3d_do_compression = doCompress;
     g3d_do_compression = doCompress;
 
 
@@ -93,13 +93,13 @@ Rast3d_setCompressionMode(int doCompress, int doLzw, int doRle, int precision)
 	return;
 	return;
 
 
     if ((doLzw != RASTER3D_NO_LZW) && (doLzw != RASTER3D_USE_LZW))
     if ((doLzw != RASTER3D_NO_LZW) && (doLzw != RASTER3D_USE_LZW))
-	Rast3d_fatalError("Rast3d_setCompressionMode: wrong value for doLzw.");
+	Rast3d_fatal_error("Rast3d_set_compression_mode: wrong value for doLzw.");
 
 
     if ((doRle != RASTER3D_NO_RLE) && (doRle != RASTER3D_USE_RLE))
     if ((doRle != RASTER3D_NO_RLE) && (doRle != RASTER3D_USE_RLE))
-	Rast3d_fatalError("Rast3d_setCompressionMode: wrong value for doRle.");
+	Rast3d_fatal_error("Rast3d_set_compression_mode: wrong value for doRle.");
 
 
     if (precision < -1)
     if (precision < -1)
-	Rast3d_fatalError("Rast3d_setCompressionMode: wrong value for precision.");
+	Rast3d_fatal_error("Rast3d_set_compression_mode: wrong value for precision.");
 
 
     g3d_do_lzw_compression = doLzw;
     g3d_do_lzw_compression = doLzw;
     g3d_do_rle_compression = doRle;
     g3d_do_rle_compression = doRle;
@@ -122,7 +122,7 @@ Rast3d_setCompressionMode(int doCompress, int doLzw, int doRle, int precision)
  */
  */
 
 
 void
 void
-Rast3d_getCompressionMode(int *doCompress, int *doLzw, int *doRle,
+Rast3d_get_compression_mode(int *doCompress, int *doLzw, int *doRle,
 		       int *precision)
 		       int *precision)
 {
 {
     if (doCompress != NULL)
     if (doCompress != NULL)
@@ -147,10 +147,10 @@ Rast3d_getCompressionMode(int *doCompress, int *doLzw, int *doRle,
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setCacheSize(int nTiles)
+void Rast3d_set_cache_size(int nTiles)
 {
 {
     if (nTiles < 0)
     if (nTiles < 0)
-	Rast3d_fatalError("Rast3d_setCacheSize: size out of range.");
+	Rast3d_fatal_error("Rast3d_set_cache_size: size out of range.");
 
 
     g3d_cache_default = nTiles;
     g3d_cache_default = nTiles;
 }
 }
@@ -166,7 +166,7 @@ void Rast3d_setCacheSize(int nTiles)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_getCacheSize()
+int Rast3d_get_cache_size()
 {
 {
     return g3d_cache_default;
     return g3d_cache_default;
 }
 }
@@ -183,10 +183,10 @@ int Rast3d_getCacheSize()
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setCacheLimit(int nBytes)
+void Rast3d_set_cache_limit(int nBytes)
 {
 {
     if (nBytes <= 0)
     if (nBytes <= 0)
-	Rast3d_fatalError("Rast3d_setCacheLimit: size out of range.");
+	Rast3d_fatal_error("Rast3d_set_cache_limit: size out of range.");
 
 
     g3d_cache_max = nBytes;
     g3d_cache_max = nBytes;
 }
 }
@@ -203,7 +203,7 @@ void Rast3d_setCacheLimit(int nBytes)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_getCacheLimit()
+int Rast3d_get_cache_limit()
 {
 {
     return g3d_cache_max;
     return g3d_cache_max;
 }
 }
@@ -220,10 +220,10 @@ int Rast3d_getCacheLimit()
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setFileType(int type)
+void Rast3d_set_file_type(int type)
 {
 {
     if ((type != FCELL_TYPE) && (type != DCELL_TYPE))
     if ((type != FCELL_TYPE) && (type != DCELL_TYPE))
-	Rast3d_fatalError("Rast3d_setFileTypeDefault: invalid type");
+	Rast3d_fatal_error("Rast3d_setFileTypeDefault: invalid type");
 
 
     g3d_file_type = type;
     g3d_file_type = type;
 }
 }
@@ -240,7 +240,7 @@ void Rast3d_setFileType(int type)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_getFileType()
+int Rast3d_get_file_type()
 {
 {
     return g3d_file_type;
     return g3d_file_type;
 }
 }
@@ -259,19 +259,19 @@ int Rast3d_getFileType()
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setTileDimension(int tileX, int tileY, int tileZ)
+void Rast3d_set_tile_dimension(int tileX, int tileY, int tileZ)
 {
 {
     if ((g3d_tile_dimension[0] = tileX) <= 0)
     if ((g3d_tile_dimension[0] = tileX) <= 0)
-	Rast3d_fatalError
-	    ("Rast3d_setTileDimension: value for tile x environment variable out of range");
+	Rast3d_fatal_error
+	    ("Rast3d_set_tile_dimension: value for tile x environment variable out of range");
 
 
     if ((g3d_tile_dimension[1] = tileY) <= 0)
     if ((g3d_tile_dimension[1] = tileY) <= 0)
-	Rast3d_fatalError
-	    ("Rast3d_setTileDimension: value for tile y environment variable out of range");
+	Rast3d_fatal_error
+	    ("Rast3d_set_tile_dimension: value for tile y environment variable out of range");
 
 
     if ((g3d_tile_dimension[2] = tileZ) <= 0)
     if ((g3d_tile_dimension[2] = tileZ) <= 0)
-	Rast3d_fatalError
-	    ("Rast3d_setTileDimension: value for tile z environment variable out of range");
+	Rast3d_fatal_error
+	    ("Rast3d_set_tile_dimension: value for tile z environment variable out of range");
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -288,7 +288,7 @@ void Rast3d_setTileDimension(int tileX, int tileY, int tileZ)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getTileDimension(int *tileX, int *tileY, int *tileZ)
+void Rast3d_get_tile_dimension(int *tileX, int *tileY, int *tileZ)
 {
 {
     *tileX = g3d_tile_dimension[0];
     *tileX = g3d_tile_dimension[0];
     *tileY = g3d_tile_dimension[1];
     *tileY = g3d_tile_dimension[1];
@@ -307,7 +307,7 @@ void Rast3d_getTileDimension(int *tileX, int *tileY, int *tileZ)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setErrorFun(void (*fun) (const char *))
+void Rast3d_set_error_fun(void (*fun) (const char *))
 {
 {
     g3d_error_fun = fun;
     g3d_error_fun = fun;
 }
 }
@@ -324,7 +324,7 @@ void Rast3d_setErrorFun(void (*fun) (const char *))
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setUnit(const char *unit)
+void Rast3d_set_unit(const char *unit)
 {
 {
     Rast3d_free(g3d_unit_default);
     Rast3d_free(g3d_unit_default);
     g3d_unit_default = G_store(unit);
     g3d_unit_default = G_store(unit);
@@ -344,7 +344,7 @@ void Rast3d_setUnit(const char *unit)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_initDefaults(void)
+void Rast3d_init_defaults(void)
 {
 {
     static int firstTime = 1;
     static int firstTime = 1;
     const char *value, *windowName;
     const char *value, *windowName;
@@ -407,13 +407,13 @@ void Rast3d_initDefaults(void)
 	    }
 	    }
 	    else {
 	    else {
 		if (sscanf(value, "%d", &g3d_precision) != 1) {
 		if (sscanf(value, "%d", &g3d_precision) != 1) {
-		    Rast3d_fatalError
-			("Rast3d_initDefaults: precision environment variable has invalid value");
+		    Rast3d_fatal_error
+			("Rast3d_init_defaults: precision environment variable has invalid value");
 		}
 		}
 		else {
 		else {
 		    if (g3d_precision < -1) {
 		    if (g3d_precision < -1) {
-			Rast3d_fatalError
-			    ("Rast3d_initDefaults: value for cache environment variable out of range");
+			Rast3d_fatal_error
+			    ("Rast3d_init_defaults: value for cache environment variable out of range");
 		    }
 		    }
 		}
 		}
 	    }
 	    }
@@ -442,12 +442,12 @@ void Rast3d_initDefaults(void)
 	}
 	}
 	else {
 	else {
 	    if (sscanf(value, "%d", &g3d_cache_default) != 1) {
 	    if (sscanf(value, "%d", &g3d_cache_default) != 1) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: cache environment variable has invalid value");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: cache environment variable has invalid value");
 	    }
 	    }
 	    if (g3d_cache_default < 0) {
 	    if (g3d_cache_default < 0) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: value for cache environment variable out of range");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: value for cache environment variable out of range");
 	    }
 	    }
 	}
 	}
     }
     }
@@ -460,12 +460,12 @@ void Rast3d_initDefaults(void)
 	}
 	}
 	else {
 	else {
 	    if (sscanf(value, "%d", &g3d_cache_max) != 1) {
 	    if (sscanf(value, "%d", &g3d_cache_max) != 1) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: cache environment variable has invalid value");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: cache environment variable has invalid value");
 	    }
 	    }
 	    if (g3d_cache_max < 0) {
 	    if (g3d_cache_max < 0) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: value for cache environment variable out of range");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: value for cache environment variable out of range");
 	    }
 	    }
 	}
 	}
     }
     }
@@ -478,12 +478,12 @@ void Rast3d_initDefaults(void)
 	}
 	}
 	else {
 	else {
 	    if (sscanf(value, "%d", g3d_tile_dimension) != 1) {
 	    if (sscanf(value, "%d", g3d_tile_dimension) != 1) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: tile dimension x environment variable has invalid value");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: tile dimension x environment variable has invalid value");
 	    }
 	    }
 	    if (g3d_tile_dimension[0] <= 0) {
 	    if (g3d_tile_dimension[0] <= 0) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: value for tile x environment variable out of range");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: value for tile x environment variable out of range");
 	    }
 	    }
 	}
 	}
 
 
@@ -494,12 +494,12 @@ void Rast3d_initDefaults(void)
 	}
 	}
 	else {
 	else {
 	    if (sscanf(value, "%d", g3d_tile_dimension + 1) != 1) {
 	    if (sscanf(value, "%d", g3d_tile_dimension + 1) != 1) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: tile dimension y environment variable has invalid value");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: tile dimension y environment variable has invalid value");
 	    }
 	    }
 	    if (g3d_tile_dimension[1] <= 0) {
 	    if (g3d_tile_dimension[1] <= 0) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: value for tile y environment variable out of range");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: value for tile y environment variable out of range");
 	    }
 	    }
 	}
 	}
 
 
@@ -510,12 +510,12 @@ void Rast3d_initDefaults(void)
 	}
 	}
 	else {
 	else {
 	    if (sscanf(value, "%d", g3d_tile_dimension + 2) != 1) {
 	    if (sscanf(value, "%d", g3d_tile_dimension + 2) != 1) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: tile dimension z environment variable has invalid value");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: tile dimension z environment variable has invalid value");
 	    }
 	    }
 	    if (g3d_tile_dimension[2] <= 0) {
 	    if (g3d_tile_dimension[2] <= 0) {
-		Rast3d_fatalError
-		    ("Rast3d_initDefaults: value for tile z environment variable out of range");
+		Rast3d_fatal_error
+		    ("Rast3d_init_defaults: value for tile z environment variable out of range");
 	    }
 	    }
 	}
 	}
     }
     }
@@ -524,13 +524,13 @@ void Rast3d_initDefaults(void)
 	value = getenv(RASTER3D_FATAL_ERROR_ENV_VAR);
 	value = getenv(RASTER3D_FATAL_ERROR_ENV_VAR);
 
 
 	if (value != NULL) {
 	if (value != NULL) {
-	    g3d_error_fun = Rast3d_fatalError_noargs;
+	    g3d_error_fun = Rast3d_fatal_error_noargs;
 	}
 	}
 	else {
 	else {
 	    value = getenv(RASTER3D_PRINT_ERROR_ENV_VAR);
 	    value = getenv(RASTER3D_PRINT_ERROR_ENV_VAR);
 
 
 	    if (value != NULL) {
 	    if (value != NULL) {
-		g3d_error_fun = Rast3d_printError;
+		g3d_error_fun = Rast3d_print_error;
 	    }
 	    }
 	    else {
 	    else {
 		g3d_error_fun = RASTER3D_ERROR_FUN_DEFAULT;
 		g3d_error_fun = RASTER3D_ERROR_FUN_DEFAULT;
@@ -541,7 +541,7 @@ void Rast3d_initDefaults(void)
     if (g3d_unit_default == NULL)
     if (g3d_unit_default == NULL)
 	g3d_unit_default = G_store(RASTER3D_UNIT_DEFAULT);
 	g3d_unit_default = G_store(RASTER3D_UNIT_DEFAULT);
 
 
-    windowName = Rast3d_getWindowParams();
+    windowName = Rast3d_get_window_params();
     if (windowName == NULL) {
     if (windowName == NULL) {
 	value = getenv(RASTER3D_DEFAULT_WINDOW3D);
 	value = getenv(RASTER3D_DEFAULT_WINDOW3D);
 	if (value != NULL)
 	if (value != NULL)
@@ -549,8 +549,8 @@ void Rast3d_initDefaults(void)
 		windowName = value;
 		windowName = value;
     }
     }
 
 
-    if (!Rast3d_readWindow(&window, windowName))
-	Rast3d_fatalError("Rast3d_initDefaults: Error reading window");
-    Rast3d_setWindow(&window);
+    if (!Rast3d_read_window(&window, windowName))
+	Rast3d_fatal_error("Rast3d_init_defaults: Error reading window");
+    Rast3d_set_window(&window);
 
 
 }
 }

+ 12 - 12
lib/raster3d/doubleio.c

@@ -8,7 +8,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_writeDoubles(int fd, int useXdr, const double *i, int nofNum)
+int Rast3d_write_doubles(int fd, int useXdr, const double *i, int nofNum)
 {
 {
     int firstTime = 1;
     int firstTime = 1;
     XDR xdrEncodeStream;
     XDR xdrEncodeStream;
@@ -16,11 +16,11 @@ int Rast3d_writeDoubles(int fd, int useXdr, const double *i, int nofNum)
     u_int n;
     u_int n;
 
 
     if (nofNum <= 0)
     if (nofNum <= 0)
-	Rast3d_fatalError("Rast3d_writeDoubles: nofNum out of range");
+	Rast3d_fatal_error("Rast3d_write_doubles: nofNum out of range");
 
 
     if (useXdr == RASTER3D_NO_XDR) {
     if (useXdr == RASTER3D_NO_XDR) {
 	if (write(fd, i, sizeof(double) * nofNum) != sizeof(double) * nofNum) {
 	if (write(fd, i, sizeof(double) * nofNum) != sizeof(double) * nofNum) {
-	    Rast3d_error("Rast3d_writeDoubles: writing to file failed");
+	    Rast3d_error("Rast3d_write_doubles: writing to file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 	else {
 	else {
@@ -41,19 +41,19 @@ int Rast3d_writeDoubles(int fd, int useXdr, const double *i, int nofNum)
 	    n = 1024;
 	    n = 1024;
 
 
 	if (!xdr_setpos(&xdrEncodeStream, 0)) {
 	if (!xdr_setpos(&xdrEncodeStream, 0)) {
-	    Rast3d_error("Rast3d_writeDoubles: positioning xdr failed");
+	    Rast3d_error("Rast3d_write_doubles: positioning xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!xdr_vector(&xdrEncodeStream, (char *)i, n, sizeof(double),
 	if (!xdr_vector(&xdrEncodeStream, (char *)i, n, sizeof(double),
 			(xdrproc_t) xdr_double)) {
 			(xdrproc_t) xdr_double)) {
-	    Rast3d_error("Rast3d_writeDoubles: writing xdr failed");
+	    Rast3d_error("Rast3d_write_doubles: writing xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (write(fd, xdrDoubleBuf, RASTER3D_XDR_DOUBLE_LENGTH * n) !=
 	if (write(fd, xdrDoubleBuf, RASTER3D_XDR_DOUBLE_LENGTH * n) !=
 	    RASTER3D_XDR_DOUBLE_LENGTH * n) {
 	    RASTER3D_XDR_DOUBLE_LENGTH * n) {
-	    Rast3d_error("Rast3d_writeDoubles: writing xdr to file failed");
+	    Rast3d_error("Rast3d_write_doubles: writing xdr to file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
@@ -66,7 +66,7 @@ int Rast3d_writeDoubles(int fd, int useXdr, const double *i, int nofNum)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_readDoubles(int fd, int useXdr, double *i, int nofNum)
+int Rast3d_read_doubles(int fd, int useXdr, double *i, int nofNum)
 {
 {
     int firstTime = 1;
     int firstTime = 1;
     XDR xdrDecodeStream;
     XDR xdrDecodeStream;
@@ -74,11 +74,11 @@ int Rast3d_readDoubles(int fd, int useXdr, double *i, int nofNum)
     u_int n;
     u_int n;
 
 
     if (nofNum <= 0)
     if (nofNum <= 0)
-	Rast3d_fatalError("Rast3d_readDoubles: nofNum out of range");
+	Rast3d_fatal_error("Rast3d_read_doubles: nofNum out of range");
 
 
     if (useXdr == RASTER3D_NO_XDR) {
     if (useXdr == RASTER3D_NO_XDR) {
 	if (read(fd, i, sizeof(double) * nofNum) != sizeof(double) * nofNum) {
 	if (read(fd, i, sizeof(double) * nofNum) != sizeof(double) * nofNum) {
-	    Rast3d_error("Rast3d_readDoubles: reading from file failed");
+	    Rast3d_error("Rast3d_read_doubles: reading from file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 	else {
 	else {
@@ -99,18 +99,18 @@ int Rast3d_readDoubles(int fd, int useXdr, double *i, int nofNum)
 
 
 	if (read(fd, xdrDoubleBuf, RASTER3D_XDR_DOUBLE_LENGTH * n) !=
 	if (read(fd, xdrDoubleBuf, RASTER3D_XDR_DOUBLE_LENGTH * n) !=
 	    RASTER3D_XDR_DOUBLE_LENGTH * n) {
 	    RASTER3D_XDR_DOUBLE_LENGTH * n) {
-	    Rast3d_error("Rast3d_readDoubles: reading xdr from file failed");
+	    Rast3d_error("Rast3d_read_doubles: reading xdr from file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!xdr_setpos(&xdrDecodeStream, 0)) {
 	if (!xdr_setpos(&xdrDecodeStream, 0)) {
-	    Rast3d_error("Rast3d_readDoubles: positioning xdr failed");
+	    Rast3d_error("Rast3d_read_doubles: positioning xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!xdr_vector(&xdrDecodeStream, (char *)i, n, sizeof(double),
 	if (!xdr_vector(&xdrDecodeStream, (char *)i, n, sizeof(double),
 			(xdrproc_t) xdr_double)) {
 			(xdrproc_t) xdr_double)) {
-	    Rast3d_error("Rast3d_readDoubles: reading xdr failed");
+	    Rast3d_error("Rast3d_read_doubles: reading xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 

+ 4 - 4
lib/raster3d/error.c

@@ -22,7 +22,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_skipError(const char *msg)
+void Rast3d_skip_error(const char *msg)
 {
 {
 }
 }
 
 
@@ -37,7 +37,7 @@ void Rast3d_skipError(const char *msg)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_printError(const char *msg)
+void Rast3d_print_error(const char *msg)
 {
 {
     fprintf(stderr, "ERROR: ");
     fprintf(stderr, "ERROR: ");
     fprintf(stderr, msg);
     fprintf(stderr, msg);
@@ -55,7 +55,7 @@ void Rast3d_printError(const char *msg)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_fatalError(const char *msg, ...)
+void Rast3d_fatal_error(const char *msg, ...)
 {
 {
     char buffer[2000];		/* No novels to the error logs, OK? */
     char buffer[2000];		/* No novels to the error logs, OK? */
     va_list ap;
     va_list ap;
@@ -67,7 +67,7 @@ void Rast3d_fatalError(const char *msg, ...)
     G_fatal_error("%s", buffer);
     G_fatal_error("%s", buffer);
 }
 }
 
 
-void Rast3d_fatalError_noargs(const char *msg)
+void Rast3d_fatal_error_noargs(const char *msg)
 {
 {
     G_fatal_error("%s", msg);
     G_fatal_error("%s", msg);
 }
 }

+ 56 - 56
lib/raster3d/filecompare.c

@@ -20,10 +20,10 @@ static void Rast3d_float2xdrFloat(float *f, float *xdrf)
     xdrmem_create(&xdrEncodeStream, (caddr_t) xdrf, 4, XDR_ENCODE);
     xdrmem_create(&xdrEncodeStream, (caddr_t) xdrf, 4, XDR_ENCODE);
 
 
     if (!xdr_setpos(&xdrEncodeStream, 0))
     if (!xdr_setpos(&xdrEncodeStream, 0))
-	Rast3d_fatalError("Rast3d_float2xdrFloat: positioning xdr failed");
+	Rast3d_fatal_error("Rast3d_float2xdrFloat: positioning xdr failed");
 
 
     if (!xdr_float(&xdrEncodeStream, f))
     if (!xdr_float(&xdrEncodeStream, f))
-	Rast3d_fatalError("Rast3d_float2xdrFloat: writing xdr failed");
+	Rast3d_fatal_error("Rast3d_float2xdrFloat: writing xdr failed");
 
 
     xdr_destroy(&xdrEncodeStream);
     xdr_destroy(&xdrEncodeStream);
 }
 }
@@ -37,10 +37,10 @@ static void Rast3d_double2xdrDouble(double *d, double *xdrd)
     xdrmem_create(&xdrEncodeStream, (caddr_t) xdrd, 8, XDR_ENCODE);
     xdrmem_create(&xdrEncodeStream, (caddr_t) xdrd, 8, XDR_ENCODE);
 
 
     if (!xdr_setpos(&xdrEncodeStream, 0))
     if (!xdr_setpos(&xdrEncodeStream, 0))
-	Rast3d_fatalError("Rast3d_double2xdrDouble: positioning xdr failed");
+	Rast3d_fatal_error("Rast3d_double2xdrDouble: positioning xdr failed");
 
 
     if (!xdr_double(&xdrEncodeStream, d))
     if (!xdr_double(&xdrEncodeStream, d))
-	Rast3d_fatalError("Rast3d_double2xdrDouble: writing xdr failed");
+	Rast3d_fatal_error("Rast3d_double2xdrDouble: writing xdr failed");
 
 
     xdr_destroy(&xdrEncodeStream);
     xdr_destroy(&xdrEncodeStream);
 }
 }
@@ -196,8 +196,8 @@ static int Rast3d_compareFloats(float *f1, int p1, float *f2, int p2)
     unsigned char *c1, *c2;
     unsigned char *c1, *c2;
     float xdrf1, xdrf2;
     float xdrf1, xdrf2;
 
 
-    if (Rast3d_isNullValueNum(f1, FCELL_TYPE))
-	return Rast3d_isNullValueNum(f2, FCELL_TYPE);
+    if (Rast3d_is_null_value_num(f1, FCELL_TYPE))
+	return Rast3d_is_null_value_num(f2, FCELL_TYPE);
 
 
     Rast3d_float2xdrFloat(f1, &xdrf1);
     Rast3d_float2xdrFloat(f1, &xdrf1);
     Rast3d_float2xdrFloat(f2, &xdrf2);
     Rast3d_float2xdrFloat(f2, &xdrf2);
@@ -227,8 +227,8 @@ static int Rast3d_compareDoubles(double *d1, int p1, double *d2, int p2)
     unsigned char *c1, *c2;
     unsigned char *c1, *c2;
     double xdrd1, xdrd2;
     double xdrd1, xdrd2;
 
 
-    if (Rast3d_isNullValueNum(d1, DCELL_TYPE))
-	return Rast3d_isNullValueNum(d2, DCELL_TYPE);
+    if (Rast3d_is_null_value_num(d1, DCELL_TYPE))
+	return Rast3d_is_null_value_num(d2, DCELL_TYPE);
 
 
     Rast3d_double2xdrDouble(d1, &xdrd1);
     Rast3d_double2xdrDouble(d1, &xdrd1);
     Rast3d_double2xdrDouble(d2, &xdrd2);
     Rast3d_double2xdrDouble(d2, &xdrd2);
@@ -261,8 +261,8 @@ static int Rast3d_compareFloatDouble(float *f, int p1, double *d, int p2)
     float xdrf, fTmp;
     float xdrf, fTmp;
     double xdrd, xdrd2, dTmp;
     double xdrd, xdrd2, dTmp;
 
 
-    if (Rast3d_isNullValueNum(f, FCELL_TYPE))
-	return Rast3d_isNullValueNum(d, DCELL_TYPE);
+    if (Rast3d_is_null_value_num(f, FCELL_TYPE))
+	return Rast3d_is_null_value_num(d, DCELL_TYPE);
 
 
     /* need this since assigning a double to a float actually may change the */
     /* need this since assigning a double to a float actually may change the */
     /* bit pattern. an example (in xdr format) is the double */
     /* bit pattern. an example (in xdr format) is the double */
@@ -309,13 +309,13 @@ static void compareFilesNocache(void *map, void *map2)
     int tileX, tileY, tileZ, typeIntern, typeIntern2;
     int tileX, tileY, tileZ, typeIntern, typeIntern2;
     int nx, ny, nz;
     int nx, ny, nz;
 
 
-    p1 = Rast3d_tilePrecisionMap(map);
-    p2 = Rast3d_tilePrecisionMap(map2);
+    p1 = Rast3d_tile_precision_map(map);
+    p2 = Rast3d_tile_precision_map(map2);
 
 
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
-    Rast3d_getNofTilesMap(map2, &nx, &ny, &nz);
-    typeIntern = Rast3d_tileTypeMap(map);
-    typeIntern2 = Rast3d_tileTypeMap(map2);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
+    Rast3d_get_nof_tiles_map(map2, &nx, &ny, &nz);
+    typeIntern = Rast3d_tile_type_map(map);
+    typeIntern2 = Rast3d_tile_type_map(map2);
 
 
     n1p = &n1;
     n1p = &n1;
     f1p = (float *)&n1;
     f1p = (float *)&n1;
@@ -328,8 +328,8 @@ static void compareFilesNocache(void *map, void *map2)
 	for (y = 0; y < ny * tileY; y++) {
 	for (y = 0; y < ny * tileY; y++) {
 	    for (x = 0; x < nx * tileX; x++) {
 	    for (x = 0; x < nx * tileX; x++) {
 
 
-		Rast3d_getBlock(map, x, y, z, 1, 1, 1, n1p, typeIntern);
-		Rast3d_getBlock(map2, x, y, z, 1, 1, 1, n2p, typeIntern2);
+		Rast3d_get_block(map, x, y, z, 1, 1, 1, n1p, typeIntern);
+		Rast3d_get_block(map2, x, y, z, 1, 1, 1, n2p, typeIntern2);
 
 
 		if (typeIntern == FCELL_TYPE) {
 		if (typeIntern == FCELL_TYPE) {
 		    if (typeIntern2 == FCELL_TYPE)
 		    if (typeIntern2 == FCELL_TYPE)
@@ -347,12 +347,12 @@ static void compareFilesNocache(void *map, void *map2)
 		if (!correct) {
 		if (!correct) {
 		    int xTile, yTile, zTile, xOffs, yOffs, zOffs;
 		    int xTile, yTile, zTile, xOffs, yOffs, zOffs;
 
 
-		    Rast3d_coord2tileCoord(map2, x, y, z, &xTile, &yTile, &zTile,
+		    Rast3d_coord2tile_coord(map2, x, y, z, &xTile, &yTile, &zTile,
 					&xOffs, &yOffs, &zOffs);
 					&xOffs, &yOffs, &zOffs);
 		    printf("(%d %d %d) (%d %d %d) (%d %d %d) %.20f %.20f\n",
 		    printf("(%d %d %d) (%d %d %d) (%d %d %d) %.20f %.20f\n",
 			   x, y, z, xTile, yTile, zTile, xOffs, yOffs, zOffs,
 			   x, y, z, xTile, yTile, zTile, xOffs, yOffs, zOffs,
 			   *n1p, *n2p);
 			   *n1p, *n2p);
-		    Rast3d_fatalError
+		    Rast3d_fatal_error
 			("compareFilesNocache: files don't match\n");
 			("compareFilesNocache: files don't match\n");
 		}
 		}
 	    }
 	    }
@@ -383,7 +383,7 @@ static void compareFilesNocache(void *map, void *map2)
  */
  */
 
 
 void
 void
-Rast3d_compareFiles(const char *f1, const char *mapset1, const char *f2,
+Rast3d_compare_files(const char *f1, const char *mapset1, const char *f2,
 		 const char *mapset2)
 		 const char *mapset2)
 {
 {
     void *map, *map2;
     void *map, *map2;
@@ -398,35 +398,35 @@ Rast3d_compareFiles(const char *f1, const char *mapset1, const char *f2,
 
 
     printf("\nComparing %s and %s\n", f1, f2);
     printf("\nComparing %s and %s\n", f1, f2);
 
 
-    map = Rast3d_openCellOld(f1, mapset1, RASTER3D_DEFAULT_WINDOW,
+    map = Rast3d_open_cell_old(f1, mapset1, RASTER3D_DEFAULT_WINDOW,
 			  RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			  RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError("Rast3d_compareFiles: error in Rast3d_openCellOld");
+	Rast3d_fatal_error("Rast3d_compare_files: error in Rast3d_open_cell_old");
 
 
-    Rast3d_printHeader(map);
+    Rast3d_print_header(map);
 
 
-    map2 = Rast3d_openCellOld(f2, mapset2, RASTER3D_DEFAULT_WINDOW,
+    map2 = Rast3d_open_cell_old(f2, mapset2, RASTER3D_DEFAULT_WINDOW,
 			   RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			   RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
     if (map2 == NULL)
     if (map2 == NULL)
-	Rast3d_fatalError("Rast3d_compareFiles: error in Rast3d_openCellOld");
+	Rast3d_fatal_error("Rast3d_compare_files: error in Rast3d_open_cell_old");
 
 
-    Rast3d_printHeader(map2);
+    Rast3d_print_header(map2);
 
 
-    typeIntern = Rast3d_tileTypeMap(map);
-    typeIntern2 = Rast3d_tileTypeMap(map2);
+    typeIntern = Rast3d_tile_type_map(map);
+    typeIntern2 = Rast3d_tile_type_map(map2);
 
 
-    p1 = Rast3d_tilePrecisionMap(map);
-    p2 = Rast3d_tilePrecisionMap(map2);
+    p1 = Rast3d_tile_precision_map(map);
+    p2 = Rast3d_tile_precision_map(map2);
 
 
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
-    Rast3d_getTileDimensionsMap(map2, &tileX2, &tileY2, &tileZ2);
-    Rast3d_getNofTilesMap(map2, &nx, &ny, &nz);
-    Rast3d_getCoordsMap(map, &rows, &cols, &depths);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
+    Rast3d_get_tile_dimensions_map(map2, &tileX2, &tileY2, &tileZ2);
+    Rast3d_get_nof_tiles_map(map2, &nx, &ny, &nz);
+    Rast3d_get_coords_map(map, &rows, &cols, &depths);
 
 
-    if ((!Rast3d_tileUseCacheMap(map)) || (!Rast3d_tileUseCacheMap(map2))) {
+    if ((!Rast3d_tile_use_cache_map(map)) || (!Rast3d_tile_use_cache_map(map2))) {
 	compareFilesNocache(map, map2);
 	compareFilesNocache(map, map2);
-	Rast3d_closeCell(map);
-	Rast3d_closeCell(map2);
+	Rast3d_close_cell(map);
+	Rast3d_close_cell(map2);
 	return;
 	return;
     }
     }
 
 
@@ -435,33 +435,33 @@ Rast3d_compareFiles(const char *f1, const char *mapset1, const char *f2,
     n2p = &n2;
     n2p = &n2;
     f2p = (float *)&n2;
     f2p = (float *)&n2;
 
 
-    Rast3d_autolockOn(map);
-    Rast3d_autolockOn(map2);
-    Rast3d_minUnlocked(map, cols / tileX + 1);
+    Rast3d_autolock_on(map);
+    Rast3d_autolock_on(map2);
+    Rast3d_min_unlocked(map, cols / tileX + 1);
 
 
-    Rast3d_getCoordsMap(map2, &rows, &cols, &depths);
-    Rast3d_minUnlocked(map2, cols / tileX + 1);
+    Rast3d_get_coords_map(map2, &rows, &cols, &depths);
+    Rast3d_min_unlocked(map2, cols / tileX + 1);
 
 
-    Rast3d_getCoordsMap(map, &rows, &cols, &depths);
+    Rast3d_get_coords_map(map, &rows, &cols, &depths);
     for (z = 0; z < depths; z++) {
     for (z = 0; z < depths; z++) {
 	printf("comparing: z = %d\n", z);
 	printf("comparing: z = %d\n", z);
 
 
 	if ((z % tileZ) == 0) {
 	if ((z % tileZ) == 0) {
-	    if (!Rast3d_unlockAll(map))
-		Rast3d_fatalError("Rast3d_compareFiles: error in Rast3d_unlockAll");
+	    if (!Rast3d_unlock_all(map))
+		Rast3d_fatal_error("Rast3d_compare_files: error in Rast3d_unlock_all");
 	}
 	}
 	if ((z % tileZ2) == 0) {
 	if ((z % tileZ2) == 0) {
-	    if (!Rast3d_unlockAll(map2))
-		Rast3d_fatalError("Rast3d_compareFiles: error in Rast3d_unlockAll");
+	    if (!Rast3d_unlock_all(map2))
+		Rast3d_fatal_error("Rast3d_compare_files: error in Rast3d_unlock_all");
 	}
 	}
 
 
 	for (y = 0; y < rows; y++) {
 	for (y = 0; y < rows; y++) {
 	    for (x = 0; x < cols; x++) {
 	    for (x = 0; x < cols; x++) {
-		Rast3d_getValueRegion(map, x, y, z, n1p, typeIntern);
-		Rast3d_getValueRegion(map2, x, y, z, n2p, typeIntern2);
+		Rast3d_get_value_region(map, x, y, z, n1p, typeIntern);
+		Rast3d_get_value_region(map2, x, y, z, n2p, typeIntern2);
 
 
-		Rast3d_isNullValueNum(n1p, typeIntern);
-		Rast3d_isNullValueNum(n2p, typeIntern2);
+		Rast3d_is_null_value_num(n1p, typeIntern);
+		Rast3d_is_null_value_num(n2p, typeIntern2);
 
 
 		if (typeIntern == FCELL_TYPE) {
 		if (typeIntern == FCELL_TYPE) {
 		    if (typeIntern2 == FCELL_TYPE)
 		    if (typeIntern2 == FCELL_TYPE)
@@ -479,15 +479,15 @@ Rast3d_compareFiles(const char *f1, const char *mapset1, const char *f2,
 		if (!correct) {
 		if (!correct) {
 		    int xTile, yTile, zTile, xOffs, yOffs, zOffs;
 		    int xTile, yTile, zTile, xOffs, yOffs, zOffs;
 
 
-		    Rast3d_coord2tileCoord(map2, x, y, z, &xTile, &yTile, &zTile,
+		    Rast3d_coord2tile_coord(map2, x, y, z, &xTile, &yTile, &zTile,
 					&xOffs, &yOffs, &zOffs);
 					&xOffs, &yOffs, &zOffs);
-		    Rast3d_fatalError("Rast3d_compareFiles: files don't match\n");
+		    Rast3d_fatal_error("Rast3d_compare_files: files don't match\n");
 		}
 		}
 	    }
 	    }
 	}
 	}
     }
     }
 
 
     printf("Files are identical up to precision.\n");
     printf("Files are identical up to precision.\n");
-    Rast3d_closeCell(map);
-    Rast3d_closeCell(map2);
+    Rast3d_close_cell(map);
+    Rast3d_close_cell(map2);
 }
 }

+ 35 - 35
lib/raster3d/fpcompress.c

@@ -19,7 +19,7 @@
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
-void G_fpcompress_printBinary(char *c, int numBits)
+void Rast3d_fpcompress_print_binary(char *c, int numBits)
 {
 {
     unsigned char bit;
     unsigned char bit;
     int i;
     int i;
@@ -34,7 +34,7 @@ void G_fpcompress_printBinary(char *c, int numBits)
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
-void G_fpcompress_dissectXdrDouble(unsigned char *numPointer)
+void Rast3d_fpcompress_dissect_xdr_double(unsigned char *numPointer)
 {
 {
     char sign, exponent;
     char sign, exponent;
 
 
@@ -42,13 +42,13 @@ void G_fpcompress_dissectXdrDouble(unsigned char *numPointer)
     exponent = (*numPointer << 1) | (*(numPointer + 1) >> 7);
     exponent = (*numPointer << 1) | (*(numPointer + 1) >> 7);
 
 
     printf("%f: sign = ", *((float *)numPointer));
     printf("%f: sign = ", *((float *)numPointer));
-    G_fpcompress_printBinary(&sign, 1);
+    Rast3d_fpcompress_print_binary(&sign, 1);
     printf("   exp = ");
     printf("   exp = ");
-    G_fpcompress_printBinary(&exponent, 8);
+    Rast3d_fpcompress_print_binary(&exponent, 8);
     printf("   mantissa = ");
     printf("   mantissa = ");
-    G_fpcompress_printBinary((char *)(numPointer + 1), 7);
-    G_fpcompress_printBinary((char *)(numPointer + 2), 8);
-    G_fpcompress_printBinary((char *)(numPointer + 3), 8);
+    Rast3d_fpcompress_print_binary((char *)(numPointer + 1), 7);
+    Rast3d_fpcompress_print_binary((char *)(numPointer + 2), 8);
+    Rast3d_fpcompress_print_binary((char *)(numPointer + 3), 8);
     printf("\n");
     printf("\n");
 }
 }
 
 
@@ -100,7 +100,7 @@ G_fpcompress_rearrangeEncodeFloats(unsigned char *src, int size,
     f = (float *)src;
     f = (float *)src;
     nofNull = 0;
     nofNull = 0;
     while (srcStop != (unsigned char *)f)
     while (srcStop != (unsigned char *)f)
-	nofNull += Rast3d_isXdrNullFloat(f++);
+	nofNull += Rast3d_is_xdr_null_float(f++);
 
 
     if (nofNull == size) {
     if (nofNull == size) {
 	*dst = (unsigned char)ALL_NULL_CODE;
 	*dst = (unsigned char)ALL_NULL_CODE;
@@ -135,7 +135,7 @@ G_fpcompress_rearrangeEncodeFloats(unsigned char *src, int size,
 
 
     while (srcStop != src) {
     while (srcStop != src) {
 	if (nofNull) {
 	if (nofNull) {
-	    isNull = Rast3d_isXdrNullFloat((float *)src);
+	    isNull = Rast3d_is_xdr_null_float((float *)src);
 
 
 	    if (nNullBits) {
 	    if (nNullBits) {
 		*nullBits |= ((unsigned char)isNull << nNullBits++);
 		*nullBits |= ((unsigned char)isNull << nNullBits++);
@@ -258,7 +258,7 @@ G_fpcompress_rearrangeEncodeDoubles(unsigned char *src, int size,
     d = (double *)src;
     d = (double *)src;
     nofNull = 0;
     nofNull = 0;
     while (srcStop != (unsigned char *)d)
     while (srcStop != (unsigned char *)d)
-	nofNull += Rast3d_isXdrNullDouble(d++);
+	nofNull += Rast3d_is_xdr_null_double(d++);
 
 
     if (nofNull == size) {
     if (nofNull == size) {
 	*dst = (unsigned char)ALL_NULL_CODE;
 	*dst = (unsigned char)ALL_NULL_CODE;
@@ -300,7 +300,7 @@ G_fpcompress_rearrangeEncodeDoubles(unsigned char *src, int size,
 
 
     while (srcStop != src) {
     while (srcStop != src) {
 	if (nofNull) {
 	if (nofNull) {
-	    isNull = Rast3d_isXdrNullDouble((double *)src);
+	    isNull = Rast3d_is_xdr_null_double((double *)src);
 
 
 	    if (nNullBits) {
 	    if (nNullBits) {
 		*nullBits |= ((unsigned char)isNull << nNullBits++);
 		*nullBits |= ((unsigned char)isNull << nNullBits++);
@@ -435,7 +435,7 @@ G_fpcompress_rearrangeDecodeFloats(unsigned char *src, int size,
     if (*src == (unsigned char)ALL_NULL_CODE) {
     if (*src == (unsigned char)ALL_NULL_CODE) {
 	f = (float *)dst;
 	f = (float *)dst;
 	while (dstStop != (unsigned char *)f)
 	while (dstStop != (unsigned char *)f)
-	    Rast3d_setXdrNullFloat(f++);
+	    Rast3d_set_xdr_null_float(f++);
 
 
 	return;
 	return;
     }
     }
@@ -485,7 +485,7 @@ G_fpcompress_rearrangeDecodeFloats(unsigned char *src, int size,
 	    }
 	    }
 
 
 	    if (isNull) {
 	    if (isNull) {
-		Rast3d_setXdrNullFloat((float *)dst);
+		Rast3d_set_xdr_null_float((float *)dst);
 		dst += XDR_FLOAT_LENGTH;
 		dst += XDR_FLOAT_LENGTH;
 		continue;
 		continue;
 	    }
 	    }
@@ -577,7 +577,7 @@ G_fpcompress_rearrangeDecodeDoubles(unsigned char *src, int size,
 	/*printf ("all null\n"); */
 	/*printf ("all null\n"); */
 	d = (double *)dst;
 	d = (double *)dst;
 	while (dstStop != (unsigned char *)d)
 	while (dstStop != (unsigned char *)d)
-	    Rast3d_setXdrNullDouble(d++);
+	    Rast3d_set_xdr_null_double(d++);
 
 
 	return;
 	return;
     }
     }
@@ -637,7 +637,7 @@ G_fpcompress_rearrangeDecodeDoubles(unsigned char *src, int size,
 	    }
 	    }
 
 
 	    if (isNull) {
 	    if (isNull) {
-		Rast3d_setXdrNullDouble((double *)dst);
+		Rast3d_set_xdr_null_double((double *)dst);
 		dst += XDR_DOUBLE_LENGTH;
 		dst += XDR_DOUBLE_LENGTH;
 		continue;
 		continue;
 	    }
 	    }
@@ -695,7 +695,7 @@ G_fpcompress_rearrangeDecodeDoubles(unsigned char *src, int size,
 /* IMPORTANT!!! this function changes the "src". */
 /* IMPORTANT!!! this function changes the "src". */
 
 
 int
 int
-G_fpcompress_writeXdrNums(int fd, char *src, int nofNum, int precision,
+Rast3d_fpcompress_write_xdr_nums(int fd, char *src, int nofNum, int precision,
 			  char *compressBuf, int isFloat, int useRle,
 			  char *compressBuf, int isFloat, int useRle,
 			  int useLzw)
 			  int useLzw)
 {
 {
@@ -721,11 +721,11 @@ G_fpcompress_writeXdrNums(int fd, char *src, int nofNum, int precision,
 #endif
 #endif
 
 
     if (useRle == RASTER3D_USE_RLE)
     if (useRle == RASTER3D_USE_RLE)
-	rleLength = G_rle_count_only(compressBuf + 1, offsetMantissa, 1);
+	rleLength = Rast3d_rle_count_only(compressBuf + 1, offsetMantissa, 1);
 
 
     if ((useRle == RASTER3D_USE_RLE) && (rleLength < offsetMantissa)) {
     if ((useRle == RASTER3D_USE_RLE) && (rleLength < offsetMantissa)) {
 
 
-	G_rle_encode(compressBuf + 1, src, offsetMantissa, 1);
+	Rast3d_rle_encode(compressBuf + 1, src, offsetMantissa, 1);
 	srcStop = src + rleLength;
 	srcStop = src + rleLength;
 	dst = compressBuf + 1 + offsetMantissa - rleLength;
 	dst = compressBuf + 1 + offsetMantissa - rleLength;
 	while (src != srcStop)
 	while (src != srcStop)
@@ -782,7 +782,7 @@ G_fpcompress_writeXdrNums(int fd, char *src, int nofNum, int precision,
     }
     }
 
 
     if (status < 0) {
     if (status < 0) {
-	Rast3d_error("G_fpcompress_writeXdrNums: write error");
+	Rast3d_error("Rast3d_fpcompress_write_xdr_nums: write error");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -792,13 +792,13 @@ G_fpcompress_writeXdrNums(int fd, char *src, int nofNum, int precision,
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
 int
 int
-G_fpcompress_writeXdrFloats(int fd, char *src, int nofNum, int precision,
+Rast3d_fpcompress_write_xdr_floats(int fd, char *src, int nofNum, int precision,
 			    char *compressBuf, int useRle, int useLzw)
 			    char *compressBuf, int useRle, int useLzw)
 {
 {
-    if (!G_fpcompress_writeXdrNums(fd, src, nofNum, precision, compressBuf, 1,
+    if (!Rast3d_fpcompress_write_xdr_nums(fd, src, nofNum, precision, compressBuf, 1,
 				   useRle, useLzw)) {
 				   useRle, useLzw)) {
 	Rast3d_error
 	Rast3d_error
-	    ("G_fpcompress_writeXdrFloats: error in G_fpcompress_writeXdrNums");
+	    ("Rast3d_fpcompress_write_xdr_floats: error in Rast3d_fpcompress_write_xdr_nums");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -808,13 +808,13 @@ G_fpcompress_writeXdrFloats(int fd, char *src, int nofNum, int precision,
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
 int
 int
-G_fpcompress_writeXdrDouble(int fd, char *src, int nofNum, int precision,
+Rast3d_fpcompress_write_xdr_double(int fd, char *src, int nofNum, int precision,
 			    char *compressBuf, int useRle, int useLzw)
 			    char *compressBuf, int useRle, int useLzw)
 {
 {
-    if (!G_fpcompress_writeXdrNums(fd, src, nofNum, precision, compressBuf, 0,
+    if (!Rast3d_fpcompress_write_xdr_nums(fd, src, nofNum, precision, compressBuf, 0,
 				   useRle, useLzw)) {
 				   useRle, useLzw)) {
 	Rast3d_error
 	Rast3d_error
-	    ("G_fpcompress_writeXdrDouble: error in G_fpcompress_writeXdrNums");
+	    ("Rast3d_fpcompress_write_xdr_double: error in Rast3d_fpcompress_write_xdr_nums");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -824,7 +824,7 @@ G_fpcompress_writeXdrDouble(int fd, char *src, int nofNum, int precision,
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
 int
 int
-G_fpcompress_readXdrNums(int fd, char *dst, int nofNum, int fileBytes,
+Rast3d_fpcompress_read_xdr_nums(int fd, char *dst, int nofNum, int fileBytes,
 			 int precision, char *compressBuf, int isFloat)
 			 int precision, char *compressBuf, int isFloat)
 {
 {
     int status, lengthEncode, lengthDecode;
     int status, lengthEncode, lengthDecode;
@@ -840,16 +840,16 @@ G_fpcompress_readXdrNums(int fd, char *dst, int nofNum, int fileBytes,
 			 nofNum * nBytes + 1);
 			 nofNum * nBytes + 1);
 #endif
 #endif
     if (status < 0) {
     if (status < 0) {
-	Rast3d_error("G_fpcompress_readXdrNums: read error");
+	Rast3d_error("Rast3d_fpcompress_read_xdr_nums: read error");
 	return 0;
 	return 0;
     }
     }
 
 
     if (*compressBuf++ == 1) {
     if (*compressBuf++ == 1) {
 	status--;
 	status--;
-	G_rle_decode(compressBuf, dst, nofNum * nBytes, 1,
+	Rast3d_rle_decode(compressBuf, dst, nofNum * nBytes, 1,
 		     &lengthEncode, &lengthDecode);
 		     &lengthEncode, &lengthDecode);
 	if (*dst == ALL_NULL_CODE)
 	if (*dst == ALL_NULL_CODE)
-	    Rast3d_fatalError("G_fpcompress_readXdrNums: wrong code");
+	    Rast3d_fatal_error("Rast3d_fpcompress_read_xdr_nums: wrong code");
 
 
 	if (status == nofNum * nBytes)
 	if (status == nofNum * nBytes)
 	    status -= lengthDecode - lengthEncode;
 	    status -= lengthDecode - lengthEncode;
@@ -880,13 +880,13 @@ G_fpcompress_readXdrNums(int fd, char *dst, int nofNum, int fileBytes,
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
 int
 int
-G_fpcompress_readXdrFloats(int fd, char *dst, int nofNum, int fileBytes,
+Rast3d_fpcompress_read_xdr_floats(int fd, char *dst, int nofNum, int fileBytes,
 			   int precision, char *compressBuf)
 			   int precision, char *compressBuf)
 {
 {
-    if (!G_fpcompress_readXdrNums(fd, dst, nofNum, fileBytes, precision,
+    if (!Rast3d_fpcompress_read_xdr_nums(fd, dst, nofNum, fileBytes, precision,
 				  compressBuf, 1)) {
 				  compressBuf, 1)) {
 	Rast3d_error
 	Rast3d_error
-	    ("G_fpcompress_readXdrFloats: error in G_fpcompress_readXdrNums");
+	    ("Rast3d_fpcompress_read_xdr_floats: error in Rast3d_fpcompress_read_xdr_nums");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -896,13 +896,13 @@ G_fpcompress_readXdrFloats(int fd, char *dst, int nofNum, int fileBytes,
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
 int
 int
-G_fpcompress_readXdrDoubles(int fd, char *dst, int nofNum, int fileBytes,
+Rast3d_fpcompress_read_xdr_doubles(int fd, char *dst, int nofNum, int fileBytes,
 			    int precision, char *compressBuf)
 			    int precision, char *compressBuf)
 {
 {
-    if (!G_fpcompress_readXdrNums(fd, dst, nofNum, fileBytes, precision,
+    if (!Rast3d_fpcompress_read_xdr_nums(fd, dst, nofNum, fileBytes, precision,
 				  compressBuf, 0)) {
 				  compressBuf, 0)) {
 	Rast3d_error
 	Rast3d_error
-	    ("G_fpcompress_readXdrDouble: error in G_fpcompress_readXdrNums");
+	    ("G_fpcompress_readXdrDouble: error in Rast3d_fpcompress_read_xdr_nums");
 	return 0;
 	return 0;
     }
     }
 
 

+ 34 - 34
lib/raster3d/fpxdr.c

@@ -12,7 +12,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_isXdrNullNum(const void *num, int isFloat)
+int Rast3d_is_xdr_null_num(const void *num, int isFloat)
 {
 {
     static const char null_bytes[8] = {
     static const char null_bytes[8] = {
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
@@ -23,21 +23,21 @@ int Rast3d_isXdrNullNum(const void *num, int isFloat)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_isXdrNullFloat(const float *f)
+int Rast3d_is_xdr_null_float(const float *f)
 {
 {
-    return Rast3d_isXdrNullNum(f, 1);
+    return Rast3d_is_xdr_null_num(f, 1);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_isXdrNullDouble(const double *d)
+int Rast3d_is_xdr_null_double(const double *d)
 {
 {
-    return Rast3d_isXdrNullNum(d, 0);
+    return Rast3d_is_xdr_null_num(d, 0);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void Rast3d_setXdrNullNum(void *num, int isFloat)
+void Rast3d_set_xdr_null_num(void *num, int isFloat)
 {
 {
     static const char null_bytes[8] = {
     static const char null_bytes[8] = {
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
 	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
@@ -48,23 +48,23 @@ void Rast3d_setXdrNullNum(void *num, int isFloat)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void Rast3d_setXdrNullDouble(double *d)
+void Rast3d_set_xdr_null_double(double *d)
 {
 {
-    Rast3d_setXdrNullNum(d, 0);
+    Rast3d_set_xdr_null_num(d, 0);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void Rast3d_setXdrNullFloat(float *f)
+void Rast3d_set_xdr_null_float(float *f)
 {
 {
-    Rast3d_setXdrNullNum(f, 1);
+    Rast3d_set_xdr_null_num(f, 1);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 XDR xdrEncodeStream, xdrDecodeStream;	/* xdr support structures */
 XDR xdrEncodeStream, xdrDecodeStream;	/* xdr support structures */
 
 
-int Rast3d_initFpXdr(RASTER3D_Map * map, int misuseBytes)
+int Rast3d_init_fp_xdr(RASTER3D_Map * map, int misuseBytes)
 
 
 
 
 
 
@@ -81,7 +81,7 @@ int Rast3d_initFpXdr(RASTER3D_Map * map, int misuseBytes)
 	    misuseBytes;
 	    misuseBytes;
 	xdr = Rast3d_malloc(xdrLength);
 	xdr = Rast3d_malloc(xdrLength);
 	if (xdr == NULL) {
 	if (xdr == NULL) {
-	    Rast3d_error("Rast3d_initFpXdr: error in Rast3d_malloc");
+	    Rast3d_error("Rast3d_init_fp_xdr: error in Rast3d_malloc");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
@@ -95,7 +95,7 @@ int Rast3d_initFpXdr(RASTER3D_Map * map, int misuseBytes)
 	    misuseBytes;
 	    misuseBytes;
 	xdr = Rast3d_realloc(xdr, xdrLength);
 	xdr = Rast3d_realloc(xdr, xdrLength);
 	if (xdr == NULL) {
 	if (xdr == NULL) {
-	    Rast3d_error("Rast3d_initFpXdr: error in Rast3d_realloc");
+	    Rast3d_error("Rast3d_init_fp_xdr: error in Rast3d_realloc");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
@@ -118,7 +118,7 @@ static int (*xdrFun) ();
 static XDR *xdrs;
 static XDR *xdrs;
 static double tmpValue, *tmp;
 static double tmpValue, *tmp;
 
 
-int Rast3d_initCopyToXdr(RASTER3D_Map * map, int sType)
+int Rast3d_init_copy_to_xdr(RASTER3D_Map * map, int sType)
 {
 {
     xdrTmp = xdr;
     xdrTmp = xdr;
     useXdr = map->useXdr;
     useXdr = map->useXdr;
@@ -134,7 +134,7 @@ int Rast3d_initCopyToXdr(RASTER3D_Map * map, int sType)
 
 
     type = map->type;
     type = map->type;
     isFloat = (type == FCELL_TYPE);
     isFloat = (type == FCELL_TYPE);
-    externLength = Rast3d_externLength(type);
+    externLength = Rast3d_extern_length(type);
     eltLength = Rast3d_length(srcType);
     eltLength = Rast3d_length(srcType);
     if (isFloat)
     if (isFloat)
 	xdrFun = xdr_float;
 	xdrFun = xdr_float;
@@ -147,29 +147,29 @@ int Rast3d_initCopyToXdr(RASTER3D_Map * map, int sType)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_copyToXdr(const void *src, int nofNum)
+int Rast3d_copy_to_xdr(const void *src, int nofNum)
 {
 {
     int i;
     int i;
 
 
     if (useXdr == RASTER3D_NO_XDR) {
     if (useXdr == RASTER3D_NO_XDR) {
-	Rast3d_copyValues(src, 0, srcType, xdrTmp, 0, type, nofNum);
-	xdrTmp = G_incr_void_ptr(xdrTmp, nofNum * Rast3d_externLength(type));
+	Rast3d_copy_values(src, 0, srcType, xdrTmp, 0, type, nofNum);
+	xdrTmp = G_incr_void_ptr(xdrTmp, nofNum * Rast3d_extern_length(type));
 	return 1;
 	return 1;
     }
     }
 
 
     for (i = 0; i < nofNum; i++, src = G_incr_void_ptr(src, eltLength)) {
     for (i = 0; i < nofNum; i++, src = G_incr_void_ptr(src, eltLength)) {
 
 
-	if (Rast3d_isNullValueNum(src, srcType)) {
-	    Rast3d_setXdrNullNum(xdrTmp, isFloat);
+	if (Rast3d_is_null_value_num(src, srcType)) {
+	    Rast3d_set_xdr_null_num(xdrTmp, isFloat);
 	    if (!xdr_setpos(xdrs, xdr_getpos(xdrs) + externLength)) {
 	    if (!xdr_setpos(xdrs, xdr_getpos(xdrs) + externLength)) {
-		Rast3d_error("Rast3d_copyToXdr: positioning xdr failed");
+		Rast3d_error("Rast3d_copy_to_xdr: positioning xdr failed");
 		return 0;
 		return 0;
 	    }
 	    }
 	}
 	}
 	else {
 	else {
 	    if (type == srcType) {
 	    if (type == srcType) {
 		if (xdrFun(xdrs, src) < 0) {
 		if (xdrFun(xdrs, src) < 0) {
-		    Rast3d_error("Rast3d_copyToXdr: writing xdr failed");
+		    Rast3d_error("Rast3d_copy_to_xdr: writing xdr failed");
 		    return 0;
 		    return 0;
 		}
 		}
 	    }
 	    }
@@ -179,7 +179,7 @@ int Rast3d_copyToXdr(const void *src, int nofNum)
 		else
 		else
 		    *((double *)tmp) = (double)*((float *)src);
 		    *((double *)tmp) = (double)*((float *)src);
 		if (xdrFun(xdrs, tmp) < 0) {
 		if (xdrFun(xdrs, tmp) < 0) {
-		    Rast3d_error("Rast3d_copyToXdr: writing xdr failed");
+		    Rast3d_error("Rast3d_copy_to_xdr: writing xdr failed");
 		    return 0;
 		    return 0;
 		}
 		}
 	    }
 	    }
@@ -193,7 +193,7 @@ int Rast3d_copyToXdr(const void *src, int nofNum)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_initCopyFromXdr(RASTER3D_Map * map, int dType)
+int Rast3d_init_copy_from_xdr(RASTER3D_Map * map, int dType)
 {
 {
     xdrTmp = xdr;
     xdrTmp = xdr;
     useXdr = map->useXdr;
     useXdr = map->useXdr;
@@ -201,7 +201,7 @@ int Rast3d_initCopyFromXdr(RASTER3D_Map * map, int dType)
 
 
     if (useXdr == RASTER3D_USE_XDR) {
     if (useXdr == RASTER3D_USE_XDR) {
 	if (!xdr_setpos(&(xdrDecodeStream), 0)) {
 	if (!xdr_setpos(&(xdrDecodeStream), 0)) {
-	    Rast3d_error("Rast3d_initCopyFromXdr: positioning xdr failed");
+	    Rast3d_error("Rast3d_init_copy_from_xdr: positioning xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 	xdrs = &(xdrDecodeStream);
 	xdrs = &(xdrDecodeStream);
@@ -209,7 +209,7 @@ int Rast3d_initCopyFromXdr(RASTER3D_Map * map, int dType)
 
 
     type = map->type;
     type = map->type;
     isFloat = (type == FCELL_TYPE);
     isFloat = (type == FCELL_TYPE);
-    externLength = Rast3d_externLength(type);
+    externLength = Rast3d_extern_length(type);
     eltLength = Rast3d_length(dstType);
     eltLength = Rast3d_length(dstType);
     if (isFloat)
     if (isFloat)
 	xdrFun = xdr_float;
 	xdrFun = xdr_float;
@@ -222,35 +222,35 @@ int Rast3d_initCopyFromXdr(RASTER3D_Map * map, int dType)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_copyFromXdr(int nofNum, void *dst)
+int Rast3d_copy_from_xdr(int nofNum, void *dst)
 {
 {
     int i;
     int i;
 
 
     if (useXdr == RASTER3D_NO_XDR) {
     if (useXdr == RASTER3D_NO_XDR) {
-	Rast3d_copyValues(xdrTmp, 0, type, dst, 0, dstType, nofNum);
-	xdrTmp = G_incr_void_ptr(xdrTmp, nofNum * Rast3d_externLength(type));
+	Rast3d_copy_values(xdrTmp, 0, type, dst, 0, dstType, nofNum);
+	xdrTmp = G_incr_void_ptr(xdrTmp, nofNum * Rast3d_extern_length(type));
 	return 1;
 	return 1;
     }
     }
 
 
     for (i = 0; i < nofNum; i++, dst = G_incr_void_ptr(dst, eltLength)) {
     for (i = 0; i < nofNum; i++, dst = G_incr_void_ptr(dst, eltLength)) {
 
 
-	if (Rast3d_isXdrNullNum(xdrTmp, isFloat)) {
-	    Rast3d_setNullValue(dst, 1, dstType);
+	if (Rast3d_is_xdr_null_num(xdrTmp, isFloat)) {
+	    Rast3d_set_null_value(dst, 1, dstType);
 	    if (!xdr_setpos(xdrs, xdr_getpos(xdrs) + externLength)) {
 	    if (!xdr_setpos(xdrs, xdr_getpos(xdrs) + externLength)) {
-		Rast3d_error("Rast3d_copyFromXdr: positioning xdr failed");
+		Rast3d_error("Rast3d_copy_from_xdr: positioning xdr failed");
 		return 0;
 		return 0;
 	    }
 	    }
 	}
 	}
 	else {
 	else {
 	    if (type == dstType) {
 	    if (type == dstType) {
 		if (xdrFun(xdrs, dst) < 0) {
 		if (xdrFun(xdrs, dst) < 0) {
-		    Rast3d_error("Rast3d_copyFromXdr: reading xdr failed");
+		    Rast3d_error("Rast3d_copy_from_xdr: reading xdr failed");
 		    return 0;
 		    return 0;
 		}
 		}
 	    }
 	    }
 	    else {
 	    else {
 		if (xdrFun(xdrs, tmp) < 0) {
 		if (xdrFun(xdrs, tmp) < 0) {
-		    Rast3d_error("Rast3d_copyFromXdr: reading xdr failed");
+		    Rast3d_error("Rast3d_copy_from_xdr: reading xdr failed");
 		    return 0;
 		    return 0;
 		}
 		}
 		if (type == FCELL_TYPE)
 		if (type == FCELL_TYPE)

+ 22 - 22
lib/raster3d/getblock.c

@@ -9,7 +9,7 @@
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_getBlockNocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int ny,
+Rast3d_get_block_nocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int ny,
 		    int nz, void *block, int type)
 		    int nz, void *block, int type)
 {
 {
     void *tile;
     void *tile;
@@ -19,13 +19,13 @@ Rast3d_getBlockNocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int n
     int tileIndex;
     int tileIndex;
 
 
     if (!map->useCache)
     if (!map->useCache)
-	tile = Rast3d_allocTilesType(map, 1, type);
+	tile = Rast3d_alloc_tiles_type(map, 1, type);
     if (tile == NULL)
     if (tile == NULL)
-	Rast3d_fatalError("Rast3d_getBlockNocache: error in Rast3d_allocTiles");
+	Rast3d_fatal_error("Rast3d_get_block_nocache: error in Rast3d_alloc_tiles");
 
 
-    Rast3d_coord2tileCoord(map, x0, y0, z0, &tileX0, &tileY0, &tileZ0,
+    Rast3d_coord2tile_coord(map, x0, y0, z0, &tileX0, &tileY0, &tileZ0,
 			&tileOffsX0, &tileOffsY0, &tileOffsZ0);
 			&tileOffsX0, &tileOffsY0, &tileOffsZ0);
-    Rast3d_coord2tileCoord(map, x0 + nx - 1, y0 + ny - 1, z0 + nz - 1,
+    Rast3d_coord2tile_coord(map, x0 + nx - 1, y0 + ny - 1, z0 + nz - 1,
 			&tileX1, &tileY1, &tileZ1,
 			&tileX1, &tileY1, &tileZ1,
 			&tileOffsX1, &tileOffsY1, &tileOffsZ1);
 			&tileOffsX1, &tileOffsY1, &tileOffsZ1);
 
 
@@ -36,24 +36,24 @@ Rast3d_getBlockNocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int n
 	    for (tx = tileX0; tx <= tileX1; tx++) {
 	    for (tx = tileX0; tx <= tileX1; tx++) {
 		dx = (tx - tileX0) * map->tileX - tileOffsX0;
 		dx = (tx - tileX0) * map->tileX - tileOffsX0;
 
 
-		tileIndex = Rast3d_tile2tileIndex(map, tx, ty, tz);
+		tileIndex = Rast3d_tile2tile_index(map, tx, ty, tz);
 
 
-		if (Rast3d_tileIndexInRange(map, tileIndex))
+		if (Rast3d_tile_index_in_range(map, tileIndex))
 		    if (map->useCache) {
 		    if (map->useCache) {
-			tile = Rast3d_getTilePtr(map, tileIndex);
+			tile = Rast3d_get_tile_ptr(map, tileIndex);
 			if (tile == NULL)
 			if (tile == NULL)
-			    Rast3d_fatalError
-				("Rast3d_getBlockNocache: error in Rast3d_getTilePtr");
+			    Rast3d_fatal_error
+				("Rast3d_get_block_nocache: error in Rast3d_get_tile_ptr");
 		    }
 		    }
 		    else {
 		    else {
-			if (!Rast3d_readTile
+			if (!Rast3d_read_tile
 			    (map, tileIndex, tile, map->typeIntern))
 			    (map, tileIndex, tile, map->typeIntern))
-			    Rast3d_fatalError
-				("Rast3d_getBlockNocache: error in Rast3d_readTile");
+			    Rast3d_fatal_error
+				("Rast3d_get_block_nocache: error in Rast3d_read_tile");
 		    }
 		    }
 
 
 		else
 		else
-		    Rast3d_setNullTile(map, tile);
+		    Rast3d_set_null_tile(map, tile);
 
 
 		cols = (tx == tileX1 ? tileOffsX1 : map->tileX - 1);
 		cols = (tx == tileX1 ? tileOffsX1 : map->tileX - 1);
 		rows = (ty == tileY1 ? tileOffsY1 : map->tileY - 1);
 		rows = (ty == tileY1 ? tileOffsY1 : map->tileY - 1);
@@ -63,7 +63,7 @@ Rast3d_getBlockNocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int n
 
 
 		for (z = (tz == tileZ0 ? tileOffsZ0 : 0); z <= depths; z++)
 		for (z = (tz == tileZ0 ? tileOffsZ0 : 0); z <= depths; z++)
 		    for (y = (ty == tileY0 ? tileOffsY0 : 0); y <= rows; y++) {
 		    for (y = (ty == tileY0 ? tileOffsY0 : 0); y <= rows; y++) {
-			Rast3d_copyValues(tile,
+			Rast3d_copy_values(tile,
 				       z * map->tileXY + y * map->tileX + x,
 				       z * map->tileXY + y * map->tileX + x,
 				       map->typeIntern,
 				       map->typeIntern,
 				       block,
 				       block,
@@ -75,7 +75,7 @@ Rast3d_getBlockNocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int n
     }
     }
 
 
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_freeTiles(tile);
+	Rast3d_free_tiles(tile);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -102,13 +102,13 @@ Rast3d_getBlockNocache(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int n
  */
  */
 
 
 void
 void
-Rast3d_getBlock(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int ny, int nz,
+Rast3d_get_block(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int ny, int nz,
 	     void *block, int type)
 	     void *block, int type)
 {
 {
     int x, y, z, nNull, x1, y1, z1, length;
     int x, y, z, nNull, x1, y1, z1, length;
 
 
     if (!map->useCache) {
     if (!map->useCache) {
-	Rast3d_getBlockNocache(map, x0, y0, z0, nx, ny, nz, block, type);
+	Rast3d_get_block_nocache(map, x0, y0, z0, nx, ny, nz, block, type);
 	return;
 	return;
     }
     }
 
 
@@ -121,17 +121,17 @@ Rast3d_getBlock(RASTER3D_Map * map, int x0, int y0, int z0, int nx, int ny, int
     for (z = z0; z < z1; z++) {
     for (z = z0; z < z1; z++) {
 	for (y = y0; y < y1; y++) {
 	for (y = y0; y < y1; y++) {
 	    for (x = x0; x < x1; x++) {
 	    for (x = x0; x < x1; x++) {
-		Rast3d_getValueRegion(map, x, y, z, block, type);
+		Rast3d_get_value_region(map, x, y, z, block, type);
 		block = G_incr_void_ptr(block, length);
 		block = G_incr_void_ptr(block, length);
 	    }
 	    }
 	    nNull = x0 + nx - x;
 	    nNull = x0 + nx - x;
-	    Rast3d_setNullValue(block, nNull, type);
+	    Rast3d_set_null_value(block, nNull, type);
 	    block = G_incr_void_ptr(block, length * nNull);
 	    block = G_incr_void_ptr(block, length * nNull);
 	}
 	}
 	nNull = (y0 + ny - y) * nx;
 	nNull = (y0 + ny - y) * nx;
-	Rast3d_setNullValue(block, nNull, type);
+	Rast3d_set_null_value(block, nNull, type);
 	block = G_incr_void_ptr(block, length * nNull);
 	block = G_incr_void_ptr(block, length * nNull);
     }
     }
     nNull = (z0 + nz - z) * ny * nx;
     nNull = (z0 + nz - z) * ny * nx;
-    Rast3d_setNullValue(block, nNull, type);
+    Rast3d_set_null_value(block, nNull, type);
 }
 }

+ 27 - 27
lib/raster3d/getvalue.c

@@ -19,7 +19,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getValue(RASTER3D_Map * map, int x, int y, int z, void *value, int type)
+void Rast3d_get_value(RASTER3D_Map * map, int x, int y, int z, void *value, int type)
 {
 {
     /* get the resampled value */
     /* get the resampled value */
     map->resampleFun(map, x, y, z, value, type);
     map->resampleFun(map, x, y, z, value, type);
@@ -31,7 +31,7 @@ void Rast3d_getValue(RASTER3D_Map * map, int x, int y, int z, void *value, int t
  * \brief 
  * \brief 
  *
  *
  * Is equivalent to
  * Is equivalent to
- * <tt>Rast3d_getValue (map, x, y, z, &value, FCELL_TYPE);</tt> return value.
+ * <tt>Rast3d_get_value (map, x, y, z, &value, FCELL_TYPE);</tt> return value.
  *
  *
  *  \param map
  *  \param map
  *  \param x
  *  \param x
@@ -40,11 +40,11 @@ void Rast3d_getValue(RASTER3D_Map * map, int x, int y, int z, void *value, int t
  *  \return float
  *  \return float
  */
  */
 
 
-float Rast3d_getFloat(RASTER3D_Map * map, int x, int y, int z)
+float Rast3d_get_float(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     float value;
     float value;
 
 
-    Rast3d_getValue(map, x, y, z, &value, FCELL_TYPE);
+    Rast3d_get_value(map, x, y, z, &value, FCELL_TYPE);
     return value;
     return value;
 }
 }
 
 
@@ -54,7 +54,7 @@ float Rast3d_getFloat(RASTER3D_Map * map, int x, int y, int z)
  * \brief 
  * \brief 
  *
  *
  * Is equivalent
  * Is equivalent
- * to <tt>Rast3d_getValue (map, x, y, z, &value, DCELL_TYPE);</tt> return value.
+ * to <tt>Rast3d_get_value (map, x, y, z, &value, DCELL_TYPE);</tt> return value.
  *
  *
  *  \param map
  *  \param map
  *  \param x
  *  \param x
@@ -63,11 +63,11 @@ float Rast3d_getFloat(RASTER3D_Map * map, int x, int y, int z)
  *  \return double
  *  \return double
  */
  */
 
 
-double Rast3d_getDouble(RASTER3D_Map * map, int x, int y, int z)
+double Rast3d_get_double(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     double value;
     double value;
 
 
-    Rast3d_getValue(map, x, y, z, &value, DCELL_TYPE);
+    Rast3d_get_value(map, x, y, z, &value, DCELL_TYPE);
     return value;
     return value;
 }
 }
 
 
@@ -91,7 +91,7 @@ double Rast3d_getDouble(RASTER3D_Map * map, int x, int y, int z)
  */
  */
 
 
 void
 void
-Rast3d_getWindowValue(RASTER3D_Map * map, double north, double east, double top,
+Rast3d_get_window_value(RASTER3D_Map * map, double north, double east, double top,
 		   void *value, int type)
 		   void *value, int type)
 {
 {
     int col, row, depth;
     int col, row, depth;
@@ -102,7 +102,7 @@ Rast3d_getWindowValue(RASTER3D_Map * map, double north, double east, double top,
     if ((row < 0) || (row >= map->window.rows) ||
     if ((row < 0) || (row >= map->window.rows) ||
 	(col < 0) || (col >= map->window.cols) ||
 	(col < 0) || (col >= map->window.cols) ||
 	(depth < 0) || (depth >= map->window.depths)) {
 	(depth < 0) || (depth >= map->window.depths)) {
-	Rast3d_setNullValue(value, 1, type);
+	Rast3d_set_null_value(value, 1, type);
 	return;
 	return;
     }
     }
 
 
@@ -128,7 +128,7 @@ Rast3d_getWindowValue(RASTER3D_Map * map, double north, double east, double top,
  */
  */
 
 
 void
 void
-Rast3d_getRegionValue(RASTER3D_Map * map, double north, double east, double top,
+Rast3d_get_region_value(RASTER3D_Map * map, double north, double east, double top,
 		   void *value, int type)
 		   void *value, int type)
 {
 {
     int row, col, depth;
     int row, col, depth;
@@ -139,12 +139,12 @@ Rast3d_getRegionValue(RASTER3D_Map * map, double north, double east, double top,
     if ((row < 0) || (row >= map->region.rows) ||
     if ((row < 0) || (row >= map->region.rows) ||
 	(col < 0) || (col >= map->region.cols) ||
 	(col < 0) || (col >= map->region.cols) ||
 	(depth < 0) || (depth >= map->region.depths)) {
 	(depth < 0) || (depth >= map->region.depths)) {
-	Rast3d_setNullValue(value, 1, type);
+	Rast3d_set_null_value(value, 1, type);
 	return;
 	return;
     }
     }
 
 
     /* Get the value from the map in map-region resolution */
     /* Get the value from the map in map-region resolution */
-	Rast3d_getValueRegion(map, col, row, depth, value, type);
+	Rast3d_get_value_region(map, col, row, depth, value, type);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -152,7 +152,7 @@ Rast3d_getRegionValue(RASTER3D_Map * map, double north, double east, double top,
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Is equivalent to <tt>Rast3d_getValueRegion (map, x, y, z, &value, FCELL_TYPE);</tt>
+ * Is equivalent to <tt>Rast3d_get_value_region (map, x, y, z, &value, FCELL_TYPE);</tt>
  * return value.
  * return value.
  *
  *
  *  \param map
  *  \param map
@@ -162,19 +162,19 @@ Rast3d_getRegionValue(RASTER3D_Map * map, double north, double east, double top,
  *  \return float
  *  \return float
  */
  */
 
 
-float Rast3d_getFloatRegion(RASTER3D_Map * map, int x, int y, int z)
+float Rast3d_get_float_region(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     int tileIndex, offs;
     int tileIndex, offs;
     float *tile;
     float *tile;
 
 
     if (map->typeIntern == DCELL_TYPE)
     if (map->typeIntern == DCELL_TYPE)
-	return (float)Rast3d_getDoubleRegion(map, x, y, z);
+	return (float)Rast3d_get_double_region(map, x, y, z);
 
 
-    Rast3d_coord2tileIndex(map, x, y, z, &tileIndex, &offs);
-    tile = (float *)Rast3d_getTilePtr(map, tileIndex);
+    Rast3d_coord2tile_index(map, x, y, z, &tileIndex, &offs);
+    tile = (float *)Rast3d_get_tile_ptr(map, tileIndex);
 
 
     if (tile == NULL)
     if (tile == NULL)
-	Rast3d_fatalError("Rast3d_getFloatRegion: error in Rast3d_getTilePtr");
+	Rast3d_fatal_error("Rast3d_get_float_region: error in Rast3d_get_tile_ptr");
 
 
     return tile[offs];
     return tile[offs];
 }
 }
@@ -185,7 +185,7 @@ float Rast3d_getFloatRegion(RASTER3D_Map * map, int x, int y, int z)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Is equivalent to <tt>Rast3d_getValueRegion (map, x, y, z, &value,
+ * Is equivalent to <tt>Rast3d_get_value_region (map, x, y, z, &value,
  * DCELL_TYPE);</tt> return value.
  * DCELL_TYPE);</tt> return value.
  *
  *
  *  \param map
  *  \param map
@@ -195,19 +195,19 @@ float Rast3d_getFloatRegion(RASTER3D_Map * map, int x, int y, int z)
  *  \return double
  *  \return double
  */
  */
 
 
-double Rast3d_getDoubleRegion(RASTER3D_Map * map, int x, int y, int z)
+double Rast3d_get_double_region(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     int tileIndex, offs;
     int tileIndex, offs;
     double *tile;
     double *tile;
 
 
     if (map->typeIntern == FCELL_TYPE)
     if (map->typeIntern == FCELL_TYPE)
-	return (double)Rast3d_getFloatRegion(map, x, y, z);
+	return (double)Rast3d_get_float_region(map, x, y, z);
 
 
-    Rast3d_coord2tileIndex(map, x, y, z, &tileIndex, &offs);
-    tile = (double *)Rast3d_getTilePtr(map, tileIndex);
+    Rast3d_coord2tile_index(map, x, y, z, &tileIndex, &offs);
+    tile = (double *)Rast3d_get_tile_ptr(map, tileIndex);
 
 
     if (tile == NULL)
     if (tile == NULL)
-	Rast3d_fatalError("Rast3d_getDoubleRegion: error in Rast3d_getTilePtr");
+	Rast3d_fatal_error("Rast3d_get_double_region: error in Rast3d_get_tile_ptr");
 
 
     return tile[offs];
     return tile[offs];
 }
 }
@@ -234,12 +234,12 @@ double Rast3d_getDoubleRegion(RASTER3D_Map * map, int x, int y, int z)
  */
  */
 
 
 void
 void
-Rast3d_getValueRegion(RASTER3D_Map * map, int x, int y, int z, void *value, int type)
+Rast3d_get_value_region(RASTER3D_Map * map, int x, int y, int z, void *value, int type)
 {
 {
     if (type == FCELL_TYPE) {
     if (type == FCELL_TYPE) {
-	*((float *)value) = Rast3d_getFloatRegion(map, x, y, z);
+	*((float *)value) = Rast3d_get_float_region(map, x, y, z);
 	return;
 	return;
     }
     }
 
 
-    *((double *)value) = Rast3d_getDoubleRegion(map, x, y, z);
+    *((double *)value) = Rast3d_get_double_region(map, x, y, z);
 }
 }

+ 36 - 36
lib/raster3d/header.c

@@ -46,16 +46,16 @@ Rast3d_readWriteHeader(struct Key_Value *headerKeys, int doRead, int *proj,
     int (*headerString) ();
     int (*headerString) ();
 
 
     if (doRead) {
     if (doRead) {
-	headerDouble = Rast3d_keyGetDouble;
-	headerInt = Rast3d_keyGetInt;
-	headerString = Rast3d_keyGetString;
-	headerValue = Rast3d_keyGetValue;
+	headerDouble = Rast3d_key_get_double;
+	headerInt = Rast3d_key_get_int;
+	headerString = Rast3d_key_get_string;
+	headerValue = Rast3d_key_get_value;
     }
     }
     else {
     else {
-	headerDouble = Rast3d_keySetDouble;
-	headerInt = Rast3d_keySetInt;
-	headerString = Rast3d_keySetString;
-	headerValue = Rast3d_keySetValue;
+	headerDouble = Rast3d_key_set_double;
+	headerInt = Rast3d_key_set_int;
+	headerString = Rast3d_key_set_string;
+	headerValue = Rast3d_key_set_value;
     }
     }
 
 
     returnVal = 1;
     returnVal = 1;
@@ -109,7 +109,7 @@ Rast3d_readWriteHeader(struct Key_Value *headerKeys, int doRead, int *proj,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_readHeader(RASTER3D_Map * map, int *proj, int *zone, double *north,
+Rast3d_read_header(RASTER3D_Map * map, int *proj, int *zone, double *north,
 	       double *south, double *east, double *west, double *top,
 	       double *south, double *east, double *west, double *top,
 	       double *bottom, int *rows, int *cols, int *depths,
 	       double *bottom, int *rows, int *cols, int *depths,
 	       double *ew_res, double *ns_res, double *tb_res, int *tileX,
 	       double *ew_res, double *ns_res, double *tb_res, int *tileX,
@@ -122,7 +122,7 @@ Rast3d_readHeader(RASTER3D_Map * map, int *proj, int *zone, double *north,
 
 
     Rast3d_filename(path, RASTER3D_HEADER_ELEMENT, map->fileName, map->mapset);
     Rast3d_filename(path, RASTER3D_HEADER_ELEMENT, map->fileName, map->mapset);
     if (access(path, R_OK) != 0) {
     if (access(path, R_OK) != 0) {
-	Rast3d_error("Rast3d_readHeader: unable to find [%s]", path);
+	Rast3d_error("Rast3d_read_header: unable to find [%s]", path);
 	return 0;
 	return 0;
     }
     }
 
 
@@ -136,7 +136,7 @@ Rast3d_readHeader(RASTER3D_Map * map, int *proj, int *zone, double *north,
 			     tileX, tileY, tileZ,
 			     tileX, tileY, tileZ,
 			     type, compression, useRle, useLzw, precision,
 			     type, compression, useRle, useLzw, precision,
 			     dataOffset, useXdr, hasIndex, unit)) {
 			     dataOffset, useXdr, hasIndex, unit)) {
-	Rast3d_error("Rast3d_readHeader: error extracting header key(s) of file %s",
+	Rast3d_error("Rast3d_read_header: error extracting header key(s) of file %s",
 		  path);
 		  path);
 	return 0;
 	return 0;
     }
     }
@@ -148,7 +148,7 @@ Rast3d_readHeader(RASTER3D_Map * map, int *proj, int *zone, double *north,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_writeHeader(RASTER3D_Map * map, int proj, int zone, double north, double south,
+Rast3d_write_header(RASTER3D_Map * map, int proj, int zone, double north, double south,
 		double east, double west, double top, double bottom, int rows,
 		double east, double west, double top, double bottom, int rows,
 		int cols, int depths, double ew_res, double ns_res,
 		int cols, int depths, double ew_res, double ns_res,
 		double tb_res, int tileX, int tileY, int tileZ, int type,
 		double tb_res, int tileX, int tileY, int tileZ, int type,
@@ -169,13 +169,13 @@ Rast3d_writeHeader(RASTER3D_Map * map, int proj, int zone, double north, double
 			     &type, &compression, &useRle, &useLzw,
 			     &type, &compression, &useRle, &useLzw,
 			     &precision, &dataOffset, &useXdr, &hasIndex,
 			     &precision, &dataOffset, &useXdr, &hasIndex,
 			     &unit)) {
 			     &unit)) {
-	Rast3d_error("Rast3d_writeHeader: error adding header key(s) for file %s",
+	Rast3d_error("Rast3d_write_header: error adding header key(s) for file %s",
 		  path);
 		  path);
 	return 0;
 	return 0;
     }
     }
 
 
     Rast3d_filename(path, RASTER3D_HEADER_ELEMENT, map->fileName, map->mapset);
     Rast3d_filename(path, RASTER3D_HEADER_ELEMENT, map->fileName, map->mapset);
-    Rast3d_makeMapsetMapDirectory(map->fileName);
+    Rast3d_make_mapset_map_directory(map->fileName);
     G_write_key_value_file(path, headerKeys);
     G_write_key_value_file(path, headerKeys);
 
 
     G_free_key_value(headerKeys);
     G_free_key_value(headerKeys);
@@ -211,7 +211,7 @@ Rast3d_writeHeader(RASTER3D_Map * map, int proj, int zone, double north, double
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_cacheSizeEncode(int cacheCode, int n)
+int Rast3d_cache_size_encode(int cacheCode, int n)
 {
 {
     if (cacheCode >= RASTER3D_NO_CACHE)
     if (cacheCode >= RASTER3D_NO_CACHE)
 	return cacheCode * n;
 	return cacheCode * n;
@@ -219,14 +219,14 @@ int Rast3d_cacheSizeEncode(int cacheCode, int n)
 	return cacheCode;
 	return cacheCode;
 
 
     if (cacheCode < RASTER3D_USE_CACHE_XYZ)
     if (cacheCode < RASTER3D_USE_CACHE_XYZ)
-	Rast3d_fatalError("Rast3d_cacheSizeEncode: invalid cache code");
+	Rast3d_fatal_error("Rast3d_cache_size_encode: invalid cache code");
 
 
     return n * (-10) + cacheCode;
     return n * (-10) + cacheCode;
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d__computeCacheSize(RASTER3D_Map * map, int cacheCode)
+int Rast3d__compute_cache_size(RASTER3D_Map * map, int cacheCode)
 {
 {
     int n, size;
     int n, size;
 
 
@@ -254,7 +254,7 @@ int Rast3d__computeCacheSize(RASTER3D_Map * map, int cacheCode)
     else if (cacheCode == RASTER3D_USE_CACHE_XYZ)
     else if (cacheCode == RASTER3D_USE_CACHE_XYZ)
 	size = map->nTiles;
 	size = map->nTiles;
     else
     else
-	Rast3d_fatalError("Rast3d__computeCacheSize: invalid cache code");
+	Rast3d_fatal_error("Rast3d__compute_cache_size: invalid cache code");
 
 
     return RASTER3D_MIN(size, map->nTiles);
     return RASTER3D_MIN(size, map->nTiles);
 }
 }
@@ -266,7 +266,7 @@ int Rast3d__computeCacheSize(RASTER3D_Map * map, int cacheCode)
 /* and initializes the index and cache. This function should be taken apart. */
 /* and initializes the index and cache. This function should be taken apart. */
 
 
 int
 int
-Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle,
+Rast3d_fill_header(RASTER3D_Map * map, int operation, int compression, int useRle,
 	       int useLzw, int type, int precision, int cache, int hasIndex,
 	       int useLzw, int type, int precision, int cache, int hasIndex,
 	       int useXdr, int typeIntern, int nofHeaderBytes, int tileX,
 	       int useXdr, int typeIntern, int nofHeaderBytes, int tileX,
 	       int tileY, int tileZ, int proj, int zone, double north,
 	       int tileY, int tileZ, int proj, int zone, double north,
@@ -275,7 +275,7 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
 	       double ns_res, double tb_res, char *unit)
 	       double ns_res, double tb_res, char *unit)
 {
 {
     if (!RASTER3D_VALID_OPERATION(operation))
     if (!RASTER3D_VALID_OPERATION(operation))
-	Rast3d_fatalError("Rast3d_fillHeader: operation not valid\n");
+	Rast3d_fatal_error("Rast3d_fill_header: operation not valid\n");
 
 
     map->operation = operation;
     map->operation = operation;
 
 
@@ -299,7 +299,7 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
     map->region.ns_res = ns_res;
     map->region.ns_res = ns_res;
     map->region.tb_res = tb_res;
     map->region.tb_res = tb_res;
 
 
-    Rast3d_adjustRegion(&(map->region));
+    Rast3d_adjust_region(&(map->region));
 
 
     map->tileX = tileX;
     map->tileX = tileX;
     map->tileY = tileY;
     map->tileY = tileY;
@@ -327,28 +327,28 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
 	map->clipZ = -1;
 	map->clipZ = -1;
 
 
     if ((type != FCELL_TYPE) && (type != DCELL_TYPE))
     if ((type != FCELL_TYPE) && (type != DCELL_TYPE))
-	Rast3d_fatalError("Rast3d_fillHeader: invalid type");
+	Rast3d_fatal_error("Rast3d_fill_header: invalid type");
     map->type = type;
     map->type = type;
 
 
     if ((typeIntern != FCELL_TYPE) && (typeIntern != DCELL_TYPE))
     if ((typeIntern != FCELL_TYPE) && (typeIntern != DCELL_TYPE))
-	Rast3d_fatalError("Rast3d_fillHeader: invalid type");
+	Rast3d_fatal_error("Rast3d_fill_header: invalid type");
     map->typeIntern = typeIntern;
     map->typeIntern = typeIntern;
 
 
     if (!RASTER3D_VALID_XDR_OPTION(useXdr))
     if (!RASTER3D_VALID_XDR_OPTION(useXdr))
-	Rast3d_fatalError("Rast3d_fillHeader: invalid xdr option");
+	Rast3d_fatal_error("Rast3d_fill_header: invalid xdr option");
     map->useXdr = useXdr;
     map->useXdr = useXdr;
 
 
     map->offset = nofHeaderBytes;
     map->offset = nofHeaderBytes;
 
 
     if ((map->fileEndPtr = lseek(map->data_fd, (long)0, SEEK_END)) == -1) {
     if ((map->fileEndPtr = lseek(map->data_fd, (long)0, SEEK_END)) == -1) {
-	Rast3d_error("Rast3d_fillHeader: can't position file");
+	Rast3d_error("Rast3d_fill_header: can't position file");
 	return 0;
 	return 0;
     }
     }
 
 
     map->useCache = (cache != RASTER3D_NO_CACHE);
     map->useCache = (cache != RASTER3D_NO_CACHE);
 
 
     map->numLengthIntern = Rast3d_length(map->typeIntern);
     map->numLengthIntern = Rast3d_length(map->typeIntern);
-    map->numLengthExtern = Rast3d_externLength(map->type);
+    map->numLengthExtern = Rast3d_extern_length(map->type);
 
 
     map->compression = compression;
     map->compression = compression;
     map->useRle = useRle;
     map->useRle = useRle;
@@ -364,7 +364,7 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
 		RLE_STATUS_BYTES;
 		RLE_STATUS_BYTES;
 	    tmpCompress = Rast3d_malloc(tmpCompressLength);
 	    tmpCompress = Rast3d_malloc(tmpCompressLength);
 	    if (tmpCompress == NULL) {
 	    if (tmpCompress == NULL) {
-		Rast3d_error("Rast3d_fillHeader: error in Rast3d_malloc");
+		Rast3d_error("Rast3d_fill_header: error in Rast3d_malloc");
 		return 0;
 		return 0;
 	    }
 	    }
 	}
 	}
@@ -376,7 +376,7 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
 		RLE_STATUS_BYTES;
 		RLE_STATUS_BYTES;
 	    tmpCompress = Rast3d_realloc(tmpCompress, tmpCompressLength);
 	    tmpCompress = Rast3d_realloc(tmpCompress, tmpCompressLength);
 	    if (tmpCompress == NULL) {
 	    if (tmpCompress == NULL) {
-		Rast3d_error("Rast3d_fillHeader: error in Rast3d_realloc");
+		Rast3d_error("Rast3d_fill_header: error in Rast3d_realloc");
 		return 0;
 		return 0;
 	    }
 	    }
 	}
 	}
@@ -384,8 +384,8 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
 
 
 #define XDR_MISUSE_BYTES 10
 #define XDR_MISUSE_BYTES 10
 
 
-    if (!Rast3d_initFpXdr(map, XDR_MISUSE_BYTES)) {
-	Rast3d_error("Rast3d_fillHeader: error in Rast3d_initFpXdr");
+    if (!Rast3d_init_fp_xdr(map, XDR_MISUSE_BYTES)) {
+	Rast3d_error("Rast3d_fill_header: error in Rast3d_init_fp_xdr");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -396,25 +396,25 @@ Rast3d_fillHeader(RASTER3D_Map * map, int operation, int compression, int useRle
 	/* allocate one tile buffer */
 	/* allocate one tile buffer */
 	map->data = Rast3d_malloc(map->tileSize * map->numLengthIntern);
 	map->data = Rast3d_malloc(map->tileSize * map->numLengthIntern);
 	if (map->data == NULL) {
 	if (map->data == NULL) {
-	    Rast3d_error("Rast3d_fillHeader: error in Rast3d_malloc");
+	    Rast3d_error("Rast3d_fill_header: error in Rast3d_malloc");
 	    return 0;
 	    return 0;
 	}
 	}
 	map->currentIndex = -1;
 	map->currentIndex = -1;
     }
     }
     else {
     else {
-	if (!Rast3d_initCache(map,
+	if (!Rast3d_init_cache(map,
 			   RASTER3D_MAX(1,
 			   RASTER3D_MAX(1,
-				   RASTER3D_MIN(Rast3d__computeCacheSize(map, cache),
+				   RASTER3D_MIN(Rast3d__compute_cache_size(map, cache),
 					   g3d_cache_max /
 					   g3d_cache_max /
 					   map->tileSize /
 					   map->tileSize /
 					   map->numLengthIntern)))) {
 					   map->numLengthIntern)))) {
-	    Rast3d_error("Rast3d_fillHeader: error in Rast3d_initCache");
+	    Rast3d_error("Rast3d_fill_header: error in Rast3d_init_cache");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
 
 
-    if (!Rast3d_initIndex(map, hasIndex)) {
-	Rast3d_error("Rast3d_fillHeader: error in Rast3d_initIndex");
+    if (!Rast3d_init_index(map, hasIndex)) {
+	Rast3d_error("Rast3d_fill_header: error in Rast3d_init_index");
 	return 0;
 	return 0;
     }
     }
 
 

+ 16 - 16
lib/raster3d/headerinfo.c

@@ -16,7 +16,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getCoordsMap(RASTER3D_Map * map, int *rows, int *cols, int *depths)
+void Rast3d_get_coords_map(RASTER3D_Map * map, int *rows, int *cols, int *depths)
 {
 {
     *rows = map->region.rows;
     *rows = map->region.rows;
     *cols = map->region.cols;
     *cols = map->region.cols;
@@ -25,7 +25,7 @@ void Rast3d_getCoordsMap(RASTER3D_Map * map, int *rows, int *cols, int *depths)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void Rast3d_getCoordsMapWindow(RASTER3D_Map * map, int *rows, int *cols, int *depths)
+void Rast3d_get_coords_map_window(RASTER3D_Map * map, int *rows, int *cols, int *depths)
 {
 {
     *rows = map->window.rows;
     *rows = map->window.rows;
     *cols = map->window.cols;
     *cols = map->window.cols;
@@ -48,7 +48,7 @@ void Rast3d_getCoordsMapWindow(RASTER3D_Map * map, int *rows, int *cols, int *de
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getNofTilesMap(RASTER3D_Map * map, int *nx, int *ny, int *nz)
+void Rast3d_get_nof_tiles_map(RASTER3D_Map * map, int *nx, int *ny, int *nz)
 {
 {
     *nx = map->nx;
     *nx = map->nx;
     *ny = map->ny;
     *ny = map->ny;
@@ -74,7 +74,7 @@ void Rast3d_getNofTilesMap(RASTER3D_Map * map, int *nx, int *ny, int *nz)
  */
  */
 
 
 void
 void
-Rast3d_getRegionMap(RASTER3D_Map * map, double *north, double *south, double *east,
+Rast3d_get_region_map(RASTER3D_Map * map, double *north, double *south, double *east,
 		 double *west, double *top, double *bottom)
 		 double *west, double *top, double *bottom)
 {
 {
     *north = map->region.north;
     *north = map->region.north;
@@ -88,7 +88,7 @@ Rast3d_getRegionMap(RASTER3D_Map * map, double *north, double *south, double *ea
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_getWindowMap(RASTER3D_Map * map, double *north, double *south, double *east,
+Rast3d_get_window_map(RASTER3D_Map * map, double *north, double *south, double *east,
 		 double *west, double *top, double *bottom)
 		 double *west, double *top, double *bottom)
 {
 {
     *north = map->window.north;
     *north = map->window.north;
@@ -112,16 +112,16 @@ Rast3d_getWindowMap(RASTER3D_Map * map, double *north, double *south, double *ea
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getRegionStructMap(RASTER3D_Map * map, RASTER3D_Region * region)
+void Rast3d_get_region_struct_map(RASTER3D_Map * map, RASTER3D_Region * region)
 {
 {
-    Rast3d_regionCopy(region, &(map->region));
+    Rast3d_region_copy(region, &(map->region));
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void Rast3d_getWindowStructMap(RASTER3D_Map * map, RASTER3D_Region * window)
 void Rast3d_getWindowStructMap(RASTER3D_Map * map, RASTER3D_Region * window)
 {
 {
-    Rast3d_regionCopy(window, &(map->window));
+    Rast3d_region_copy(window, &(map->window));
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -139,7 +139,7 @@ void Rast3d_getWindowStructMap(RASTER3D_Map * map, RASTER3D_Region * window)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getTileDimensionsMap(RASTER3D_Map * map, int *x, int *y, int *z)
+void Rast3d_get_tile_dimensions_map(RASTER3D_Map * map, int *x, int *y, int *z)
 {
 {
     *x = map->tileX;
     *x = map->tileX;
     *y = map->tileY;
     *y = map->tileY;
@@ -158,7 +158,7 @@ void Rast3d_getTileDimensionsMap(RASTER3D_Map * map, int *x, int *y, int *z)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_tileTypeMap(RASTER3D_Map * map)
+int Rast3d_tile_type_map(RASTER3D_Map * map)
 {
 {
     return map->typeIntern;
     return map->typeIntern;
 }
 }
@@ -175,7 +175,7 @@ int Rast3d_tileTypeMap(RASTER3D_Map * map)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_fileTypeMap(RASTER3D_Map * map)
+int Rast3d_file_type_map(RASTER3D_Map * map)
 {
 {
     return map->type;
     return map->type;
 }
 }
@@ -192,7 +192,7 @@ int Rast3d_fileTypeMap(RASTER3D_Map * map)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_tilePrecisionMap(RASTER3D_Map * map)
+int Rast3d_tile_precision_map(RASTER3D_Map * map)
 {
 {
     return map->precision;
     return map->precision;
 }
 }
@@ -209,7 +209,7 @@ int Rast3d_tilePrecisionMap(RASTER3D_Map * map)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_tileUseCacheMap(RASTER3D_Map * map)
+int Rast3d_tile_use_cache_map(RASTER3D_Map * map)
 {
 {
     return map->useCache;
     return map->useCache;
 }
 }
@@ -225,7 +225,7 @@ int Rast3d_tileUseCacheMap(RASTER3D_Map * map)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_printHeader(RASTER3D_Map * map)
+void Rast3d_print_header(RASTER3D_Map * map)
 {
 {
     double rangeMin, rangeMax;
     double rangeMin, rangeMax;
 
 
@@ -265,11 +265,11 @@ void Rast3d_printHeader(RASTER3D_Map * map)
 	   map->region.depths);
 	   map->region.depths);
     printf("  Tile size (%d %d %d)\n", map->tileX, map->tileY, map->tileZ);
     printf("  Tile size (%d %d %d)\n", map->tileX, map->tileY, map->tileZ);
     printf("  Range (");
     printf("  Range (");
-    if (Rast3d_isNullValueNum(&rangeMin, DCELL_TYPE))
+    if (Rast3d_is_null_value_num(&rangeMin, DCELL_TYPE))
 	printf("NULL, ");
 	printf("NULL, ");
     else
     else
 	printf("%f, ", (double)rangeMin);
 	printf("%f, ", (double)rangeMin);
-    if (Rast3d_isNullValueNum(&rangeMax, DCELL_TYPE))
+    if (Rast3d_is_null_value_num(&rangeMax, DCELL_TYPE))
 	printf("NULL)\n");
 	printf("NULL)\n");
     else
     else
 	printf("%f)\n", (double)rangeMax);
 	printf("%f)\n", (double)rangeMax);

+ 4 - 4
lib/raster3d/history.c

@@ -1,7 +1,7 @@
 
 
 /**********************************************************************
 /**********************************************************************
  *
  *
- *  Rast3d_readHistory (name, mapset, hist)
+ *  Rast3d_read_history (name, mapset, hist)
  *      char *name                   name of map
  *      char *name                   name of map
  *      char *mapset                 mapset that map belongs to
  *      char *mapset                 mapset that map belongs to
  *      struct History *hist        structure to hold history info
  *      struct History *hist        structure to hold history info
@@ -16,7 +16,7 @@
  *
  *
  **********************************************************************
  **********************************************************************
  *
  *
- *  Rast3d_writeHistory (name, hist)
+ *  Rast3d_write_history (name, hist)
  *      char *name                   name of map
  *      char *name                   name of map
  *      struct History *hist        structure holding history info
  *      struct History *hist        structure holding history info
  *
  *
@@ -61,7 +61,7 @@ void SimpleErrorMessage(FILE * fd, const char *name, const char *mapset)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_readHistory(const char *name, const char *mapset, struct History *hist)
+int Rast3d_read_history(const char *name, const char *mapset, struct History *hist)
 {
 {
     FILE *fp;
     FILE *fp;
 
 
@@ -94,7 +94,7 @@ int Rast3d_readHistory(const char *name, const char *mapset, struct History *his
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_writeHistory(const char *name, struct History *hist)
+int Rast3d_write_history(const char *name, struct History *hist)
 /* This function is adapted from Rast_write_history */
 /* This function is adapted from Rast_write_history */
 {
 {
     FILE *fp = G_fopen_new_misc(RASTER3D_DIRECTORY, RASTER3D_HISTORY_ELEMENT, name);
     FILE *fp = G_fopen_new_misc(RASTER3D_DIRECTORY, RASTER3D_HISTORY_ELEMENT, name);

+ 17 - 17
lib/raster3d/index.c

@@ -51,7 +51,7 @@ static int Rast3d_readIndex(RASTER3D_Map * map)
 	    return 0;
 	    return 0;
 	}
 	}
 
 
-	G_rle_decode(tmp2, tmp, map->indexLongNbytes * map->nTiles, 1,
+	Rast3d_rle_decode(tmp2, tmp, map->indexLongNbytes * map->nTiles, 1,
 		     &dummy1, &dummy2);
 		     &dummy1, &dummy2);
 
 
 	if (indexLength > sizeof(long) * map->nTiles)
 	if (indexLength > sizeof(long) * map->nTiles)
@@ -62,7 +62,7 @@ static int Rast3d_readIndex(RASTER3D_Map * map)
 	return 0;
 	return 0;
     }
     }
 
 
-    Rast3d_longDecode(tmp, map->index, map->nTiles, map->indexLongNbytes);
+    Rast3d_long_decode(tmp, map->index, map->nTiles, map->indexLongNbytes);
 
 
     for (tileIndex = 0; tileIndex < map->nTiles; tileIndex++)
     for (tileIndex = 0; tileIndex < map->nTiles; tileIndex++)
 	if (map->index[tileIndex] == 0)
 	if (map->index[tileIndex] == 0)
@@ -75,7 +75,7 @@ static int Rast3d_readIndex(RASTER3D_Map * map)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_flushIndex(RASTER3D_Map * map)
+int Rast3d_flush_index(RASTER3D_Map * map)
 {
 {
     int sizeCompressed, indexLength, tileIndex;
     int sizeCompressed, indexLength, tileIndex;
     unsigned char *tmp;
     unsigned char *tmp;
@@ -86,16 +86,16 @@ int Rast3d_flushIndex(RASTER3D_Map * map)
 
 
     map->indexOffset = lseek(map->data_fd, (long)0, SEEK_END);
     map->indexOffset = lseek(map->data_fd, (long)0, SEEK_END);
     if (map->indexOffset == -1) {
     if (map->indexOffset == -1) {
-	Rast3d_error("Rast3d_flushIndex: can't rewind file");
+	Rast3d_error("Rast3d_flush_index: can't rewind file");
 	return 0;
 	return 0;
     }
     }
 
 
-    map->indexNbytesUsed = Rast3d_longEncode(&(map->indexOffset),
+    map->indexNbytesUsed = Rast3d_long_encode(&(map->indexOffset),
 					  (unsigned char *)&ldummy, 1);
 					  (unsigned char *)&ldummy, 1);
 
 
     tmp = Rast3d_malloc(sizeof(long) * map->nTiles);
     tmp = Rast3d_malloc(sizeof(long) * map->nTiles);
     if (tmp == NULL) {
     if (tmp == NULL) {
-	Rast3d_error("Rast3d_flushIndex: error in Rast3d_malloc");
+	Rast3d_error("Rast3d_flush_index: error in Rast3d_malloc");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -103,29 +103,29 @@ int Rast3d_flushIndex(RASTER3D_Map * map)
 	if (map->index[tileIndex] == -1)
 	if (map->index[tileIndex] == -1)
 	    map->index[tileIndex] = 0;
 	    map->index[tileIndex] = 0;
 
 
-    (void)Rast3d_longEncode(map->index, tmp, map->nTiles);
+    (void)Rast3d_long_encode(map->index, tmp, map->nTiles);
 
 
-    sizeCompressed = G_rle_count_only(tmp, sizeof(long) * map->nTiles, 1);
+    sizeCompressed = Rast3d_rle_count_only(tmp, sizeof(long) * map->nTiles, 1);
 
 
     if (sizeCompressed >= map->nTiles * sizeof(long)) {
     if (sizeCompressed >= map->nTiles * sizeof(long)) {
 	indexLength = map->nTiles * sizeof(long);
 	indexLength = map->nTiles * sizeof(long);
 	if (write(map->data_fd, tmp, indexLength) != indexLength) {
 	if (write(map->data_fd, tmp, indexLength) != indexLength) {
-	    Rast3d_error("Rast3d_flushIndex: can't write file");
+	    Rast3d_error("Rast3d_flush_index: can't write file");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
     else {
     else {
 	indexLength = sizeCompressed;
 	indexLength = sizeCompressed;
-	G_rle_encode(tmp, (char *)map->index, sizeof(long) * map->nTiles, 1);
+	Rast3d_rle_encode(tmp, (char *)map->index, sizeof(long) * map->nTiles, 1);
 	if (write(map->data_fd, map->index, sizeCompressed) != sizeCompressed) {
 	if (write(map->data_fd, map->index, sizeCompressed) != sizeCompressed) {
-	    Rast3d_error("Rast3d_flushIndex: can't write file");
+	    Rast3d_error("Rast3d_flush_index: can't write file");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
 
 
     Rast3d_free(tmp);
     Rast3d_free(tmp);
     if (!Rast3d_readIndex(map)) {
     if (!Rast3d_readIndex(map)) {
-	Rast3d_error("Rast3d_flushIndex: error in Rast3d_readIndex");
+	Rast3d_error("Rast3d_flush_index: error in Rast3d_readIndex");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -152,7 +152,7 @@ static int indexSortCompare(const void *a, const void *b)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_initIndex(RASTER3D_Map * map, int hasIndex)
+int Rast3d_init_index(RASTER3D_Map * map, int hasIndex)
 {
 {
     int tile;
     int tile;
     int i0, i1, i2, i3, i4, i5, offset, nofElts;
     int i0, i1, i2, i3, i4, i5, offset, nofElts;
@@ -163,7 +163,7 @@ int Rast3d_initIndex(RASTER3D_Map * map, int hasIndex)
     map->tileLength = Rast3d_malloc(sizeof(int) * map->nTiles);
     map->tileLength = Rast3d_malloc(sizeof(int) * map->nTiles);
 
 
     if ((map->index == NULL) || (map->tileLength == NULL)) {
     if ((map->index == NULL) || (map->tileLength == NULL)) {
-	Rast3d_error("Rast3d_initIndex: error in Rast3d_malloc");
+	Rast3d_error("Rast3d_init_index: error in Rast3d_malloc");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -177,7 +177,7 @@ int Rast3d_initIndex(RASTER3D_Map * map, int hasIndex)
 	offset = 0;
 	offset = 0;
 	for (tile = 0; tile < map->nTiles; tile++) {
 	for (tile = 0; tile < map->nTiles; tile++) {
 	    map->index[tile] = offset * map->numLengthExtern + map->offset;
 	    map->index[tile] = offset * map->numLengthExtern + map->offset;
-	    nofElts = Rast3d_computeClippedTileDimensions
+	    nofElts = Rast3d_compute_clipped_tile_dimensions
 		(map, tile, &i0, &i1, &i2, &i3, &i4, &i5);
 		(map, tile, &i0, &i1, &i2, &i3, &i4, &i5);
 	    map->tileLength[tile] = nofElts * map->numLengthExtern;
 	    map->tileLength[tile] = nofElts * map->numLengthExtern;
 	    offset += nofElts;
 	    offset += nofElts;
@@ -186,13 +186,13 @@ int Rast3d_initIndex(RASTER3D_Map * map, int hasIndex)
     }
     }
 
 
     if (!Rast3d_readIndex(map)) {
     if (!Rast3d_readIndex(map)) {
-	Rast3d_error("Rast3d_initIndex: error in Rast3d_readIndex");
+	Rast3d_error("Rast3d_init_index: error in Rast3d_readIndex");
 	return 0;
 	return 0;
     }
     }
 
 
     offsetP = Rast3d_malloc(sizeof(int) * map->nTiles);
     offsetP = Rast3d_malloc(sizeof(int) * map->nTiles);
     if (offsetP == NULL) {
     if (offsetP == NULL) {
-	Rast3d_error("Rast3d_initIndex: error in Rast3d_malloc");
+	Rast3d_error("Rast3d_init_index: error in Rast3d_malloc");
 	return 0;
 	return 0;
     }
     }
 
 

+ 12 - 12
lib/raster3d/intio.c

@@ -8,7 +8,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_writeInts(int fd, int useXdr, const int *i, int nofNum)
+int Rast3d_write_ints(int fd, int useXdr, const int *i, int nofNum)
 {
 {
     int firstTime = 1;
     int firstTime = 1;
     XDR xdrEncodeStream;
     XDR xdrEncodeStream;
@@ -16,11 +16,11 @@ int Rast3d_writeInts(int fd, int useXdr, const int *i, int nofNum)
     u_int n;
     u_int n;
 
 
     if (nofNum <= 0)
     if (nofNum <= 0)
-	Rast3d_fatalError("Rast3d_writeInts: nofNum out of range");
+	Rast3d_fatal_error("Rast3d_write_ints: nofNum out of range");
 
 
     if (useXdr == RASTER3D_NO_XDR) {
     if (useXdr == RASTER3D_NO_XDR) {
 	if (write(fd, i, sizeof(int) * nofNum) != sizeof(int) * nofNum) {
 	if (write(fd, i, sizeof(int) * nofNum) != sizeof(int) * nofNum) {
-	    Rast3d_error("Rast3d_writeInts: writing to file failed");
+	    Rast3d_error("Rast3d_write_ints: writing to file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 	else {
 	else {
@@ -40,19 +40,19 @@ int Rast3d_writeInts(int fd, int useXdr, const int *i, int nofNum)
 	    n = 1024;
 	    n = 1024;
 
 
 	if (!xdr_setpos(&xdrEncodeStream, 0)) {
 	if (!xdr_setpos(&xdrEncodeStream, 0)) {
-	    Rast3d_error("Rast3d_writeInts: positioning xdr failed");
+	    Rast3d_error("Rast3d_write_ints: positioning xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!xdr_vector(&xdrEncodeStream, (char *)i, n, sizeof(int),
 	if (!xdr_vector(&xdrEncodeStream, (char *)i, n, sizeof(int),
 			(xdrproc_t) xdr_int)) {
 			(xdrproc_t) xdr_int)) {
-	    Rast3d_error("Rast3d_writeInts: writing xdr failed");
+	    Rast3d_error("Rast3d_write_ints: writing xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (write(fd, xdrIntBuf, RASTER3D_XDR_INT_LENGTH * n) !=
 	if (write(fd, xdrIntBuf, RASTER3D_XDR_INT_LENGTH * n) !=
 	    RASTER3D_XDR_INT_LENGTH * n) {
 	    RASTER3D_XDR_INT_LENGTH * n) {
-	    Rast3d_error("Rast3d_writeInts: writing xdr to file failed");
+	    Rast3d_error("Rast3d_write_ints: writing xdr to file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
@@ -65,7 +65,7 @@ int Rast3d_writeInts(int fd, int useXdr, const int *i, int nofNum)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_readInts(int fd, int useXdr, int *i, int nofNum)
+int Rast3d_read_ints(int fd, int useXdr, int *i, int nofNum)
 {
 {
     int firstTime = 1;
     int firstTime = 1;
     XDR xdrDecodeStream;
     XDR xdrDecodeStream;
@@ -73,11 +73,11 @@ int Rast3d_readInts(int fd, int useXdr, int *i, int nofNum)
     u_int n;
     u_int n;
 
 
     if (nofNum <= 0)
     if (nofNum <= 0)
-	Rast3d_fatalError("Rast3d_readInts: nofNum out of range");
+	Rast3d_fatal_error("Rast3d_read_ints: nofNum out of range");
 
 
     if (useXdr == RASTER3D_NO_XDR) {
     if (useXdr == RASTER3D_NO_XDR) {
 	if (read(fd, i, sizeof(int) * nofNum) != sizeof(int) * nofNum) {
 	if (read(fd, i, sizeof(int) * nofNum) != sizeof(int) * nofNum) {
-	    Rast3d_error("Rast3d_readInts: reading from file failed");
+	    Rast3d_error("Rast3d_read_ints: reading from file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 	else {
 	else {
@@ -98,18 +98,18 @@ int Rast3d_readInts(int fd, int useXdr, int *i, int nofNum)
 
 
 	if (read(fd, xdrIntBuf, RASTER3D_XDR_INT_LENGTH * n) !=
 	if (read(fd, xdrIntBuf, RASTER3D_XDR_INT_LENGTH * n) !=
 	    RASTER3D_XDR_INT_LENGTH * n) {
 	    RASTER3D_XDR_INT_LENGTH * n) {
-	    Rast3d_error("Rast3d_readInts: reading xdr from file failed");
+	    Rast3d_error("Rast3d_read_ints: reading xdr from file failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!xdr_setpos(&xdrDecodeStream, 0)) {
 	if (!xdr_setpos(&xdrDecodeStream, 0)) {
-	    Rast3d_error("Rast3d_readInts: positioning xdr failed");
+	    Rast3d_error("Rast3d_read_ints: positioning xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 
 	if (!xdr_vector(&xdrDecodeStream, (char *)i, n, sizeof(int),
 	if (!xdr_vector(&xdrDecodeStream, (char *)i, n, sizeof(int),
 			(xdrproc_t) xdr_int)) {
 			(xdrproc_t) xdr_int)) {
-	    Rast3d_error("Rast3d_readInts: reading xdr failed");
+	    Rast3d_error("Rast3d_read_ints: reading xdr failed");
 	    return 0;
 	    return 0;
 	}
 	}
 
 

+ 16 - 16
lib/raster3d/keys.c

@@ -4,12 +4,12 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_keyGetInt(struct Key_Value *keys, const char *key, int *i)
+int Rast3d_key_get_int(struct Key_Value *keys, const char *key, int *i)
 {
 {
     const char *str;
     const char *str;
 
 
     if ((str = G_find_key_value(key, keys)) == NULL) {
     if ((str = G_find_key_value(key, keys)) == NULL) {
-	Rast3d_error("Rast3d_keyGetInt: cannot find field %s in key structure",
+	Rast3d_error("Rast3d_key_get_int: cannot find field %s in key structure",
 		  key);
 		  key);
 	return 0;
 	return 0;
     }
     }
@@ -17,18 +17,18 @@ int Rast3d_keyGetInt(struct Key_Value *keys, const char *key, int *i)
     if (sscanf(str, "%d", i) == 1)
     if (sscanf(str, "%d", i) == 1)
 	return 1;
 	return 1;
 
 
-    Rast3d_error("Rast3d_keyGetInt: invalid value: field %s in key structure", key);
+    Rast3d_error("Rast3d_key_get_int: invalid value: field %s in key structure", key);
     return 0;
     return 0;
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_keyGetDouble(struct Key_Value *keys, const char *key, double *d)
+int Rast3d_key_get_double(struct Key_Value *keys, const char *key, double *d)
 {
 {
     const char *str;
     const char *str;
 
 
     if ((str = G_find_key_value(key, keys)) == NULL) {
     if ((str = G_find_key_value(key, keys)) == NULL) {
-	Rast3d_error("Rast3d_keyGetDouble: cannot find field %s in key structure",
+	Rast3d_error("Rast3d_key_get_double: cannot find field %s in key structure",
 		  key);
 		  key);
 	return 0;
 	return 0;
     }
     }
@@ -36,7 +36,7 @@ int Rast3d_keyGetDouble(struct Key_Value *keys, const char *key, double *d)
     if (sscanf(str, "%lf", d) == 1)
     if (sscanf(str, "%lf", d) == 1)
 	return 1;
 	return 1;
 
 
-    Rast3d_error("Rast3d_keyGetDouble: invalid value: field %s in key structure",
+    Rast3d_error("Rast3d_key_get_double: invalid value: field %s in key structure",
 	      key);
 	      key);
     return 0;
     return 0;
 }
 }
@@ -44,12 +44,12 @@ int Rast3d_keyGetDouble(struct Key_Value *keys, const char *key, double *d)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_keyGetString(struct Key_Value *keys, const char *key, char **returnStr)
+Rast3d_key_get_string(struct Key_Value *keys, const char *key, char **returnStr)
 {
 {
     const char *str;
     const char *str;
 
 
     if ((str = G_find_key_value(key, keys)) == NULL) {
     if ((str = G_find_key_value(key, keys)) == NULL) {
-	Rast3d_error("Rast3d_keyGetString: cannot find field %s in key structure",
+	Rast3d_error("Rast3d_key_get_string: cannot find field %s in key structure",
 		  key);
 		  key);
 	return 0;
 	return 0;
     }
     }
@@ -61,13 +61,13 @@ Rast3d_keyGetString(struct Key_Value *keys, const char *key, char **returnStr)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_keyGetValue(struct Key_Value *keys, const char *key, char *val1,
+Rast3d_key_get_value(struct Key_Value *keys, const char *key, char *val1,
 		char *val2, int result1, int result2, int *resultVar)
 		char *val2, int result1, int result2, int *resultVar)
 {
 {
     const char *str;
     const char *str;
 
 
     if ((str = G_find_key_value(key, keys)) == NULL) {
     if ((str = G_find_key_value(key, keys)) == NULL) {
-	Rast3d_error("Rast3d_keyGetValue: cannot find field %s in key structure",
+	Rast3d_error("Rast3d_key_get_value: cannot find field %s in key structure",
 		  key);
 		  key);
 	return 0;
 	return 0;
     }
     }
@@ -81,14 +81,14 @@ Rast3d_keyGetValue(struct Key_Value *keys, const char *key, char *val1,
 	return 1;
 	return 1;
     }
     }
 
 
-    Rast3d_error("Rast3d_keyGetValue: invalid type: field %s in key structure",
+    Rast3d_error("Rast3d_key_get_value: invalid type: field %s in key structure",
 	      key);
 	      key);
     return 0;
     return 0;
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_keySetInt(struct Key_Value *keys, const char *key, const int *i)
+int Rast3d_key_set_int(struct Key_Value *keys, const char *key, const int *i)
 {
 {
     char keyValStr[200];
     char keyValStr[200];
 
 
@@ -99,7 +99,7 @@ int Rast3d_keySetInt(struct Key_Value *keys, const char *key, const int *i)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_keySetDouble(struct Key_Value *keys, const char *key, const double *d)
+int Rast3d_key_set_double(struct Key_Value *keys, const char *key, const double *d)
 {
 {
     char keyValStr[200];
     char keyValStr[200];
 
 
@@ -111,7 +111,7 @@ int Rast3d_keySetDouble(struct Key_Value *keys, const char *key, const double *d
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_keySetString(struct Key_Value *keys, const char *key,
+Rast3d_key_set_string(struct Key_Value *keys, const char *key,
 		 char *const *keyValStr)
 		 char *const *keyValStr)
 {
 {
     G_set_key_value(key, *keyValStr, keys);
     G_set_key_value(key, *keyValStr, keys);
@@ -121,7 +121,7 @@ Rast3d_keySetString(struct Key_Value *keys, const char *key,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_keySetValue(struct Key_Value *keys, const char *key, const char *val1,
+Rast3d_key_set_value(struct Key_Value *keys, const char *key, const char *val1,
 		const char *val2, int keyval1, int keyval2,
 		const char *val2, int keyval1, int keyval2,
 		const int *keyvalVar)
 		const int *keyvalVar)
 {
 {
@@ -135,6 +135,6 @@ Rast3d_keySetValue(struct Key_Value *keys, const char *key, const char *val1,
 	return 1;
 	return 1;
     }
     }
 
 
-    Rast3d_error("Rast3d_keySetValue: wrong key value");
+    Rast3d_error("Rast3d_key_set_value: wrong key value");
     return 0;
     return 0;
 }
 }

+ 4 - 4
lib/raster3d/long.c

@@ -2,7 +2,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_longEncode(long *source, unsigned char *dst, int nofNums)
+int Rast3d_long_encode(long *source, unsigned char *dst, int nofNums)
 {
 {
     long *src, d;
     long *src, d;
     int eltLength, nBytes;
     int eltLength, nBytes;
@@ -33,7 +33,7 @@ int Rast3d_longEncode(long *source, unsigned char *dst, int nofNums)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_longDecode(unsigned char *source, long *dst, int nofNums, int longNbytes)
+Rast3d_long_decode(unsigned char *source, long *dst, int nofNums, int longNbytes)
 {
 {
     long *dest;
     long *dest;
     int eltLength;
     int eltLength;
@@ -50,7 +50,7 @@ Rast3d_longDecode(unsigned char *source, long *dst, int nofNums, int longNbytes)
     while (source != srcStop) {
     while (source != srcStop) {
 	*dest = *source--;
 	*dest = *source--;
 	if ((eltLength >= RASTER3D_LONG_LENGTH) && (*dest != 0))
 	if ((eltLength >= RASTER3D_LONG_LENGTH) && (*dest != 0))
-	    Rast3d_fatalError("Rast3d_longDecode: decoded long too long");
+	    Rast3d_fatal_error("Rast3d_long_decode: decoded long too long");
 	dest--;
 	dest--;
     }
     }
 
 
@@ -62,7 +62,7 @@ Rast3d_longDecode(unsigned char *source, long *dst, int nofNums, int longNbytes)
 	    *dest *= 256;
 	    *dest *= 256;
 	    *dest += *source--;
 	    *dest += *source--;
 	    if ((eltLength >= RASTER3D_LONG_LENGTH) && (*dest != 0))
 	    if ((eltLength >= RASTER3D_LONG_LENGTH) && (*dest != 0))
-		Rast3d_fatalError("Rast3d_longDecode: decoded long too long");
+		Rast3d_fatal_error("Rast3d_long_decode: decoded long too long");
 	    dest--;
 	    dest--;
 	}
 	}
     }
     }

+ 1 - 1
lib/raster3d/mapset.c

@@ -6,7 +6,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void Rast3d_makeMapsetMapDirectory(const char *mapName)
+void Rast3d_make_mapset_map_directory(const char *mapName)
 {
 {
     char buf[GNAME_MAX + sizeof(RASTER3D_DIRECTORY) + 2];
     char buf[GNAME_MAX + sizeof(RASTER3D_DIRECTORY) + 2];
 
 

+ 39 - 39
lib/raster3d/mask.c

@@ -24,16 +24,16 @@ static void dummy(void)
 
 
 static float RASTER3D_MASKNUMmaskValue;
 static float RASTER3D_MASKNUMmaskValue;
 
 
-/* Call to dummy() to match void return type of Rast3d_setNullValue() */
+/* Call to dummy() to match void return type of Rast3d_set_null_value() */
 #define RASTER3D_MASKNUM(map,Xmask,Ymask,Zmask,VALUEmask,TYPEmask) \
 #define RASTER3D_MASKNUM(map,Xmask,Ymask,Zmask,VALUEmask,TYPEmask) \
 \
 \
    (RASTER3D_MASKNUMmaskValue = Rast3d_getMaskFloat (map, Xmask, Ymask, Zmask), \
    (RASTER3D_MASKNUMmaskValue = Rast3d_getMaskFloat (map, Xmask, Ymask, Zmask), \
-    ((Rast3d_isNullValueNum (&RASTER3D_MASKNUMmaskValue, FCELL_TYPE)) ? \
-      Rast3d_setNullValue (VALUEmask, 1, TYPEmask) : dummy()))
+    ((Rast3d_is_null_value_num (&RASTER3D_MASKNUMmaskValue, FCELL_TYPE)) ? \
+      Rast3d_set_null_value (VALUEmask, 1, TYPEmask) : dummy()))
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
 
 
-int Rast3d_maskClose()
+int Rast3d_mask_close()
 {
 {
     /* No Idea if this is correct return value */
     /* No Idea if this is correct return value */
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
@@ -41,8 +41,8 @@ int Rast3d_maskClose()
 
 
     Rast3d_maskMapExistsVar = 0;
     Rast3d_maskMapExistsVar = 0;
 
 
-    if (!Rast3d_closeCell(Rast3d_maskMap)) {
-	Rast3d_error("Rast3d_maskClose: error closing mask");
+    if (!Rast3d_close_cell(Rast3d_maskMap)) {
+	Rast3d_error("Rast3d_mask_close: error closing mask");
 
 
 	return 0;
 	return 0;
     }
     }
@@ -61,7 +61,7 @@ int Rast3d_maskClose()
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_maskFileExists(void)
+int Rast3d_mask_file_exists(void)
 {
 {
     return G_find_file_misc(RASTER3D_DIRECTORY, RASTER3D_CELL_ELEMENT, RASTER3D_MASK_MAP, G_mapset()) != NULL;
     return G_find_file_misc(RASTER3D_DIRECTORY, RASTER3D_CELL_ELEMENT, RASTER3D_MASK_MAP, G_mapset()) != NULL;
 }
 }
@@ -70,7 +70,7 @@ int Rast3d_maskFileExists(void)
 
 
 static int maskOpenOldCacheDefault = RASTER3D_USE_CACHE_DEFAULT;
 static int maskOpenOldCacheDefault = RASTER3D_USE_CACHE_DEFAULT;
 
 
-int Rast3d_maskOpenOld(void)
+int Rast3d_mask_open_old(void)
 {
 {
     RASTER3D_Region region;
     RASTER3D_Region region;
 
 
@@ -78,22 +78,22 @@ int Rast3d_maskOpenOld(void)
     if (Rast3d_maskMapExistsVar)
     if (Rast3d_maskMapExistsVar)
 	return 1;
 	return 1;
 
 
-    Rast3d_maskMapExistsVar = Rast3d_maskFileExists();
+    Rast3d_maskMapExistsVar = Rast3d_mask_file_exists();
 
 
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
 	return 1;
 	return 1;
 
 
-    if ((Rast3d_maskMap = Rast3d_openCellOld(RASTER3D_MASK_MAP, G_mapset(),
+    if ((Rast3d_maskMap = Rast3d_open_cell_old(RASTER3D_MASK_MAP, G_mapset(),
 				       RASTER3D_DEFAULT_WINDOW, FCELL_TYPE,
 				       RASTER3D_DEFAULT_WINDOW, FCELL_TYPE,
 				       maskOpenOldCacheDefault))
 				       maskOpenOldCacheDefault))
 	== NULL) {
 	== NULL) {
-	Rast3d_error("Rast3d_maskOpenOld: cannot open mask");
+	Rast3d_error("Rast3d_mask_open_old: cannot open mask");
 
 
 	return 0;
 	return 0;
     }
     }
 
 
-    Rast3d_getRegionStructMap(Rast3d_maskMap, &region);
-    Rast3d_setWindowMap(Rast3d_maskMap, &region);
+    Rast3d_get_region_struct_map(Rast3d_maskMap, &region);
+    Rast3d_set_window_map(Rast3d_maskMap, &region);
 
 
     return 1;
     return 1;
 }
 }
@@ -112,7 +112,7 @@ static float Rast3d_getMaskFloat(RASTER3D_Map * map, int x, int y, int z)
     top = ((double)z + 0.5) / (double)map->window.depths *
     top = ((double)z + 0.5) / (double)map->window.depths *
 	(map->window.top - map->window.bottom) + map->window.bottom;
 	(map->window.top - map->window.bottom) + map->window.bottom;
 
 
-    Rast3d_getRegionValue(Rast3d_maskMap, north, east, top, &value, FCELL_TYPE);
+    Rast3d_get_region_value(Rast3d_maskMap, north, east, top, &value, FCELL_TYPE);
     return value;
     return value;
 }
 }
 
 
@@ -131,13 +131,13 @@ static float Rast3d_getMaskFloat(RASTER3D_Map * map, int x, int y, int z)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_maskReopen(int cache)
+int Rast3d_mask_reopen(int cache)
 {
 {
     int tmp;
     int tmp;
 
 
     if (Rast3d_maskMapExistsVar)
     if (Rast3d_maskMapExistsVar)
-	if (!Rast3d_maskClose()) {
-	    Rast3d_error("Rast3d_maskReopen: error closing mask");
+	if (!Rast3d_mask_close()) {
+	    Rast3d_error("Rast3d_mask_reopen: error closing mask");
 
 
 	    return 0;
 	    return 0;
 	}
 	}
@@ -145,8 +145,8 @@ int Rast3d_maskReopen(int cache)
     tmp = maskOpenOldCacheDefault;
     tmp = maskOpenOldCacheDefault;
     maskOpenOldCacheDefault = cache;
     maskOpenOldCacheDefault = cache;
 
 
-    if (!Rast3d_maskOpenOld()) {
-	Rast3d_error("Rast3d_maskReopen: error opening mask");
+    if (!Rast3d_mask_open_old()) {
+	Rast3d_error("Rast3d_mask_reopen: error opening mask");
 
 
 	return 0;
 	return 0;
     }
     }
@@ -170,13 +170,13 @@ int Rast3d_maskReopen(int cache)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_isMasked(RASTER3D_Map * map, int x, int y, int z)
+int Rast3d_is_masked(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
 	return 0;
 	return 0;
 
 
     RASTER3D_MASKNUMmaskValue = Rast3d_getMaskFloat(map, x, y, z);
     RASTER3D_MASKNUMmaskValue = Rast3d_getMaskFloat(map, x, y, z);
-    return (Rast3d_isNullValueNum(&RASTER3D_MASKNUMmaskValue, FCELL_TYPE));
+    return (Rast3d_is_null_value_num(&RASTER3D_MASKNUMmaskValue, FCELL_TYPE));
 }
 }
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
@@ -186,7 +186,7 @@ int Rast3d_isMasked(RASTER3D_Map * map, int x, int y, int z)
  * \brief 
  * \brief 
  *
  *
  * Replaces the value stored in <em>value</em> with the NULL-value if 
  * Replaces the value stored in <em>value</em> with the NULL-value if 
- * <em>Rast3d_isMasked (x, y, z)</em> returns 1. Does nothing otherwise.
+ * <em>Rast3d_is_masked (x, y, z)</em> returns 1. Does nothing otherwise.
  * <em>value</em> is assumed to be of<em>type</em>.
  * <em>value</em> is assumed to be of<em>type</em>.
  *
  *
  *  \param x
  *  \param x
@@ -197,7 +197,7 @@ int Rast3d_isMasked(RASTER3D_Map * map, int x, int y, int z)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_maskNum(RASTER3D_Map * map, int x, int y, int z, void *value, int type)
+void Rast3d_mask_num(RASTER3D_Map * map, int x, int y, int z, void *value, int type)
 {
 {
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
 	return;
 	return;
@@ -210,7 +210,7 @@ void Rast3d_maskNum(RASTER3D_Map * map, int x, int y, int z, void *value, int ty
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- *  Same as <em>Rast3d_maskNum (x, y, z, value, FCELL_TYPE)</em>.
+ *  Same as <em>Rast3d_mask_num (x, y, z, value, FCELL_TYPE)</em>.
  *
  *
  *  \param x
  *  \param x
  *  \param y
  *  \param y
@@ -219,7 +219,7 @@ void Rast3d_maskNum(RASTER3D_Map * map, int x, int y, int z, void *value, int ty
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_maskFloat(RASTER3D_Map * map, int x, int y, int z, float *value)
+void Rast3d_mask_float(RASTER3D_Map * map, int x, int y, int z, float *value)
 {
 {
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
 	return;
 	return;
@@ -232,7 +232,7 @@ void Rast3d_maskFloat(RASTER3D_Map * map, int x, int y, int z, float *value)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Same as <em>Rast3d_maskNum (x, y, z, value, DCELL_TYPE)</em>.
+ * Same as <em>Rast3d_mask_num (x, y, z, value, DCELL_TYPE)</em>.
  *
  *
  *  \param x
  *  \param x
  *  \param y
  *  \param y
@@ -241,7 +241,7 @@ void Rast3d_maskFloat(RASTER3D_Map * map, int x, int y, int z, float *value)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_maskDouble(RASTER3D_Map * map, int x, int y, int z, double *value)
+void Rast3d_mask_double(RASTER3D_Map * map, int x, int y, int z, double *value)
 {
 {
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
 	return;
 	return;
@@ -255,7 +255,7 @@ void Rast3d_maskDouble(RASTER3D_Map * map, int x, int y, int z, double *value)
  * \brief 
  * \brief 
  *
  *
  *  Replaces the values stored in <em>tile</em> (with <em>tileIndex</em>) for 
  *  Replaces the values stored in <em>tile</em> (with <em>tileIndex</em>) for 
- *  which <em>Rast3d_isMasked</em> returns 1 with NULL-values. Does not change
+ *  which <em>Rast3d_is_masked</em> returns 1 with NULL-values. Does not change
  *  the remaining values. The values are assumed to be of <em>type</em>. 
  *  the remaining values. The values are assumed to be of <em>type</em>. 
  *  Whether replacement is performed or not only depends on location of the
  *  Whether replacement is performed or not only depends on location of the
  *  cells of the tile and not on the status of the mask for <em>map</em>
  *  cells of the tile and not on the status of the mask for <em>map</em>
@@ -268,7 +268,7 @@ void Rast3d_maskDouble(RASTER3D_Map * map, int x, int y, int z, double *value)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_maskTile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
+void Rast3d_mask_tile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
 {
 {
     int nofNum, rows, cols, depths, xRedundant, yRedundant, zRedundant;
     int nofNum, rows, cols, depths, xRedundant, yRedundant, zRedundant;
     int x, y, z, xLength, yLength, dx, dy, dz, length;
     int x, y, z, xLength, yLength, dx, dy, dz, length;
@@ -276,21 +276,21 @@ void Rast3d_maskTile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
     if (!Rast3d_maskMapExistsVar)
     if (!Rast3d_maskMapExistsVar)
 	return;
 	return;
 
 
-    nofNum = Rast3d_computeClippedTileDimensions(map, tileIndex,
+    nofNum = Rast3d_compute_clipped_tile_dimensions(map, tileIndex,
 					      &rows, &cols, &depths,
 					      &rows, &cols, &depths,
 					      &xRedundant, &yRedundant,
 					      &xRedundant, &yRedundant,
 					      &zRedundant);
 					      &zRedundant);
-    Rast3d_tileIndexOrigin(map, tileIndex, &x, &y, &z);
+    Rast3d_tile_index_origin(map, tileIndex, &x, &y, &z);
 
 
     if (nofNum == map->tileSize) {
     if (nofNum == map->tileSize) {
 	 /*AV*/
 	 /*AV*/
 	    /* BEGIN OF ORIGINAL CODE */
 	    /* BEGIN OF ORIGINAL CODE */
 	    /*
 	    /*
-	     *    Rast3d_getTileDimensionsMap (map, &rows, &cols, &depths);
+	     *    Rast3d_get_tile_dimensions_map (map, &rows, &cols, &depths);
 	     */
 	     */
 	     /*AV*/
 	     /*AV*/
 	    /* BEGIN OF MY CODE */
 	    /* BEGIN OF MY CODE */
-	    Rast3d_getTileDimensionsMap(map, &cols, &rows, &depths);
+	    Rast3d_get_tile_dimensions_map(map, &cols, &rows, &depths);
 	/* END OF MY CODE */
 	/* END OF MY CODE */
 	xRedundant = yRedundant = 0;
 	xRedundant = yRedundant = 0;
     }
     }
@@ -329,7 +329,7 @@ void Rast3d_maskTile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_maskOn(RASTER3D_Map * map)
+void Rast3d_mask_on(RASTER3D_Map * map)
 {
 {
     map->useMask = 1;
     map->useMask = 1;
 }
 }
@@ -346,7 +346,7 @@ void Rast3d_maskOn(RASTER3D_Map * map)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_maskOff(RASTER3D_Map * map)
+void Rast3d_mask_off(RASTER3D_Map * map)
 {
 {
     map->useMask = 0;
     map->useMask = 0;
 }
 }
@@ -362,7 +362,7 @@ void Rast3d_maskOff(RASTER3D_Map * map)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_maskIsOn(RASTER3D_Map * map)
+int Rast3d_mask_is_on(RASTER3D_Map * map)
 {
 {
     return map->useMask;
     return map->useMask;
 }
 }
@@ -377,7 +377,7 @@ int Rast3d_maskIsOn(RASTER3D_Map * map)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_maskIsOff(RASTER3D_Map * map)
+int Rast3d_mask_is_off(RASTER3D_Map * map)
 {
 {
     return !map->useMask;
     return !map->useMask;
 }
 }
@@ -391,7 +391,7 @@ int Rast3d_maskIsOff(RASTER3D_Map * map)
  *  \return char * 
  *  \return char * 
  */
  */
 
 
-const char *Rast3d_maskFile(void)
+const char *Rast3d_mask_file(void)
 {
 {
     return RASTER3D_MASK_MAP;
     return RASTER3D_MASK_MAP;
 }
 }
@@ -405,7 +405,7 @@ const char *Rast3d_maskFile(void)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_maskMapExists(void)
+int Rast3d_mask_map_exists(void)
 {
 {
     return Rast3d_maskMapExistsVar;
     return Rast3d_maskMapExistsVar;
 }
 }

+ 9 - 9
lib/raster3d/misc.c

@@ -12,7 +12,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_g3dType2cellType(int g3dType)
+int Rast3d_g3d_type2cell_type(int g3dType)
 {
 {
     if (g3dType == FCELL_TYPE)
     if (g3dType == FCELL_TYPE)
 	return FCELL_TYPE;
 	return FCELL_TYPE;
@@ -22,7 +22,7 @@ int Rast3d_g3dType2cellType(int g3dType)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_copyFloat2Double(const float *src, int offsSrc, double *dst, int offsDst,
+Rast3d_copy_float2Double(const float *src, int offsSrc, double *dst, int offsDst,
 		     int nElts)
 		     int nElts)
 {
 {
     int i;
     int i;
@@ -37,7 +37,7 @@ Rast3d_copyFloat2Double(const float *src, int offsSrc, double *dst, int offsDst,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_copyDouble2Float(const double *src, int offsSrc, float *dst, int offsDst,
+Rast3d_copy_double2Float(const double *src, int offsSrc, float *dst, int offsDst,
 		     int nElts)
 		     int nElts)
 {
 {
     int i;
     int i;
@@ -52,18 +52,18 @@ Rast3d_copyDouble2Float(const double *src, int offsSrc, float *dst, int offsDst,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_copyValues(const void *src, int offsSrc, int typeSrc, void *dst,
+Rast3d_copy_values(const void *src, int offsSrc, int typeSrc, void *dst,
 	       int offsDst, int typeDst, int nElts)
 	       int offsDst, int typeDst, int nElts)
 {
 {
     int eltLength;
     int eltLength;
 
 
     if ((typeSrc == FCELL_TYPE) && (typeDst == DCELL_TYPE)) {
     if ((typeSrc == FCELL_TYPE) && (typeDst == DCELL_TYPE)) {
-	Rast3d_copyFloat2Double(src, offsSrc, dst, offsDst, nElts);
+	Rast3d_copy_float2Double(src, offsSrc, dst, offsDst, nElts);
 	return;
 	return;
     }
     }
 
 
     if ((typeSrc == DCELL_TYPE) && (typeDst == FCELL_TYPE)) {
     if ((typeSrc == DCELL_TYPE) && (typeDst == FCELL_TYPE)) {
-	Rast3d_copyDouble2Float(src, offsSrc, dst, offsDst, nElts);
+	Rast3d_copy_double2Float(src, offsSrc, dst, offsDst, nElts);
 	return;
 	return;
     }
     }
 
 
@@ -80,7 +80,7 @@ Rast3d_copyValues(const void *src, int offsSrc, int typeSrc, void *dst,
 int Rast3d_length(int t)
 int Rast3d_length(int t)
 {
 {
     if (!RASTER3D_IS_CORRECT_TYPE(t))
     if (!RASTER3D_IS_CORRECT_TYPE(t))
-	Rast3d_fatalError("Rast3d_length: invalid type");
+	Rast3d_fatal_error("Rast3d_length: invalid type");
 
 
     if (t == FCELL_TYPE)
     if (t == FCELL_TYPE)
 	return sizeof(FCELL);
 	return sizeof(FCELL);
@@ -89,10 +89,10 @@ int Rast3d_length(int t)
     return 0;
     return 0;
 }
 }
 
 
-int Rast3d_externLength(int t)
+int Rast3d_extern_length(int t)
 {
 {
     if (!RASTER3D_IS_CORRECT_TYPE(t))
     if (!RASTER3D_IS_CORRECT_TYPE(t))
-	Rast3d_fatalError("Rast3d_externLength: invalid type");
+	Rast3d_fatal_error("Rast3d_extern_length: invalid type");
 
 
     if (t == FCELL_TYPE)
     if (t == FCELL_TYPE)
 	return RASTER3D_XDR_FLOAT_LENGTH;
 	return RASTER3D_XDR_FLOAT_LENGTH;

+ 2 - 2
lib/raster3d/null.c

@@ -9,7 +9,7 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d_isNullValueNum(const void *n, int type)
+int Rast3d_is_null_value_num(const void *n, int type)
 {
 {
     if (type == FCELL_TYPE)
     if (type == FCELL_TYPE)
 	return Rast_is_f_null_value(n);
 	return Rast_is_f_null_value(n);
@@ -32,7 +32,7 @@ int Rast3d_isNullValueNum(const void *n, int type)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setNullValue(void *c, int nofElts, int type)
+void Rast3d_set_null_value(void *c, int nofElts, int type)
 {
 {
     if (type == FCELL_TYPE) {
     if (type == FCELL_TYPE) {
 	Rast_set_f_null_value((float *)c, nofElts);
 	Rast_set_f_null_value((float *)c, nofElts);

+ 49 - 49
lib/raster3d/open.c

@@ -9,21 +9,21 @@
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void *Rast3d_openCellOldNoHeader(const char *name, const char *mapset)
+void *Rast3d_open_cell_old_no_header(const char *name, const char *mapset)
 {
 {
     RASTER3D_Map *map;
     RASTER3D_Map *map;
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
 
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
-    if (!Rast3d_maskOpenOld()) {
-	Rast3d_error(_("Rast3d_openCellOldNoHeader: error in Rast3d_maskOpenOld"));
+    if (!Rast3d_mask_open_old()) {
+	Rast3d_error(_("Rast3d_open_cell_old_no_header: error in Rast3d_mask_open_old"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
     map = Rast3d_malloc(sizeof(RASTER3D_Map));
     map = Rast3d_malloc(sizeof(RASTER3D_Map));
     if (map == NULL) {
     if (map == NULL) {
-	Rast3d_error(_("Rast3d_openCellOldNoHeader: error in Rast3d_malloc"));
+	Rast3d_error(_("Rast3d_open_cell_old_no_header: error in Rast3d_malloc"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
@@ -34,12 +34,12 @@ void *Rast3d_openCellOldNoHeader(const char *name, const char *mapset)
 
 
     map->data_fd = G_open_old_misc(RASTER3D_DIRECTORY, RASTER3D_CELL_ELEMENT, xname, xmapset);
     map->data_fd = G_open_old_misc(RASTER3D_DIRECTORY, RASTER3D_CELL_ELEMENT, xname, xmapset);
     if (map->data_fd < 0) {
     if (map->data_fd < 0) {
-	Rast3d_error(_("Rast3d_openCellOldNoHeader: error in G_open_old"));
+	Rast3d_error(_("Rast3d_open_cell_old_no_header: error in G_open_old"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
     Rast3d_range_init(map);
     Rast3d_range_init(map);
-    Rast3d_maskOff(map);
+    Rast3d_mask_off(map);
 
 
     return map;
     return map;
 }
 }
@@ -56,13 +56,13 @@ void *Rast3d_openCellOldNoHeader(const char *name, const char *mapset)
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
- * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cacheSizeEncode ()</tt> (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
+ * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cache_size_encode ()</tt> (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * specifies the number of tiles buffered in the cache.  <em>window</em> sets the
  * specifies the number of tiles buffered in the cache.  <em>window</em> sets the
  * window-region for the map. It is either a pointer to a window structure or
  * window-region for the map. It is either a pointer to a window structure or
  * RASTER3D_DEFAULT_WINDOW, which uses the window stored at initialization time or
  * RASTER3D_DEFAULT_WINDOW, which uses the window stored at initialization time or
- * set via <tt>Rast3d_setWindow ()</tt> (cf.{g3d:G3d.setWindow}).
+ * set via <tt>Rast3d_set_window ()</tt> (cf.{g3d:G3d.setWindow}).
  * To modify the window for the map after it has already been opened use
  * To modify the window for the map after it has already been opened use
- * <tt>Rast3d_setWindowMap ()</tt> (cf.{g3d:G3d.setWindowMap}).
+ * <tt>Rast3d_set_window_map ()</tt> (cf.{g3d:G3d.setWindowMap}).
  * Returns a pointer to the cell structure ... if successful, NULL ...
  * Returns a pointer to the cell structure ... if successful, NULL ...
  * otherwise.
  * otherwise.
  *
  *
@@ -74,7 +74,7 @@ void *Rast3d_openCellOldNoHeader(const char *name, const char *mapset)
  *  \return void * 
  *  \return void * 
  */
  */
 
 
-void *Rast3d_openCellOld(const char *name, const char *mapset,
+void *Rast3d_open_cell_old(const char *name, const char *mapset,
 		      RASTER3D_Region * window, int typeIntern, int cache)
 		      RASTER3D_Region * window, int typeIntern, int cache)
 {
 {
     RASTER3D_Map *map;
     RASTER3D_Map *map;
@@ -86,18 +86,18 @@ void *Rast3d_openCellOld(const char *name, const char *mapset,
     char *ltmp, *unit;
     char *ltmp, *unit;
     double north, south, east, west, top, bottom;
     double north, south, east, west, top, bottom;
 
 
-    map = Rast3d_openCellOldNoHeader(name, mapset);
+    map = Rast3d_open_cell_old_no_header(name, mapset);
     if (map == NULL) {
     if (map == NULL) {
-	Rast3d_error(_("Rast3d_openCellOld: error in Rast3d_openCellOldNoHeader"));
+	Rast3d_error(_("Rast3d_open_cell_old: error in Rast3d_open_cell_old_no_header"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
     if (lseek(map->data_fd, (long)0, SEEK_SET) == -1) {
     if (lseek(map->data_fd, (long)0, SEEK_SET) == -1) {
-	Rast3d_error(_("Rast3d_openCellOld: can't rewind file"));
+	Rast3d_error(_("Rast3d_open_cell_old: can't rewind file"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
-    if (!Rast3d_readHeader(map,
+    if (!Rast3d_read_header(map,
 			&proj, &zone,
 			&proj, &zone,
 			&north, &south, &east, &west, &top, &bottom,
 			&north, &south, &east, &west, &top, &bottom,
 			&rows, &cols, &depths,
 			&rows, &cols, &depths,
@@ -105,19 +105,19 @@ void *Rast3d_openCellOld(const char *name, const char *mapset,
 			&tileX, &tileY, &tileZ,
 			&tileX, &tileY, &tileZ,
 			&type, &compression, &useRle, &useLzw,
 			&type, &compression, &useRle, &useLzw,
 			&precision, &dataOffset, &useXdr, &hasIndex, &unit)) {
 			&precision, &dataOffset, &useXdr, &hasIndex, &unit)) {
-	Rast3d_error(_("Rast3d_openCellOld: error in Rast3d_readHeader"));
+	Rast3d_error(_("Rast3d_open_cell_old: error in Rast3d_read_header"));
 	return 0;
 	return 0;
     }
     }
 
 
     if (window == RASTER3D_DEFAULT_WINDOW)
     if (window == RASTER3D_DEFAULT_WINDOW)
-	window = Rast3d_windowPtr();
+	window = Rast3d_window_ptr();
 
 
     if (proj != window->proj) {
     if (proj != window->proj) {
-	Rast3d_error(_("Rast3d_openCellOld: projection does not match window projection"));
+	Rast3d_error(_("Rast3d_open_cell_old: projection does not match window projection"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
     if (zone != window->zone) {
     if (zone != window->zone) {
-	Rast3d_error(_("Rast3d_openCellOld: zone does not match window zone"));
+	Rast3d_error(_("Rast3d_open_cell_old: zone does not match window zone"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
@@ -125,31 +125,31 @@ void *Rast3d_openCellOld(const char *name, const char *mapset,
 
 
     if (hasIndex) {
     if (hasIndex) {
 	/* see RASTER3D_openCell_new () for format of header */
 	/* see RASTER3D_openCell_new () for format of header */
-	if ((!Rast3d_readInts(map->data_fd, map->useXdr,
+	if ((!Rast3d_read_ints(map->data_fd, map->useXdr,
 			   &(map->indexLongNbytes), 1)) ||
 			   &(map->indexLongNbytes), 1)) ||
-	    (!Rast3d_readInts(map->data_fd, map->useXdr,
+	    (!Rast3d_read_ints(map->data_fd, map->useXdr,
 			   &(map->indexNbytesUsed), 1))) {
 			   &(map->indexNbytesUsed), 1))) {
-	    Rast3d_error(_("Rast3d_openCellOld: can't read header"));
+	    Rast3d_error(_("Rast3d_open_cell_old: can't read header"));
 	    return (void *)NULL;
 	    return (void *)NULL;
 	}
 	}
 
 
 	/* if our long is to short to store offsets we can't read the file */
 	/* if our long is to short to store offsets we can't read the file */
 	if (map->indexNbytesUsed > sizeof(long))
 	if (map->indexNbytesUsed > sizeof(long))
-	    Rast3d_fatalError(_("Rast3d_openCellOld: index does not fit into long"));
+	    Rast3d_fatal_error(_("Rast3d_open_cell_old: index does not fit into long"));
 
 
 	ltmp = Rast3d_malloc(map->indexLongNbytes);
 	ltmp = Rast3d_malloc(map->indexLongNbytes);
 	if (ltmp == NULL) {
 	if (ltmp == NULL) {
-	    Rast3d_error(_("Rast3d_openCellOld: error in Rast3d_malloc"));
+	    Rast3d_error(_("Rast3d_open_cell_old: error in Rast3d_malloc"));
 	    return (void *)NULL;
 	    return (void *)NULL;
 	}
 	}
 
 
 	/* convert file long to long */
 	/* convert file long to long */
 	if (read(map->data_fd, ltmp, map->indexLongNbytes) !=
 	if (read(map->data_fd, ltmp, map->indexLongNbytes) !=
 	    map->indexLongNbytes) {
 	    map->indexLongNbytes) {
-	    Rast3d_error(_("Rast3d_openCellOld: can't read header"));
+	    Rast3d_error(_("Rast3d_open_cell_old: can't read header"));
 	    return (void *)NULL;
 	    return (void *)NULL;
 	}
 	}
-	Rast3d_longDecode(ltmp, &(map->indexOffset), 1, map->indexLongNbytes);
+	Rast3d_long_decode(ltmp, &(map->indexOffset), 1, map->indexLongNbytes);
 	Rast3d_free(ltmp);
 	Rast3d_free(ltmp);
     }
     }
 
 
@@ -158,20 +158,20 @@ void *Rast3d_openCellOld(const char *name, const char *mapset,
     if (typeIntern == RASTER3D_TILE_SAME_AS_FILE)
     if (typeIntern == RASTER3D_TILE_SAME_AS_FILE)
 	typeIntern = type;
 	typeIntern = type;
 
 
-    if (!Rast3d_fillHeader(map, RASTER3D_READ_DATA, compression, useRle, useLzw,
+    if (!Rast3d_fill_header(map, RASTER3D_READ_DATA, compression, useRle, useLzw,
 			type, precision, cache,
 			type, precision, cache,
 			hasIndex, map->useXdr, typeIntern,
 			hasIndex, map->useXdr, typeIntern,
 			nofHeaderBytes, tileX, tileY, tileZ,
 			nofHeaderBytes, tileX, tileY, tileZ,
 			proj, zone,
 			proj, zone,
 			north, south, east, west, top, bottom,
 			north, south, east, west, top, bottom,
 			rows, cols, depths, ew_res, ns_res, tb_res, unit)) {
 			rows, cols, depths, ew_res, ns_res, tb_res, unit)) {
-	Rast3d_error(_("Rast3d_openCellOld: error in Rast3d_fillHeader"));
+	Rast3d_error(_("Rast3d_open_cell_old: error in Rast3d_fill_header"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
-    Rast3d_regionCopy(&(map->window), window);
-    Rast3d_adjustRegion(&(map->window));
-    Rast3d_getNearestNeighborFunPtr(&(map->resampleFun));
+    Rast3d_region_copy(&(map->window), window);
+    Rast3d_adjust_region(&(map->window));
+    Rast3d_get_nearest_neighbor_fun_ptr(&(map->resampleFun));
 
 
     return map;
     return map;
 }
 }
@@ -188,7 +188,7 @@ void *Rast3d_openCellOld(const char *name, const char *mapset,
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
- * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cacheSizeEncode ()</tt>
+ * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cache_size_encode ()</tt>
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * specifies the number of tiles buffered in the cache.  <em>region</em> specifies
  * specifies the number of tiles buffered in the cache.  <em>region</em> specifies
  * the 3d region.  
  * the 3d region.  
@@ -202,7 +202,7 @@ void *Rast3d_openCellOld(const char *name, const char *mapset,
  *  \return void * 
  *  \return void * 
  */
  */
 
 
-void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
+void *Rast3d_open_cell_new(const char *name, int typeIntern, int cache,
 		      RASTER3D_Region * region)
 		      RASTER3D_Region * region)
 {
 {
     RASTER3D_Map *map;
     RASTER3D_Map *map;
@@ -210,9 +210,9 @@ void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
     long ldummy = 0;
     long ldummy = 0;
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
 
-    Rast3d_initDefaults();
-    if (!Rast3d_maskOpenOld()) {
-	Rast3d_error(_("Rast3d_openCellNew: error in Rast3d_maskOpenOld"));
+    Rast3d_init_defaults();
+    if (!Rast3d_mask_open_old()) {
+	Rast3d_error(_("Rast3d_open_cell_new: error in Rast3d_mask_open_old"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
@@ -221,7 +221,7 @@ void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
 
 
     map = Rast3d_malloc(sizeof(RASTER3D_Map));
     map = Rast3d_malloc(sizeof(RASTER3D_Map));
     if (map == NULL) {
     if (map == NULL) {
-	Rast3d_error(_("Rast3d_openCellNew: error in Rast3d_malloc"));
+	Rast3d_error(_("Rast3d_open_cell_new: error in Rast3d_malloc"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
@@ -236,11 +236,11 @@ void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
     map->tempName = G_tempfile();
     map->tempName = G_tempfile();
     map->data_fd = open(map->tempName, O_RDWR | O_CREAT | O_TRUNC, 0666);
     map->data_fd = open(map->tempName, O_RDWR | O_CREAT | O_TRUNC, 0666);
     if (map->data_fd < 0) {
     if (map->data_fd < 0) {
-	Rast3d_error(_("Rast3d_openCellNew: could not open file"));
+	Rast3d_error(_("Rast3d_open_cell_new: could not open file"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
-    Rast3d_makeMapsetMapDirectory(map->fileName);
+    Rast3d_make_mapset_map_directory(map->fileName);
 
 
     map->useXdr = RASTER3D_USE_XDR;
     map->useXdr = RASTER3D_USE_XDR;
 
 
@@ -278,15 +278,15 @@ void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
 	/* the index is appended at the end of the file at closing time. since */
 	/* the index is appended at the end of the file at closing time. since */
 	/* we do not know this position yet we write dummy values */
 	/* we do not know this position yet we write dummy values */
 
 
-	if ((!Rast3d_writeInts(map->data_fd, map->useXdr,
+	if ((!Rast3d_write_ints(map->data_fd, map->useXdr,
 			    &(map->indexLongNbytes), 1)) ||
 			    &(map->indexLongNbytes), 1)) ||
-	    (!Rast3d_writeInts(map->data_fd, map->useXdr, &dummy, 1))) {
-	    Rast3d_error(_("Rast3d_openCellNew: can't write header"));
+	    (!Rast3d_write_ints(map->data_fd, map->useXdr, &dummy, 1))) {
+	    Rast3d_error(_("Rast3d_open_cell_new: can't write header"));
 	    return (void *)NULL;
 	    return (void *)NULL;
 	}
 	}
 	if (write(map->data_fd, &ldummy, map->indexLongNbytes) !=
 	if (write(map->data_fd, &ldummy, map->indexLongNbytes) !=
 	    map->indexLongNbytes) {
 	    map->indexLongNbytes) {
-	    Rast3d_error(_("Rast3d_openCellNew: can't write header"));
+	    Rast3d_error(_("Rast3d_open_cell_new: can't write header"));
 	    return (void *)NULL;
 	    return (void *)NULL;
 	}
 	}
     }
     }
@@ -295,9 +295,9 @@ void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
     nofHeaderBytes = lseek(map->data_fd, (long)0, SEEK_CUR);
     nofHeaderBytes = lseek(map->data_fd, (long)0, SEEK_CUR);
 
 
     Rast3d_range_init(map);
     Rast3d_range_init(map);
-    Rast3d_adjustRegion(region);
+    Rast3d_adjust_region(region);
 
 
-    if (!Rast3d_fillHeader(map, RASTER3D_WRITE_DATA, compression,
+    if (!Rast3d_fill_header(map, RASTER3D_WRITE_DATA, compression,
 			g3d_do_rle_compression, g3d_do_lzw_compression,
 			g3d_do_rle_compression, g3d_do_lzw_compression,
 			g3d_file_type, precision, cache, RASTER3D_HAS_INDEX,
 			g3d_file_type, precision, cache, RASTER3D_HAS_INDEX,
 			map->useXdr, typeIntern, nofHeaderBytes,
 			map->useXdr, typeIntern, nofHeaderBytes,
@@ -309,16 +309,16 @@ void *Rast3d_openCellNew(const char *name, int typeIntern, int cache,
 			region->rows, region->cols, region->depths,
 			region->rows, region->cols, region->depths,
 			region->ew_res, region->ns_res, region->tb_res,
 			region->ew_res, region->ns_res, region->tb_res,
 			g3d_unit_default)) {
 			g3d_unit_default)) {
-	Rast3d_error(_("Rast3d_openCellNew: error in Rast3d_fillHeader"));
+	Rast3d_error(_("Rast3d_open_cell_new: error in Rast3d_fill_header"));
 	return (void *)NULL;
 	return (void *)NULL;
     }
     }
 
 
     /*Set the map window to the map region */
     /*Set the map window to the map region */
-    Rast3d_regionCopy(&(map->window), region);
+    Rast3d_region_copy(&(map->window), region);
     /*Set the resampling function to nearest neighbor for data access */
     /*Set the resampling function to nearest neighbor for data access */
-    Rast3d_getNearestNeighborFunPtr(&(map->resampleFun));
+    Rast3d_get_nearest_neighbor_fun_ptr(&(map->resampleFun));
 
 
-    Rast3d_maskOff(map);
+    Rast3d_mask_off(map);
 
 
     return (void *)map;
     return (void *)map;
 }
 }

+ 24 - 24
lib/raster3d/open2.c

@@ -12,7 +12,7 @@
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
- * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cacheSizeEncode ()</tt>
+ * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cache_size_encode ()</tt>
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * specifies the number of tiles buffered in the cache.  <em>region</em> specifies
  * specifies the number of tiles buffered in the cache.  <em>region</em> specifies
  * the 3d region.  
  * the 3d region.  
@@ -38,7 +38,7 @@
  */
  */
 
 
 
 
-void *Rast3d_openNewParam(const char *name, int typeIntern, int cache,
+void *Rast3d_open_new_param(const char *name, int typeIntern, int cache,
 		       RASTER3D_Region * region, int type, int doLzw, int doRle,
 		       RASTER3D_Region * region, int type, int doLzw, int doRle,
 		       int precision, int tileX, int tileY, int tileZ)
 		       int precision, int tileX, int tileY, int tileZ)
 {
 {
@@ -47,22 +47,22 @@ void *Rast3d_openNewParam(const char *name, int typeIntern, int cache,
 	oldTileZ;
 	oldTileZ;
     int oldType;
     int oldType;
 
 
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
-    Rast3d_getCompressionMode(&oldCompress, &oldLzw, &oldRle, &oldPrecision);
-    Rast3d_setCompressionMode(oldCompress, doLzw, doRle, precision);
+    Rast3d_get_compression_mode(&oldCompress, &oldLzw, &oldRle, &oldPrecision);
+    Rast3d_set_compression_mode(oldCompress, doLzw, doRle, precision);
 
 
-    Rast3d_getTileDimension(&oldTileX, &oldTileY, &oldTileZ);
-    Rast3d_setTileDimension(tileX, tileY, tileZ);
+    Rast3d_get_tile_dimension(&oldTileX, &oldTileY, &oldTileZ);
+    Rast3d_set_tile_dimension(tileX, tileY, tileZ);
 
 
-    oldType = Rast3d_getFileType();
-    Rast3d_setFileType(type);
+    oldType = Rast3d_get_file_type();
+    Rast3d_set_file_type(type);
 
 
-    map = Rast3d_openCellNew(name, typeIntern, cache, region);
+    map = Rast3d_open_cell_new(name, typeIntern, cache, region);
 
 
-    Rast3d_setCompressionMode(oldCompress, oldLzw, oldRle, oldPrecision);
-    Rast3d_setTileDimension(oldTileX, oldTileY, oldTileZ);
-    Rast3d_setFileType(oldType);
+    Rast3d_set_compression_mode(oldCompress, oldLzw, oldRle, oldPrecision);
+    Rast3d_set_tile_dimension(oldTileX, oldTileY, oldTileZ);
+    Rast3d_set_file_type(oldType);
 
 
     return map;
     return map;
 }
 }
@@ -78,7 +78,7 @@ void *Rast3d_openNewParam(const char *name, int typeIntern, int cache,
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * cache-mode used and must be either RASTER3D_NO_CACHE, RASTER3D_USE_CACHE_DEFAULT,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y, RASTER3D_USE_CACHE_Z,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
  * RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ, RASTER3D_USE_CACHE_YZ,
- * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cacheSizeEncode ()</tt>
+ * RASTER3D_USE_CACHE_XYZ, the result of <tt>Rast3d_cache_size_encode ()</tt>
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer which
  * specifies the number of tiles buffered in the cache.  <em>region</em> specifies
  * specifies the number of tiles buffered in the cache.  <em>region</em> specifies
  * the 3d region.  
  * the 3d region.  
@@ -95,28 +95,28 @@ void *Rast3d_openNewParam(const char *name, int typeIntern, int cache,
  */
  */
 
 
 
 
-void *Rast3d_openNewOptTileSize(const char *name, int cache, RASTER3D_Region * region, int type, int maxSize)
+void *Rast3d_open_new_opt_tile_size(const char *name, int cache, RASTER3D_Region * region, int type, int maxSize)
 {
 {
     void *map;
     void *map;
     int oldTileX, oldTileY, oldTileZ, oldType;
     int oldTileX, oldTileY, oldTileZ, oldType;
     int tileX, tileY, tileZ;
     int tileX, tileY, tileZ;
 
 
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
 
 
-    Rast3d_getTileDimension(&oldTileX, &oldTileY, &oldTileZ);
+    Rast3d_get_tile_dimension(&oldTileX, &oldTileY, &oldTileZ);
     
     
-    Rast3d_computeOptimalTileDimension(region, type, &tileX, &tileY, &tileZ, maxSize);
+    Rast3d_compute_optimal_tile_dimension(region, type, &tileX, &tileY, &tileZ, maxSize);
 
 
-    Rast3d_setTileDimension(tileX, tileY, tileZ);
+    Rast3d_set_tile_dimension(tileX, tileY, tileZ);
 
 
-    oldType = Rast3d_getFileType();
-    Rast3d_setFileType(type);
+    oldType = Rast3d_get_file_type();
+    Rast3d_set_file_type(type);
 
 
-    map = Rast3d_openCellNew(name, RASTER3D_TILE_SAME_AS_FILE, cache, region);
+    map = Rast3d_open_cell_new(name, RASTER3D_TILE_SAME_AS_FILE, cache, region);
 
 
-    Rast3d_setTileDimension(oldTileX, oldTileY, oldTileZ);
-    Rast3d_setFileType(oldType);
+    Rast3d_set_tile_dimension(oldTileX, oldTileY, oldTileZ);
+    Rast3d_set_file_type(oldType);
 
 
     return map;
     return map;
 }
 }

+ 10 - 10
lib/raster3d/param.c

@@ -38,7 +38,7 @@ static Rast3d_paramType *param;
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setStandard3dInputParams()
+void Rast3d_set_standard3d_input_params()
 {
 {
     param = Rast3d_malloc(sizeof(Rast3d_paramType));
     param = Rast3d_malloc(sizeof(Rast3d_paramType));
 
 
@@ -53,7 +53,7 @@ void Rast3d_setStandard3dInputParams()
 
 
 /*----------------------------------------------------------------------------*/
 /*----------------------------------------------------------------------------*/
 
 
-int Rast3d_getStandard3dParams(int *useTypeDefault, int *type,
+int Rast3d_get_standard3d_params(int *useTypeDefault, int *type,
 			    int *useLzwDefault, int *doLzw,
 			    int *useLzwDefault, int *doLzw,
 			    int *useRleDefault, int *doRle,
 			    int *useRleDefault, int *doRle,
 			    int *usePrecisionDefault, int *precision,
 			    int *usePrecisionDefault, int *precision,
@@ -65,25 +65,25 @@ int Rast3d_getStandard3dParams(int *useTypeDefault, int *type,
     *useTypeDefault = *useLzwDefault = *useRleDefault = 0;
     *useTypeDefault = *useLzwDefault = *useRleDefault = 0;
     *usePrecisionDefault = *useDimensionDefault = 0;
     *usePrecisionDefault = *useDimensionDefault = 0;
 
 
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     if (strcmp(param->type->answer, "double") == 0)
     if (strcmp(param->type->answer, "double") == 0)
 	*type = DCELL_TYPE;
 	*type = DCELL_TYPE;
     else if (strcmp(param->type->answer, "float") == 0)
     else if (strcmp(param->type->answer, "float") == 0)
 	*type = FCELL_TYPE;
 	*type = FCELL_TYPE;
     else {
     else {
-	*type = Rast3d_getFileType();
+	*type = Rast3d_get_file_type();
 	*useTypeDefault = 1;
 	*useTypeDefault = 1;
     }
     }
 
 
-    Rast3d_getCompressionMode(&doCompress, doLzw, doRle, precision);
+    Rast3d_get_compression_mode(&doCompress, doLzw, doRle, precision);
 
 
     if (strcmp(param->precision->answer, "default") != 0) {
     if (strcmp(param->precision->answer, "default") != 0) {
 	if (strcmp(param->precision->answer, "max") == 0)
 	if (strcmp(param->precision->answer, "max") == 0)
 	    *precision = -1;
 	    *precision = -1;
 	else if ((sscanf(param->precision->answer, "%d", precision) != 1) ||
 	else if ((sscanf(param->precision->answer, "%d", precision) != 1) ||
 		 (*precision < 0)) {
 		 (*precision < 0)) {
-	    Rast3d_error(_("Rast3d_getStandard3dParams: precision value invalid"));
+	    Rast3d_error(_("Rast3d_get_standard3d_params: precision value invalid"));
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
@@ -112,11 +112,11 @@ int Rast3d_getStandard3dParams(int *useTypeDefault, int *type,
     else
     else
 	*useLzwDefault = *useRleDefault = 1;
 	*useLzwDefault = *useRleDefault = 1;
 
 
-    Rast3d_getTileDimension(tileX, tileY, tileZ);
+    Rast3d_get_tile_dimension(tileX, tileY, tileZ);
     if (strcmp(param->dimension->answer, "default") != 0) {
     if (strcmp(param->dimension->answer, "default") != 0) {
 	if (sscanf(param->dimension->answer, "%dx%dx%d",
 	if (sscanf(param->dimension->answer, "%dx%dx%d",
 		   tileX, tileY, tileZ) != 3) {
 		   tileX, tileY, tileZ) != 3) {
-	    Rast3d_error(_("Rast3d_getStandard3dParams: tile dimension value invalid"));
+	    Rast3d_error(_("Rast3d_get_standard3d_params: tile dimension value invalid"));
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
@@ -132,7 +132,7 @@ int Rast3d_getStandard3dParams(int *useTypeDefault, int *type,
 
 
 static struct Option *windowParam = NULL;
 static struct Option *windowParam = NULL;
 
 
-void Rast3d_setWindowParams(void)
+void Rast3d_set_window_params(void)
 {
 {
     windowParam = G_define_option();
     windowParam = G_define_option();
     windowParam->key = "region3";
     windowParam->key = "region3";
@@ -145,7 +145,7 @@ void Rast3d_setWindowParams(void)
 
 
 /*----------------------------------------------------------------------------*/
 /*----------------------------------------------------------------------------*/
 
 
-char *Rast3d_getWindowParams(void)
+char *Rast3d_get_window_params(void)
 {
 {
     if (windowParam == NULL)
     if (windowParam == NULL)
 	return NULL;
 	return NULL;

+ 19 - 19
lib/raster3d/putvalue.c

@@ -5,7 +5,7 @@
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Is equivalent to Rast3d_putValue (map, x, y, z, &value, FCELL_TYPE).
+ * Is equivalent to Rast3d_put_value (map, x, y, z, &value, FCELL_TYPE).
  *
  *
  *  \param map
  *  \param map
  *  \param x
  *  \param x
@@ -15,23 +15,23 @@
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_putFloat(RASTER3D_Map * map, int x, int y, int z, float value)
+int Rast3d_put_float(RASTER3D_Map * map, int x, int y, int z, float value)
 {
 {
     int tileIndex, offs;
     int tileIndex, offs;
     float *tile;
     float *tile;
 
 
     if (map->typeIntern == DCELL_TYPE) {
     if (map->typeIntern == DCELL_TYPE) {
-	if (!Rast3d_putDouble(map, x, y, z, (double)value)) {
-	    Rast3d_error("Rast3d_putFloat: error in Rast3d_putDouble");
+	if (!Rast3d_put_double(map, x, y, z, (double)value)) {
+	    Rast3d_error("Rast3d_put_float: error in Rast3d_put_double");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
     }
     }
 
 
-    Rast3d_coord2tileIndex(map, x, y, z, &tileIndex, &offs);
-    tile = (float *)Rast3d_getTilePtr(map, tileIndex);
+    Rast3d_coord2tile_index(map, x, y, z, &tileIndex, &offs);
+    tile = (float *)Rast3d_get_tile_ptr(map, tileIndex);
     if (tile == NULL) {
     if (tile == NULL) {
-	Rast3d_error("Rast3d_putFloat: error in Rast3d_getTilePtr");
+	Rast3d_error("Rast3d_put_float: error in Rast3d_get_tile_ptr");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -45,7 +45,7 @@ int Rast3d_putFloat(RASTER3D_Map * map, int x, int y, int z, float value)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- *  Is equivalent to Rast3d_putValue (map, x, y, z, &value, DCELL_TYPE).
+ *  Is equivalent to Rast3d_put_value (map, x, y, z, &value, DCELL_TYPE).
  *
  *
  *  \param map
  *  \param map
  *  \param x
  *  \param x
@@ -55,23 +55,23 @@ int Rast3d_putFloat(RASTER3D_Map * map, int x, int y, int z, float value)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_putDouble(RASTER3D_Map * map, int x, int y, int z, double value)
+int Rast3d_put_double(RASTER3D_Map * map, int x, int y, int z, double value)
 {
 {
     int tileIndex, offs;
     int tileIndex, offs;
     double *tile;
     double *tile;
 
 
     if (map->typeIntern == FCELL_TYPE) {
     if (map->typeIntern == FCELL_TYPE) {
-	if (!Rast3d_putFloat(map, x, y, z, (float)value)) {
-	    Rast3d_error("Rast3d_putDouble: error in Rast3d_putFloat");
+	if (!Rast3d_put_float(map, x, y, z, (float)value)) {
+	    Rast3d_error("Rast3d_put_double: error in Rast3d_put_float");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
     }
     }
 
 
-    Rast3d_coord2tileIndex(map, x, y, z, &tileIndex, &offs);
-    tile = (double *)Rast3d_getTilePtr(map, tileIndex);
+    Rast3d_coord2tile_index(map, x, y, z, &tileIndex, &offs);
+    tile = (double *)Rast3d_get_tile_ptr(map, tileIndex);
     if (tile == NULL) {
     if (tile == NULL) {
-	Rast3d_error("Rast3d_putDouble: error in Rast3d_getTilePtr");
+	Rast3d_error("Rast3d_put_double: error in Rast3d_get_tile_ptr");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -99,18 +99,18 @@ int Rast3d_putDouble(RASTER3D_Map * map, int x, int y, int z, double value)
  */
  */
 
 
 int
 int
-Rast3d_putValue(RASTER3D_Map * map, int x, int y, int z, const void *value, int type)
+Rast3d_put_value(RASTER3D_Map * map, int x, int y, int z, const void *value, int type)
 {
 {
     if (type == FCELL_TYPE) {
     if (type == FCELL_TYPE) {
-	if (!Rast3d_putFloat(map, x, y, z, *((float *)value))) {
-	    Rast3d_error("Rast3d_putValue: error in Rast3d_putFloat");
+	if (!Rast3d_put_float(map, x, y, z, *((float *)value))) {
+	    Rast3d_error("Rast3d_put_value: error in Rast3d_put_float");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
     }
     }
 
 
-    if (!Rast3d_putDouble(map, x, y, z, *((double *)value))) {
-	Rast3d_error("Rast3d_putValue: error in Rast3d_putDouble");
+    if (!Rast3d_put_double(map, x, y, z, *((double *)value))) {
+	Rast3d_error("Rast3d_put_value: error in Rast3d_put_double");
 	return 0;
 	return 0;
     }
     }
     return 1;
     return 1;

+ 4 - 4
lib/raster3d/range.c

@@ -14,7 +14,7 @@
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_range_updateFromTile(RASTER3D_Map * map, const void *tile, int rows, int cols,
+Rast3d_range_update_from_tile(RASTER3D_Map * map, const void *tile, int rows, int cols,
 			 int depths, int xRedundant, int yRedundant,
 			 int depths, int xRedundant, int yRedundant,
 			 int zRedundant, int nofNum, int type)
 			 int zRedundant, int nofNum, int type)
 {
 {
@@ -22,7 +22,7 @@ Rast3d_range_updateFromTile(RASTER3D_Map * map, const void *tile, int rows, int
     struct FPRange *range;
     struct FPRange *range;
 
 
     range = &(map->range);
     range = &(map->range);
-    cellType = Rast3d_g3dType2cellType(type);
+    cellType = Rast3d_g3d_type2cell_type(type);
 
 
     if (nofNum == map->tileSize) {
     if (nofNum == map->tileSize) {
 	Rast_row_update_fp_range(tile, map->tileSize, range, cellType);
 	Rast_row_update_fp_range(tile, map->tileSize, range, cellType);
@@ -58,7 +58,7 @@ Rast3d_range_updateFromTile(RASTER3D_Map * map, const void *tile, int rows, int
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_readRange(const char *name, const char *mapset, struct FPRange *drange)
+Rast3d_read_range(const char *name, const char *mapset, struct FPRange *drange)
  /* adapted from Rast_read_fp_range */
  /* adapted from Rast_read_fp_range */
 {
 {
     int fd;
     int fd;
@@ -115,7 +115,7 @@ int Rast3d_range_load(RASTER3D_Map * map)
 {
 {
     if (map->operation == RASTER3D_WRITE_DATA)
     if (map->operation == RASTER3D_WRITE_DATA)
 	return 1;
 	return 1;
-    if (Rast3d_readRange(map->fileName, map->mapset, &(map->range)) == -1) {
+    if (Rast3d_read_range(map->fileName, map->mapset, &(map->range)) == -1) {
 	return 0;
 	return 0;
     }
     }
 
 

+ 2 - 2
lib/raster3d/raster3d_intern.h

@@ -61,8 +61,8 @@ extern RASTER3D_Region g3d_window;
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-extern void Rast3d_fatalError(const char * /* msg */ , ...);
-extern void Rast3d_fatalError_noargs(const char * /* msg */ );
+extern void Rast3d_fatal_error(const char * /* msg */ , ...);
+extern void Rast3d_fatal_error_noargs(const char * /* msg */ );
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 

+ 19 - 19
lib/raster3d/region.c

@@ -19,7 +19,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_extract2dRegion(RASTER3D_Region * region3d, struct Cell_head *region2d)
+void Rast3d_extract2d_region(RASTER3D_Region * region3d, struct Cell_head *region2d)
 {
 {
     region2d->proj = region3d->proj;
     region2d->proj = region3d->proj;
     region2d->zone = region3d->zone;
     region2d->zone = region3d->zone;
@@ -46,7 +46,7 @@ void Rast3d_extract2dRegion(RASTER3D_Region * region3d, struct Cell_head *region
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_regionToCellHead(RASTER3D_Region * region3d, struct Cell_head *region2d)
+void Rast3d_region_to_cell_head(RASTER3D_Region * region3d, struct Cell_head *region2d)
 {
 {
     region2d->proj = region3d->proj;
     region2d->proj = region3d->proj;
     region2d->zone = region3d->zone;
     region2d->zone = region3d->zone;
@@ -86,7 +86,7 @@ void Rast3d_regionToCellHead(RASTER3D_Region * region3d, struct Cell_head *regio
  */
  */
 
 
 void
 void
-Rast3d_incorporate2dRegion(struct Cell_head *region2d, RASTER3D_Region * region3d)
+Rast3d_incorporate2d_region(struct Cell_head *region2d, RASTER3D_Region * region3d)
 {
 {
     region3d->proj = region2d->proj;
     region3d->proj = region2d->proj;
     region3d->zone = region2d->zone;
     region3d->zone = region2d->zone;
@@ -115,7 +115,7 @@ Rast3d_incorporate2dRegion(struct Cell_head *region2d, RASTER3D_Region * region3
  */
  */
 
 
 void
 void
-Rast3d_regionFromToCellHead(struct Cell_head *region2d, RASTER3D_Region * region3d)
+Rast3d_region_from_to_cell_head(struct Cell_head *region2d, RASTER3D_Region * region3d)
 {
 {
     region3d->proj = region2d->proj;
     region3d->proj = region2d->proj;
     region3d->zone = region2d->zone;
     region3d->zone = region2d->zone;
@@ -149,16 +149,16 @@ Rast3d_regionFromToCellHead(struct Cell_head *region2d, RASTER3D_Region * region
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_adjustRegion(RASTER3D_Region * region)
+void Rast3d_adjust_region(RASTER3D_Region * region)
 {
 {
     struct Cell_head region2d;
     struct Cell_head region2d;
 
 
-    Rast3d_regionToCellHead(region, &region2d);
+    Rast3d_region_to_cell_head(region, &region2d);
     G_adjust_Cell_head3(&region2d, 1, 1, 1);
     G_adjust_Cell_head3(&region2d, 1, 1, 1);
-    Rast3d_regionFromToCellHead(&region2d, region);
+    Rast3d_region_from_to_cell_head(&region2d, region);
 
 
     if (region->depths <= 0)
     if (region->depths <= 0)
-	Rast3d_fatalError("Rast3d_adjustRegion: depths <= 0");
+	Rast3d_fatal_error("Rast3d_adjust_region: depths <= 0");
     region->tb_res = (region->top - region->bottom) / region->depths;
     region->tb_res = (region->top - region->bottom) / region->depths;
 }
 }
 
 
@@ -175,16 +175,16 @@ void Rast3d_adjustRegion(RASTER3D_Region * region)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_adjustRegionRes(RASTER3D_Region * region)
+void Rast3d_adjust_region_res(RASTER3D_Region * region)
 {
 {
     struct Cell_head region2d;
     struct Cell_head region2d;
 
 
-    Rast3d_regionToCellHead(region, &region2d);
+    Rast3d_region_to_cell_head(region, &region2d);
     G_adjust_Cell_head3(&region2d, 1, 1, 1);
     G_adjust_Cell_head3(&region2d, 1, 1, 1);
-    Rast3d_regionFromToCellHead(&region2d, region);
+    Rast3d_region_from_to_cell_head(&region2d, region);
 
 
     if (region->tb_res <= 0)
     if (region->tb_res <= 0)
-	Rast3d_fatalError("Rast3d_adjustRegionRes: tb_res <= 0");
+	Rast3d_fatal_error("Rast3d_adjust_region_res: tb_res <= 0");
 
 
     region->depths = (region->top - region->bottom + region->tb_res / 2.0) /
     region->depths = (region->top - region->bottom + region->tb_res / 2.0) /
 	region->tb_res;
 	region->tb_res;
@@ -205,7 +205,7 @@ void Rast3d_adjustRegionRes(RASTER3D_Region * region)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_regionCopy(RASTER3D_Region * regionDest, RASTER3D_Region * regionSrc)
+void Rast3d_region_copy(RASTER3D_Region * regionDest, RASTER3D_Region * regionSrc)
 {
 {
     *regionDest = *regionSrc;
     *regionDest = *regionSrc;
 }
 }
@@ -214,7 +214,7 @@ void Rast3d_regionCopy(RASTER3D_Region * regionDest, RASTER3D_Region * regionSrc
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 int
 int
-Rast3d_readRegionMap(const char *name, const char *mapset, RASTER3D_Region * region)
+Rast3d_read_region_map(const char *name, const char *mapset, RASTER3D_Region * region)
 {
 {
     char fullName[GPATH_MAX];
     char fullName[GPATH_MAX];
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
@@ -226,7 +226,7 @@ Rast3d_readRegionMap(const char *name, const char *mapset, RASTER3D_Region * reg
 	    mapset = G_find_grid3(name, "");
 	    mapset = G_find_grid3(name, "");
 	Rast3d_filename(fullName, RASTER3D_HEADER_ELEMENT, name, mapset);
 	Rast3d_filename(fullName, RASTER3D_HEADER_ELEMENT, name, mapset);
     }
     }
-    return Rast3d_readWindow(region, fullName);
+    return Rast3d_read_window(region, fullName);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -245,7 +245,7 @@ Rast3d_readRegionMap(const char *name, const char *mapset, RASTER3D_Region * reg
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_isValidLocation(RASTER3D_Region *region, double north, double east, double top)
+int Rast3d_is_valid_location(RASTER3D_Region *region, double north, double east, double top)
 {
 {
     return ((north >= region->south) && (north <= region->north) &&
     return ((north >= region->south) && (north <= region->north) &&
 	    (east >= region->west) && (east <= region->east) &&
 	    (east >= region->west) && (east <= region->east) &&
@@ -298,7 +298,7 @@ Rast3d_location2coord(RASTER3D_Region *region, double north, double east, double
  *
  *
  *  Converts region-coordinates <em>(north, east,
  *  Converts region-coordinates <em>(north, east,
  *  top)</em> into cell-coordinates <em>(x, y, z)</em>.
  *  top)</em> into cell-coordinates <em>(x, y, z)</em>.
- *  This function calls Rast3d_fatalError in case location is not in window.
+ *  This function calls Rast3d_fatal_error in case location is not in window.
  *
  *
  *  \param map
  *  \param map
  *  \param north
  *  \param north
@@ -314,8 +314,8 @@ void
 Rast3d_location2coord2(RASTER3D_Region *region, double north, double east, double top,
 Rast3d_location2coord2(RASTER3D_Region *region, double north, double east, double top,
 		   int *x, int *y, int *z)
 		   int *x, int *y, int *z)
 {
 {
-    if (!Rast3d_isValidLocation(region, north, east, top))
-	Rast3d_fatalError("Rast3d_location2coord2: location not in region");
+    if (!Rast3d_is_valid_location(region, north, east, top))
+	Rast3d_fatal_error("Rast3d_location2coord2: location not in region");
 
 
     Rast3d_location2coord(region, north, east, top, x, y, z);
     Rast3d_location2coord(region, north, east, top, x, y, z);
 }
 }

+ 9 - 9
lib/raster3d/resample.c

@@ -22,7 +22,7 @@
  */
  */
 
 
 void
 void
-Rast3d_nearestNeighbor(RASTER3D_Map * map, int x, int y, int z, void *value,
+Rast3d_nearest_neighbor(RASTER3D_Map * map, int x, int y, int z, void *value,
 		    int type)
 		    int type)
 {
 {
     double north, east, top;
     double north, east, top;
@@ -38,12 +38,12 @@ Rast3d_nearestNeighbor(RASTER3D_Map * map, int x, int y, int z, void *value,
     if ((row < 0) || (row >= map->region.rows) ||
     if ((row < 0) || (row >= map->region.rows) ||
 	(col < 0) || (col >= map->region.cols) ||
 	(col < 0) || (col >= map->region.cols) ||
 	(depth < 0) || (depth >= map->region.depths)) {
 	(depth < 0) || (depth >= map->region.depths)) {
-	Rast3d_setNullValue(value, 1, type);
+	Rast3d_set_null_value(value, 1, type);
 	return;
 	return;
     }
     }
     
     
     /* Get the value from the map in map-region resolution */
     /* Get the value from the map in map-region resolution */
-	Rast3d_getValueRegion(map, col, row, depth, value, type);
+	Rast3d_get_value_region(map, col, row, depth, value, type);
 }
 }
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
@@ -53,13 +53,13 @@ Rast3d_nearestNeighbor(RASTER3D_Map * map, int x, int y, int z, void *value,
  * \brief 
  * \brief 
  *
  *
  * Sets the resampling function to be used by
  * Sets the resampling function to be used by
- * Rast3d_getValue () (cf.{g3d:G3d.getValue}). This function is defined
+ * Rast3d_get_value () (cf.{g3d:G3d.getValue}). This function is defined
  * as follows:
  * as follows:
  *
  *
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setResamplingFun(RASTER3D_Map * map, void (*resampleFun) ())
+void Rast3d_set_resampling_fun(RASTER3D_Map * map, void (*resampleFun) ())
 {
 {
     map->resampleFun = resampleFun;
     map->resampleFun = resampleFun;
 }
 }
@@ -77,7 +77,7 @@ void Rast3d_setResamplingFun(RASTER3D_Map * map, void (*resampleFun) ())
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getResamplingFun(RASTER3D_Map * map, void (**resampleFun) ())
+void Rast3d_get_resampling_fun(RASTER3D_Map * map, void (**resampleFun) ())
 {
 {
     *resampleFun = map->resampleFun;
     *resampleFun = map->resampleFun;
 }
 }
@@ -89,12 +89,12 @@ void Rast3d_getResamplingFun(RASTER3D_Map * map, void (**resampleFun) ())
  * \brief 
  * \brief 
  *
  *
  *  Returns
  *  Returns
- * in <em>nnFunPtr</em> a pointer to Rast3d_nearestNeighbor () (cf.{g3d:G3d.nearestNeighbor}).
+ * in <em>nnFunPtr</em> a pointer to Rast3d_nearest_neighbor () (cf.{g3d:G3d.nearestNeighbor}).
  *
  *
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getNearestNeighborFunPtr(void (**nnFunPtr) ())
+void Rast3d_get_nearest_neighbor_fun_ptr(void (**nnFunPtr) ())
 {
 {
-    *nnFunPtr = Rast3d_nearestNeighbor;
+    *nnFunPtr = Rast3d_nearest_neighbor;
 }
 }

+ 43 - 43
lib/raster3d/retile.c

@@ -16,45 +16,45 @@ retileNocache(void *map, const char *nameOut, int tileX, int tileY, int tileZ)
     int tileXsave, tileYsave, tileZsave;
     int tileXsave, tileYsave, tileZsave;
     RASTER3D_Region region;
     RASTER3D_Region region;
 
 
-    saveType = Rast3d_getFileType();
-    Rast3d_setFileType(Rast3d_fileTypeMap(map));
-    Rast3d_getTileDimension(&tileXsave, &tileYsave, &tileZsave);
-    Rast3d_setTileDimension(tileX, tileY, tileZ);
-    typeIntern = Rast3d_tileTypeMap(map);
-    Rast3d_getRegionStructMap(map, &region);
+    saveType = Rast3d_get_file_type();
+    Rast3d_set_file_type(Rast3d_file_type_map(map));
+    Rast3d_get_tile_dimension(&tileXsave, &tileYsave, &tileZsave);
+    Rast3d_set_tile_dimension(tileX, tileY, tileZ);
+    typeIntern = Rast3d_tile_type_map(map);
+    Rast3d_get_region_struct_map(map, &region);
 
 
-    map2 = Rast3d_openCellNew(nameOut, typeIntern, RASTER3D_NO_CACHE, &region);
+    map2 = Rast3d_open_cell_new(nameOut, typeIntern, RASTER3D_NO_CACHE, &region);
 
 
     if (map2 == NULL)
     if (map2 == NULL)
-	Rast3d_fatalError("Rast3d_retile: error in Rast3d_openCellNew");
+	Rast3d_fatal_error("Rast3d_retile: error in Rast3d_open_cell_new");
 
 
-    Rast3d_setFileType(saveType);
-    Rast3d_setTileDimension(tileXsave, tileYsave, tileZsave);
+    Rast3d_set_file_type(saveType);
+    Rast3d_set_tile_dimension(tileXsave, tileYsave, tileZsave);
 
 
-    data = Rast3d_allocTiles(map2, 1);
+    data = Rast3d_alloc_tiles(map2, 1);
     if (data == NULL)
     if (data == NULL)
-	Rast3d_fatalError("Rast3d_retile: error in Rast3d_allocTiles");
+	Rast3d_fatal_error("Rast3d_retile: error in Rast3d_alloc_tiles");
 
 
-    Rast3d_getNofTilesMap(map2, &nx, &ny, &nz);
+    Rast3d_get_nof_tiles_map(map2, &nx, &ny, &nz);
 
 
     for (z = 0; z < nz; z++) {
     for (z = 0; z < nz; z++) {
         G_percent(z, nz, 1);
         G_percent(z, nz, 1);
 	for (y = 0; y < ny; y++)
 	for (y = 0; y < ny; y++)
 	    for (x = 0; x < nx; x++) {
 	    for (x = 0; x < nx; x++) {
-		Rast3d_getBlock(map, x * tileX, y * tileY, z * tileZ,
+		Rast3d_get_block(map, x * tileX, y * tileY, z * tileZ,
 			     tileX, tileY, tileZ, data, typeIntern);
 			     tileX, tileY, tileZ, data, typeIntern);
-		if (!Rast3d_writeTile
-		    (map2, Rast3d_tile2tileIndex(map2, x, y, z), data,
+		if (!Rast3d_write_tile
+		    (map2, Rast3d_tile2tile_index(map2, x, y, z), data,
 		     typeIntern))
 		     typeIntern))
-		    Rast3d_fatalError
-			("Rast3d_retileNocache: error in Rast3d_writeTile");
+		    Rast3d_fatal_error
+			("Rast3d_retileNocache: error in Rast3d_write_tile");
 	    }
 	    }
     }
     }
     
     
     G_percent(1, 1, 1);
     G_percent(1, 1, 1);
         
         
-    Rast3d_freeTiles(data);
-    Rast3d_closeCell(map2);
+    Rast3d_free_tiles(data);
+    Rast3d_close_cell(map2);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -87,28 +87,28 @@ Rast3d_retile(void *map, const char *nameOut, int tileX, int tileY, int tileZ)
     int tileXsave, tileYsave, tileZsave;
     int tileXsave, tileYsave, tileZsave;
     RASTER3D_Region region;
     RASTER3D_Region region;
 
 
-    if (!Rast3d_tileUseCacheMap(map)) {
+    if (!Rast3d_tile_use_cache_map(map)) {
 	retileNocache(map, nameOut, tileX, tileY, tileZ);
 	retileNocache(map, nameOut, tileX, tileY, tileZ);
 	return;
 	return;
     }
     }
 
 
-    saveType = Rast3d_getFileType();
-    Rast3d_setFileType(Rast3d_fileTypeMap(map));
-    Rast3d_getTileDimension(&tileXsave, &tileYsave, &tileZsave);
-    Rast3d_setTileDimension(tileX, tileY, tileZ);
+    saveType = Rast3d_get_file_type();
+    Rast3d_set_file_type(Rast3d_file_type_map(map));
+    Rast3d_get_tile_dimension(&tileXsave, &tileYsave, &tileZsave);
+    Rast3d_set_tile_dimension(tileX, tileY, tileZ);
 
 
-    typeIntern = Rast3d_tileTypeMap(map);
-    Rast3d_getRegionStructMap(map, &region);
+    typeIntern = Rast3d_tile_type_map(map);
+    Rast3d_get_region_struct_map(map, &region);
 
 
     map2 =
     map2 =
-	Rast3d_openCellNew(nameOut, typeIntern, RASTER3D_USE_CACHE_DEFAULT, &region);
+	Rast3d_open_cell_new(nameOut, typeIntern, RASTER3D_USE_CACHE_DEFAULT, &region);
     if (map2 == NULL)
     if (map2 == NULL)
-	Rast3d_fatalError("Rast3d_retile: error in Rast3d_openCellNew");
+	Rast3d_fatal_error("Rast3d_retile: error in Rast3d_open_cell_new");
 
 
-    Rast3d_setFileType(saveType);
-    Rast3d_setTileDimension(tileXsave, tileYsave, tileZsave);
+    Rast3d_set_file_type(saveType);
+    Rast3d_set_tile_dimension(tileXsave, tileYsave, tileZsave);
 
 
-    Rast3d_coord2tileCoord(map2, 0, 0, 0,
+    Rast3d_coord2tile_coord(map2, 0, 0, 0,
 			&xTile, &yTile, &zTile, &xOffs, &yOffs, &zOffs);
 			&xTile, &yTile, &zTile, &xOffs, &yOffs, &zOffs);
 
 
     prev = zTile;
     prev = zTile;
@@ -116,30 +116,30 @@ Rast3d_retile(void *map, const char *nameOut, int tileX, int tileY, int tileZ)
     x = 0;
     x = 0;
     y = 0;
     y = 0;
 
 
-    Rast3d_getCoordsMap(map, &rows, &cols, &depths);
+    Rast3d_get_coords_map(map, &rows, &cols, &depths);
 
 
     for (z = 0; z < depths; z++) {
     for (z = 0; z < depths; z++) {
         G_percent(z, depths, 1);
         G_percent(z, depths, 1);
-	Rast3d_coord2tileCoord(map2, x, y, z, &xTile, &yTile, &zTile,
+	Rast3d_coord2tile_coord(map2, x, y, z, &xTile, &yTile, &zTile,
 			    &xOffs, &yOffs, &zOffs);
 			    &xOffs, &yOffs, &zOffs);
 	if (zTile > prev) {
 	if (zTile > prev) {
-	    if (!Rast3d_flushAllTiles(map2))
-		Rast3d_fatalError("Rast3d_retile: error in Rast3d_flushAllTiles");
+	    if (!Rast3d_flush_all_tiles(map2))
+		Rast3d_fatal_error("Rast3d_retile: error in Rast3d_flush_all_tiles");
 	    prev++;
 	    prev++;
 	}
 	}
 
 
 	for (y = 0; y < rows; y++)
 	for (y = 0; y < rows; y++)
 	    for (x = 0; x < cols; x++) {
 	    for (x = 0; x < cols; x++) {
 
 
-		Rast3d_getValueRegion(map, x, y, z, &value, typeIntern);
-		if (!Rast3d_putValue(map2, x, y, z, &value, typeIntern))
-		    Rast3d_fatalError("Rast3d_retile: error in Rast3d_putValue");
+		Rast3d_get_value_region(map, x, y, z, &value, typeIntern);
+		if (!Rast3d_put_value(map2, x, y, z, &value, typeIntern))
+		    Rast3d_fatal_error("Rast3d_retile: error in Rast3d_put_value");
 	    }
 	    }
     }
     }
 
 
     G_percent(1, 1, 1);
     G_percent(1, 1, 1);
-    if (!Rast3d_flushAllTiles(map2))
-	Rast3d_fatalError("Rast3d_retile: error in Rast3d_flushAllTiles");
-    if (!Rast3d_closeCell(map2))
-	Rast3d_fatalError("Rast3d_retile: error in Rast3d_closeCell");
+    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");
 }
 }

+ 6 - 6
lib/raster3d/rle.c

@@ -120,13 +120,13 @@ static char *rle_code2length(char *src, int *length)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int G_rle_count_only(char *src, int nofElts, int eltLength)
+int Rast3d_rle_count_only(char *src, int nofElts, int eltLength)
 {
 {
     int length, nofEqual;
     int length, nofEqual;
     char *head, *tail, *headStop, *headStop2;
     char *head, *tail, *headStop, *headStop2;
 
 
     if (nofElts <= 0)
     if (nofElts <= 0)
-	Rast3d_fatalError("trying to encode 0-length list");
+	Rast3d_fatal_error("trying to encode 0-length list");
 
 
     length = 0;
     length = 0;
     nofEqual = 1;
     nofEqual = 1;
@@ -163,13 +163,13 @@ int G_rle_count_only(char *src, int nofElts, int eltLength)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-void G_rle_encode(char *src, char *dst, int nofElts, int eltLength)
+void Rast3d_rle_encode(char *src, char *dst, int nofElts, int eltLength)
 {
 {
     int length, nofEqual;
     int length, nofEqual;
     char *head, *tail, *headStop, *headStop2;
     char *head, *tail, *headStop, *headStop2;
 
 
     if (nofElts <= 0)
     if (nofElts <= 0)
-	Rast3d_fatalError("trying to encode 0-length list");
+	Rast3d_fatal_error("trying to encode 0-length list");
 
 
     length = 0;
     length = 0;
     nofEqual = 1;
     nofEqual = 1;
@@ -220,7 +220,7 @@ void G_rle_encode(char *src, char *dst, int nofElts, int eltLength)
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-G_rle_decode(char *src, char *dst, int nofElts, int eltLength,
+Rast3d_rle_decode(char *src, char *dst, int nofElts, int eltLength,
 	     int *lengthEncode, int *lengthDecode)
 	     int *lengthEncode, int *lengthDecode)
 {
 {
     int nofEqual;
     int nofEqual;
@@ -247,7 +247,7 @@ G_rle_decode(char *src, char *dst, int nofElts, int eltLength,
 	src += eltLength;
 	src += eltLength;
     }
     }
 
 
-    Rast3d_fatalError("G_rle_decode: string ends prematurely");
+    Rast3d_fatal_error("Rast3d_rle_decode: string ends prematurely");
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/

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

@@ -41,8 +41,8 @@ int test_coordinate_transform(void)
     
     
     /* We need to set up a specific region for the new g3d map.
     /* We need to set up a specific region for the new g3d map.
      * First we safe the default region. */
      * First we safe the default region. */
-    Rast3d_getWindow(&default_region);
-    Rast3d_regionCopy(&region, &default_region);
+    Rast3d_get_window(&default_region);
+    Rast3d_region_copy(&region, &default_region);
     
     
     region.bottom = 0.0;
     region.bottom = 0.0;
     region.top = 1000;
     region.top = 1000;
@@ -54,12 +54,12 @@ int test_coordinate_transform(void)
     region.cols = 10;
     region.cols = 10;
     region.depths = 5;
     region.depths = 5;
         
         
-    Rast3d_adjustRegion(&region);
+    Rast3d_adjust_region(&region);
     
     
-    map = Rast3d_openNewOptTileSize("test_coordinate_transform", RASTER3D_USE_CACHE_XYZ, &region, FCELL_TYPE, 32);
+    map = Rast3d_open_new_opt_tile_size("test_coordinate_transform", RASTER3D_USE_CACHE_XYZ, &region, FCELL_TYPE, 32);
         
         
     /* The window is the same as the map region ... of course */
     /* The window is the same as the map region ... of course */
-    Rast3d_setWindowMap(map, &region);
+    Rast3d_set_window_map(map, &region);
     
     
     G_message("Test the upper right corner, coordinates must be col = 9, row = 0, depth = 4");
     G_message("Test the upper right corner, coordinates must be col = 9, row = 0, depth = 4");
     
     
@@ -143,7 +143,7 @@ int test_coordinate_transform(void)
         sum++;
         sum++;
     }
     }
     
     
-    Rast3d_closeCell(map);
+    Rast3d_close_cell(map);
     
     
     G_remove("grid3", "test_coordinate_transform");
     G_remove("grid3", "test_coordinate_transform");
     
     
@@ -157,7 +157,7 @@ int test_region(void)
     int sum = 0;
     int sum = 0;
     RASTER3D_Region region, new_region;
     RASTER3D_Region region, new_region;
     
     
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
     region.bottom = 0.0;
     region.bottom = 0.0;
     region.top = 1000;
     region.top = 1000;
     region.south = 10000;
     region.south = 10000;
@@ -172,93 +172,93 @@ int test_region(void)
     region.tb_res = 0;
     region.tb_res = 0;
         
         
     /* Test region adjustment */
     /* Test region adjustment */
-    Rast3d_adjustRegion(&region);
+    Rast3d_adjust_region(&region);
     
     
     if(region.ew_res != 500) {
     if(region.ew_res != 500) {
-        G_message("Error in Rast3d_adjustRegion: region.ew_res != 500");
+        G_message("Error in Rast3d_adjust_region: region.ew_res != 500");
         sum++;
         sum++;
     }
     }
     
     
     if(region.ns_res != 500) {
     if(region.ns_res != 500) {
-        G_message("Error in Rast3d_adjustRegion: region.ew_res != 500");
+        G_message("Error in Rast3d_adjust_region: region.ew_res != 500");
         sum++;
         sum++;
     }
     }
     
     
     if(region.tb_res != 200) {
     if(region.tb_res != 200) {
-        G_message("Error in Rast3d_adjustRegion: region.ew_res != 500");
+        G_message("Error in Rast3d_adjust_region: region.ew_res != 500");
         sum++;
         sum++;
     }
     }
     
     
     /* Test the region copy */
     /* Test the region copy */
-    Rast3d_regionCopy(&new_region, &region);
+    Rast3d_region_copy(&new_region, &region);
         
         
     if(region.bottom != new_region.bottom) {
     if(region.bottom != new_region.bottom) {
-        G_message("Error in Rast3d_regionCopy: region.bottom != new_region.bottom");
+        G_message("Error in Rast3d_region_copy: region.bottom != new_region.bottom");
         sum++;
         sum++;
     }
     }
     
     
     if(region.cols != new_region.cols) {
     if(region.cols != new_region.cols) {
-        G_message("Error in Rast3d_regionCopy: region.cols != new_region.cols");
+        G_message("Error in Rast3d_region_copy: region.cols != new_region.cols");
         sum++;
         sum++;
     }
     }
     
     
     if(region.depths != new_region.depths) {
     if(region.depths != new_region.depths) {
-        G_message("Error in Rast3d_regionCopy: region.depths != new_region.depths");
+        G_message("Error in Rast3d_region_copy: region.depths != new_region.depths");
         sum++;
         sum++;
     }
     }
     
     
     if(region.east != new_region.east) {
     if(region.east != new_region.east) {
-        G_message("Error in Rast3d_regionCopy: region.east != new_region.east");
+        G_message("Error in Rast3d_region_copy: region.east != new_region.east");
         sum++;
         sum++;
     }
     }
     
     
     if(region.ew_res != new_region.ew_res) {
     if(region.ew_res != new_region.ew_res) {
-        G_message("Error in Rast3d_regionCopy: region.ew_res != new_region.ew_res");
+        G_message("Error in Rast3d_region_copy: region.ew_res != new_region.ew_res");
         sum++;
         sum++;
     }
     }
     
     
     if(region.north != new_region.north) {
     if(region.north != new_region.north) {
-        G_message("Error in Rast3d_regionCopy: region.north != new_region.north");
+        G_message("Error in Rast3d_region_copy: region.north != new_region.north");
         sum++;
         sum++;
     }
     }
     
     
     if(region.ns_res != new_region.ns_res) {
     if(region.ns_res != new_region.ns_res) {
-        G_message("Error in Rast3d_regionCopy: region.ns_res != new_region.ns_res");
+        G_message("Error in Rast3d_region_copy: region.ns_res != new_region.ns_res");
         sum++;
         sum++;
     }
     }
     
     
     if(region.proj != new_region.proj) {
     if(region.proj != new_region.proj) {
-        G_message("Error in Rast3d_regionCopy: region.proj != new_region.proj");
+        G_message("Error in Rast3d_region_copy: region.proj != new_region.proj");
         sum++;
         sum++;
     }
     }
     
     
     if(region.rows != new_region.rows) {
     if(region.rows != new_region.rows) {
-        G_message("Error in Rast3d_regionCopy: region.rows != new_region.rows");
+        G_message("Error in Rast3d_region_copy: region.rows != new_region.rows");
         sum++;
         sum++;
     }
     }
     
     
     if(region.south != new_region.south) {
     if(region.south != new_region.south) {
-        G_message("Error in Rast3d_regionCopy: region.south != new_region.south");
+        G_message("Error in Rast3d_region_copy: region.south != new_region.south");
         sum++;
         sum++;
     }
     }
     
     
     if(region.tb_res != new_region.tb_res) {
     if(region.tb_res != new_region.tb_res) {
-        G_message("Error in Rast3d_regionCopy: region.tb_res != new_region.tb_res");
+        G_message("Error in Rast3d_region_copy: region.tb_res != new_region.tb_res");
         sum++;
         sum++;
     }
     }
     
     
     if(region.top != new_region.top) {
     if(region.top != new_region.top) {
-        G_message("Error in Rast3d_regionCopy: region.top != new_region.top");
+        G_message("Error in Rast3d_region_copy: region.top != new_region.top");
         sum++;
         sum++;
     }
     }
     
     
     if(region.west != new_region.west) {
     if(region.west != new_region.west) {
-        G_message("Error in Rast3d_regionCopy: region.west != new_region.west");
+        G_message("Error in Rast3d_region_copy: region.west != new_region.west");
         sum++;
         sum++;
     }
     }
     
     
     if(region.zone != new_region.zone) {
     if(region.zone != new_region.zone) {
-        G_message("Error in Rast3d_regionCopy: region.zone != new_region.zone");
+        G_message("Error in Rast3d_region_copy: region.zone != new_region.zone");
         sum++;
         sum++;
     }    
     }    
     
     

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

@@ -85,7 +85,7 @@ int main(int argc, char *argv[]) {
         exit(EXIT_FAILURE);
         exit(EXIT_FAILURE);
     
     
     /* Initiate the defaults for testing */
     /* Initiate the defaults for testing */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /*Run the unit tests */
     /*Run the unit tests */
     if (param.testunit->answer || param.full->answer) {
     if (param.testunit->answer || param.full->answer) {

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

@@ -68,7 +68,7 @@ int test_put_get_value_dcell(void)
     
     
     /* We need to set up a specific region for the new g3d map.
     /* We need to set up a specific region for the new g3d map.
      * First we safe the default region. */
      * First we safe the default region. */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
     
     
     region.bottom = 0.0;
     region.bottom = 0.0;
     region.top = 1000;
     region.top = 1000;
@@ -80,12 +80,12 @@ int test_put_get_value_dcell(void)
     region.cols = 10;
     region.cols = 10;
     region.depths = 5;
     region.depths = 5;
         
         
-    Rast3d_adjustRegion(&region);
+    Rast3d_adjust_region(&region);
         
         
-    map = Rast3d_openNewOptTileSize("test_put_get_value_dcell", RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, 32);
+    map = Rast3d_open_new_opt_tile_size("test_put_get_value_dcell", RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, 32);
     
     
     /* The window is the same as the map region ... of course */
     /* The window is the same as the map region ... of course */
-    Rast3d_setWindowMap(map, &region);
+    Rast3d_set_window_map(map, &region);
     /*
     /*
      ROWS
      ROWS
   1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6500 7000 7500 8000 8500 9000 north
   1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6500 7000 7500 8000 8500 9000 north
@@ -108,12 +108,12 @@ int test_put_get_value_dcell(void)
             for(x = 0; x < region.cols; x++) {
             for(x = 0; x < region.cols; x++) {
                 /* Add cols, rows and depths and put this in the map */
                 /* Add cols, rows and depths and put this in the map */
                 value = x + y + z;
                 value = x + y + z;
-                Rast3d_putValue(map, x, y, z, &value, DCELL_TYPE);
+                Rast3d_put_value(map, x, y, z, &value, DCELL_TYPE);
             }
             }
         }
         }
     }
     }
     /* Write everything to the disk */
     /* Write everything to the disk */
-    Rast3d_flushAllTiles(map);
+    Rast3d_flush_all_tiles(map);
     
     
     /* Reread the map and compare the expected results */
     /* Reread the map and compare the expected results */
     
     
@@ -168,21 +168,21 @@ int test_put_get_value_dcell(void)
     east = region.west + region.ew_res * col;
     east = region.west + region.ew_res * col;
     top = region.bottom + region.tb_res * depth;
     top = region.bottom + region.tb_res * depth;
     
     
-    Rast3d_getRegionValue(map, north, east, top, &value, DCELL_TYPE);
-    Rast3d_getValue(map, col, row, depth, &value_ref, DCELL_TYPE);
-    /* Rast3d_getValueRegion does not work with coordinates outside the region */
+    Rast3d_get_region_value(map, north, east, top, &value, DCELL_TYPE);
+    Rast3d_get_value(map, col, row, depth, &value_ref, DCELL_TYPE);
+    /* Rast3d_get_value_region does not work with coordinates outside the region */
     printf("Value %g == %g\n", value, value_ref);
     printf("Value %g == %g\n", value, value_ref);
     
     
     if(value == 0 || value < 0 || value > 0) {
     if(value == 0 || value < 0 || value > 0) {
-        G_message("Error in Rast3d_getRegionValue");
+        G_message("Error in Rast3d_get_region_value");
         sum++;
         sum++;
     }
     }
     if(value_ref == 0 || value_ref < 0 || value_ref > 0) {
     if(value_ref == 0 || value_ref < 0 || value_ref > 0) {
-        G_message("Error in Rast3d_getValue");
+        G_message("Error in Rast3d_get_value");
         sum++;
         sum++;
     }
     }
     
     
-    Rast3d_closeCell(map);
+    Rast3d_close_cell(map);
     
     
     G_remove("grid3", "test_put_get_value_dcell");
     G_remove("grid3", "test_put_get_value_dcell");
     
     
@@ -208,7 +208,7 @@ int test_put_get_value_fcell(void)
     
     
     /* We need to set up a specific region for the new g3d map.
     /* We need to set up a specific region for the new g3d map.
      * First we safe the default region. */
      * First we safe the default region. */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
     
     
     region.bottom = 0.0;
     region.bottom = 0.0;
     region.top = 1000;
     region.top = 1000;
@@ -220,24 +220,24 @@ int test_put_get_value_fcell(void)
     region.cols = 10;
     region.cols = 10;
     region.depths = 5;
     region.depths = 5;
         
         
-    Rast3d_adjustRegion(&region);
+    Rast3d_adjust_region(&region);
         
         
-    map = Rast3d_openNewOptTileSize("test_put_get_value_dcell", RASTER3D_USE_CACHE_XY, &region, FCELL_TYPE, 32);
+    map = Rast3d_open_new_opt_tile_size("test_put_get_value_dcell", RASTER3D_USE_CACHE_XY, &region, FCELL_TYPE, 32);
     
     
     /* The window is the same as the map region ... of course */
     /* The window is the same as the map region ... of course */
-    Rast3d_setWindowMap(map, &region);
+    Rast3d_set_window_map(map, &region);
     
     
     for(z = 0; z < region.depths; z++) {
     for(z = 0; z < region.depths; z++) {
         for(y = 0; y < region.rows; y++) {
         for(y = 0; y < region.rows; y++) {
             for(x = 0; x < region.cols; x++) {
             for(x = 0; x < region.cols; x++) {
                 /* Add cols, rows and depths and put this in the map */
                 /* Add cols, rows and depths and put this in the map */
                 value = x + y + z;
                 value = x + y + z;
-                Rast3d_putValue(map, x, y, z, &value, FCELL_TYPE);
+                Rast3d_put_value(map, x, y, z, &value, FCELL_TYPE);
             }
             }
         }
         }
     }
     }
     /* Write everything to the disk */
     /* Write everything to the disk */
-    Rast3d_flushAllTiles(map);
+    Rast3d_flush_all_tiles(map);
     
     
        /* Reread the map and compare the expected results */
        /* Reread the map and compare the expected results */
     
     
@@ -290,21 +290,21 @@ int test_put_get_value_fcell(void)
     east = region.west + region.ew_res * col;
     east = region.west + region.ew_res * col;
     top = region.bottom + region.tb_res * depth;
     top = region.bottom + region.tb_res * depth;
     
     
-    Rast3d_getRegionValue(map, north, east, top, &value, FCELL_TYPE);
-    Rast3d_getValue(map, 10, 15, 5, &value_ref, FCELL_TYPE);
-    /* Rast3d_getValueRegion does not work with coordinates outside the region */
+    Rast3d_get_region_value(map, north, east, top, &value, FCELL_TYPE);
+    Rast3d_get_value(map, 10, 15, 5, &value_ref, FCELL_TYPE);
+    /* Rast3d_get_value_region does not work with coordinates outside the region */
     printf("Value %g == %g\n", value, value_ref);
     printf("Value %g == %g\n", value, value_ref);
     
     
     if(value == 0 || value < 0 || value > 0) {
     if(value == 0 || value < 0 || value > 0) {
-        G_message("Error in Rast3d_getRegionValue");
+        G_message("Error in Rast3d_get_region_value");
         sum++;
         sum++;
     }
     }
     if(value_ref == 0 || value_ref < 0 || value_ref > 0) {
     if(value_ref == 0 || value_ref < 0 || value_ref > 0) {
-        G_message("Error in Rast3d_getValue");
+        G_message("Error in Rast3d_get_value");
         sum++;
         sum++;
     }
     }
     
     
-    Rast3d_closeCell(map);
+    Rast3d_close_cell(map);
     
     
     G_remove("grid3", "test_put_get_value_fcell");
     G_remove("grid3", "test_put_get_value_fcell");
     
     
@@ -330,7 +330,7 @@ int test_put_get_value_resampling(void)
     
     
     /* We need to set up a specific region for the new g3d map.
     /* We need to set up a specific region for the new g3d map.
      * First we safe the default region. */
      * First we safe the default region. */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
     
     
     region.bottom = 0.0;
     region.bottom = 0.0;
     region.top = 1000;
     region.top = 1000;
@@ -342,22 +342,22 @@ int test_put_get_value_resampling(void)
     region.cols = 10;
     region.cols = 10;
     region.depths = 5;
     region.depths = 5;
         
         
-    Rast3d_adjustRegion(&region);
+    Rast3d_adjust_region(&region);
     
     
-    map = Rast3d_openNewOptTileSize("test_put_get_value_resample", RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, 32);
+    map = Rast3d_open_new_opt_tile_size("test_put_get_value_resample", RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, 32);
     
     
     /* We modify the window for resampling tests */
     /* We modify the window for resampling tests */
-    Rast3d_regionCopy(&window, &region);
+    Rast3d_region_copy(&window, &region);
         
         
     /* Double the cols, rows and depths -> 8x resolution window */
     /* Double the cols, rows and depths -> 8x resolution window */
     window.rows = 30;
     window.rows = 30;
     window.cols = 20;
     window.cols = 20;
     window.depths = 10;
     window.depths = 10;
     
     
-    Rast3d_adjustRegion(&window);
+    Rast3d_adjust_region(&window);
     
     
     /* The window is the same as the map region ... of course */
     /* The window is the same as the map region ... of course */
-    Rast3d_setWindowMap(map, &window);
+    Rast3d_set_window_map(map, &window);
     /*
     /*
      ROWS
      ROWS
   1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6500 7000 7500 8000 8500 9000 north
   1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6500 7000 7500 8000 8500 9000 north
@@ -385,12 +385,12 @@ int test_put_get_value_resampling(void)
             for(x = 0; x < region.cols; x++) {
             for(x = 0; x < region.cols; x++) {
                 /* Add cols, rows and depths and put this in the map */
                 /* Add cols, rows and depths and put this in the map */
                 value = x + y + z;
                 value = x + y + z;
-                Rast3d_putDouble(map, x, y, z, value);
+                Rast3d_put_double(map, x, y, z, value);
             }
             }
         }
         }
     }
     }
     /* Write everything to the disk */
     /* Write everything to the disk */
-    Rast3d_flushAllTiles(map);
+    Rast3d_flush_all_tiles(map);
     
     
     /* Reread the map and compare the expected results */
     /* Reread the map and compare the expected results */
     
     
@@ -435,7 +435,7 @@ int test_put_get_value_resampling(void)
     
     
     sum += test_resampling_dcell(map, north, east, top, col, row, depth, 2);
     sum += test_resampling_dcell(map, north, east, top, col, row, depth, 2);
     
     
-    Rast3d_closeCell(map);
+    Rast3d_close_cell(map);
     
     
     G_remove("grid3", "test_put_get_value_dcell");
     G_remove("grid3", "test_put_get_value_dcell");
     
     
@@ -452,26 +452,26 @@ int test_resampling_dcell(RASTER3D_Map *map, double north, double east, double t
     DCELL value_reg;
     DCELL value_reg;
     DCELL value_win;
     DCELL value_win;
     
     
-    Rast3d_getRegionValue(map, north, east, top, &value, DCELL_TYPE);
-    Rast3d_getWindowValue(map, north, east, top, &value_win, DCELL_TYPE);
-    Rast3d_getValue(map, col * fact, row * fact, depth * fact, &value_ref, DCELL_TYPE);
-    Rast3d_getValueRegion(map, col, row, depth, &value_reg, DCELL_TYPE);
+    Rast3d_get_region_value(map, north, east, top, &value, DCELL_TYPE);
+    Rast3d_get_window_value(map, north, east, top, &value_win, DCELL_TYPE);
+    Rast3d_get_value(map, col * fact, row * fact, depth * fact, &value_ref, DCELL_TYPE);
+    Rast3d_get_value_region(map, col, row, depth, &value_reg, DCELL_TYPE);
     printf("Value %g == %g == %g == %g\n", value, value_win, value_ref, value_reg);
     printf("Value %g == %g == %g == %g\n", value, value_win, value_ref, value_reg);
     
     
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getRegionValue");
+        G_message("Error in Rast3d_get_region_value");
         sum++;
         sum++;
     }
     }
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getWindowValue");
+        G_message("Error in Rast3d_get_window_value");
         sum++;
         sum++;
     }
     }
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getValue");
+        G_message("Error in Rast3d_get_value");
         sum++;
         sum++;
     }
     }
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getValueRegion");
+        G_message("Error in Rast3d_get_value_region");
         sum++;
         sum++;
     }
     }
     
     
@@ -488,26 +488,26 @@ int test_resampling_fcell(RASTER3D_Map *map, double north, double east, double t
     FCELL value_reg;
     FCELL value_reg;
     FCELL value_win;
     FCELL value_win;
     
     
-    Rast3d_getRegionValue(map, north, east, top, &value, FCELL_TYPE);
-    Rast3d_getWindowValue(map, north, east, top, &value_win, FCELL_TYPE);
-    Rast3d_getValue(map, col * fact, row * fact, depth * fact, &value_ref, FCELL_TYPE);
-    Rast3d_getValueRegion(map, col, row, depth, &value_reg, FCELL_TYPE);
+    Rast3d_get_region_value(map, north, east, top, &value, FCELL_TYPE);
+    Rast3d_get_window_value(map, north, east, top, &value_win, FCELL_TYPE);
+    Rast3d_get_value(map, col * fact, row * fact, depth * fact, &value_ref, FCELL_TYPE);
+    Rast3d_get_value_region(map, col, row, depth, &value_reg, FCELL_TYPE);
     printf("Value %g == %g == %g == %g\n", value, value_win, value_ref, value_reg);
     printf("Value %g == %g == %g == %g\n", value, value_win, value_ref, value_reg);
     
     
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getRegionValue");
+        G_message("Error in Rast3d_get_region_value");
         sum++;
         sum++;
     }
     }
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getWindowValue");
+        G_message("Error in Rast3d_get_window_value");
         sum++;
         sum++;
     }
     }
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getValue");
+        G_message("Error in Rast3d_get_value");
         sum++;
         sum++;
     }
     }
     if(value != col + row + depth) {
     if(value != col + row + depth) {
-        G_message("Error in Rast3d_getValueRegion");
+        G_message("Error in Rast3d_get_value_region");
         sum++;
         sum++;
     }
     }
     
     

+ 7 - 7
lib/raster3d/tilealloc.c

@@ -23,13 +23,13 @@
  *                   NULL ... otherwise.
  *                   NULL ... otherwise.
  */
  */
 
 
-void *Rast3d_allocTilesType(RASTER3D_Map * map, int nofTiles, int type)
+void *Rast3d_alloc_tiles_type(RASTER3D_Map * map, int nofTiles, int type)
 {
 {
     void *tiles;
     void *tiles;
 
 
     tiles = Rast3d_malloc(map->tileSize * Rast3d_length(type) * nofTiles);
     tiles = Rast3d_malloc(map->tileSize * Rast3d_length(type) * nofTiles);
     if (tiles == NULL) {
     if (tiles == NULL) {
-	Rast3d_error("Rast3d_allocTilesType: error in Rast3d_malloc");
+	Rast3d_error("Rast3d_alloc_tiles_type: error in Rast3d_malloc");
 	return NULL;
 	return NULL;
     }
     }
 
 
@@ -42,20 +42,20 @@ void *Rast3d_allocTilesType(RASTER3D_Map * map, int nofTiles, int type)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- *  Is equivalent to Rast3d_allocTilesType (map, nofTiles, Rast3d_fileTypeMap (map)).
+ *  Is equivalent to Rast3d_alloc_tiles_type (map, nofTiles, Rast3d_file_type_map (map)).
  *
  *
  *  \param map
  *  \param map
  *  \param nofTiles
  *  \param nofTiles
  *  \return void * 
  *  \return void * 
  */
  */
 
 
-void *Rast3d_allocTiles(RASTER3D_Map * map, int nofTiles)
+void *Rast3d_alloc_tiles(RASTER3D_Map * map, int nofTiles)
 {
 {
     void *tiles;
     void *tiles;
 
 
-    tiles = Rast3d_allocTilesType(map, nofTiles, map->typeIntern);
+    tiles = Rast3d_alloc_tiles_type(map, nofTiles, map->typeIntern);
     if (tiles == NULL) {
     if (tiles == NULL) {
-	Rast3d_error("Rast3d_allocTiles: error in Rast3d_allocTilesType");
+	Rast3d_error("Rast3d_alloc_tiles: error in Rast3d_alloc_tiles_type");
 	return NULL;
 	return NULL;
     }
     }
 
 
@@ -74,7 +74,7 @@ void *Rast3d_allocTiles(RASTER3D_Map * map, int nofTiles)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_freeTiles(void *tiles)
+void Rast3d_free_tiles(void *tiles)
 {
 {
     Rast3d_free(tiles);
     Rast3d_free(tiles);
 }
 }

+ 15 - 15
lib/raster3d/tileio.c

@@ -29,7 +29,7 @@
  * is read from file and stored in the buffer provided by the map structure.
  * is read from file and stored in the buffer provided by the map structure.
  * The pointer to this buffer is returned. If the buffer already contains the
  * The pointer to this buffer is returned. If the buffer already contains the
  * tile with <em>tileIndex</em> reading is skipped. Data which was stored in
  * tile with <em>tileIndex</em> reading is skipped. Data which was stored in
- * earlier calls to <tt>Rast3d_getTilePtr</tt> is destroyed.  If the tile with <em>tileIndex</em> is not stored on the file corresponding to <em>map</em>, and <em>tileIndex</em> is a valid index the buffer is filled with NULL-values.<br>
+ * earlier calls to <tt>Rast3d_get_tile_ptr</tt> is destroyed.  If the tile with <em>tileIndex</em> is not stored on the file corresponding to <em>map</em>, and <em>tileIndex</em> is a valid index the buffer is filled with NULL-values.<br>
  * If <em>map</em> is old and the cache is used the tile with <em>tileIndex</em> is
  * If <em>map</em> is old and the cache is used the tile with <em>tileIndex</em> is
  * read from file and stored in one of the cache buffers.  The pointer to buffer
  * read from file and stored in one of the cache buffers.  The pointer to buffer
  * is returned.  If no free cache buffer is available an unlocked cache-buffer
  * is returned.  If no free cache buffer is available an unlocked cache-buffer
@@ -42,8 +42,8 @@
  * as if <em>map</em> is old and the cache is not used.  If the tile with <em>tileIndex</em> 
  * as if <em>map</em> is old and the cache is not used.  If the tile with <em>tileIndex</em> 
  * is already stored on file, it is read into the buffer, if not,
  * is already stored on file, it is read into the buffer, if not,
  * the cells are set to null-values.  If the buffer corresponding to the pointer
  * the cells are set to null-values.  If the buffer corresponding to the pointer
- * is used for writing, subsequent calls to <tt>Rast3d_getTilePtr</tt> may destroy the
- * values already stored in the buffer.  Use <tt>Rast3d_flushTile</tt> to write the buffer
+ * is used for writing, subsequent calls to <tt>Rast3d_get_tile_ptr</tt> may destroy the
+ * values already stored in the buffer.  Use <tt>Rast3d_flush_tile</tt> to write the buffer
  * to the file before reusing it for a different index.  The use of this buffer
  * to the file before reusing it for a different index.  The use of this buffer
  * as write buffer is discouraged.<br>
  * as write buffer is discouraged.<br>
  * If <em>map</em> is new and the cache is used the functionality is the same as if
  * If <em>map</em> is new and the cache is used the functionality is the same as if
@@ -59,8 +59,8 @@
  * Care has to be taken if this function is used in non-cache mode since it is
  * Care has to be taken if this function is used in non-cache mode since it is
  * implicitly invoked every time a read or write request is issued.  The only
  * implicitly invoked every time a read or write request is issued.  The only
  * I/O-functions for which it is safe to assume that they do not invoke
  * I/O-functions for which it is safe to assume that they do not invoke
- * <tt>Rast3d_getTilePtr</tt> are <tt>Rast3d_readTile()</tt> and
- * <tt>Rast3d_writeTile()</tt> and their corresponding type-specific versions.
+ * <tt>Rast3d_get_tile_ptr</tt> are <tt>Rast3d_read_tile()</tt> and
+ * <tt>Rast3d_write_tile()</tt> and their corresponding type-specific versions.
  *
  *
  *  \param map
  *  \param map
  *  \param tileIndex
  *  \param tileIndex
@@ -68,19 +68,19 @@
  *                 NULL ... otherwise.
  *                 NULL ... otherwise.
  */
  */
 
 
-void *Rast3d_getTilePtr(RASTER3D_Map * map, int tileIndex)
+void *Rast3d_get_tile_ptr(RASTER3D_Map * map, int tileIndex)
 {
 {
     void *ptr;
     void *ptr;
 
 
     if ((tileIndex >= map->nTiles) || (tileIndex < 0)) {
     if ((tileIndex >= map->nTiles) || (tileIndex < 0)) {
-	Rast3d_error("Rast3d_getTilePtr: tileIndex out of range");
+	Rast3d_error("Rast3d_get_tile_ptr: tileIndex out of range");
 	return NULL;
 	return NULL;
     }
     }
 
 
     if (map->useCache) {
     if (map->useCache) {
 	ptr = Rast3d_cache_elt_ptr(map->cache, tileIndex);
 	ptr = Rast3d_cache_elt_ptr(map->cache, tileIndex);
 	if (ptr == NULL) {
 	if (ptr == NULL) {
-	    Rast3d_error("Rast3d_getTilePtr: error in Rast3d_cache_elt_ptr");
+	    Rast3d_error("Rast3d_get_tile_ptr: error in Rast3d_cache_elt_ptr");
 	    return NULL;
 	    return NULL;
 	}
 	}
 	return ptr;
 	return ptr;
@@ -90,8 +90,8 @@ void *Rast3d_getTilePtr(RASTER3D_Map * map, int tileIndex)
 	return map->data;
 	return map->data;
 
 
     map->currentIndex = tileIndex;
     map->currentIndex = tileIndex;
-    if (!Rast3d_readTile(map, map->currentIndex, map->data, map->typeIntern)) {
-	Rast3d_error("Rast3d_getTilePtr: error in Rast3d_readTile");
+    if (!Rast3d_read_tile(map, map->currentIndex, map->data, map->typeIntern)) {
+	Rast3d_error("Rast3d_get_tile_ptr: error in Rast3d_read_tile");
 	return NULL;
 	return NULL;
     }
     }
 
 
@@ -104,7 +104,7 @@ void *Rast3d_getTilePtr(RASTER3D_Map * map, int tileIndex)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Same functionality as <tt>Rast3d_getTilePtr()</tt> but does not return the pointer.
+ * Same functionality as <tt>Rast3d_get_tile_ptr()</tt> but does not return the pointer.
  *
  *
  *  \param map
  *  \param map
  *  \param tileIndex
  *  \param tileIndex
@@ -112,10 +112,10 @@ void *Rast3d_getTilePtr(RASTER3D_Map * map, int tileIndex)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_tileLoad(RASTER3D_Map * map, int tileIndex)
+int Rast3d_tile_load(RASTER3D_Map * map, int tileIndex)
 {
 {
-    if (Rast3d_getTilePtr(map, tileIndex) == NULL) {
-	Rast3d_error("Rast3d_tileLoad: error in Rast3d_getTilePtr");
+    if (Rast3d_get_tile_ptr(map, tileIndex) == NULL) {
+	Rast3d_error("Rast3d_tile_load: error in Rast3d_get_tile_ptr");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -124,7 +124,7 @@ int Rast3d_tileLoad(RASTER3D_Map * map, int tileIndex)
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-int Rast3d__removeTile(RASTER3D_Map * map, int tileIndex)
+int Rast3d__remove_tile(RASTER3D_Map * map, int tileIndex)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
 	return 1;
 	return 1;

+ 16 - 16
lib/raster3d/tilemath.c

@@ -22,7 +22,7 @@
  */
  */
 
 
 void
 void
-Rast3d_tileIndex2tile(RASTER3D_Map * map, int tileIndex, int *xTile, int *yTile,
+Rast3d_tile_index2tile(RASTER3D_Map * map, int tileIndex, int *xTile, int *yTile,
 		   int *zTile)
 		   int *zTile)
 {
 {
     int tileIndex2d;
     int tileIndex2d;
@@ -49,7 +49,7 @@ Rast3d_tileIndex2tile(RASTER3D_Map * map, int tileIndex, int *xTile, int *yTile,
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_tile2tileIndex(RASTER3D_Map * map, int xTile, int yTile, int zTile)
+int Rast3d_tile2tile_index(RASTER3D_Map * map, int xTile, int yTile, int zTile)
 {
 {
     return map->nxy * zTile + map->nx * yTile + xTile;
     return map->nxy * zTile + map->nx * yTile + xTile;
 }
 }
@@ -75,7 +75,7 @@ int Rast3d_tile2tileIndex(RASTER3D_Map * map, int xTile, int yTile, int zTile)
  */
  */
 
 
 void
 void
-Rast3d_tileCoordOrigin(RASTER3D_Map * map, int xTile, int yTile, int zTile, int *x,
+Rast3d_tile_coord_origin(RASTER3D_Map * map, int xTile, int yTile, int zTile, int *x,
 		    int *y, int *z)
 		    int *y, int *z)
 {
 {
     *x = map->tileX * xTile;
     *x = map->tileX * xTile;
@@ -100,12 +100,12 @@ Rast3d_tileCoordOrigin(RASTER3D_Map * map, int xTile, int yTile, int zTile, int
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_tileIndexOrigin(RASTER3D_Map * map, int tileIndex, int *x, int *y, int *z)
+void Rast3d_tile_index_origin(RASTER3D_Map * map, int tileIndex, int *x, int *y, int *z)
 {
 {
     int xTile, yTile, zTile;
     int xTile, yTile, zTile;
 
 
-    Rast3d_tileIndex2tile(map, tileIndex, &xTile, &yTile, &zTile);
-    Rast3d_tileCoordOrigin(map, xTile, yTile, zTile, x, y, z);
+    Rast3d_tile_index2tile(map, tileIndex, &xTile, &yTile, &zTile);
+    Rast3d_tile_coord_origin(map, xTile, yTile, zTile, x, y, z);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -133,7 +133,7 @@ void Rast3d_tileIndexOrigin(RASTER3D_Map * map, int tileIndex, int *x, int *y, i
  */
  */
 
 
 void
 void
-Rast3d_coord2tileCoord(RASTER3D_Map * map, int x, int y, int z, int *xTile,
+Rast3d_coord2tile_coord(RASTER3D_Map * map, int x, int y, int z, int *xTile,
 		    int *yTile, int *zTile, int *xOffs, int *yOffs,
 		    int *yTile, int *zTile, int *xOffs, int *yOffs,
 		    int *zOffs)
 		    int *zOffs)
 {
 {
@@ -164,14 +164,14 @@ Rast3d_coord2tileCoord(RASTER3D_Map * map, int x, int y, int z, int *xTile,
  */
  */
 
 
 void
 void
-Rast3d_coord2tileIndex(RASTER3D_Map * map, int x, int y, int z, int *tileIndex,
+Rast3d_coord2tile_index(RASTER3D_Map * map, int x, int y, int z, int *tileIndex,
 		    int *offset)
 		    int *offset)
 {
 {
     int xTile, yTile, zTile, xOffs, yOffs, zOffs;
     int xTile, yTile, zTile, xOffs, yOffs, zOffs;
 
 
-    Rast3d_coord2tileCoord(map, x, y, z,
+    Rast3d_coord2tile_coord(map, x, y, z,
 			&xTile, &yTile, &zTile, &xOffs, &yOffs, &zOffs);
 			&xTile, &yTile, &zTile, &xOffs, &yOffs, &zOffs);
-    *tileIndex = Rast3d_tile2tileIndex(map, xTile, yTile, zTile);
+    *tileIndex = Rast3d_tile2tile_index(map, xTile, yTile, zTile);
     *offset = zOffs * map->tileXY + yOffs * map->tileX + xOffs;
     *offset = zOffs * map->tileXY + yOffs * map->tileX + xOffs;
 }
 }
 
 
@@ -192,7 +192,7 @@ Rast3d_coord2tileIndex(RASTER3D_Map * map, int x, int y, int z, int *tileIndex,
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_coordInRange(RASTER3D_Map * map, int x, int y, int z)
+int Rast3d_coord_in_range(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     return (x >= 0) && (x < map->region.cols) && (y >= 0) &&
     return (x >= 0) && (x < map->region.cols) && (y >= 0) &&
 	(y < map->region.rows) && (z >= 0) && (z < map->region.depths);
 	(y < map->region.rows) && (z >= 0) && (z < map->region.depths);
@@ -212,7 +212,7 @@ int Rast3d_coordInRange(RASTER3D_Map * map, int x, int y, int z)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_tileIndexInRange(RASTER3D_Map * map, int tileIndex)
+int Rast3d_tile_index_in_range(RASTER3D_Map * map, int tileIndex)
 {
 {
     return (tileIndex < map->nTiles) && (tileIndex >= 0);
     return (tileIndex < map->nTiles) && (tileIndex >= 0);
 }
 }
@@ -234,7 +234,7 @@ int Rast3d_tileIndexInRange(RASTER3D_Map * map, int tileIndex)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_tileInRange(RASTER3D_Map * map, int x, int y, int z)
+int Rast3d_tile_in_range(RASTER3D_Map * map, int x, int y, int z)
 {
 {
     return (x >= 0) && (x < map->nx) && (y >= 0) && (y < map->ny) &&
     return (x >= 0) && (x < map->nx) && (y >= 0) && (y < map->ny) &&
 	(z >= 0) && (z < map->nz);
 	(z >= 0) && (z < map->nz);
@@ -264,13 +264,13 @@ int Rast3d_tileInRange(RASTER3D_Map * map, int x, int y, int z)
  */
  */
 
 
 int
 int
-Rast3d_computeClippedTileDimensions(RASTER3D_Map * map, int tileIndex, int *rows,
+Rast3d_compute_clipped_tile_dimensions(RASTER3D_Map * map, int tileIndex, int *rows,
 				 int *cols, int *depths, int *xRedundant,
 				 int *cols, int *depths, int *xRedundant,
 				 int *yRedundant, int *zRedundant)
 				 int *yRedundant, int *zRedundant)
 {
 {
     int x, y, z;
     int x, y, z;
 
 
-    Rast3d_tileIndex2tile(map, tileIndex, &x, &y, &z);
+    Rast3d_tile_index2tile(map, tileIndex, &x, &y, &z);
 
 
     if ((x != map->clipX) && (y != map->clipY) && (z != map->clipZ)) {
     if ((x != map->clipX) && (y != map->clipY) && (z != map->clipZ)) {
 	return map->tileSize;
 	return map->tileSize;
@@ -329,7 +329,7 @@ Rast3d_computeClippedTileDimensions(RASTER3D_Map * map, int tileIndex, int *rows
  */
  */
 
 
 void
 void
-Rast3d_computeOptimalTileDimension(RASTER3D_Region *region, int type, int *tileX, int *tileY, int *tileZ, int maxSize)
+Rast3d_compute_optimal_tile_dimension(RASTER3D_Region *region, int type, int *tileX, int *tileY, int *tileZ, int maxSize)
 {
 {
    int size = 0;
    int size = 0;
    int x, y, z;
    int x, y, z;

+ 5 - 5
lib/raster3d/tilenull.c

@@ -20,9 +20,9 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setNullTileType(RASTER3D_Map * map, void *tile, int type)
+void Rast3d_set_null_tile_type(RASTER3D_Map * map, void *tile, int type)
 {
 {
-    Rast3d_setNullValue(tile, map->tileSize, type);
+    Rast3d_set_null_value(tile, map->tileSize, type);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -31,14 +31,14 @@ void Rast3d_setNullTileType(RASTER3D_Map * map, void *tile, int type)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Is equivalent to Rast3d_setNullTileType (map, tile, Rast3d_fileTypeMap (map)).
+ * Is equivalent to Rast3d_set_null_tile_type (map, tile, Rast3d_file_type_map (map)).
  *
  *
  *  \param map
  *  \param map
  *  \param tile
  *  \param tile
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setNullTile(RASTER3D_Map * map, void *tile)
+void Rast3d_set_null_tile(RASTER3D_Map * map, void *tile)
 {
 {
-    Rast3d_setNullTileType(map, tile, map->typeIntern);
+    Rast3d_set_null_tile_type(map, tile, map->typeIntern);
 }
 }

+ 61 - 61
lib/raster3d/tileread.c

@@ -15,14 +15,14 @@ Rast3d_xdrTile2tile(RASTER3D_Map * map, void *tile, int rows, int cols, int dept
 {
 {
     int y, z, xLength, yLength, length;
     int y, z, xLength, yLength, length;
 
 
-    if (!Rast3d_initCopyFromXdr(map, type)) {
-	Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_initCopyFromXdr");
+    if (!Rast3d_init_copy_from_xdr(map, type)) {
+	Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_init_copy_from_xdr");
 	return 0;
 	return 0;
     }
     }
 
 
     if (nofNum == map->tileSize) {
     if (nofNum == map->tileSize) {
-	if (!Rast3d_copyFromXdr(map->tileSize, tile)) {
-	    Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copyFromXdr");
+	if (!Rast3d_copy_from_xdr(map->tileSize, tile)) {
+	    Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copy_from_xdr");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
@@ -35,45 +35,45 @@ Rast3d_xdrTile2tile(RASTER3D_Map * map, void *tile, int rows, int cols, int dept
     if (xRedundant) {
     if (xRedundant) {
 	for (z = 0; z < depths; z++) {
 	for (z = 0; z < depths; z++) {
 	    for (y = 0; y < rows; y++) {
 	    for (y = 0; y < rows; y++) {
-		if (!Rast3d_copyFromXdr(cols, tile)) {
-		    Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copyFromXdr");
+		if (!Rast3d_copy_from_xdr(cols, tile)) {
+		    Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copy_from_xdr");
 		    return 0;
 		    return 0;
 		}
 		}
 		tile = G_incr_void_ptr(tile, cols * length);
 		tile = G_incr_void_ptr(tile, cols * length);
-		Rast3d_setNullValue(tile, xRedundant, type);
+		Rast3d_set_null_value(tile, xRedundant, type);
 		tile = G_incr_void_ptr(tile, xLength);
 		tile = G_incr_void_ptr(tile, xLength);
 	    }
 	    }
 	    if (yRedundant) {
 	    if (yRedundant) {
-		Rast3d_setNullValue(tile, map->tileX * yRedundant, type);
+		Rast3d_set_null_value(tile, map->tileX * yRedundant, type);
 		tile = G_incr_void_ptr(tile, yLength);
 		tile = G_incr_void_ptr(tile, yLength);
 	    }
 	    }
 	}
 	}
 	if (!zRedundant)
 	if (!zRedundant)
 	    return 1;
 	    return 1;
 
 
-	Rast3d_setNullValue(tile, map->tileXY * zRedundant, type);
+	Rast3d_set_null_value(tile, map->tileXY * zRedundant, type);
 	return 1;
 	return 1;
     }
     }
 
 
     if (yRedundant) {
     if (yRedundant) {
 	for (z = 0; z < depths; z++) {
 	for (z = 0; z < depths; z++) {
-	    if (!Rast3d_copyFromXdr(map->tileX * rows, tile)) {
-		Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copyFromXdr");
+	    if (!Rast3d_copy_from_xdr(map->tileX * rows, tile)) {
+		Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copy_from_xdr");
 		return 0;
 		return 0;
 	    }
 	    }
 	    tile = G_incr_void_ptr(tile, map->tileX * rows * length);
 	    tile = G_incr_void_ptr(tile, map->tileX * rows * length);
-	    Rast3d_setNullValue(tile, map->tileX * yRedundant, type);
+	    Rast3d_set_null_value(tile, map->tileX * yRedundant, type);
 	    tile = G_incr_void_ptr(tile, yLength);
 	    tile = G_incr_void_ptr(tile, yLength);
 	}
 	}
 	if (!zRedundant)
 	if (!zRedundant)
 	    return 1;
 	    return 1;
 
 
-	Rast3d_setNullValue(tile, map->tileXY * zRedundant, type);
+	Rast3d_set_null_value(tile, map->tileXY * zRedundant, type);
 	return 1;
 	return 1;
     }
     }
 
 
-    if (!Rast3d_copyFromXdr(map->tileXY * depths, tile)) {
-	Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copyFromXdr");
+    if (!Rast3d_copy_from_xdr(map->tileXY * depths, tile)) {
+	Rast3d_error("Rast3d_xdrTile2tile: error in Rast3d_copy_from_xdr");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -81,7 +81,7 @@ Rast3d_xdrTile2tile(RASTER3D_Map * map, void *tile, int rows, int cols, int dept
 	return 1;
 	return 1;
 
 
     tile = G_incr_void_ptr(tile, map->tileXY * depths * length);
     tile = G_incr_void_ptr(tile, map->tileXY * depths * length);
-    Rast3d_setNullValue(tile, map->tileXY * zRedundant, type);
+    Rast3d_set_null_value(tile, map->tileXY * zRedundant, type);
 
 
     return 1;
     return 1;
 }
 }
@@ -107,12 +107,12 @@ static int Rast3d_readTileUncompressed(RASTER3D_Map * map, int tileIndex, int no
 
 
 static int Rast3d_readTileCompressed(RASTER3D_Map * map, int tileIndex, int nofNum)
 static int Rast3d_readTileCompressed(RASTER3D_Map * map, int tileIndex, int nofNum)
 {
 {
-    if (!G_fpcompress_readXdrNums(map->data_fd, xdr, nofNum,
+    if (!Rast3d_fpcompress_read_xdr_nums(map->data_fd, xdr, nofNum,
 				  map->tileLength[tileIndex],
 				  map->tileLength[tileIndex],
 				  map->precision, tmpCompress,
 				  map->precision, tmpCompress,
 				  map->type == FCELL_TYPE)) {
 				  map->type == FCELL_TYPE)) {
 	Rast3d_error
 	Rast3d_error
-	    ("Rast3d_readTileCompressed: error in G_fpcompress_readXdrNums");
+	    ("Rast3d_readTileCompressed: error in Rast3d_fpcompress_read_xdr_nums");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -144,49 +144,49 @@ static int Rast3d_readTileCompressed(RASTER3D_Map * map, int tileIndex, int nofN
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_readTile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
+int Rast3d_read_tile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
 {
 {
     int nofNum, rows, cols, depths, xRedundant, yRedundant, zRedundant;
     int nofNum, rows, cols, depths, xRedundant, yRedundant, zRedundant;
 
 
     if ((tileIndex >= map->nTiles) || (tileIndex < 0))
     if ((tileIndex >= map->nTiles) || (tileIndex < 0))
-	Rast3d_fatalError("Rast3d_readTile: tile index out of range");
+	Rast3d_fatal_error("Rast3d_read_tile: tile index out of range");
 
 
     if (map->index[tileIndex] == -1) {
     if (map->index[tileIndex] == -1) {
-	Rast3d_setNullTileType(map, tile, type);
+	Rast3d_set_null_tile_type(map, tile, type);
 	return 1;
 	return 1;
     }
     }
 
 
-    nofNum = Rast3d_computeClippedTileDimensions(map, tileIndex,
+    nofNum = Rast3d_compute_clipped_tile_dimensions(map, tileIndex,
 					      &rows, &cols, &depths,
 					      &rows, &cols, &depths,
 					      &xRedundant, &yRedundant,
 					      &xRedundant, &yRedundant,
 					      &zRedundant);
 					      &zRedundant);
 
 
     if (lseek(map->data_fd, map->index[tileIndex], SEEK_SET) == -1) {
     if (lseek(map->data_fd, map->index[tileIndex], SEEK_SET) == -1) {
-	Rast3d_error("Rast3d_readTile: can't position file");
+	Rast3d_error("Rast3d_read_tile: can't position file");
 	return 0;
 	return 0;
     }
     }
 
 
     if (map->compression == RASTER3D_NO_COMPRESSION) {
     if (map->compression == RASTER3D_NO_COMPRESSION) {
 	if (!Rast3d_readTileUncompressed(map, tileIndex, nofNum)) {
 	if (!Rast3d_readTileUncompressed(map, tileIndex, nofNum)) {
-	    Rast3d_error("Rast3d_readTile: error in Rast3d_readTileUncompressed");
+	    Rast3d_error("Rast3d_read_tile: error in Rast3d_readTileUncompressed");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
     else if (!Rast3d_readTileCompressed(map, tileIndex, nofNum)) {
     else if (!Rast3d_readTileCompressed(map, tileIndex, nofNum)) {
-	Rast3d_error("Rast3d_readTile: error in Rast3d_readTileCompressed");
+	Rast3d_error("Rast3d_read_tile: error in Rast3d_readTileCompressed");
 	return 0;
 	return 0;
     }
     }
 
 
     if (!Rast3d_xdrTile2tile(map, tile, rows, cols, depths,
     if (!Rast3d_xdrTile2tile(map, tile, rows, cols, depths,
 			  xRedundant, yRedundant, zRedundant, nofNum, type)) {
 			  xRedundant, yRedundant, zRedundant, nofNum, type)) {
-	Rast3d_error("Rast3d_readTile: error in Rast3d_xdrTile2tile");
+	Rast3d_error("Rast3d_read_tile: error in Rast3d_xdrTile2tile");
 	return 0;
 	return 0;
     }
     }
 
 
-    if (Rast3d_maskIsOff(map))
+    if (Rast3d_mask_is_off(map))
 	return 1;
 	return 1;
 
 
-    Rast3d_maskTile(map, tileIndex, tile, type);
+    Rast3d_mask_tile(map, tileIndex, tile, type);
     return 1;
     return 1;
 }
 }
 
 
@@ -196,7 +196,7 @@ int Rast3d_readTile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- *  Is equivalent to Rast3d_readTile (map, tileIndex, tile, FCELL_TYPE).
+ *  Is equivalent to Rast3d_read_tile (map, tileIndex, tile, FCELL_TYPE).
  *
  *
  *  \param map
  *  \param map
  *  \param tileIndex
  *  \param tileIndex
@@ -204,10 +204,10 @@ int Rast3d_readTile(RASTER3D_Map * map, int tileIndex, void *tile, int type)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_readTileFloat(RASTER3D_Map * map, int tileIndex, void *tile)
+int Rast3d_read_tile_float(RASTER3D_Map * map, int tileIndex, void *tile)
 {
 {
-    if (!Rast3d_readTile(map, tileIndex, tile, FCELL_TYPE)) {
-	Rast3d_error("Rast3d_readTileFloat: error in Rast3d_readTile");
+    if (!Rast3d_read_tile(map, tileIndex, tile, FCELL_TYPE)) {
+	Rast3d_error("Rast3d_read_tile_float: error in Rast3d_read_tile");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -220,7 +220,7 @@ int Rast3d_readTileFloat(RASTER3D_Map * map, int tileIndex, void *tile)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- *  Is equivalent to Rast3d_readTile (map, tileIndex, tile, DCELL_TYPE).
+ *  Is equivalent to Rast3d_read_tile (map, tileIndex, tile, DCELL_TYPE).
  *
  *
  *  \param map
  *  \param map
  *  \param tileIndex
  *  \param tileIndex
@@ -228,10 +228,10 @@ int Rast3d_readTileFloat(RASTER3D_Map * map, int tileIndex, void *tile)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_readTileDouble(RASTER3D_Map * map, int tileIndex, void *tile)
+int Rast3d_read_tile_double(RASTER3D_Map * map, int tileIndex, void *tile)
 {
 {
-    if (!Rast3d_readTile(map, tileIndex, tile, DCELL_TYPE)) {
-	Rast3d_error("Rast3d_readTileDouble: error in Rast3d_readTile");
+    if (!Rast3d_read_tile(map, tileIndex, tile, DCELL_TYPE)) {
+	Rast3d_error("Rast3d_read_tile_double: error in Rast3d_read_tile");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -258,13 +258,13 @@ int Rast3d_readTileDouble(RASTER3D_Map * map, int tileIndex, void *tile)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_lockTile(RASTER3D_Map * map, int tileIndex)
+int Rast3d_lock_tile(RASTER3D_Map * map, int tileIndex)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError("Rast3d_lockTile: function invalid in non-cache mode");
+	Rast3d_fatal_error("Rast3d_lock_tile: function invalid in non-cache mode");
 
 
     if (!Rast3d_cache_lock(map->cache, tileIndex)) {
     if (!Rast3d_cache_lock(map->cache, tileIndex)) {
-	Rast3d_error("Rast3d_lockTile: error in Rast3d_cache_lock");
+	Rast3d_error("Rast3d_lock_tile: error in Rast3d_cache_lock");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -285,13 +285,13 @@ int Rast3d_lockTile(RASTER3D_Map * map, int tileIndex)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_unlockTile(RASTER3D_Map * map, int tileIndex)
+int Rast3d_unlock_tile(RASTER3D_Map * map, int tileIndex)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError("Rast3d_unlockTile: function invalid in non-cache mode");
+	Rast3d_fatal_error("Rast3d_unlock_tile: function invalid in non-cache mode");
 
 
     if (!Rast3d_cache_unlock(map->cache, tileIndex)) {
     if (!Rast3d_cache_unlock(map->cache, tileIndex)) {
-	Rast3d_error("Rast3d_unlockTile: error in Rast3d_cache_unlock");
+	Rast3d_error("Rast3d_unlock_tile: error in Rast3d_cache_unlock");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -311,13 +311,13 @@ int Rast3d_unlockTile(RASTER3D_Map * map, int tileIndex)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_unlockAll(RASTER3D_Map * map)
+int Rast3d_unlock_all(RASTER3D_Map * map)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError("Rast3d_unlockAll: function invalid in non-cache mode");
+	Rast3d_fatal_error("Rast3d_unlock_all: function invalid in non-cache mode");
 
 
     if (!Rast3d_cache_unlock_all(map->cache)) {
     if (!Rast3d_cache_unlock_all(map->cache)) {
-	Rast3d_error("Rast3d_unlockAll: error in Rast3d_cache_unlock_all");
+	Rast3d_error("Rast3d_unlock_all: error in Rast3d_cache_unlock_all");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -336,10 +336,10 @@ int Rast3d_unlockAll(RASTER3D_Map * map)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_autolockOn(RASTER3D_Map * map)
+void Rast3d_autolock_on(RASTER3D_Map * map)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError("Rast3d_autoLockOn: function invalid in non-cache mode");
+	Rast3d_fatal_error("Rast3d_autoLockOn: function invalid in non-cache mode");
 
 
     Rast3d_cache_autolock_on(map->cache);
     Rast3d_cache_autolock_on(map->cache);
 }
 }
@@ -356,10 +356,10 @@ void Rast3d_autolockOn(RASTER3D_Map * map)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_autolockOff(RASTER3D_Map * map)
+void Rast3d_autolock_off(RASTER3D_Map * map)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError("Rast3d_autoLockOff: function invalid in non-cache mode");
+	Rast3d_fatal_error("Rast3d_autoLockOff: function invalid in non-cache mode");
 
 
     Rast3d_cache_autolock_off(map->cache);
     Rast3d_cache_autolock_off(map->cache);
 }
 }
@@ -372,11 +372,11 @@ void Rast3d_autolockOff(RASTER3D_Map * map)
  *
  *
  * Sets the minimum
  * Sets the minimum
  * number of unlocked tiles to <em>minUnlocked</em>.  This function should be used
  * number of unlocked tiles to <em>minUnlocked</em>.  This function should be used
- * in combination with <tt>Rast3d_unlockAll ()</tt> in order to avoid situations where the
+ * in combination with <tt>Rast3d_unlock_all ()</tt> in order to avoid situations where the
  * new minimum is larger than the actual number of unlocked tiles.
  * new minimum is larger than the actual number of unlocked tiles.
  * <em>minUnlocked</em> must be one of RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y,
  * <em>minUnlocked</em> must be one of RASTER3D_USE_CACHE_X, RASTER3D_USE_CACHE_Y,
  * RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ,
  * RASTER3D_USE_CACHE_Z, RASTER3D_USE_CACHE_XY, RASTER3D_USE_CACHE_XZ,
- * RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cacheSizeEncode()
+ * RASTER3D_USE_CACHE_YZ, RASTER3D_USE_CACHE_XYZ, the result of Rast3d_cache_size_encode()
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer
  * (cf.{g3d:G3d.cacheSizeEncode}), or any positive integer
  * which explicitly specifies the number of tiles.
  * which explicitly specifies the number of tiles.
  *
  *
@@ -385,13 +385,13 @@ void Rast3d_autolockOff(RASTER3D_Map * map)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_minUnlocked(RASTER3D_Map * map, int minUnlocked)
+void Rast3d_min_unlocked(RASTER3D_Map * map, int minUnlocked)
 {
 {
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError("Rast3d_autoLockOff: function invalid in non-cache mode");
+	Rast3d_fatal_error("Rast3d_autoLockOff: function invalid in non-cache mode");
 
 
-    Rast3d_cache_set_minUnlock(map->cache,
-			    Rast3d__computeCacheSize(map, minUnlocked));
+    Rast3d_cache_set_min_unlock(map->cache,
+			    Rast3d__compute_cache_size(map, minUnlocked));
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -407,14 +407,14 @@ void Rast3d_minUnlocked(RASTER3D_Map * map, int minUnlocked)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_beginCycle(RASTER3D_Map * map)
+int Rast3d_begin_cycle(RASTER3D_Map * map)
 {
 {
-    if (!Rast3d_unlockAll(map)) {
-	Rast3d_fatalError("Rast3d_beginCycle: error in Rast3d_unlockAll");
+    if (!Rast3d_unlock_all(map)) {
+	Rast3d_fatal_error("Rast3d_begin_cycle: error in Rast3d_unlock_all");
 	return 0;
 	return 0;
     }
     }
 
 
-    Rast3d_autolockOn(map);
+    Rast3d_autolock_on(map);
     return 1;
     return 1;
 }
 }
 
 
@@ -431,8 +431,8 @@ int Rast3d_beginCycle(RASTER3D_Map * map)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_endCycle(RASTER3D_Map * map)
+int Rast3d_end_cycle(RASTER3D_Map * map)
 {
 {
-    Rast3d_autolockOff(map);
+    Rast3d_autolock_off(map);
     return 1;
     return 1;
 }
 }

+ 55 - 55
lib/raster3d/tilewrite.c

@@ -18,15 +18,15 @@ Rast3d_tile2xdrTile(RASTER3D_Map * map, const void *tile, int rows, int cols,
 {
 {
     int y, z;
     int y, z;
 
 
-    if (!Rast3d_initCopyToXdr(map, type)) {
-	Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_initCopyToXdr");
+    if (!Rast3d_init_copy_to_xdr(map, type)) {
+	Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_init_copy_to_xdr");
 	return 0;
 	return 0;
     }
     }
 
 
 
 
     if (nofNum == map->tileSize) {
     if (nofNum == map->tileSize) {
-	if (!Rast3d_copyToXdr(tile, map->tileSize)) {
-	    Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copyToXdr");
+	if (!Rast3d_copy_to_xdr(tile, map->tileSize)) {
+	    Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copy_to_xdr");
 	    return 0;
 	    return 0;
 	}
 	}
 	return 1;
 	return 1;
@@ -35,8 +35,8 @@ Rast3d_tile2xdrTile(RASTER3D_Map * map, const void *tile, int rows, int cols,
     if (xRedundant) {
     if (xRedundant) {
 	for (z = 0; z < depths; z++) {
 	for (z = 0; z < depths; z++) {
 	    for (y = 0; y < rows; y++) {
 	    for (y = 0; y < rows; y++) {
-		if (!Rast3d_copyToXdr(tile, cols)) {
-		    Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copyToXdr");
+		if (!Rast3d_copy_to_xdr(tile, cols)) {
+		    Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copy_to_xdr");
 		    return 0;
 		    return 0;
 		}
 		}
 		tile = G_incr_void_ptr(tile, map->tileX * Rast3d_length(type));
 		tile = G_incr_void_ptr(tile, map->tileX * Rast3d_length(type));
@@ -52,8 +52,8 @@ Rast3d_tile2xdrTile(RASTER3D_Map * map, const void *tile, int rows, int cols,
 
 
     if (yRedundant) {
     if (yRedundant) {
 	for (z = 0; z < depths; z++) {
 	for (z = 0; z < depths; z++) {
-	    if (!Rast3d_copyToXdr(tile, map->tileX * rows)) {
-		Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copyToXdr");
+	    if (!Rast3d_copy_to_xdr(tile, map->tileX * rows)) {
+		Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copy_to_xdr");
 		return 0;
 		return 0;
 	    }
 	    }
 	    tile = G_incr_void_ptr(tile, map->tileXY * Rast3d_length(type));
 	    tile = G_incr_void_ptr(tile, map->tileXY * Rast3d_length(type));
@@ -61,8 +61,8 @@ Rast3d_tile2xdrTile(RASTER3D_Map * map, const void *tile, int rows, int cols,
 	return 1;
 	return 1;
     }
     }
 
 
-    if (!Rast3d_copyToXdr(tile, map->tileXY * depths)) {
-	Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copyToXdr");
+    if (!Rast3d_copy_to_xdr(tile, map->tileXY * depths)) {
+	Rast3d_error("Rast3d_tile2xdrTile: error in Rast3d_copy_to_xdr");
 	return 0;
 	return 0;
     }
     }
     return 1;
     return 1;
@@ -85,11 +85,11 @@ static int Rast3d_writeTileUncompressed(RASTER3D_Map * map, int nofNum)
 
 
 static int Rast3d_writeTileCompressed(RASTER3D_Map * map, int nofNum)
 static int Rast3d_writeTileCompressed(RASTER3D_Map * map, int nofNum)
 {
 {
-    if (!G_fpcompress_writeXdrNums(map->data_fd, xdr, nofNum, map->precision,
+    if (!Rast3d_fpcompress_write_xdr_nums(map->data_fd, xdr, nofNum, map->precision,
 				   tmpCompress, map->type == FCELL_TYPE,
 				   tmpCompress, map->type == FCELL_TYPE,
 				   map->useRle, map->useLzw)) {
 				   map->useRle, map->useLzw)) {
 	Rast3d_error
 	Rast3d_error
-	    ("Rast3d_writeTileCompressed: error in G_fpcompress_writeXdrNums");
+	    ("Rast3d_writeTileCompressed: error in Rast3d_fpcompress_write_xdr_nums");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -127,13 +127,13 @@ static int Rast3d_writeTileCompressed(RASTER3D_Map * map, int nofNum)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_writeTile(RASTER3D_Map * map, int tileIndex, const void *tile, int type)
+int Rast3d_write_tile(RASTER3D_Map * map, int tileIndex, const void *tile, int type)
 {
 {
     int rows, cols, depths, xRedundant, yRedundant, zRedundant, nofNum;
     int rows, cols, depths, xRedundant, yRedundant, zRedundant, nofNum;
 
 
     /* valid tileIndex ? */
     /* valid tileIndex ? */
     if ((tileIndex >= map->nTiles) || (tileIndex < 0))
     if ((tileIndex >= map->nTiles) || (tileIndex < 0))
-	Rast3d_fatalError("Rast3d_writeTile: tileIndex out of range");
+	Rast3d_fatal_error("Rast3d_write_tile: tileIndex out of range");
 
 
     /* already written ? */
     /* already written ? */
     if (map->index[tileIndex] != -1)
     if (map->index[tileIndex] != -1)
@@ -142,16 +142,16 @@ int Rast3d_writeTile(RASTER3D_Map * map, int tileIndex, const void *tile, int ty
     /* save the file position */
     /* save the file position */
     map->index[tileIndex] = lseek(map->data_fd, (long)0, SEEK_END);
     map->index[tileIndex] = lseek(map->data_fd, (long)0, SEEK_END);
     if (map->index[tileIndex] == -1) {
     if (map->index[tileIndex] == -1) {
-	Rast3d_error("Rast3d_writeTile: can't position file");
+	Rast3d_error("Rast3d_write_tile: can't position file");
 	return 0;
 	return 0;
     }
     }
 
 
-    nofNum = Rast3d_computeClippedTileDimensions(map, tileIndex,
+    nofNum = Rast3d_compute_clipped_tile_dimensions(map, tileIndex,
 					      &rows, &cols, &depths,
 					      &rows, &cols, &depths,
 					      &xRedundant, &yRedundant,
 					      &xRedundant, &yRedundant,
 					      &zRedundant);
 					      &zRedundant);
 
 
-    Rast3d_range_updateFromTile(map, tile, rows, cols, depths,
+    Rast3d_range_update_from_tile(map, tile, rows, cols, depths,
 			     xRedundant, yRedundant, zRedundant, nofNum,
 			     xRedundant, yRedundant, zRedundant, nofNum,
 			     type);
 			     type);
 
 
@@ -163,12 +163,12 @@ int Rast3d_writeTile(RASTER3D_Map * map, int tileIndex, const void *tile, int ty
 
 
     if (map->compression == RASTER3D_NO_COMPRESSION) {
     if (map->compression == RASTER3D_NO_COMPRESSION) {
 	if (!Rast3d_writeTileUncompressed(map, nofNum)) {
 	if (!Rast3d_writeTileUncompressed(map, nofNum)) {
-	    Rast3d_error("Rast3d_writeTile: error in Rast3d_writeTileUncompressed");
+	    Rast3d_error("Rast3d_write_tile: error in Rast3d_writeTileUncompressed");
 	    return 0;
 	    return 0;
 	}
 	}
     }
     }
     else if (!Rast3d_writeTileCompressed(map, nofNum)) {
     else if (!Rast3d_writeTileCompressed(map, nofNum)) {
-	Rast3d_error("Rast3d_writeTile: error in Rast3d_writeTileCompressed");
+	Rast3d_error("Rast3d_write_tile: error in Rast3d_writeTileCompressed");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -185,7 +185,7 @@ int Rast3d_writeTile(RASTER3D_Map * map, int tileIndex, const void *tile, int ty
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- *  Is equivalent to <tt>Rast3d_writeTile (map, tileIndex, tile, FCELL_TYPE).</tt>
+ *  Is equivalent to <tt>Rast3d_write_tile (map, tileIndex, tile, FCELL_TYPE).</tt>
  *
  *
  *  \param map
  *  \param map
  *  \param tileIndex
  *  \param tileIndex
@@ -193,14 +193,14 @@ int Rast3d_writeTile(RASTER3D_Map * map, int tileIndex, const void *tile, int ty
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_writeTileFloat(RASTER3D_Map * map, int tileIndex, const void *tile)
+int Rast3d_write_tile_float(RASTER3D_Map * map, int tileIndex, const void *tile)
 {
 {
     int status;
     int status;
 
 
-    if ((status = Rast3d_writeTile(map, tileIndex, tile, FCELL_TYPE)))
+    if ((status = Rast3d_write_tile(map, tileIndex, tile, FCELL_TYPE)))
 	return status;
 	return status;
 
 
-    Rast3d_error("Rast3d_writeTileFloat: error in Rast3d_writeTile");
+    Rast3d_error("Rast3d_write_tile_float: error in Rast3d_write_tile");
     return 0;
     return 0;
 }
 }
 
 
@@ -210,7 +210,7 @@ int Rast3d_writeTileFloat(RASTER3D_Map * map, int tileIndex, const void *tile)
 /*!
 /*!
  * \brief 
  * \brief 
  *
  *
- * Is equivalent to <tt>Rast3d_writeTile (map, tileIndex, tile, DCELL_TYPE).</tt>
+ * Is equivalent to <tt>Rast3d_write_tile (map, tileIndex, tile, DCELL_TYPE).</tt>
  *
  *
  *  \param map
  *  \param map
  *  \param tileIndex
  *  \param tileIndex
@@ -218,14 +218,14 @@ int Rast3d_writeTileFloat(RASTER3D_Map * map, int tileIndex, const void *tile)
  *  \return int
  *  \return int
  */
  */
 
 
-int Rast3d_writeTileDouble(RASTER3D_Map * map, int tileIndex, const void *tile)
+int Rast3d_write_tile_double(RASTER3D_Map * map, int tileIndex, const void *tile)
 {
 {
     int status;
     int status;
 
 
-    if ((status = Rast3d_writeTile(map, tileIndex, tile, DCELL_TYPE)))
+    if ((status = Rast3d_write_tile(map, tileIndex, tile, DCELL_TYPE)))
 	return status;
 	return status;
 
 
-    Rast3d_error("Rast3d_writeTileDouble: error in Rast3d_writeTile");
+    Rast3d_error("Rast3d_write_tile_double: error in Rast3d_write_tile");
     return 0;
     return 0;
 }
 }
 
 
@@ -244,7 +244,7 @@ int Rast3d_writeTileDouble(RASTER3D_Map * map, int tileIndex, const void *tile)
  * from the cache (in non-cache mode the buffer provided by the map-structure is
  * from the cache (in non-cache mode the buffer provided by the map-structure is
  * written).
  * written).
  * If this tile has already been written before the write request is ignored.
  * If this tile has already been written before the write request is ignored.
- * If the tile was never referred to before the invokation of Rast3d_flushTile, a
+ * If the tile was never referred to before the invokation of Rast3d_flush_tile, a
  * tile filled with NULL-values is written.
  * tile filled with NULL-values is written.
  *
  *
  *  \param map
  *  \param map
@@ -253,23 +253,23 @@ int Rast3d_writeTileDouble(RASTER3D_Map * map, int tileIndex, const void *tile)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_flushTile(RASTER3D_Map * map, int tileIndex)
+int Rast3d_flush_tile(RASTER3D_Map * map, int tileIndex)
 {
 {
     const void *tile;
     const void *tile;
 
 
-    tile = Rast3d_getTilePtr(map, tileIndex);
+    tile = Rast3d_get_tile_ptr(map, tileIndex);
     if (tile == NULL) {
     if (tile == NULL) {
-	Rast3d_error("Rast3d_flushTile: error in Rast3d_getTilePtr");
+	Rast3d_error("Rast3d_flush_tile: error in Rast3d_get_tile_ptr");
 	return 0;
 	return 0;
     }
     }
 
 
-    if (!Rast3d_writeTile(map, tileIndex, tile, map->typeIntern)) {
-	Rast3d_error("Rast3d_flushTile: error in Rast3d_writeTile");
+    if (!Rast3d_write_tile(map, tileIndex, tile, map->typeIntern)) {
+	Rast3d_error("Rast3d_flush_tile: error in Rast3d_write_tile");
 	return 0;
 	return 0;
     }
     }
 
 
-    if (!Rast3d__removeTile(map, tileIndex)) {
-	Rast3d_error("Rast3d_flushTile: error in Rast3d__removeTile");
+    if (!Rast3d__remove_tile(map, tileIndex)) {
+	Rast3d_error("Rast3d_flush_tile: error in Rast3d__remove_tile");
 	return 0;
 	return 0;
     }
     }
 
 
@@ -305,20 +305,20 @@ int Rast3d_flushTile(RASTER3D_Map * map, int tileIndex)
  */
  */
 
 
 int
 int
-Rast3d_flushTileCube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xMax,
+Rast3d_flush_tile_cube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xMax,
 		  int yMax, int zMax)
 		  int yMax, int zMax)
 {
 {
     int x, y, z;
     int x, y, z;
 
 
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError
-	    ("Rast3d_flushTileCube: function invalid in non-cache mode");
+	Rast3d_fatal_error
+	    ("Rast3d_flush_tile_cube: function invalid in non-cache mode");
 
 
     for (x = xMin; x <= xMax; x++)
     for (x = xMin; x <= xMax; x++)
 	for (y = yMin; y <= yMax; y++)
 	for (y = yMin; y <= yMax; y++)
 	    for (z = zMin; z <= zMax; z++)
 	    for (z = zMin; z <= zMax; z++)
-		if (!Rast3d_flushTile(map, Rast3d_tile2tileIndex(map, x, y, z))) {
-		    Rast3d_error("Rast3d_flushTileCube: error in Rast3d_flushTile");
+		if (!Rast3d_flush_tile(map, Rast3d_tile2tile_index(map, x, y, z))) {
+		    Rast3d_error("Rast3d_flush_tile_cube: error in Rast3d_flush_tile");
 		    return 0;
 		    return 0;
 		}
 		}
 
 
@@ -351,7 +351,7 @@ Rast3d_flushTileCube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xMax,
  */
  */
 
 
 int
 int
-Rast3d_flushTilesInCube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xMax,
+Rast3d_flush_tiles_in_cube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xMax,
 		     int yMax, int zMax)
 		     int yMax, int zMax)
 {
 {
     int xTileMin, yTileMin, zTileMin, xTileMax, yTileMax, zTileMax;
     int xTileMin, yTileMin, zTileMin, xTileMax, yTileMax, zTileMax;
@@ -359,40 +359,40 @@ Rast3d_flushTilesInCube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xM
     int regionMaxX, regionMaxY, regionMaxZ;
     int regionMaxX, regionMaxY, regionMaxZ;
 
 
     if (!map->useCache)
     if (!map->useCache)
-	Rast3d_fatalError
-	    ("Rast3d_flushTilesInCube: function invalid in non-cache mode");
+	Rast3d_fatal_error
+	    ("Rast3d_flush_tiles_in_cube: function invalid in non-cache mode");
      /*AV*/
      /*AV*/
 	/*BEGIN OF ORIGINAL CODE */
 	/*BEGIN OF ORIGINAL CODE */
 	/*
 	/*
-	 *  Rast3d_getCoordsMap (map, &regionMaxX, &regionMaxY, &regionMaxZ);
+	 *  Rast3d_get_coords_map (map, &regionMaxX, &regionMaxY, &regionMaxZ);
 	 */
 	 */
 	 /*AV*/
 	 /*AV*/
 	/* BEGIN OF MY CODE */
 	/* BEGIN OF MY CODE */
-	Rast3d_getCoordsMap(map, &regionMaxY, &regionMaxX, &regionMaxZ);
+	Rast3d_get_coords_map(map, &regionMaxY, &regionMaxX, &regionMaxZ);
     /* END OF MY CODE */
     /* END OF MY CODE */
 
 
     if ((xMin < 0) && (xMax < 0))
     if ((xMin < 0) && (xMax < 0))
-	Rast3d_fatalError("Rast3d_flushTilesInCube: coordinate out of Range");
+	Rast3d_fatal_error("Rast3d_flush_tiles_in_cube: coordinate out of Range");
     if ((xMin >= regionMaxX) && (xMax >= regionMaxX))
     if ((xMin >= regionMaxX) && (xMax >= regionMaxX))
-	Rast3d_fatalError("Rast3d_flushTilesInCube: coordinate out of Range");
+	Rast3d_fatal_error("Rast3d_flush_tiles_in_cube: coordinate out of Range");
 
 
     xMin = MIN(MAX(0, xMin), regionMaxX - 1);
     xMin = MIN(MAX(0, xMin), regionMaxX - 1);
 
 
     if ((yMin < 0) && (yMax < 0))
     if ((yMin < 0) && (yMax < 0))
-	Rast3d_fatalError("Rast3d_flushTilesInCube: coordinate out of Range");
+	Rast3d_fatal_error("Rast3d_flush_tiles_in_cube: coordinate out of Range");
     if ((yMin >= regionMaxY) && (yMax >= regionMaxY))
     if ((yMin >= regionMaxY) && (yMax >= regionMaxY))
-	Rast3d_fatalError("Rast3d_flushTilesInCube: coordinate out of Range");
+	Rast3d_fatal_error("Rast3d_flush_tiles_in_cube: coordinate out of Range");
 
 
     yMin = MIN(MAX(0, yMin), regionMaxY - 1);
     yMin = MIN(MAX(0, yMin), regionMaxY - 1);
 
 
     if ((zMin < 0) && (zMax < 0))
     if ((zMin < 0) && (zMax < 0))
-	Rast3d_fatalError("Rast3d_flushTilesInCube: coordinate out of Range");
+	Rast3d_fatal_error("Rast3d_flush_tiles_in_cube: coordinate out of Range");
     if ((zMin >= regionMaxZ) && (zMax >= regionMaxZ))
     if ((zMin >= regionMaxZ) && (zMax >= regionMaxZ))
-	Rast3d_fatalError("Rast3d_flushTilesInCube: coordinate out of Range");
+	Rast3d_fatal_error("Rast3d_flush_tiles_in_cube: coordinate out of Range");
 
 
     zMin = MIN(MAX(0, zMin), regionMaxZ - 1);
     zMin = MIN(MAX(0, zMin), regionMaxZ - 1);
 
 
-    Rast3d_coord2tileCoord(map, xMin, yMin, zMin,
+    Rast3d_coord2tile_coord(map, xMin, yMin, zMin,
 			&xTileMin, &yTileMin, &zTileMin,
 			&xTileMin, &yTileMin, &zTileMin,
 			&xOffs, &yOffs, &zOffs);
 			&xOffs, &yOffs, &zOffs);
 
 
@@ -403,7 +403,7 @@ Rast3d_flushTilesInCube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xM
     if (zOffs != 0)
     if (zOffs != 0)
 	zTileMin++;
 	zTileMin++;
 
 
-    Rast3d_coord2tileCoord(map, xMax + 1, yMax + 1, zMax + 1,
+    Rast3d_coord2tile_coord(map, xMax + 1, yMax + 1, zMax + 1,
 			&xTileMax, &yTileMax, &zTileMax,
 			&xTileMax, &yTileMax, &zTileMax,
 			&xOffs, &yOffs, &zOffs);
 			&xOffs, &yOffs, &zOffs);
 
 
@@ -411,9 +411,9 @@ Rast3d_flushTilesInCube(RASTER3D_Map * map, int xMin, int yMin, int zMin, int xM
     yTileMax--;
     yTileMax--;
     zTileMax--;
     zTileMax--;
 
 
-    if (!Rast3d_flushTileCube(map, xTileMin, yTileMin, zTileMin,
+    if (!Rast3d_flush_tile_cube(map, xTileMin, yTileMin, zTileMin,
 			   xTileMax, yTileMax, zTileMax)) {
 			   xTileMax, yTileMax, zTileMax)) {
-	Rast3d_error("Rast3d_flushTilesInCube: error in Rast3d_flushTileCube");
+	Rast3d_error("Rast3d_flush_tiles_in_cube: error in Rast3d_flush_tile_cube");
 	return 0;
 	return 0;
     }
     }
 
 

+ 32 - 32
lib/raster3d/volume.c

@@ -14,23 +14,23 @@ static int verifyVolumeVertices(map, v)
      double v[2][2][2][3];
      double v[2][2][2][3];
 
 
 {
 {
-    if (!(Rast3d_isValidLocation(map, v[0][0][0][0], v[0][0][0][1],
+    if (!(Rast3d_is_valid_location(map, v[0][0][0][0], v[0][0][0][1],
 			      v[0][0][0][2]) &&
 			      v[0][0][0][2]) &&
-	  Rast3d_isValidLocation(map, v[0][0][1][0], v[0][0][1][1],
+	  Rast3d_is_valid_location(map, v[0][0][1][0], v[0][0][1][1],
 			      v[0][0][1][2]) &&
 			      v[0][0][1][2]) &&
-	  Rast3d_isValidLocation(map, v[0][1][0][0], v[0][1][0][1],
+	  Rast3d_is_valid_location(map, v[0][1][0][0], v[0][1][0][1],
 			      v[0][1][0][2]) &&
 			      v[0][1][0][2]) &&
-	  Rast3d_isValidLocation(map, v[0][1][1][0], v[0][1][1][1],
+	  Rast3d_is_valid_location(map, v[0][1][1][0], v[0][1][1][1],
 			      v[0][1][1][2]) &&
 			      v[0][1][1][2]) &&
-	  Rast3d_isValidLocation(map, v[1][0][0][0], v[1][0][0][1],
+	  Rast3d_is_valid_location(map, v[1][0][0][0], v[1][0][0][1],
 			      v[1][0][0][2]) &&
 			      v[1][0][0][2]) &&
-	  Rast3d_isValidLocation(map, v[1][0][1][0], v[1][0][1][1],
+	  Rast3d_is_valid_location(map, v[1][0][1][0], v[1][0][1][1],
 			      v[1][0][1][2]) &&
 			      v[1][0][1][2]) &&
-	  Rast3d_isValidLocation(map, v[1][1][0][0], v[1][1][0][1],
+	  Rast3d_is_valid_location(map, v[1][1][0][0], v[1][1][0][1],
 			      v[1][1][0][2]) &&
 			      v[1][1][0][2]) &&
-	  Rast3d_isValidLocation(map, v[1][1][1][0], v[1][1][1][1],
+	  Rast3d_is_valid_location(map, v[1][1][1][0], v[1][1][1][1],
 			      v[1][1][1][2])))
 			      v[1][1][1][2])))
-	Rast3d_fatalError("verifyCubeVertices: volume vertex out of range");
+	Rast3d_fatal_error("verifyCubeVertices: volume vertex out of range");
     return 0;
     return 0;
 }
 }
 
 
@@ -43,14 +43,14 @@ static int verifyVolumeEdges(nx, ny, nz)
 
 
 {
 {
     if ((nx <= 0) || (ny <= 0) || (nz <= 0))
     if ((nx <= 0) || (ny <= 0) || (nz <= 0))
-	Rast3d_fatalError("verifyCubeEdges: Volume edge out of range");
+	Rast3d_fatal_error("verifyCubeEdges: Volume edge out of range");
     return 0;
     return 0;
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_getVolumeA(void *map, double u[2][2][2][3], int nx, int ny, int nz,
+Rast3d_get_volume_a(void *map, double u[2][2][2][3], int nx, int ny, int nz,
 	       void *volumeBuf, int type)
 	       void *volumeBuf, int type)
 {
 {
     typedef double doubleArray[3];
     typedef double doubleArray[3];
@@ -125,16 +125,16 @@ Rast3d_getVolumeA(void *map, double u[2][2][2][3], int nx, int ny, int nz,
 		   (int) dx / 2, (int) dy / 2, (int) dz / 2,
 		   (int) dx / 2, (int) dy / 2, (int) dz / 2,
 		   v[0], v[1], v[2],
 		   v[0], v[1], v[2],
 		   x, y, z, 
 		   x, y, z, 
-		   Rast3d_getDoubleRegion (map, x, y, z));
+		   Rast3d_get_double_region (map, x, y, z));
 		 */
 		 */
 		if (type == DCELL_TYPE)
 		if (type == DCELL_TYPE)
 		    *(doubleBuf + ((int)dz / 2) * nx * ny +
 		    *(doubleBuf + ((int)dz / 2) * nx * ny +
 		      ((int)dy / 2) * nx + (int)dx / 2) =
 		      ((int)dy / 2) * nx + (int)dx / 2) =
-Rast3d_getDoubleRegion(map, x, y, z);
+Rast3d_get_double_region(map, x, y, z);
 		else
 		else
 		    *(floatBuf + ((int)dz / 2) * nx * ny +
 		    *(floatBuf + ((int)dz / 2) * nx * ny +
 		      ((int)dy / 2) * nx + (int)dx / 2) =
 		      ((int)dy / 2) * nx + (int)dx / 2) =
-Rast3d_getFloatRegion(map, x, y, z);
+Rast3d_get_float_region(map, x, y, z);
 	    }
 	    }
 	}
 	}
     }
     }
@@ -143,7 +143,7 @@ Rast3d_getFloatRegion(map, x, y, z);
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_getVolume(void *map,
+Rast3d_get_volume(void *map,
 	      double originNorth, double originWest, double originBottom,
 	      double originNorth, double originWest, double originBottom,
 	      double vxNorth, double vxWest, double vxBottom,
 	      double vxNorth, double vxWest, double vxBottom,
 	      double vyNorth, double vyWest, double vyBottom,
 	      double vyNorth, double vyWest, double vyBottom,
@@ -184,19 +184,19 @@ Rast3d_getVolume(void *map,
     u[1][1][1][1] = (u[1][0][0][1] - u[0][0][0][1]) + u[0][1][1][1];
     u[1][1][1][1] = (u[1][0][0][1] - u[0][0][0][1]) + u[0][1][1][1];
     u[1][1][1][2] = (u[1][0][0][2] - u[0][0][0][2]) + u[0][1][1][2];
     u[1][1][1][2] = (u[1][0][0][2] - u[0][0][0][2]) + u[0][1][1][2];
 
 
-    Rast3d_getVolumeA(map, u, nx, ny, nz, volumeBuf, type);
+    Rast3d_get_volume_a(map, u, nx, ny, nz, volumeBuf, type);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_getAlignedVolume(void *map,
+Rast3d_get_aligned_volume(void *map,
 		     double originNorth, double originWest,
 		     double originNorth, double originWest,
 		     double originBottom, double lengthNorth,
 		     double originBottom, double lengthNorth,
 		     double lengthWest, double lengthBottom, int nx, int ny,
 		     double lengthWest, double lengthBottom, int nx, int ny,
 		     int nz, void *volumeBuf, int type)
 		     int nz, void *volumeBuf, int type)
 {
 {
-    Rast3d_getVolume(map,
+    Rast3d_get_volume(map,
 		  originNorth, originWest, originBottom,
 		  originNorth, originWest, originBottom,
 		  originNorth + lengthNorth, originWest, originBottom,
 		  originNorth + lengthNorth, originWest, originBottom,
 		  originNorth, originWest + lengthWest, originBottom,
 		  originNorth, originWest + lengthWest, originBottom,
@@ -207,7 +207,7 @@ Rast3d_getAlignedVolume(void *map,
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
 void
 void
-Rast3d_makeAlignedVolumeFile(void *map, const char *fileName,
+Rast3d_make_aligned_volume_file(void *map, const char *fileName,
 			  double originNorth, double originWest,
 			  double originNorth, double originWest,
 			  double originBottom, double lengthNorth,
 			  double originBottom, double lengthNorth,
 			  double lengthWest, double lengthBottom, int nx,
 			  double lengthWest, double lengthBottom, int nx,
@@ -218,14 +218,14 @@ Rast3d_makeAlignedVolumeFile(void *map, const char *fileName,
     int x, y, z, eltLength;
     int x, y, z, eltLength;
     RASTER3D_Region region;
     RASTER3D_Region region;
 
 
-    volumeBuf = Rast3d_malloc(nx * ny * nz * sizeof(Rast3d_getFileType()));
+    volumeBuf = Rast3d_malloc(nx * ny * nz * sizeof(Rast3d_get_file_type()));
     if (volumeBuf == NULL)
     if (volumeBuf == NULL)
-	Rast3d_fatalError("Rast3d_makeAlignedVolumeFile: error in Rast3d_malloc");
+	Rast3d_fatal_error("Rast3d_make_aligned_volume_file: error in Rast3d_malloc");
 
 
-    Rast3d_getAlignedVolume(map,
+    Rast3d_get_aligned_volume(map,
 			 originNorth, originWest, originBottom,
 			 originNorth, originWest, originBottom,
 			 lengthNorth, lengthWest, lengthBottom,
 			 lengthNorth, lengthWest, lengthBottom,
-			 nx, ny, nz, volumeBuf, Rast3d_getFileType());
+			 nx, ny, nz, volumeBuf, Rast3d_get_file_type());
 
 
     region.north = originNorth;
     region.north = originNorth;
     region.south = originNorth + lengthNorth;
     region.south = originNorth + lengthNorth;
@@ -238,30 +238,30 @@ Rast3d_makeAlignedVolumeFile(void *map, const char *fileName,
     region.cols = nx;
     region.cols = nx;
     region.depths = nz;
     region.depths = nz;
 
 
-    mapVolume = Rast3d_openCellNew(fileName, Rast3d_getFileType(),
+    mapVolume = Rast3d_open_cell_new(fileName, Rast3d_get_file_type(),
 				RASTER3D_USE_CACHE_DEFAULT, &region);
 				RASTER3D_USE_CACHE_DEFAULT, &region);
     if (mapVolume == NULL)
     if (mapVolume == NULL)
-	Rast3d_fatalError("Rast3d_makeAlignedVolumeFile: error in Rast3d_openCellNew");
+	Rast3d_fatal_error("Rast3d_make_aligned_volume_file: error in Rast3d_open_cell_new");
 
 
-    eltLength = Rast3d_length(Rast3d_getFileType());
+    eltLength = Rast3d_length(Rast3d_get_file_type());
 
 
     for (z = 0; z < nz; z++) {
     for (z = 0; z < nz; z++) {
 	for (y = 0; y < ny; y++) {
 	for (y = 0; y < ny; y++) {
 	    for (x = 0; x < nx; x++) {
 	    for (x = 0; x < nx; x++) {
 		/* Rast3d_putValueRegion? */
 		/* Rast3d_putValueRegion? */
-		if (!Rast3d_putValue(mapVolume, x, y, z,
+		if (!Rast3d_put_value(mapVolume, x, y, z,
 				  G_incr_void_ptr(volumeBuf,
 				  G_incr_void_ptr(volumeBuf,
 						  (z * ny * nx + y * nx +
 						  (z * ny * nx + y * nx +
 						   x) * eltLength),
 						   x) * eltLength),
-				  Rast3d_fileTypeMap(mapVolume)))
-		    Rast3d_fatalError
-			("Rast3d_makeAlignedVolumeFile: error in Rast3d_putValue");
+				  Rast3d_file_type_map(mapVolume)))
+		    Rast3d_fatal_error
+			("Rast3d_make_aligned_volume_file: error in Rast3d_put_value");
 	    }
 	    }
 	}
 	}
     }
     }
 
 
-    if (!Rast3d_closeCell(mapVolume))
-	Rast3d_fatalError("Rast3d_makeAlignedVolumeFile: error in Rast3d_closeCell");
+    if (!Rast3d_close_cell(mapVolume))
+	Rast3d_fatal_error("Rast3d_make_aligned_volume_file: error in Rast3d_close_cell");
 
 
     Rast3d_free(volumeBuf);
     Rast3d_free(volumeBuf);
 }
 }

+ 9 - 9
lib/raster3d/window.c

@@ -21,10 +21,10 @@ RASTER3D_Region g3d_window;
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setWindowMap(RASTER3D_Map * map, RASTER3D_Region * window)
+void Rast3d_set_window_map(RASTER3D_Map * map, RASTER3D_Region * window)
 {
 {
-    Rast3d_regionCopy(&(map->window), window);
-    Rast3d_adjustRegion(&(map->window));
+    Rast3d_region_copy(&(map->window), window);
+    Rast3d_adjust_region(&(map->window));
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -40,10 +40,10 @@ void Rast3d_setWindowMap(RASTER3D_Map * map, RASTER3D_Region * window)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_setWindow(RASTER3D_Region * window)
+void Rast3d_set_window(RASTER3D_Region * window)
 {
 {
-    Rast3d_regionCopy(&g3d_window, window);
-    Rast3d_adjustRegion(&g3d_window);
+    Rast3d_region_copy(&g3d_window, window);
+    Rast3d_adjust_region(&g3d_window);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -58,14 +58,14 @@ void Rast3d_setWindow(RASTER3D_Region * window)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_getWindow(RASTER3D_Region * window)
+void Rast3d_get_window(RASTER3D_Region * window)
 {
 {
-    Rast3d_regionCopy(window, &g3d_window);
+    Rast3d_region_copy(window, &g3d_window);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
 
-RASTER3D_Region *Rast3d_windowPtr()
+RASTER3D_Region *Rast3d_window_ptr()
 {
 {
     return &g3d_window;
     return &g3d_window;
 }
 }

+ 9 - 9
lib/raster3d/windowio.c

@@ -20,12 +20,12 @@ Rast3d_readWriteWindow(struct Key_Value *windowKeys, int doRead, int *proj,
     int (*windowInt) (), (*windowDouble) ();
     int (*windowInt) (), (*windowDouble) ();
 
 
     if (doRead) {
     if (doRead) {
-	windowDouble = Rast3d_keyGetDouble;
-	windowInt = Rast3d_keyGetInt;
+	windowDouble = Rast3d_key_get_double;
+	windowInt = Rast3d_key_get_int;
     }
     }
     else {
     else {
-	windowDouble = Rast3d_keySetDouble;
-	windowInt = Rast3d_keySetInt;
+	windowDouble = Rast3d_key_set_double;
+	windowInt = Rast3d_key_set_int;
     }
     }
 
 
     returnVal = 1;
     returnVal = 1;
@@ -136,7 +136,7 @@ static void Rast3d_getFullWindowPath(char *path, const char *windowName)
  *          0 ... otherwise.
  *          0 ... otherwise.
  */
  */
 
 
-int Rast3d_readWindow(RASTER3D_Region * window, const char *windowName)
+int Rast3d_read_window(RASTER3D_Region * window, const char *windowName)
 {
 {
     struct Cell_head win;
     struct Cell_head win;
     struct Key_Value *windowKeys;
     struct Key_Value *windowKeys;
@@ -165,7 +165,7 @@ int Rast3d_readWindow(RASTER3D_Region * window, const char *windowName)
 	Rast3d_getFullWindowPath(path, windowName);
 	Rast3d_getFullWindowPath(path, windowName);
 
 
 	if (access(path, R_OK) != 0) {
 	if (access(path, R_OK) != 0) {
-	    G_warning("Rast3d_readWindow: unable to find [%s].", path);
+	    G_warning("Rast3d_read_window: unable to find [%s].", path);
 	    return 0;
 	    return 0;
 	}
 	}
 
 
@@ -180,7 +180,7 @@ int Rast3d_readWindow(RASTER3D_Region * window, const char *windowName)
 				 &(window->depths), &(window->ew_res),
 				 &(window->depths), &(window->ew_res),
 				 &(window->ns_res), &(window->tb_res))) {
 				 &(window->ns_res), &(window->tb_res))) {
 	    Rast3d_error
 	    Rast3d_error
-		("Rast3d_readWindow: error extracting window key(s) of file %s",
+		("Rast3d_read_window: error extracting window key(s) of file %s",
 		 path);
 		 path);
 	    return 0;
 	    return 0;
 	}
 	}
@@ -273,7 +273,7 @@ int Rast3d_readWindow(RASTER3D_Region * window, const char *windowName)
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_useWindowParams(void)
+void Rast3d_use_window_params(void)
 {
 {
-    Rast3d_setWindowParams();
+    Rast3d_set_window_params();
 }
 }

+ 5 - 5
lib/raster3d/writeascii.c

@@ -16,7 +16,7 @@
  *  \return void
  *  \return void
  */
  */
 
 
-void Rast3d_writeAscii(void *map, const char *fname)
+void Rast3d_write_ascii(void *map, const char *fname)
 {
 {
     FILE *fp;
     FILE *fp;
     DCELL d1 = 0;
     DCELL d1 = 0;
@@ -25,8 +25,8 @@ void Rast3d_writeAscii(void *map, const char *fname)
     int x, y, z;
     int x, y, z;
     int rows, cols, depths, typeIntern;
     int rows, cols, depths, typeIntern;
 
 
-    Rast3d_getCoordsMap(map, &rows, &cols, &depths);
-    typeIntern = Rast3d_tileTypeMap(map);
+    Rast3d_get_coords_map(map, &rows, &cols, &depths);
+    typeIntern = Rast3d_tile_type_map(map);
 
 
     d1p = &d1;
     d1p = &d1;
     f1p = (FCELL *) &d1;
     f1p = (FCELL *) &d1;
@@ -34,13 +34,13 @@ void Rast3d_writeAscii(void *map, const char *fname)
     if (fname == NULL)
     if (fname == NULL)
         fp = stdout;
         fp = stdout;
     else if ((fp = fopen(fname, "w")) == NULL)
     else if ((fp = fopen(fname, "w")) == NULL)
-        Rast3d_fatalError("Rast3d_writeAscii: can't open file to write\n");
+        Rast3d_fatal_error("Rast3d_write_ascii: can't open file to write\n");
 
 
     for (z = 0; z < depths; z++) {
     for (z = 0; z < depths; z++) {
         for (y = 0; y < rows; y++) {
         for (y = 0; y < rows; y++) {
             fprintf(fp, "z y x %d %d (%d - %d)\n", z, y, 0, cols - 1);
             fprintf(fp, "z y x %d %d (%d - %d)\n", z, y, 0, cols - 1);
             for (x = 0; x < cols; x++) {
             for (x = 0; x < cols; x++) {
-                Rast3d_getValueRegion(map, x, y, z, d1p, typeIntern);
+                Rast3d_get_value_region(map, x, y, z, d1p, typeIntern);
 
 
                 if (typeIntern == FCELL_TYPE)
                 if (typeIntern == FCELL_TYPE)
                     fprintf(fp, "%.18f ", *f1p);
                     fprintf(fp, "%.18f ", *f1p);

+ 2 - 2
raster/r.colors.out/raster3d_main.c

@@ -55,9 +55,9 @@ int main(int argc, char **argv)
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
-    if (Rast3d_readColors(opt.map->answer, "", &colors) < 0)
+    if (Rast3d_read_colors(opt.map->answer, "", &colors) < 0)
         G_fatal_error(_("Unable to read color table for raster3d map <%s>"), opt.map->answer);
         G_fatal_error(_("Unable to read color table for raster3d map <%s>"), opt.map->answer);
-    Rast3d_readRange(opt.map->answer, "", &range);
+    Rast3d_read_range(opt.map->answer, "", &range);
 
 
     write_colors(&colors, &range, opt.file->answer, flag.p->answer ? 1 : 0);
     write_colors(&colors, &range, opt.file->answer, flag.p->answer ? 1 : 0);
 
 

+ 5 - 5
raster/r.colors/edit_colors.c

@@ -184,7 +184,7 @@ int edit_colors(int argc, char **argv, int type, const char *maptype,
     int stat = -1;
     int stat = -1;
     if (remove) {
     if (remove) {
         if (type == RASTER3D_TYPE) {
         if (type == RASTER3D_TYPE) {
-            stat = Rast3d_removeColor(name);
+            stat = Rast3d_remove_color(name);
         } else {
         } else {
             stat = Rast_remove_colors(name, mapset);
             stat = Rast_remove_colors(name, mapset);
         }
         }
@@ -197,7 +197,7 @@ int edit_colors(int argc, char **argv, int type, const char *maptype,
 
 
     G_suppress_warnings(TRUE);
     G_suppress_warnings(TRUE);
     if (type == RASTER3D_TYPE) {
     if (type == RASTER3D_TYPE) {
-        have_colors = Rast3d_readColors(name, mapset, &colors);
+        have_colors = Rast3d_read_colors(name, mapset, &colors);
     } else {
     } else {
         have_colors = Rast_read_colors(name, mapset, &colors);
         have_colors = Rast_read_colors(name, mapset, &colors);
     }
     }
@@ -214,7 +214,7 @@ int edit_colors(int argc, char **argv, int type, const char *maptype,
 
 
     if (type == RASTER3D_TYPE) {
     if (type == RASTER3D_TYPE) {
         fp = 1; /* g3d maps are always floating point */
         fp = 1; /* g3d maps are always floating point */
-        Rast3d_readRange(name, mapset, &range);
+        Rast3d_read_range(name, mapset, &range);
     } else {
     } else {
         fp = Rast_map_is_fp(name, mapset);
         fp = Rast_map_is_fp(name, mapset);
         Rast_read_fp_range(name, mapset, &range);
         Rast_read_fp_range(name, mapset, &range);
@@ -274,7 +274,7 @@ int edit_colors(int argc, char **argv, int type, const char *maptype,
             if (cmapset == NULL)
             if (cmapset == NULL)
                 G_fatal_error(_("Raster3d map <%s> not found"), cmap);
                 G_fatal_error(_("Raster3d map <%s> not found"), cmap);
 
 
-            if (Rast3d_readColors(cmap, cmapset, &colors) < 0)
+            if (Rast3d_read_colors(cmap, cmapset, &colors) < 0)
                 G_fatal_error(_("Unable to read color table for raster3d map <%s>"), cmap);
                 G_fatal_error(_("Unable to read color table for raster3d map <%s>"), cmap);
         }
         }
     }
     }
@@ -311,7 +311,7 @@ int edit_colors(int argc, char **argv, int type, const char *maptype,
     if (fp)
     if (fp)
         Rast_mark_colors_as_fp(&colors);
         Rast_mark_colors_as_fp(&colors);
     if (type == RASTER3D_TYPE) {
     if (type == RASTER3D_TYPE) {
-        Rast3d_writeColors(name, mapset, &colors);
+        Rast3d_write_colors(name, mapset, &colors);
     } else {
     } else {
         Rast_write_colors(name, mapset, &colors);
         Rast_write_colors(name, mapset, &colors);
     }
     }

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

@@ -62,13 +62,13 @@ void get_fp_stats(const char *name, const char *mapset,
         ncols = Rast_window_cols();
         ncols = Rast_window_cols();
     } else {
     } else {
         /* Initiate the default settings */
         /* Initiate the default settings */
-        Rast3d_initDefaults();
+        Rast3d_init_defaults();
 
 
-        map3d = Rast3d_openCellOld(name, mapset, RASTER3D_DEFAULT_WINDOW,
+        map3d = Rast3d_open_cell_old(name, mapset, RASTER3D_DEFAULT_WINDOW,
                 RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
                 RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
         if (map3d == NULL)
         if (map3d == NULL)
-            Rast3d_fatalError(_("Error opening 3d raster map"));
+            Rast3d_fatal_error(_("Error opening 3d raster map"));
 
 
         nrows = map3d->window.rows;
         nrows = map3d->window.rows;
         ncols = map3d->window.cols;
         ncols = map3d->window.cols;
@@ -126,7 +126,7 @@ void get_fp_stats(const char *name, const char *mapset,
                 if (type == RASTER_TYPE)
                 if (type == RASTER_TYPE)
                     x = dcell[col];
                     x = dcell[col];
                 else
                 else
-                    x = Rast3d_getDouble(map3d, col, row, depth);
+                    x = Rast3d_get_double(map3d, col, row, depth);
 
 
                 if (Rast_is_d_null_value(&x))
                 if (Rast_is_d_null_value(&x))
                     continue;
                     continue;
@@ -152,6 +152,6 @@ void get_fp_stats(const char *name, const char *mapset,
 	if(dcell)
 	if(dcell)
     	    G_free(dcell);
     	    G_free(dcell);
     } else {
     } else {
-        Rast3d_closeCell(map3d);
+        Rast3d_close_cell(map3d);
     }
     }
 }
 }

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

@@ -21,8 +21,8 @@ RASTER3D_Region current_region3;
 
 
 void setup_region(void)
 void setup_region(void)
 {
 {
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&current_region3);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&current_region3);
 
 
     rows = current_region3.rows;
     rows = current_region3.rows;
     columns = current_region3.cols;
     columns = current_region3.cols;
@@ -74,8 +74,8 @@ static void read_row(void *handle, char *buf, int type, int depth, int row)
 	for (i = 0; i < columns; i++) {
 	for (i = 0; i < columns; i++) {
 	    double x;
 	    double x;
 
 
-	    Rast3d_getValue(handle, i, row, depth, (char *)&x, DCELL_TYPE);
-	    if (Rast3d_isNullValueNum(&x, DCELL_TYPE))
+	    Rast3d_get_value(handle, i, row, depth, (char *)&x, DCELL_TYPE);
+	    if (Rast3d_is_null_value_num(&x, DCELL_TYPE))
 		SET_NULL_C(&((CELL *) buf)[i]);
 		SET_NULL_C(&((CELL *) buf)[i]);
 	    else
 	    else
 		((CELL *) buf)[i] = (CELL) x;
 		((CELL *) buf)[i] = (CELL) x;
@@ -85,8 +85,8 @@ static void read_row(void *handle, char *buf, int type, int depth, int row)
 	for (i = 0; i < columns; i++) {
 	for (i = 0; i < columns; i++) {
 	    float x;
 	    float x;
 
 
-	    Rast3d_getValue(handle, i, row, depth, (char *)&x, FCELL_TYPE);
-	    if (Rast3d_isNullValueNum(&x, FCELL_TYPE))
+	    Rast3d_get_value(handle, i, row, depth, (char *)&x, FCELL_TYPE);
+	    if (Rast3d_is_null_value_num(&x, FCELL_TYPE))
 		SET_NULL_F(&((FCELL *) buf)[i]);
 		SET_NULL_F(&((FCELL *) buf)[i]);
 	    else
 	    else
 		((FCELL *) buf)[i] = x;
 		((FCELL *) buf)[i] = x;
@@ -96,8 +96,8 @@ static void read_row(void *handle, char *buf, int type, int depth, int row)
 	for (i = 0; i < columns; i++) {
 	for (i = 0; i < columns; i++) {
 	    double x;
 	    double x;
 
 
-	    Rast3d_getValue(handle, i, row, depth, (char *)&x, DCELL_TYPE);
-	    if (Rast3d_isNullValueNum(&x, DCELL_TYPE))
+	    Rast3d_get_value(handle, i, row, depth, (char *)&x, DCELL_TYPE);
+	    if (Rast3d_is_null_value_num(&x, DCELL_TYPE))
 		SET_NULL_D(&((DCELL *) buf)[i]);
 		SET_NULL_D(&((DCELL *) buf)[i]);
 	    else
 	    else
 		((DCELL *) buf)[i] = x;
 		((DCELL *) buf)[i] = x;
@@ -117,11 +117,11 @@ static void write_row(void *handle, const char *buf, int type, int depth,
 	    double x;
 	    double x;
 
 
 	    if (IS_NULL_C(&((CELL *) buf)[i]))
 	    if (IS_NULL_C(&((CELL *) buf)[i]))
-		Rast3d_setNullValue(&x, 1, DCELL_TYPE);
+		Rast3d_set_null_value(&x, 1, DCELL_TYPE);
 	    else
 	    else
 		x = ((CELL *) buf)[i];
 		x = ((CELL *) buf)[i];
 
 
-	    if (Rast3d_putValue(handle, i, row, depth, (char *)&x, DCELL_TYPE) <
+	    if (Rast3d_put_value(handle, i, row, depth, (char *)&x, DCELL_TYPE) <
 		0)
 		0)
 		G_fatal_error(_("Error writing data"));
 		G_fatal_error(_("Error writing data"));
 	}
 	}
@@ -131,11 +131,11 @@ static void write_row(void *handle, const char *buf, int type, int depth,
 	    float x;
 	    float x;
 
 
 	    if (IS_NULL_F(&((FCELL *) buf)[i]))
 	    if (IS_NULL_F(&((FCELL *) buf)[i]))
-		Rast3d_setNullValue(&x, 1, FCELL_TYPE);
+		Rast3d_set_null_value(&x, 1, FCELL_TYPE);
 	    else
 	    else
 		x = ((FCELL *) buf)[i];
 		x = ((FCELL *) buf)[i];
 
 
-	    if (Rast3d_putValue(handle, i, row, depth, (char *)&x, FCELL_TYPE) <
+	    if (Rast3d_put_value(handle, i, row, depth, (char *)&x, FCELL_TYPE) <
 		0)
 		0)
 		G_fatal_error(_("Error writing data"));
 		G_fatal_error(_("Error writing data"));
 	}
 	}
@@ -145,11 +145,11 @@ static void write_row(void *handle, const char *buf, int type, int depth,
 	    double x;
 	    double x;
 
 
 	    if (IS_NULL_D(&((DCELL *) buf)[i]))
 	    if (IS_NULL_D(&((DCELL *) buf)[i]))
-		Rast3d_setNullValue(&x, 1, DCELL_TYPE);
+		Rast3d_set_null_value(&x, 1, DCELL_TYPE);
 	    else
 	    else
 		x = ((DCELL *) buf)[i];
 		x = ((DCELL *) buf)[i];
 
 
-	    if (Rast3d_putValue(handle, i, row, depth, (char *)&x, DCELL_TYPE) <
+	    if (Rast3d_put_value(handle, i, row, depth, (char *)&x, DCELL_TYPE) <
 		0)
 		0)
 		G_fatal_error(_("Error writing data"));
 		G_fatal_error(_("Error writing data"));
 	}
 	}
@@ -175,7 +175,7 @@ static void init_colors(map * m)
     if (!set)
     if (!set)
 	set = G_malloc(columns);
 	set = G_malloc(columns);
 
 
-    if (Rast3d_readColors((char *)m->name, (char *)m->mapset, &m->colors) < 0)
+    if (Rast3d_read_colors((char *)m->name, (char *)m->mapset, &m->colors) < 0)
 	G_fatal_error(_("Unable to read color file for raster map <%s@%s>"),
 	G_fatal_error(_("Unable to read color file for raster map <%s@%s>"),
 		      m->name, m->mapset);
 		      m->name, m->mapset);
 
 
@@ -184,7 +184,7 @@ static void init_colors(map * m)
 
 
 static void init_cats(map * m)
 static void init_cats(map * m)
 {
 {
-    if (Rast3d_readCats((char *)m->name, (char *)m->mapset, &m->cats) < 0)
+    if (Rast3d_read_cats((char *)m->name, (char *)m->mapset, &m->cats) < 0)
 	G_fatal_error(_("Unable to read category file of raster map <%s@%s>"),
 	G_fatal_error(_("Unable to read category file of raster map <%s@%s>"),
 		      m->name, m->mapset);
 		      m->name, m->mapset);
 
 
@@ -366,7 +366,7 @@ static void close_map(map * m)
     if (!m->handle)
     if (!m->handle)
 	return;
 	return;
 
 
-    if (!Rast3d_closeCell(m->handle))
+    if (!Rast3d_close_cell(m->handle))
 	G_fatal_error(_("Unable to close raster map <%s@%s>"),
 	G_fatal_error(_("Unable to close raster map <%s@%s>"),
 		      m->name, m->mapset);
 		      m->name, m->mapset);
 
 
@@ -397,11 +397,11 @@ int map_type(const char *name, int mod)
 	    void *handle;
 	    void *handle;
 
 
 	    setup_region();	/* TODO: setup_region should be called by evaluate() ? */
 	    setup_region();	/* TODO: setup_region should be called by evaluate() ? */
-	    handle = Rast3d_openCellOld(tmpname, mapset, &current_region3,
+	    handle = Rast3d_open_cell_old(tmpname, mapset, &current_region3,
 				     RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
 				     RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
-	    result = (Rast3d_fileTypeMap(handle) == FCELL_TYPE)
+	    result = (Rast3d_file_type_map(handle) == FCELL_TYPE)
 		? FCELL_TYPE : DCELL_TYPE;
 		? FCELL_TYPE : DCELL_TYPE;
-	    Rast3d_closeCell(handle);
+	    Rast3d_close_cell(handle);
 	}
 	}
 	else
 	else
 	    result = -1;
 	    result = -1;
@@ -505,7 +505,7 @@ int open_map(const char *name, int mod, int row, int col)
     if (use_colors)
     if (use_colors)
 	init_colors(m);
 	init_colors(m);
 
 
-    m->handle = Rast3d_openCellOld((char *)name, (char *)mapset,
+    m->handle = Rast3d_open_cell_old((char *)name, (char *)mapset,
 				&current_region3, DCELL_TYPE,
 				&current_region3, DCELL_TYPE,
 				RASTER3D_USE_CACHE_DEFAULT);
 				RASTER3D_USE_CACHE_DEFAULT);
 
 
@@ -578,9 +578,9 @@ int open_output_map(const char *name, int res_type)
 {
 {
     void *handle;
     void *handle;
 
 
-    Rast3d_setFileType(res_type == FCELL_TYPE ? FCELL_TYPE : DCELL_TYPE);
+    Rast3d_set_file_type(res_type == FCELL_TYPE ? FCELL_TYPE : DCELL_TYPE);
 
 
-    handle = Rast3d_openNewOptTileSize((char *)name, RASTER3D_USE_CACHE_XYZ, &current_region3, res_type == FCELL_TYPE ? FCELL_TYPE : DCELL_TYPE, 32);
+    handle = Rast3d_open_new_opt_tile_size((char *)name, RASTER3D_USE_CACHE_XYZ, &current_region3, res_type == FCELL_TYPE ? FCELL_TYPE : DCELL_TYPE, 32);
 
 
     if (!handle)
     if (!handle)
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
@@ -607,7 +607,7 @@ void close_output_map(int fd)
 {
 {
     void *handle = omaps[fd];
     void *handle = omaps[fd];
 
 
-    if (!Rast3d_closeCell(handle))
+    if (!Rast3d_close_cell(handle))
 	G_fatal_error(_("Unable to close output raster map"));
 	G_fatal_error(_("Unable to close output raster map"));
 }
 }
 
 
@@ -623,10 +623,10 @@ void copy_cats(const char *dst, int idx)
     const map *m = &maps[idx];
     const map *m = &maps[idx];
     struct Categories cats;
     struct Categories cats;
 
 
-    if (Rast3d_readCats((char *)m->name, (char *)m->mapset, &cats) < 0)
+    if (Rast3d_read_cats((char *)m->name, (char *)m->mapset, &cats) < 0)
 	return;
 	return;
 
 
-    Rast3d_writeCats((char *)dst, &cats);
+    Rast3d_write_cats((char *)dst, &cats);
     Rast_free_cats(&cats);
     Rast_free_cats(&cats);
 }
 }
 
 
@@ -635,10 +635,10 @@ void copy_colors(const char *dst, int idx)
     const map *m = &maps[idx];
     const map *m = &maps[idx];
     struct Colors colr;
     struct Colors colr;
 
 
-    if (Rast3d_readColors((char *)m->name, (char *)m->mapset, &colr) <= 0)
+    if (Rast3d_read_colors((char *)m->name, (char *)m->mapset, &colr) <= 0)
 	return;
 	return;
 
 
-    Rast3d_writeColors((char *)dst, G_mapset(), &colr);
+    Rast3d_write_colors((char *)dst, G_mapset(), &colr);
     Rast_free_colors(&colr);
     Rast_free_colors(&colr);
 }
 }
 
 

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

@@ -55,8 +55,8 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
     /* Close files and exit */
     /* Close files and exit */
     if (map != NULL) {
     if (map != NULL) {
         /* should unopen map here! but this functionality is not jet implemented */
         /* should unopen map here! but this functionality is not jet implemented */
-        if (!Rast3d_closeCell(map))
-            Rast3d_fatalError(_("Could not close the map"));
+        if (!Rast3d_close_cell(map))
+            Rast3d_fatal_error(_("Could not close the map"));
     }
     }
 
 
     if (fd != NULL) {
     if (fd != NULL) {
@@ -64,7 +64,7 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
             close_input_raster_map(fd[i]);
             close_input_raster_map(fd[i]);
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
     exit(EXIT_FAILURE);
     exit(EXIT_FAILURE);
 
 
 }
 }
@@ -131,31 +131,31 @@ void raster_to_g3d(void *map, RASTER3D_Region region, int *fd)
                 G_incr_void_ptr(ptr, Rast_cell_size(globalRastMapType))) {
                 G_incr_void_ptr(ptr, Rast_cell_size(globalRastMapType))) {
                 if (globalRastMapType == CELL_TYPE) {
                 if (globalRastMapType == CELL_TYPE) {
                     if (Rast_is_null_value(ptr, globalRastMapType)) {
                     if (Rast_is_null_value(ptr, globalRastMapType)) {
-                        Rast3d_setNullValue(&dvalue, 1, DCELL_TYPE);
+                        Rast3d_set_null_value(&dvalue, 1, DCELL_TYPE);
                     } else {
                     } else {
                         dvalue = *(CELL *) ptr;
                         dvalue = *(CELL *) ptr;
                     }
                     }
-                    if (Rast3d_putValue
+                    if (Rast3d_put_value
                         (map, x, y, z, (char *) &dvalue, DCELL_TYPE) < 0)
                         (map, x, y, z, (char *) &dvalue, DCELL_TYPE) < 0)
                         fatal_error(map, fd, depths,
                         fatal_error(map, fd, depths,
                                     "Error writing double data");
                                     "Error writing double data");
                 } else if (globalRastMapType == FCELL_TYPE) {
                 } else if (globalRastMapType == FCELL_TYPE) {
                     if (Rast_is_null_value(ptr, globalRastMapType)) {
                     if (Rast_is_null_value(ptr, globalRastMapType)) {
-                        Rast3d_setNullValue(&fvalue, 1, FCELL_TYPE);
+                        Rast3d_set_null_value(&fvalue, 1, FCELL_TYPE);
                     } else {
                     } else {
                         fvalue = *(FCELL *) ptr;
                         fvalue = *(FCELL *) ptr;
                     }
                     }
-                    if (Rast3d_putValue
+                    if (Rast3d_put_value
                         (map, x, y, z, (char *) &fvalue, FCELL_TYPE) < 0)
                         (map, x, y, z, (char *) &fvalue, FCELL_TYPE) < 0)
                         fatal_error(map, fd, depths,
                         fatal_error(map, fd, depths,
                                     "Error writing float data");
                                     "Error writing float data");
                 } else if (globalRastMapType == DCELL_TYPE) {
                 } else if (globalRastMapType == DCELL_TYPE) {
                     if (Rast_is_null_value(ptr, globalRastMapType)) {
                     if (Rast_is_null_value(ptr, globalRastMapType)) {
-                        Rast3d_setNullValue(&dvalue, 1, DCELL_TYPE);
+                        Rast3d_set_null_value(&dvalue, 1, DCELL_TYPE);
                     } else {
                     } else {
                         dvalue = *(DCELL *) ptr;
                         dvalue = *(DCELL *) ptr;
                     }
                     }
-                    if (Rast3d_putValue
+                    if (Rast3d_put_value
                         (map, x, y, z, (char *) &dvalue, DCELL_TYPE) < 0)
                         (map, x, y, z, (char *) &dvalue, DCELL_TYPE) < 0)
                         fatal_error(map, fd, depths,
                         fatal_error(map, fd, depths,
                                     "Error writing double data");
                                     "Error writing double data");
@@ -210,14 +210,14 @@ int main(int argc, char *argv[])
 
 
     /*Check for output */
     /*Check for output */
     if (param.output->answer == NULL)
     if (param.output->answer == NULL)
-        Rast3d_fatalError(_("No output map"));
+        Rast3d_fatal_error(_("No output map"));
 
 
     /* Get the tile size */
     /* Get the tile size */
     maxSize = atoi(param.tilesize->answer);
     maxSize = atoi(param.tilesize->answer);
 
 
     /* Figure out the region from the map */
     /* Figure out the region from the map */
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&region);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&region);
 
 
     /*Check if the g3d-region is equal to the 2d rows and cols */
     /*Check if the g3d-region is equal to the 2d rows and cols */
     rows = Rast_window_rows();
     rows = Rast_window_rows();
@@ -285,17 +285,17 @@ int main(int argc, char *argv[])
     else
     else
         globalG3dMapType = FCELL_TYPE;
         globalG3dMapType = FCELL_TYPE;
 
 
-    map = Rast3d_openNewOptTileSize(param.output->answer, RASTER3D_USE_CACHE_XY, &region, globalG3dMapType, maxSize);
+    map = Rast3d_open_new_opt_tile_size(param.output->answer, RASTER3D_USE_CACHE_XY, &region, globalG3dMapType, maxSize);
 
 
     if (map == NULL)
     if (map == NULL)
         fatal_error(map, fd, opencells, _("Error opening 3d raster map"));
         fatal_error(map, fd, opencells, _("Error opening 3d raster map"));
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists()) {
+        if (Rast3d_mask_file_exists()) {
             changemask = 0;
             changemask = 0;
-            if (Rast3d_maskIsOff(map)) {
-                Rast3d_maskOn(map);
+            if (Rast3d_mask_is_off(map)) {
+                Rast3d_mask_on(map);
                 changemask = 1;
                 changemask = 1;
             }
             }
         }
         }
@@ -306,9 +306,9 @@ int main(int argc, char *argv[])
 
 
     /*We set the Mask off, if it was off before */
     /*We set the Mask off, if it was off before */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists())
-            if (Rast3d_maskIsOn(map) && changemask)
-                Rast3d_maskOff(map);
+        if (Rast3d_mask_file_exists())
+            if (Rast3d_mask_is_on(map) && changemask)
+                Rast3d_mask_off(map);
     }
     }
 
 
     /*Loop over all output maps! close */
     /*Loop over all output maps! close */
@@ -319,11 +319,11 @@ int main(int argc, char *argv[])
         G_free(fd);
         G_free(fd);
 
 
     /* Flush all tile */
     /* Flush all tile */
-    if (!Rast3d_flushAllTiles(map))
-        Rast3d_fatalError("Error flushing tiles with Rast3d_flushAllTiles");
+    if (!Rast3d_flush_all_tiles(map))
+        Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
-        Rast3d_fatalError(_("Error closing 3d raster map"));
+    if (!Rast3d_close_cell(map))
+        Rast3d_fatal_error(_("Error closing 3d raster map"));
 
 
     map = NULL;
     map = NULL;
 
 

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

@@ -132,8 +132,8 @@ void fatal_error(Database db, char *errorMsg)
     /* Close files and exit */
     /* Close files and exit */
     if (db.map != NULL) {
     if (db.map != NULL) {
         /* should unopen map here! but this functionality is not jet implemented */
         /* should unopen map here! but this functionality is not jet implemented */
-        if (!Rast3d_closeCell(db.map))
-            Rast3d_fatalError(_("Could not close the map"));
+        if (!Rast3d_close_cell(db.map))
+            Rast3d_fatal_error(_("Could not close the map"));
     }
     }
 
 
     if (db.input)
     if (db.input)
@@ -142,7 +142,7 @@ void fatal_error(Database db, char *errorMsg)
     if (db.elev)
     if (db.elev)
         close_input_raster_map(db.elev);
         close_input_raster_map(db.elev);
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
     exit(EXIT_FAILURE);
     exit(EXIT_FAILURE);
 }
 }
 
 
@@ -224,7 +224,7 @@ void elev_raster_to_g3d(Database db, RASTER3D_Region region)
     input_rast = Rast_allocate_buf(db.inputmaptype);
     input_rast = Rast_allocate_buf(db.inputmaptype);
     elev_rast = Rast_allocate_buf(db.elevmaptype);
     elev_rast = Rast_allocate_buf(db.elevmaptype);
 
 
-    Rast3d_setNullValue(&null, 1, DCELL_TYPE);
+    Rast3d_set_null_value(&null, 1, DCELL_TYPE);
 
 
 
 
     G_debug(3,
     G_debug(3,
@@ -279,11 +279,11 @@ void elev_raster_to_g3d(Database db, RASTER3D_Region region)
                         height <= ((z + 1) * tbres + bottom))
                         height <= ((z + 1) * tbres + bottom))
                         value = inval;
                         value = inval;
                     /*If the elevation is null, set the RASTER3D value null */
                     /*If the elevation is null, set the RASTER3D value null */
-                    if (Rast3d_isNullValueNum(&height, DCELL_TYPE))
+                    if (Rast3d_is_null_value_num(&height, DCELL_TYPE))
                         value = null;
                         value = null;
 
 
                     /*Write the value to the 3D map */
                     /*Write the value to the 3D map */
-                    if (Rast3d_putDouble(db.map, x, y, z, value) < 0)
+                    if (Rast3d_put_double(db.map, x, y, z, value) < 0)
                         fatal_error(db, _("Error writing RASTER3D double data"));
                         fatal_error(db, _("Error writing RASTER3D double data"));
                 }
                 }
             } else {
             } else {
@@ -296,7 +296,7 @@ void elev_raster_to_g3d(Database db, RASTER3D_Region region)
                         else if (db.useUpperVal == 2)
                         else if (db.useUpperVal == 2)
                             value = db.upper;
                             value = db.upper;
                         else
                         else
-                            value = Rast3d_getDouble(db.map, x, y, z);
+                            value = Rast3d_get_double(db.map, x, y, z);
                     }
                     }
                     /*lower cells */
                     /*lower cells */
                     if (height > ((z + 1) * tbres + bottom)) {
                     if (height > ((z + 1) * tbres + bottom)) {
@@ -305,18 +305,18 @@ void elev_raster_to_g3d(Database db, RASTER3D_Region region)
                         else if (db.useLowerVal == 2)
                         else if (db.useLowerVal == 2)
                             value = db.lower;
                             value = db.lower;
                         else
                         else
-                            value = Rast3d_getDouble(db.map, x, y, z);
+                            value = Rast3d_get_double(db.map, x, y, z);
                     }
                     }
                     /*If exactly at the border, fill upper AND lower cell */
                     /*If exactly at the border, fill upper AND lower cell */
                     if (height >= (z * tbres + bottom) &&
                     if (height >= (z * tbres + bottom) &&
                         height <= ((z + 1) * tbres + bottom))
                         height <= ((z + 1) * tbres + bottom))
                         value = inval;
                         value = inval;
                     /*If the elevation is null, set the RASTER3D value null */
                     /*If the elevation is null, set the RASTER3D value null */
-                    if (Rast3d_isNullValueNum(&height, DCELL_TYPE))
-                        value = Rast3d_getDouble(db.map, x, y, z);
+                    if (Rast3d_is_null_value_num(&height, DCELL_TYPE))
+                        value = Rast3d_get_double(db.map, x, y, z);
 
 
                     /*Write the value to the 3D map */
                     /*Write the value to the 3D map */
-                    if (Rast3d_putDouble(db.map, x, y, z, value) < 0)
+                    if (Rast3d_put_double(db.map, x, y, z, value) < 0)
                         fatal_error(db, _("Error writing RASTER3D double data"));
                         fatal_error(db, _("Error writing RASTER3D double data"));
 
 
                 }
                 }
@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
         else
         else
             G_fatal_error(_("The upper value is not valid"));
             G_fatal_error(_("The upper value is not valid"));
     } else {
     } else {
-        Rast3d_setNullValue(&db.upper, 1, DCELL_TYPE);
+        Rast3d_set_null_value(&db.upper, 1, DCELL_TYPE);
     }
     }
 
 
     /*Set the lower value */
     /*Set the lower value */
@@ -409,12 +409,12 @@ int main(int argc, char *argv[])
         else
         else
             G_fatal_error(_("The lower value is not valid"));
             G_fatal_error(_("The lower value is not valid"));
     } else {
     } else {
-        Rast3d_setNullValue(&db.lower, 1, DCELL_TYPE);
+        Rast3d_set_null_value(&db.lower, 1, DCELL_TYPE);
     }
     }
 
 
     /* Figure out the current g3d region */
     /* Figure out the current g3d region */
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&region);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&region);
 
 
     /*Check if the g3d-region is equal to the 2d rows and cols */
     /*Check if the g3d-region is equal to the 2d rows and cols */
     rows = Rast_window_rows();
     rows = Rast_window_rows();
@@ -437,7 +437,7 @@ int main(int argc, char *argv[])
 
 
     /*open RASTER3D output map */
     /*open RASTER3D output map */
     db.map = NULL;
     db.map = NULL;
-    db.map = Rast3d_openNewOptTileSize(param.output->answer, RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, maxSize);
+    db.map = Rast3d_open_new_opt_tile_size(param.output->answer, RASTER3D_USE_CACHE_XY, &region, DCELL_TYPE, maxSize);
 
 
     if (db.map == NULL)
     if (db.map == NULL)
         fatal_error(db, _("Error opening 3d raster map"));
         fatal_error(db, _("Error opening 3d raster map"));
@@ -445,10 +445,10 @@ int main(int argc, char *argv[])
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists()) {
+        if (Rast3d_mask_file_exists()) {
             changemask = 0;
             changemask = 0;
-            if (Rast3d_maskIsOff(db.map)) {
-                Rast3d_maskOn(db.map);
+            if (Rast3d_mask_is_off(db.map)) {
+                Rast3d_mask_on(db.map);
                 changemask = 1;
                 changemask = 1;
             }
             }
         }
         }
@@ -487,18 +487,18 @@ int main(int argc, char *argv[])
 
 
     /*We set the Mask off, if it was off before */
     /*We set the Mask off, if it was off before */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists())
-            if (Rast3d_maskIsOn(db.map) && changemask)
-                Rast3d_maskOff(db.map);
+        if (Rast3d_mask_file_exists())
+            if (Rast3d_mask_is_on(db.map) && changemask)
+                Rast3d_mask_off(db.map);
     }
     }
 
 
     G_debug(2, "Close 3d raster map");
     G_debug(2, "Close 3d raster map");
 
 
     /* Flush all tile */
     /* Flush all tile */
-    if (!Rast3d_flushAllTiles(db.map))
-        Rast3d_fatalError("Error flushing tiles with Rast3d_flushAllTiles");
-    if (!Rast3d_closeCell(db.map))
-        Rast3d_fatalError(_("Error closing 3d raster map"));
+    if (!Rast3d_flush_all_tiles(db.map))
+        Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
+    if (!Rast3d_close_cell(db.map))
+        Rast3d_fatal_error(_("Error closing 3d raster map"));
 
 
     G_debug(2, "\nDone\n");
     G_debug(2, "\nDone\n");
 
 

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

@@ -108,10 +108,10 @@ int main(int argc, char *argv[])
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
     /* Set the defaults */
     /* Set the defaults */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /* get the current region */
     /* get the current region */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     cols = region.cols;
     cols = region.cols;
     rows = region.rows;
     rows = region.rows;
@@ -144,18 +144,18 @@ int main(int argc, char *argv[])
     /* open 3D zoning raster with default region */
     /* open 3D zoning raster with default region */
     if ((zonemap = param.zonefile->answer) != NULL) {
     if ((zonemap = param.zonefile->answer) != NULL) {
 	if (NULL == (mapset = G_find_grid3(zonemap, "")))
 	if (NULL == (mapset = G_find_grid3(zonemap, "")))
-	    Rast3d_fatalError(_("Requested g3d map <%s> not found"), zonemap);
+	    Rast3d_fatal_error(_("Requested g3d map <%s> not found"), zonemap);
 
 
 	zmap =
 	zmap =
-	    Rast3d_openCellOld(zonemap, G_find_grid3(zonemap, ""), &region,
+	    Rast3d_open_cell_old(zonemap, G_find_grid3(zonemap, ""), &region,
 			    RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			    RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
 	if (zmap == NULL)
 	if (zmap == NULL)
-	    Rast3d_fatalError(_("Error opening g3d map <%s>"), zonemap);
+	    Rast3d_fatal_error(_("Error opening g3d map <%s>"), zonemap);
 
 
-	zmap_type = Rast3d_tileTypeMap(zmap);
+	zmap_type = Rast3d_tile_type_map(zmap);
 	
 	
-	if (Rast3d_readCats(zonemap, mapset, &(zone_info.cats)))
+	if (Rast3d_read_cats(zonemap, mapset, &(zone_info.cats)))
 	    G_warning("no category support for zoning raster");
 	    G_warning("no category support for zoning raster");
 	    
 	    
 	Rast3d_range_init(zmap);
 	Rast3d_range_init(zmap);
@@ -183,16 +183,16 @@ int main(int argc, char *argv[])
     infile = param.inputfile->answer;
     infile = param.inputfile->answer;
 
 
     if (NULL == G_find_grid3(infile, ""))
     if (NULL == G_find_grid3(infile, ""))
-	Rast3d_fatalError(_("Requested g3d map <%s> not found"), infile);
+	Rast3d_fatal_error(_("Requested g3d map <%s> not found"), infile);
 
 
     map =
     map =
-	Rast3d_openCellOld(infile, G_find_grid3(infile, ""), &region,
+	Rast3d_open_cell_old(infile, G_find_grid3(infile, ""), &region,
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Error opening g3d map <%s>"), infile);
+	Rast3d_fatal_error(_("Error opening g3d map <%s>"), infile);
 
 
-    map_type = Rast3d_tileTypeMap(map);
+    map_type = Rast3d_tile_type_map(map);
 
 
     i = 0;
     i = 0;
     while (param.percentile->answers[i])
     while (param.percentile->answers[i])
@@ -219,8 +219,8 @@ int main(int argc, char *argv[])
 		zone = 0;
 		zone = 0;
 		if (zone_info.n_zones) {
 		if (zone_info.n_zones) {
 		    if (zmap_type == FCELL_TYPE) {
 		    if (zmap_type == FCELL_TYPE) {
-			Rast3d_getValue(zmap, x, y, z, &val_f, FCELL_TYPE);
-			if (Rast3d_isNullValueNum(&val_f, FCELL_TYPE))
+			Rast3d_get_value(zmap, x, y, z, &val_f, FCELL_TYPE);
+			if (Rast3d_is_null_value_num(&val_f, FCELL_TYPE))
 			    continue;
 			    continue;
 			if (val_f < 0)
 			if (val_f < 0)
 			    zone = val_f - 0.5;
 			    zone = val_f - 0.5;
@@ -228,8 +228,8 @@ int main(int argc, char *argv[])
 			    zone = val_f + 0.5;
 			    zone = val_f + 0.5;
 		    }
 		    }
 		    else if (zmap_type == DCELL_TYPE) {
 		    else if (zmap_type == DCELL_TYPE) {
-			Rast3d_getValue(zmap, x, y, z, &val_d, DCELL_TYPE);
-			if (Rast3d_isNullValueNum(&val_d, DCELL_TYPE))
+			Rast3d_get_value(zmap, x, y, z, &val_d, DCELL_TYPE);
+			if (Rast3d_is_null_value_num(&val_d, DCELL_TYPE))
 			    continue;
 			    continue;
 			if (val_d < 0)
 			if (val_d < 0)
 			    zone = val_d - 0.5;
 			    zone = val_d - 0.5;
@@ -239,8 +239,8 @@ int main(int argc, char *argv[])
                     zone -= zone_info.min;
                     zone -= zone_info.min;
                 }
                 }
 		if (map_type == FCELL_TYPE) {
 		if (map_type == FCELL_TYPE) {
-		    Rast3d_getValue(map, x, y, z, &val_f, map_type);
-		    if (!Rast3d_isNullValueNum(&val_f, map_type)) {
+		    Rast3d_get_value(map, x, y, z, &val_f, map_type);
+		    if (!Rast3d_is_null_value_num(&val_f, map_type)) {
 			if (param.extended->answer) {
 			if (param.extended->answer) {
 			    if (stats[zone].n >= stats[zone].n_alloc) {
 			    if (stats[zone].n >= stats[zone].n_alloc) {
 				size_t msize;
 				size_t msize;
@@ -273,8 +273,8 @@ int main(int argc, char *argv[])
 		    stats[zone].size++;
 		    stats[zone].size++;
 		}
 		}
 		else if (map_type == DCELL_TYPE) {
 		else if (map_type == DCELL_TYPE) {
-		    Rast3d_getValue(map, x, y, z, &val_d, map_type);
-		    if (!Rast3d_isNullValueNum(&val_d, map_type)) {
+		    Rast3d_get_value(map, x, y, z, &val_d, map_type);
+		    if (!Rast3d_is_null_value_num(&val_d, map_type)) {
 			if (param.extended->answer) {
 			if (param.extended->answer) {
 			    if (stats[zone].n >= stats[zone].n_alloc) {
 			    if (stats[zone].n >= stats[zone].n_alloc) {
 				size_t msize;
 				size_t msize;
@@ -311,9 +311,9 @@ int main(int argc, char *argv[])
     }
     }
 
 
     /* close maps */
     /* close maps */
-    Rast3d_closeCell(map);
+    Rast3d_close_cell(map);
     if (zone_info.n_zones)
     if (zone_info.n_zones)
-	Rast3d_closeCell(zmap);
+	Rast3d_close_cell(zmap);
 
 
     /* create the output */
     /* create the output */
     if (param.table->answer)
     if (param.table->answer)

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

@@ -51,8 +51,8 @@ void fatal_error(void *map, int elevfd, int outfd, char *errorMsg)
     /* Close files and exit */
     /* Close files and exit */
 
 
     if (map != NULL) {
     if (map != NULL) {
-        if (!Rast3d_closeCell(map))
-            Rast3d_fatalError(_("Could not close RASTER3D map"));
+        if (!Rast3d_close_cell(map))
+            Rast3d_fatal_error(_("Could not close RASTER3D map"));
     }
     }
 
 
     /*unopen the output map */
     /*unopen the output map */
@@ -62,7 +62,7 @@ void fatal_error(void *map, int elevfd, int outfd, char *errorMsg)
     if (elevfd != -1)
     if (elevfd != -1)
         close_output_map(elevfd);
         close_output_map(elevfd);
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
     exit(EXIT_FAILURE);
     exit(EXIT_FAILURE);
 
 
 }
 }
@@ -136,7 +136,7 @@ void rast3d_cross_section(void *map,RASTER3D_Region region, int elevfd, int outf
     depths = region.depths;
     depths = region.depths;
     
     
     /*Typ of the RASTER3D Tile */
     /*Typ of the RASTER3D Tile */
-    typeIntern = Rast3d_tileTypeMap(map);
+    typeIntern = Rast3d_tile_type_map(map);
 
 
     /*Allocate mem for the output maps row */
     /*Allocate mem for the output maps row */
     if (typeIntern == FCELL_TYPE)
     if (typeIntern == FCELL_TYPE)
@@ -182,10 +182,10 @@ void rast3d_cross_section(void *map,RASTER3D_Region region, int elevfd, int outf
 
 
             /* Get the voxel value */
             /* Get the voxel value */
             if (typeIntern == FCELL_TYPE)
             if (typeIntern == FCELL_TYPE)
-                Rast3d_getRegionValue(map, north, east, elevation, &fcell[col], FCELL_TYPE);
+                Rast3d_get_region_value(map, north, east, elevation, &fcell[col], FCELL_TYPE);
 
 
             if (typeIntern == DCELL_TYPE)
             if (typeIntern == DCELL_TYPE)
-                Rast3d_getRegionValue(map, north, east, elevation, &dcell[col], DCELL_TYPE);
+                Rast3d_get_region_value(map, north, east, elevation, &dcell[col], DCELL_TYPE);
         }
         }
 
 
         /*Write the data to the output map */
         /*Write the data to the output map */
@@ -241,12 +241,12 @@ int main(int argc, char *argv[])
     G_debug(3, "Open 3D raster map %s", param.input->answer);
     G_debug(3, "Open 3D raster map %s", param.input->answer);
 
 
     if (NULL == G_find_grid3(param.input->answer, ""))
     if (NULL == G_find_grid3(param.input->answer, ""))
-        Rast3d_fatalError(_("3d raster map <%s> not found"),
+        Rast3d_fatal_error(_("3d raster map <%s> not found"),
                        param.input->answer);
                        param.input->answer);
 
 
     /* Figure out the region from the map */
     /* Figure out the region from the map */
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&region);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&region);
 
 
     /*Check if the g3d-region is equal to the 2d rows and cols */
     /*Check if the g3d-region is equal to the 2d rows and cols */
     rows = Rast_window_rows();
     rows = Rast_window_rows();
@@ -269,17 +269,17 @@ int main(int argc, char *argv[])
     /*Open the 3d raster map */
     /*Open the 3d raster map */
 
 
     /*******************/
     /*******************/
-    map = Rast3d_openCellOld(param.input->answer,
+    map = Rast3d_open_cell_old(param.input->answer,
                           G_find_grid3(param.input->answer, ""),
                           G_find_grid3(param.input->answer, ""),
                           &region, RASTER3D_TILE_SAME_AS_FILE,
                           &region, RASTER3D_TILE_SAME_AS_FILE,
                           RASTER3D_USE_CACHE_DEFAULT);
                           RASTER3D_USE_CACHE_DEFAULT);
 
 
     if (map == NULL)
     if (map == NULL)
-        Rast3d_fatalError(_("Error opening 3d raster map <%s>"),
+        Rast3d_fatal_error(_("Error opening 3d raster map <%s>"),
                        param.input->answer);
                        param.input->answer);
 
 
     /*Get the output type */
     /*Get the output type */
-    output_type = Rast3d_fileTypeMap(map);
+    output_type = Rast3d_file_type_map(map);
 
 
     if (output_type == FCELL_TYPE || output_type == DCELL_TYPE) {
     if (output_type == FCELL_TYPE || output_type == DCELL_TYPE) {
 
 
@@ -307,10 +307,10 @@ int main(int argc, char *argv[])
 
 
         /*if requested set the Mask on */
         /*if requested set the Mask on */
         if (param.mask->answer) {
         if (param.mask->answer) {
-            if (Rast3d_maskFileExists()) {
+            if (Rast3d_mask_file_exists()) {
                 changemask = 0;
                 changemask = 0;
-                if (Rast3d_maskIsOff(map)) {
-                    Rast3d_maskOn(map);
+                if (Rast3d_mask_is_off(map)) {
+                    Rast3d_mask_on(map);
                     changemask = 1;
                     changemask = 1;
                 }
                 }
             }
             }
@@ -324,9 +324,9 @@ int main(int argc, char *argv[])
 
 
         /*We set the Mask off, if it was off before */
         /*We set the Mask off, if it was off before */
         if (param.mask->answer) {
         if (param.mask->answer) {
-            if (Rast3d_maskFileExists())
-                if (Rast3d_maskIsOn(map) && changemask)
-                    Rast3d_maskOff(map);
+            if (Rast3d_mask_file_exists())
+                if (Rast3d_mask_is_on(map) && changemask)
+                    Rast3d_mask_off(map);
         }
         }
 
 
         Rast_close(outfd);
         Rast_close(outfd);
@@ -338,8 +338,8 @@ int main(int argc, char *argv[])
     }
     }
 
 
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
-        Rast3d_fatalError(_("Could not close RASTER3D map <%s>"),
+    if (!Rast3d_close_cell(map))
+        Rast3d_fatal_error(_("Could not close RASTER3D map <%s>"),
                        param.input->answer);
                        param.input->answer);
 
 
     return (EXIT_SUCCESS);
     return (EXIT_SUCCESS);

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

@@ -185,10 +185,10 @@ int main(int argc, char *argv[])
 
 
 
 
     /*Set the defaults */
     /*Set the defaults */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /*get the current region */
     /*get the current region */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     /*allocate the geometry structure  for geometry and area calculation */
     /*allocate the geometry structure  for geometry and area calculation */
     geom = N_init_geom_data_3d(&region, geom);
     geom = N_init_geom_data_3d(&region, geom);
@@ -364,19 +364,19 @@ write_result(N_array_3d * status, N_array_3d * phead_start,
     depths = region->depths;
     depths = region->depths;
 
 
     /*Open the new map */
     /*Open the new map */
-    map = Rast3d_openNewOptTileSize(name, RASTER3D_USE_CACHE_XY, region, DCELL_TYPE, 32);
+    map = Rast3d_open_new_opt_tile_size(name, RASTER3D_USE_CACHE_XY, region, DCELL_TYPE, 32);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Error opening g3d map <%s>"), name);
+	Rast3d_fatal_error(_("Error opening g3d map <%s>"), name);
 
 
     G_message(_("Write the result to g3d map <%s>"), name);
     G_message(_("Write the result to g3d map <%s>"), name);
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (param.mask->answer) {
     if (param.mask->answer) {
-	if (Rast3d_maskFileExists()) {
+	if (Rast3d_mask_file_exists()) {
 	    changemask = 0;
 	    changemask = 0;
-	    if (Rast3d_maskIsOff(map)) {
-		Rast3d_maskOn(map);
+	    if (Rast3d_mask_is_off(map)) {
+		Rast3d_mask_on(map);
 		changemask = 1;
 		changemask = 1;
 	    }
 	    }
 	}
 	}
@@ -398,25 +398,25 @@ write_result(N_array_3d * status, N_array_3d * phead_start,
 		    d1 = N_get_array_3d_d_value(phead_start, x, y, z);
 		    d1 = N_get_array_3d_d_value(phead_start, x, y, z);
 		}
 		}
 		else {
 		else {
-		    Rast3d_setNullValue(&d1, 1, DCELL_TYPE);
+		    Rast3d_set_null_value(&d1, 1, DCELL_TYPE);
 		}
 		}
-		Rast3d_putDouble(map, x, y, z, d1);
+		Rast3d_put_double(map, x, y, z, d1);
 	    }
 	    }
 	}
 	}
     }
     }
 
 
     /*We set the Mask off, if it was off before */
     /*We set the Mask off, if it was off before */
     if (param.mask->answer) {
     if (param.mask->answer) {
-	if (Rast3d_maskFileExists())
-	    if (Rast3d_maskIsOn(map) && changemask)
-		Rast3d_maskOff(map);
+	if (Rast3d_mask_file_exists())
+	    if (Rast3d_mask_is_on(map) && changemask)
+		Rast3d_mask_off(map);
     }
     }
 
 
     /* Flush all tile */
     /* Flush all tile */
-    if (!Rast3d_flushAllTiles(map))
-	Rast3d_fatalError("Error flushing tiles with Rast3d_flushAllTiles");
-    if (!Rast3d_closeCell(map))
-	Rast3d_fatalError(map, NULL, 0, _("Error closing g3d file"));
+    if (!Rast3d_flush_all_tiles(map))
+	Rast3d_fatal_error("Error flushing tiles with Rast3d_flush_all_tiles");
+    if (!Rast3d_close_cell(map))
+	Rast3d_fatal_error(map, NULL, 0, _("Error closing g3d file"));
 
 
     return;
     return;
 }
 }

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

@@ -55,17 +55,17 @@ void *map = NULL;
 int rowOrder;
 int rowOrder;
 int depthOrder;
 int depthOrder;
 
 
-extern void *Rast3d_openNewParam();
+extern void *Rast3d_open_new_param();
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 void fatalError(char *errorMsg)
 void fatalError(char *errorMsg)
 {
 {
     if (map != NULL) {
     if (map != NULL) {
         /* should unopen map here! */
         /* should unopen map here! */
-        Rast3d_closeCell(map);
+        Rast3d_close_cell(map);
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -192,7 +192,7 @@ FILE *openAscii(char *asciiFile, RASTER3D_Region * region)
         rewind(fp);
         rewind(fp);
     }
     }
 
 
-    Rast3d_getWindow(region);
+    Rast3d_get_window(region);
 
 
     readHeaderString(fp, "north:", &(region->north));
     readHeaderString(fp, "north:", &(region->north));
     readHeaderString(fp, "south:", &(region->south));
     readHeaderString(fp, "south:", &(region->south));
@@ -223,11 +223,11 @@ asciiToG3d(FILE * fp, RASTER3D_Region * region, int convertNull, char *nullValue
     char buff[256];
     char buff[256];
     int tileX, tileY, tileZ;
     int tileX, tileY, tileZ;
 
 
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
-    Rast3d_minUnlocked(map, RASTER3D_USE_CACHE_X);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
+    Rast3d_min_unlocked(map, RASTER3D_USE_CACHE_X);
 
 
-    Rast3d_autolockOn(map);
-    Rast3d_unlockAll(map);
+    Rast3d_autolock_on(map);
+    Rast3d_unlock_all(map);
     G_message(_("Loading data ...  (%dx%dx%d)"), region->cols, region->rows,
     G_message(_("Loading data ...  (%dx%dx%d)"), region->cols, region->rows,
               region->depths);
               region->depths);
 
 
@@ -239,7 +239,7 @@ asciiToG3d(FILE * fp, RASTER3D_Region * region, int convertNull, char *nullValue
         G_percent(z, region->depths, 1);
         G_percent(z, region->depths, 1);
 
 
         if ((z % tileZ) == 0)
         if ((z % tileZ) == 0)
-            Rast3d_unlockAll(map);
+            Rast3d_unlock_all(map);
 
 
         for (y = 0; y < region->rows; y++) /* go south to north */
         for (y = 0; y < region->rows; y++) /* go south to north */
             for (x = 0; x < region->cols; x++) {
             for (x = 0; x < region->cols; x++) {
@@ -270,7 +270,7 @@ asciiToG3d(FILE * fp, RASTER3D_Region * region, int convertNull, char *nullValue
 
 
                 /* Check for null value */
                 /* Check for null value */
                 if (convertNull && strncmp(buff, nullValue, strlen(nullValue)) == 0) {
                 if (convertNull && strncmp(buff, nullValue, strlen(nullValue)) == 0) {
-                    Rast3d_setNullValue(&value, 1, DCELL_TYPE);
+                    Rast3d_set_null_value(&value, 1, DCELL_TYPE);
                 } else {
                 } else {
                     if (sscanf(buff, "%lf", &value) != 1) {
                     if (sscanf(buff, "%lf", &value) != 1) {
                         G_warning(_("Invalid value detected."));
                         G_warning(_("Invalid value detected."));
@@ -280,10 +280,10 @@ asciiToG3d(FILE * fp, RASTER3D_Region * region, int convertNull, char *nullValue
                     }
                     }
                 }
                 }
                 /* Write the data */
                 /* Write the data */
-                Rast3d_putDouble(map, col, row, depth, value);
+                Rast3d_put_double(map, col, row, depth, value);
             }
             }
 
 
-        if (!Rast3d_flushTilesInCube(map,
+        if (!Rast3d_flush_tiles_in_cube(map,
                                   0, 0, MAX(0, depth - tileZ),
                                   0, 0, MAX(0, depth - tileZ),
                                   region->rows - 1, region->cols - 1, depth))
                                   region->rows - 1, region->cols - 1, depth))
             fatalError("asciiTog3d: error flushing tiles");
             fatalError("asciiTog3d: error flushing tiles");
@@ -294,11 +294,11 @@ asciiToG3d(FILE * fp, RASTER3D_Region * region, int convertNull, char *nullValue
                     "expected data.  [%.4f ...]"), value);
                     "expected data.  [%.4f ...]"), value);
     }
     }
 
 
-    if (!Rast3d_flushAllTiles(map))
+    if (!Rast3d_flush_all_tiles(map))
         fatalError("asciiTog3d: error flushing tiles");
         fatalError("asciiTog3d: error flushing tiles");
 
 
-    Rast3d_autolockOff(map);
-    Rast3d_unlockAll(map);
+    Rast3d_autolock_off(map);
+    Rast3d_unlock_all(map);
 
 
     G_percent(1, 1, 1);
     G_percent(1, 1, 1);
 }
 }
@@ -329,13 +329,13 @@ int main(int argc, char *argv[])
         _("Converts a 3D ASCII raster text file into a (binary) 3D raster map.");
         _("Converts a 3D ASCII raster text file into a (binary) 3D raster map.");
 
 
     setParams();
     setParams();
-    Rast3d_setStandard3dInputParams();
+    Rast3d_set_standard3d_input_params();
 
 
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
         exit(EXIT_FAILURE);
         exit(EXIT_FAILURE);
 
 
     getParams(&input, &output, &convertNull, nullValue);
     getParams(&input, &output, &convertNull, nullValue);
-    if (!Rast3d_getStandard3dParams(&useTypeDefault, &type,
+    if (!Rast3d_get_standard3d_params(&useTypeDefault, &type,
                                  &useLzwDefault, &doLzw,
                                  &useLzwDefault, &doLzw,
                                  &useRleDefault, &doRle,
                                  &useRleDefault, &doRle,
                                  &usePrecisionDefault, &precision,
                                  &usePrecisionDefault, &precision,
@@ -343,12 +343,12 @@ int main(int argc, char *argv[])
                                  &tileZ))
                                  &tileZ))
         fatalError("main: error getting standard parameters");
         fatalError("main: error getting standard parameters");
 
 
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     fp = openAscii(input, &region);
     fp = openAscii(input, &region);
 
 
     /*Open the new RASTER3D map */
     /*Open the new RASTER3D map */
-    map = Rast3d_openNewParam(output, RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_XY,
+    map = Rast3d_open_new_param(output, RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_XY,
                            &region,
                            &region,
                            type, doLzw, doRle, precision, tileX, tileY,
                            type, doLzw, doRle, precision, tileX, tileY,
                            tileZ);
                            tileZ);
@@ -359,13 +359,13 @@ int main(int argc, char *argv[])
     /*Create the new RASTER3D Map */
     /*Create the new RASTER3D Map */
     asciiToG3d(fp, &region, convertNull, nullValue);
     asciiToG3d(fp, &region, convertNull, nullValue);
 
 
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
         fatalError(_("Error closing new 3d raster map"));
         fatalError(_("Error closing new 3d raster map"));
 
 
     /* write input name to map history */
     /* write input name to map history */
-    Rast3d_readHistory(output, G_mapset(), &history);
+    Rast3d_read_history(output, G_mapset(), &history);
     Rast_set_history(&history, HIST_DATSRC_1, input);
     Rast_set_history(&history, HIST_DATSRC_1, input);
-    Rast3d_writeHistory(output, &history);
+    Rast3d_write_history(output, &history);
 
 
     map = NULL;
     map = NULL;
     if (fclose(fp))
     if (fclose(fp))

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

@@ -49,7 +49,7 @@ static void fatalError(char *errorMsg)
 	/* should unopen map here! */
 	/* should unopen map here! */
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -159,8 +159,8 @@ void convert(char *openFile, RASTER3D_Region * region, int convertNull,
 		    for (x = 0; x < region->cols; x++) {
 		    for (x = 0; x < region->cols; x++) {
 			value = data1[cnt++];
 			value = data1[cnt++];
 			if (convertNull && (value == MISSING))
 			if (convertNull && (value == MISSING))
-			    Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-			Rast3d_putFloat(map, x, y, z, value);
+			    Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+			Rast3d_put_float(map, x, y, z, value);
 		    }
 		    }
 		}
 		}
 	    }
 	    }
@@ -197,13 +197,13 @@ int main(int argc, char *argv[])
 	_("Import 3-dimensional Vis5D files.");
 	_("Import 3-dimensional Vis5D files.");
 
 
     setParams();
     setParams();
-    Rast3d_setStandard3dInputParams();
+    Rast3d_set_standard3d_input_params();
 
 
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
 	exit(1);
 	exit(1);
 
 
     getParams(&input, &output, &convertNull, &nullValue);
     getParams(&input, &output, &convertNull, &nullValue);
-    if (!Rast3d_getStandard3dParams(&useTypeDefault, &type,
+    if (!Rast3d_get_standard3d_params(&useTypeDefault, &type,
 				 &useLzwDefault, &doLzw,
 				 &useLzwDefault, &doLzw,
 				 &useRleDefault, &doRle,
 				 &useRleDefault, &doRle,
 				 &usePrecisionDefault, &precision,
 				 &usePrecisionDefault, &precision,
@@ -211,14 +211,14 @@ int main(int argc, char *argv[])
 				 &tileZ))
 				 &tileZ))
 	fatalError("main: error getting standard parameters");
 	fatalError("main: error getting standard parameters");
 
 
-    Rast3d_getWindow(&region);
-    map = Rast3d_openCellNew(output, FCELL_TYPE, RASTER3D_USE_CACHE_XY, &region);
+    Rast3d_get_window(&region);
+    map = Rast3d_open_cell_new(output, FCELL_TYPE, RASTER3D_USE_CACHE_XY, &region);
     if (map == NULL)
     if (map == NULL)
 	fatalError(_("Error opening 3d raster map"));
 	fatalError(_("Error opening 3d raster map"));
 
 
     convert(input, &region, convertNull, nullValue);
     convert(input, &region, convertNull, nullValue);
 
 
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
 	fatalError(_("Error closing 3d raster map"));
 	fatalError(_("Error closing 3d raster map"));
     map = NULL;
     map = NULL;
 
 

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

@@ -128,16 +128,16 @@ int main(int argc, char *argv[])
 
 
     /*We need to open the map */
     /*We need to open the map */
     g3map =
     g3map =
-	Rast3d_openCellOld(name, mapset, RASTER3D_DEFAULT_WINDOW,
+	Rast3d_open_cell_old(name, mapset, RASTER3D_DEFAULT_WINDOW,
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
     if (NULL == g3map)
     if (NULL == g3map)
 	G_fatal_error(_("Unable to open 3D raster map <%s>"), name);
 	G_fatal_error(_("Unable to open 3D raster map <%s>"), name);
 
 
     /*Get the maptype */
     /*Get the maptype */
-    data_type = Rast3d_fileTypeMap(g3map);
-    head_ok = Rast3d_readRegionMap(name, mapset, &cellhd) >= 0;
-    hist_ok = Rast3d_readHistory(name, mapset, &hist) >= 0;
-    cats_ok = Rast3d_readCats(name, mapset, &cats) >= 0;
+    data_type = Rast3d_file_type_map(g3map);
+    head_ok = Rast3d_read_region_map(name, mapset, &cellhd) >= 0;
+    hist_ok = Rast3d_read_history(name, mapset, &hist) >= 0;
+    cats_ok = Rast3d_read_cats(name, mapset, &cats) >= 0;
     /*Check the Timestamp */
     /*Check the Timestamp */
     time_ok = G_read_grid3_timestamp(name, mapset, &ts) > 0;
     time_ok = G_read_grid3_timestamp(name, mapset, &ts) > 0;
 
 
@@ -485,7 +485,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     /*Close the opened map */
     /*Close the opened map */
-    if (!Rast3d_closeCell(g3map))
+    if (!Rast3d_close_cell(g3map))
 	G_fatal_error(_("Unable to close 3D raster map <%s>"), name);
 	G_fatal_error(_("Unable to close 3D raster map <%s>"), name);
 
 
 
 

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

@@ -51,71 +51,71 @@ static void makeMask(char *name, d_Mask * maskRules)
     double value;
     double value;
     float floatNull;
     float floatNull;
 
 
-    cacheSize = Rast3d_cacheSizeEncode(RASTER3D_USE_CACHE_XY, 1);
+    cacheSize = Rast3d_cache_size_encode(RASTER3D_USE_CACHE_XY, 1);
 
 
     if (NULL == G_find_grid3(name, ""))
     if (NULL == G_find_grid3(name, ""))
-	Rast3d_fatalError(_("3D raster map <%s> not found"), name);
+	Rast3d_fatal_error(_("3D raster map <%s> not found"), name);
 
 
-    map = Rast3d_openCellOld(name, G_mapset(), RASTER3D_DEFAULT_WINDOW,
+    map = Rast3d_open_cell_old(name, G_mapset(), RASTER3D_DEFAULT_WINDOW,
 			  DCELL_TYPE, cacheSize);
 			  DCELL_TYPE, cacheSize);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Unable to open 3D raster map <%s>"), name);
+	Rast3d_fatal_error(_("Unable to open 3D raster map <%s>"), name);
 
 
-    Rast3d_getRegionStructMap(map, &region);
+    Rast3d_get_region_struct_map(map, &region);
 
 
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
 
 
-    mask = Rast3d_openNewParam(Rast3d_maskFile(), FCELL_TYPE, cacheSize,
+    mask = Rast3d_open_new_param(Rast3d_mask_file(), FCELL_TYPE, cacheSize,
 			    &region, FCELL_TYPE, RASTER3D_NO_LZW, RASTER3D_USE_RLE, 0,
 			    &region, FCELL_TYPE, RASTER3D_NO_LZW, RASTER3D_USE_RLE, 0,
 			    tileX, tileY, tileZ);
 			    tileX, tileY, tileZ);
 
 
     if (mask == NULL)
     if (mask == NULL)
-	Rast3d_fatalError(_("Unable to open 3D raster mask file"));
+	Rast3d_fatal_error(_("Unable to open 3D raster mask file"));
 
 
-    Rast3d_minUnlocked(map, RASTER3D_USE_CACHE_X);
-    Rast3d_autolockOn(map);
-    Rast3d_unlockAll(map);
-    Rast3d_minUnlocked(mask, RASTER3D_USE_CACHE_X);
-    Rast3d_autolockOn(mask);
-    Rast3d_unlockAll(mask);
+    Rast3d_min_unlocked(map, RASTER3D_USE_CACHE_X);
+    Rast3d_autolock_on(map);
+    Rast3d_unlock_all(map);
+    Rast3d_min_unlocked(mask, RASTER3D_USE_CACHE_X);
+    Rast3d_autolock_on(mask);
+    Rast3d_unlock_all(mask);
 
 
-    Rast3d_setNullValue(&floatNull, 1, FCELL_TYPE);
+    Rast3d_set_null_value(&floatNull, 1, FCELL_TYPE);
 
 
     for (z = 0; z < region.depths; z++) {
     for (z = 0; z < region.depths; z++) {
 	if ((z % tileZ) == 0) {
 	if ((z % tileZ) == 0) {
-	    Rast3d_unlockAll(map);
-	    Rast3d_unlockAll(mask);
+	    Rast3d_unlock_all(map);
+	    Rast3d_unlock_all(mask);
 	}
 	}
     
     
 	for (y = 0; y < region.rows; y++)	/* We count from north to south in the cube coordinate system */
 	for (y = 0; y < region.rows; y++)	/* We count from north to south in the cube coordinate system */
 	    for (x = 0; x < region.cols; x++) {
 	    for (x = 0; x < region.cols; x++) {
-		value = Rast3d_getDoubleRegion(map, x, y, z);
+		value = Rast3d_get_double_region(map, x, y, z);
 		if (Rast3d_mask_d_select((DCELL *) & value, maskRules))
 		if (Rast3d_mask_d_select((DCELL *) & value, maskRules))
-		    Rast3d_putFloat(mask, x, y, z, (float)floatNull);	/* mask-out value */
+		    Rast3d_put_float(mask, x, y, z, (float)floatNull);	/* mask-out value */
 		else
 		else
-		    Rast3d_putFloat(mask, x, y, z, (float)0.0);	/* not mask-out value */
+		    Rast3d_put_float(mask, x, y, z, (float)0.0);	/* not mask-out value */
 	    }
 	    }
 	if ((z % tileZ) == 0) {
 	if ((z % tileZ) == 0) {
-	    if (!Rast3d_flushTilesInCube
+	    if (!Rast3d_flush_tiles_in_cube
 		(mask, 0, 0, MAX(0, z - tileZ), region.rows - 1,
 		(mask, 0, 0, MAX(0, z - tileZ), region.rows - 1,
 		 region.cols - 1, z))
 		 region.cols - 1, z))
-		Rast3d_fatalError(_("makeMask: error flushing tiles in cube"));
+		Rast3d_fatal_error(_("makeMask: error flushing tiles in cube"));
 	}
 	}
     }
     }
 
 
-    if (!Rast3d_flushAllTiles(mask))
-	Rast3d_fatalError(_("makeMask: error flushing all tiles"));
+    if (!Rast3d_flush_all_tiles(mask))
+	Rast3d_fatal_error(_("makeMask: error flushing all tiles"));
 
 
-    Rast3d_autolockOff(map);
-    Rast3d_unlockAll(map);
-    Rast3d_autolockOff(mask);
-    Rast3d_unlockAll(mask);
+    Rast3d_autolock_off(map);
+    Rast3d_unlock_all(map);
+    Rast3d_autolock_off(mask);
+    Rast3d_unlock_all(mask);
 
 
-    if (!Rast3d_closeCell(mask))
-	Rast3d_fatalError(_("Unable to close 3D raster mask file"));
-    if (!Rast3d_closeCell(map))
-	Rast3d_fatalError(_("Unable to close raster map <%s>"), name);
+    if (!Rast3d_close_cell(mask))
+	Rast3d_fatal_error(_("Unable to close 3D raster mask file"));
+    if (!Rast3d_close_cell(map))
+	Rast3d_fatal_error(_("Unable to close raster map <%s>"), name);
 }
 }
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
-    if (Rast3d_maskFileExists())
+    if (Rast3d_mask_file_exists())
 	G_fatal_error(_("Cannot create mask file: RASTER3D_MASK already exists"));
 	G_fatal_error(_("Cannot create mask file: RASTER3D_MASK already exists"));
 
 
     getParams(&name, &maskRules);
     getParams(&name, &maskRules);

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

@@ -139,9 +139,9 @@ int main(int argc, char *argv[])
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
-    Rast3d_getWindow(&g3reg);
+    Rast3d_get_window(&g3reg);
     G_message(_("Region from getWindow: %d %d %d"),
     G_message(_("Region from getWindow: %d %d %d"),
 	      g3reg.rows, g3reg.cols, g3reg.depths);
 	      g3reg.rows, g3reg.cols, g3reg.depths);
 
 
@@ -150,17 +150,17 @@ int main(int argc, char *argv[])
 	 check_get_any_dspname(out->answer, name->answer, G_mapset())))
 	 check_get_any_dspname(out->answer, name->answer, G_mapset())))
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
-    Rast3d_setErrorFun(Rast3d_printError);
+    Rast3d_set_error_fun(Rast3d_print_error);
 
 
     /* open g3 file for reading and writing */
     /* open g3 file for reading and writing */
     if (NULL == (mapset = G_find_file2("grid3", name->answer, "")))
     if (NULL == (mapset = G_find_file2("grid3", name->answer, "")))
 	G_fatal_error(_("Not able to find grid3 file for [%s]"),
 	G_fatal_error(_("Not able to find grid3 file for [%s]"),
 		      name->answer);
 		      name->answer);
 
 
-    g3map = Rast3d_openCellOld(name->answer, mapset, &g3reg,
+    g3map = Rast3d_open_cell_old(name->answer, mapset, &g3reg,
 			    RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			    RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
     /*
     /*
-       g3map = Rast3d_openCellOld (name->answer, mapset, RASTER3D_DEFAULT_WINDOW,
+       g3map = Rast3d_open_cell_old (name->answer, mapset, RASTER3D_DEFAULT_WINDOW,
        RASTER3D_TILE_SAME_AS_FILE,
        RASTER3D_TILE_SAME_AS_FILE,
        RASTER3D_USE_CACHE_DEFAULT);
        RASTER3D_USE_CACHE_DEFAULT);
      */
      */
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
     /* TODO: look at this - should use current 3dregion rather than
     /* TODO: look at this - should use current 3dregion rather than
        region represented by original 3dgrid file */
        region represented by original 3dgrid file */
     /*
     /*
-       Rast3d_getRegionStructMap (g3map, &g3reg);
+       Rast3d_get_region_struct_map (g3map, &g3reg);
      */
      */
 
 
     /* DONT USE Headfax any more ?
     /* DONT USE Headfax any more ?
@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
 	fprintf(stderr, "\n");
 	fprintf(stderr, "\n");
 
 
     /* tries to write a header! */
     /* tries to write a header! */
-    Rast3d_closeCell(g3map);
+    Rast3d_close_cell(g3map);
 
 
     fclose(Headfax.dspfoutfp);
     fclose(Headfax.dspfoutfp);
 
 

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

@@ -9,7 +9,7 @@ int r3read_level(void *g3map, RASTER3D_Region * g3reg, file_info * Headfax,
 		 float *data, int n_lev)
 		 float *data, int n_lev)
 {
 {
 #ifdef NO_RESAMPLE
 #ifdef NO_RESAMPLE
-    Rast3d_getBlock(g3map, 0, 0, n_lev,
+    Rast3d_get_block(g3map, 0, 0, n_lev,
 		 Headfax->xdim, Headfax->ydim, 1, (char *)data, FCELL_TYPE);
 		 Headfax->xdim, Headfax->ydim, 1, (char *)data, FCELL_TYPE);
 #else
 #else
     /* Rast3d_getBlockRegion might be handy */
     /* Rast3d_getBlockRegion might be handy */

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

@@ -81,7 +81,7 @@ getParams(char **name, d_Mask ** maskRules, int *changeNull,
     *changeNull = (params.null->answer != NULL);
     *changeNull = (params.null->answer != NULL);
     if (*changeNull)
     if (*changeNull)
 	if (sscanf(params.null->answer, "%lf", newNullVal) != 1)
 	if (sscanf(params.null->answer, "%lf", newNullVal) != 1)
-	    Rast3d_fatalError(_("Illegal value for null"));
+	    Rast3d_fatal_error(_("Illegal value for null"));
 }
 }
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
@@ -96,78 +96,78 @@ modifyNull(char *name, d_Mask * maskRules, int changeNull, double newNullVal)
     int doCompress, doLzw, doRle, precision;
     int doCompress, doLzw, doRle, precision;
     int cacheSize;
     int cacheSize;
 
 
-    cacheSize = Rast3d_cacheSizeEncode(RASTER3D_USE_CACHE_XY, 1);
+    cacheSize = Rast3d_cache_size_encode(RASTER3D_USE_CACHE_XY, 1);
 
 
     if (NULL == G_find_grid3(name, ""))
     if (NULL == G_find_grid3(name, ""))
-	Rast3d_fatalError(_("3D raster map <%s> not found"), name);
+	Rast3d_fatal_error(_("3D raster map <%s> not found"), name);
 
 
     fprintf(stderr, "name %s Mapset %s \n", name, G_mapset());
     fprintf(stderr, "name %s Mapset %s \n", name, G_mapset());
-    map = Rast3d_openCellOld(name, G_mapset(), RASTER3D_DEFAULT_WINDOW,
+    map = Rast3d_open_cell_old(name, G_mapset(), RASTER3D_DEFAULT_WINDOW,
 			  DCELL_TYPE, cacheSize);
 			  DCELL_TYPE, cacheSize);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Unable to open 3D raster map <%s>"), name);
+	Rast3d_fatal_error(_("Unable to open 3D raster map <%s>"), name);
 
 
-    Rast3d_getRegionStructMap(map, &region);
-    Rast3d_getTileDimensionsMap(map, &tileX, &tileY, &tileZ);
+    Rast3d_get_region_struct_map(map, &region);
+    Rast3d_get_tile_dimensions_map(map, &tileX, &tileY, &tileZ);
 
 
-    Rast3d_getCompressionMode(&doCompress, &doLzw, &doRle, &precision);
+    Rast3d_get_compression_mode(&doCompress, &doLzw, &doRle, &precision);
 
 
-    mapOut = Rast3d_openNewParam(name, DCELL_TYPE, RASTER3D_USE_CACHE_XY,
-			      &region, Rast3d_fileTypeMap(map),
-			      doLzw, doRle, Rast3d_tilePrecisionMap(map), tileX,
+    mapOut = Rast3d_open_new_param(name, DCELL_TYPE, RASTER3D_USE_CACHE_XY,
+			      &region, Rast3d_file_type_map(map),
+			      doLzw, doRle, Rast3d_tile_precision_map(map), tileX,
 			      tileY, tileZ);
 			      tileY, tileZ);
     if (mapOut == NULL)
     if (mapOut == NULL)
-	Rast3d_fatalError(_("modifyNull: error opening tmp file"));
+	Rast3d_fatal_error(_("modifyNull: error opening tmp file"));
 
 
-    Rast3d_minUnlocked(map, RASTER3D_USE_CACHE_X);
-    Rast3d_autolockOn(map);
-    Rast3d_unlockAll(map);
-    Rast3d_minUnlocked(mapOut, RASTER3D_USE_CACHE_X);
-    Rast3d_autolockOn(mapOut);
-    Rast3d_unlockAll(mapOut);
+    Rast3d_min_unlocked(map, RASTER3D_USE_CACHE_X);
+    Rast3d_autolock_on(map);
+    Rast3d_unlock_all(map);
+    Rast3d_min_unlocked(mapOut, RASTER3D_USE_CACHE_X);
+    Rast3d_autolock_on(mapOut);
+    Rast3d_unlock_all(mapOut);
 
 
 	for (z = 0; z < region.depths; z++) {
 	for (z = 0; z < region.depths; z++) {
 	if ((z % tileZ) == 0) {
 	if ((z % tileZ) == 0) {
-	    Rast3d_unlockAll(map);
-	    Rast3d_unlockAll(mapOut);
+	    Rast3d_unlock_all(map);
+	    Rast3d_unlock_all(mapOut);
 	}
 	}
 	for (y = 0; y < region.rows; y++)
 	for (y = 0; y < region.rows; y++)
 	    for (x = 0; x < region.cols; x++) {
 	    for (x = 0; x < region.cols; x++) {
 
 
-		value = Rast3d_getDoubleRegion(map, x, y, z);
+		value = Rast3d_get_double_region(map, x, y, z);
 
 
-		if (Rast3d_isNullValueNum(&value, DCELL_TYPE)) {
+		if (Rast3d_is_null_value_num(&value, DCELL_TYPE)) {
 		    if (changeNull) {
 		    if (changeNull) {
 			value = newNullVal;
 			value = newNullVal;
 		    }
 		    }
 		}
 		}
 		else if (Rast3d_mask_d_select((DCELL *) & value, maskRules)) {
 		else if (Rast3d_mask_d_select((DCELL *) & value, maskRules)) {
-		    Rast3d_setNullValue(&value, 1, DCELL_TYPE);
+		    Rast3d_set_null_value(&value, 1, DCELL_TYPE);
 		}
 		}
 
 
-		Rast3d_putDouble(mapOut, x, y, z, value);
+		Rast3d_put_double(mapOut, x, y, z, value);
 	    }
 	    }
 	if ((z % tileZ) == 0) {
 	if ((z % tileZ) == 0) {
-	    if (!Rast3d_flushTilesInCube
+	    if (!Rast3d_flush_tiles_in_cube
 		(mapOut, 0, 0, MAX(0, z - tileZ), region.rows - 1,
 		(mapOut, 0, 0, MAX(0, z - tileZ), region.rows - 1,
 		 region.cols - 1, z))
 		 region.cols - 1, z))
-		Rast3d_fatalError(_("modifyNull: error flushing tiles in cube"));
+		Rast3d_fatal_error(_("modifyNull: error flushing tiles in cube"));
 	}
 	}
     }
     }
 
 
-    if (!Rast3d_flushAllTiles(mapOut))
-	Rast3d_fatalError(_("modifyNull: error flushing all tiles"));
+    if (!Rast3d_flush_all_tiles(mapOut))
+	Rast3d_fatal_error(_("modifyNull: error flushing all tiles"));
 
 
-    Rast3d_autolockOff(map);
-    Rast3d_unlockAll(map);
-    Rast3d_autolockOff(mapOut);
-    Rast3d_unlockAll(mapOut);
+    Rast3d_autolock_off(map);
+    Rast3d_unlock_all(map);
+    Rast3d_autolock_off(mapOut);
+    Rast3d_unlock_all(mapOut);
 
 
-    if (!Rast3d_closeCell(map))
-	Rast3d_fatalError(_("Unable to close raster map"));
-    if (!Rast3d_closeCell(mapOut))
-	Rast3d_fatalError(_("modifyNull: Unable to close tmp file"));
+    if (!Rast3d_close_cell(map))
+	Rast3d_fatal_error(_("Unable to close raster map"));
+    if (!Rast3d_close_cell(mapOut))
+	Rast3d_fatal_error(_("modifyNull: Unable to close tmp file"));
 }
 }
 
 
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/

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

@@ -58,12 +58,12 @@ void fatalError(char *errorMsg)
 {
 {
     if (map != NULL) {
     if (map != NULL) {
         /* should unopen map here! */
         /* should unopen map here! */
-        if (!Rast3d_closeCell(map))
+        if (!Rast3d_close_cell(map))
             fatalError(_("Error closing 3d raster map"));
             fatalError(_("Error closing 3d raster map"));
 
 
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -237,7 +237,7 @@ void G3dToascii(FILE * fp, RASTER3D_Region region, int decim)
     cols = region.cols;
     cols = region.cols;
     depths = region.depths;
     depths = region.depths;
 
 
-    typeIntern = Rast3d_tileTypeMap(map);
+    typeIntern = Rast3d_tile_type_map(map);
 
 
     for (z = 0; z < depths; z++) {
     for (z = 0; z < depths; z++) {
         G_percent(z, depths, 1);
         G_percent(z, depths, 1);
@@ -265,17 +265,17 @@ void G3dToascii(FILE * fp, RASTER3D_Region region, int decim)
 
 
                 if (typeIntern == FCELL_TYPE) {
                 if (typeIntern == FCELL_TYPE) {
                     
                     
-                    Rast3d_getValue(map, col, row, depth, &fvalue, FCELL_TYPE);
+                    Rast3d_get_value(map, col, row, depth, &fvalue, FCELL_TYPE);
                     
                     
-                    if (Rast3d_isNullValueNum(&fvalue, FCELL_TYPE))
+                    if (Rast3d_is_null_value_num(&fvalue, FCELL_TYPE))
                         fprintf(fp, "%s ", param.null_val->answer);
                         fprintf(fp, "%s ", param.null_val->answer);
                     else
                     else
                         fprintf(fp, "%.*f ", decim, fvalue);
                         fprintf(fp, "%.*f ", decim, fvalue);
                 } else {
                 } else {
                     
                     
-                    Rast3d_getValue(map, col, row, depth, &dvalue, DCELL_TYPE);
+                    Rast3d_get_value(map, col, row, depth, &dvalue, DCELL_TYPE);
                     
                     
-                    if (Rast3d_isNullValueNum(&dvalue, DCELL_TYPE))
+                    if (Rast3d_is_null_value_num(&dvalue, DCELL_TYPE))
                         fprintf(fp, "%s ", param.null_val->answer);
                         fprintf(fp, "%s ", param.null_val->answer);
                     else
                     else
                         fprintf(fp, "%.*lf ", decim, dvalue);
                         fprintf(fp, "%.*lf ", decim, dvalue);
@@ -327,30 +327,30 @@ int main(int argc, char *argv[])
     }
     }
 
 
     if (NULL == G_find_grid3(input, ""))
     if (NULL == G_find_grid3(input, ""))
-        Rast3d_fatalError(_("Requested 3d raster map not found"));
+        Rast3d_fatal_error(_("Requested 3d raster map not found"));
 
 
     /* Initiate the default settings */
     /* Initiate the default settings */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /* Figure out the current region settings */
     /* Figure out the current region settings */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     /* Open the map and use XY cache mode */
     /* Open the map and use XY cache mode */
-    map = Rast3d_openCellOld(input, G_find_grid3(input, ""), &region,
+    map = Rast3d_open_cell_old(input, G_find_grid3(input, ""), &region,
                           RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
                           RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
     if (map == NULL)
     if (map == NULL)
-        Rast3d_fatalError(_("Error opening 3d raster map"));
+        Rast3d_fatal_error(_("Error opening 3d raster map"));
 
 
     /* Open the output ascii file */
     /* Open the output ascii file */
     fp = openAscii(output, region);
     fp = openAscii(output, region);
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists()) {
+        if (Rast3d_mask_file_exists()) {
             changemask = 0;
             changemask = 0;
-            if (Rast3d_maskIsOff(map)) {
-                Rast3d_maskOn(map);
+            if (Rast3d_mask_is_off(map)) {
+                Rast3d_mask_on(map);
                 changemask = 1;
                 changemask = 1;
             }
             }
         }
         }
@@ -361,13 +361,13 @@ int main(int argc, char *argv[])
 
 
     /*We set the Mask off, if it was off bevor */
     /*We set the Mask off, if it was off bevor */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists())
-            if (Rast3d_maskIsOn(map) && changemask)
-                Rast3d_maskOff(map);
+        if (Rast3d_mask_file_exists())
+            if (Rast3d_mask_is_on(map) && changemask)
+                Rast3d_mask_off(map);
     }
     }
 
 
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
         fatalError(_("Error closing 3d raster map"));
         fatalError(_("Error closing 3d raster map"));
 
 
     if (output)
     if (output)

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

@@ -50,11 +50,11 @@ void fatalError(char *errorMsg)
 {
 {
     if (map != NULL) {
     if (map != NULL) {
 	/* should unopen map here! */
 	/* should unopen map here! */
-	if (!Rast3d_closeCell(map))
+	if (!Rast3d_close_cell(map))
 	    fatalError("Error closing 3d raster map");
 	    fatalError("Error closing 3d raster map");
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
 }
 }
 
 
 /*---------------------------------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
@@ -140,7 +140,7 @@ void convert(char *fileout, int rows, int cols, int depths, int trueCoords)
 	   depths=region.depths;
 	   depths=region.depths;
 	 */
 	 */
 	/* END OF ORIGINAL CODE WHICH IS NOT NECESSARY FOR ME, COMMENTED IT */
 	/* END OF ORIGINAL CODE WHICH IS NOT NECESSARY FOR ME, COMMENTED IT */
-	typeIntern = Rast3d_tileTypeMap(map);
+	typeIntern = Rast3d_tile_type_map(map);
 
 
     G_debug(3, "cols: %i rows: %i depths: %i\n", cols, rows, depths);
     G_debug(3, "cols: %i rows: %i depths: %i\n", cols, rows, depths);
 
 
@@ -225,10 +225,10 @@ void convert(char *fileout, int rows, int cols, int depths, int trueCoords)
 	for (x = 0; x < cols; x++) {
 	for (x = 0; x < cols; x++) {
 	    for (y = 0; y < rows; y++) {	/* north to south */
 	    for (y = 0; y < rows; y++) {	/* north to south */
 
 
-		Rast3d_getValueRegion(map, x, y, z, d1p, typeIntern);
+		Rast3d_get_value_region(map, x, y, z, d1p, typeIntern);
 
 
 		if (typeIntern == FCELL_TYPE) {
 		if (typeIntern == FCELL_TYPE) {
-		    if (Rast3d_isNullValueNum(f1p, FCELL_TYPE)) {
+		    if (Rast3d_is_null_value_num(f1p, FCELL_TYPE)) {
 			g[cnt] = MISSING;
 			g[cnt] = MISSING;
 			cnt++;
 			cnt++;
 		    }
 		    }
@@ -238,7 +238,7 @@ void convert(char *fileout, int rows, int cols, int depths, int trueCoords)
 		    }
 		    }
 		}
 		}
 		else {		/*double */
 		else {		/*double */
-		    if (Rast3d_isNullValueNum(d1p, DCELL_TYPE)) {
+		    if (Rast3d_is_null_value_num(d1p, DCELL_TYPE)) {
 			g[cnt] = MISSING;
 			g[cnt] = MISSING;
 			cnt++;
 			cnt++;
 		    }
 		    }
@@ -309,17 +309,17 @@ int main(int argc, char *argv[])
     trueCoords = coords->answer;
     trueCoords = coords->answer;
 
 
     if (NULL == G_find_grid3(input, ""))
     if (NULL == G_find_grid3(input, ""))
-	Rast3d_fatalError(_("Requested 3d raster map not found"));
+	Rast3d_fatal_error(_("Requested 3d raster map not found"));
 
 
-    map = Rast3d_openCellOld(input, G_find_grid3(input, ""), RASTER3D_DEFAULT_WINDOW,
+    map = Rast3d_open_cell_old(input, G_find_grid3(input, ""), RASTER3D_DEFAULT_WINDOW,
 			  RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
 			  RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Error opening 3d raster map"));
+	Rast3d_fatal_error(_("Error opening 3d raster map"));
 
 
     /* Use default region */
     /* Use default region */
-    /*  Rast3d_getRegionStructMap(map, &region); */
+    /*  Rast3d_get_region_struct_map(map, &region); */
     /* Figure out the region from current settings: */
     /* Figure out the region from current settings: */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     G_debug(3, "cols: %i rows: %i layers: %i\n", region.cols, region.rows,
     G_debug(3, "cols: %i rows: %i layers: %i\n", region.cols, region.rows,
 	    region.depths);
 	    region.depths);
@@ -327,7 +327,7 @@ int main(int argc, char *argv[])
     convert(output, region.rows, region.cols, region.depths, trueCoords);
     convert(output, region.rows, region.cols, region.depths, trueCoords);
 
 
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
 	fatalError(_("Error closing 3d raster map"));
 	fatalError(_("Error closing 3d raster map"));
 
 
     map = NULL;
     map = NULL;

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

@@ -40,7 +40,7 @@ void fatal_error(char *errorMsg, input_maps * in)
     /*close all open maps and free memory */
     /*close all open maps and free memory */
     release_input_maps_struct(in);
     release_input_maps_struct(in);
 
 
-    Rast3d_fatalError("Break because of errors.");
+    Rast3d_fatal_error("Break because of errors.");
 }
 }
 
 
 /* ************************************************************************* */
 /* ************************************************************************* */
@@ -61,7 +61,7 @@ int CloseInputRasterMap(int fd)
 int close_input_raster3d_map(void *map)
 int close_input_raster3d_map(void *map)
 {
 {
     if (map != NULL) {
     if (map != NULL) {
-	if (!Rast3d_closeCell(map)) {
+	if (!Rast3d_close_cell(map)) {
 	    G_warning(_("unable to close input 3d raster map"));
 	    G_warning(_("unable to close input 3d raster map"));
 	    return 1;
 	    return 1;
 	}
 	}
@@ -102,7 +102,7 @@ void release_input_maps_struct(input_maps * in)
     free(in);
     free(in);
 
 
     if (error > 0)
     if (error > 0)
-	Rast3d_fatalError("Error while closing the input maps");
+	Rast3d_fatal_error("Error while closing the input maps");
 
 
     return;
     return;
 }
 }

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

@@ -114,14 +114,14 @@ void check_input_maps(void)
     if (param.structgrid->answer) {
     if (param.structgrid->answer) {
 
 
         if (!param.top->answer || !param.bottom->answer)
         if (!param.top->answer || !param.bottom->answer)
-            Rast3d_fatalError(_("You have to specify top and bottom map"));
+            Rast3d_fatal_error(_("You have to specify top and bottom map"));
 
 
         mapset = NULL;
         mapset = NULL;
         name = NULL;
         name = NULL;
         name = param.top->answer;
         name = param.top->answer;
         mapset = G_find_raster2(name, "");
         mapset = G_find_raster2(name, "");
         if (mapset == NULL) {
         if (mapset == NULL) {
-            Rast3d_fatalError(_("Top cell map <%s> not found"),
+            Rast3d_fatal_error(_("Top cell map <%s> not found"),
                            param.top->answer);
                            param.top->answer);
         }
         }
 
 
@@ -130,7 +130,7 @@ void check_input_maps(void)
         name = param.bottom->answer;
         name = param.bottom->answer;
         mapset = G_find_raster2(name, "");
         mapset = G_find_raster2(name, "");
         if (mapset == NULL) {
         if (mapset == NULL) {
-            Rast3d_fatalError(_("Bottom cell map <%s> not found"),
+            Rast3d_fatal_error(_("Bottom cell map <%s> not found"),
                            param.bottom->answer);
                            param.bottom->answer);
         }
         }
     }
     }
@@ -139,7 +139,7 @@ void check_input_maps(void)
     if (param.input->answers != NULL) {
     if (param.input->answers != NULL) {
         for (i = 0; param.input->answers[i] != NULL; i++) {
         for (i = 0; param.input->answers[i] != NULL; i++) {
             if (NULL == G_find_grid3(param.input->answers[i], ""))
             if (NULL == G_find_grid3(param.input->answers[i], ""))
-                Rast3d_fatalError(_("Requested 3d raster map <%s> not found"),
+                Rast3d_fatal_error(_("Requested 3d raster map <%s> not found"),
                                param.input->answers[i]);
                                param.input->answers[i]);
         }
         }
     }
     }
@@ -149,10 +149,10 @@ void check_input_maps(void)
         for (i = 0; i < 3; i++) {
         for (i = 0; i < 3; i++) {
             if (param.rgbmaps->answers[i] != NULL) {
             if (param.rgbmaps->answers[i] != NULL) {
                 if (NULL == G_find_grid3(param.rgbmaps->answers[i], ""))
                 if (NULL == G_find_grid3(param.rgbmaps->answers[i], ""))
-                    Rast3d_fatalError(_("Requested g3d RGB map <%s> not found"),
+                    Rast3d_fatal_error(_("Requested g3d RGB map <%s> not found"),
                                    param.rgbmaps->answers[i]);
                                    param.rgbmaps->answers[i]);
             } else {
             } else {
-                Rast3d_fatalError(_("Please provide three g3d RGB maps"));
+                Rast3d_fatal_error(_("Please provide three g3d RGB maps"));
             }
             }
         }
         }
     }
     }
@@ -162,10 +162,10 @@ void check_input_maps(void)
         for (i = 0; i < 3; i++) {
         for (i = 0; i < 3; i++) {
             if (param.vectormaps->answers[i] != NULL) {
             if (param.vectormaps->answers[i] != NULL) {
                 if (NULL == G_find_grid3(param.vectormaps->answers[i], ""))
                 if (NULL == G_find_grid3(param.vectormaps->answers[i], ""))
-                    Rast3d_fatalError(_("Requested g3d vector map <%s> not found"),
+                    Rast3d_fatal_error(_("Requested g3d vector map <%s> not found"),
                                    param.vectormaps->answers[i]);
                                    param.vectormaps->answers[i]);
             } else {
             } else {
-                Rast3d_fatalError(_("Please provide three g3d vector maps [x,y,z]"));
+                Rast3d_fatal_error(_("Please provide three g3d vector maps [x,y,z]"));
             }
             }
         }
         }
     }
     }
@@ -199,7 +199,7 @@ void open_write_rgb_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
             maprgb = NULL;
             maprgb = NULL;
             /*Open the map */
             /*Open the map */
             maprgb =
             maprgb =
-                Rast3d_openCellOld(param.rgbmaps->answers[i],
+                Rast3d_open_cell_old(param.rgbmaps->answers[i],
                                 G_find_grid3(param.rgbmaps->answers[i], ""),
                                 G_find_grid3(param.rgbmaps->answers[i], ""),
                                 &region, RASTER3D_TILE_SAME_AS_FILE,
                                 &region, RASTER3D_TILE_SAME_AS_FILE,
                                 RASTER3D_USE_CACHE_DEFAULT);
                                 RASTER3D_USE_CACHE_DEFAULT);
@@ -211,10 +211,10 @@ void open_write_rgb_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
 
 
             /*if requested set the Mask on */
             /*if requested set the Mask on */
             if (param.mask->answer) {
             if (param.mask->answer) {
-                if (Rast3d_maskFileExists()) {
+                if (Rast3d_mask_file_exists()) {
                     changemask[i] = 0;
                     changemask[i] = 0;
-                    if (Rast3d_maskIsOff(maprgb)) {
-                        Rast3d_maskOn(maprgb);
+                    if (Rast3d_mask_is_off(maprgb)) {
+                        Rast3d_mask_on(maprgb);
                         changemask[i] = 1;
                         changemask[i] = 1;
                     }
                     }
                 }
                 }
@@ -243,12 +243,12 @@ void open_write_rgb_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
 
 
             /*We set the Mask off, if it was off before */
             /*We set the Mask off, if it was off before */
             if (param.mask->answer) {
             if (param.mask->answer) {
-                if (Rast3d_maskFileExists())
-                    if (Rast3d_maskIsOn(maprgb) && changemask[i])
-                        Rast3d_maskOff(maprgb);
+                if (Rast3d_mask_file_exists())
+                    if (Rast3d_mask_is_on(maprgb) && changemask[i])
+                        Rast3d_mask_off(maprgb);
             }
             }
             /* Close the 3d raster map */
             /* Close the 3d raster map */
-            if (!Rast3d_closeCell(maprgb)) {
+            if (!Rast3d_close_cell(maprgb)) {
                 fatal_error(_("Error closing g3d rgb map."), in);
                 fatal_error(_("Error closing g3d rgb map."), in);
             }
             }
 
 
@@ -284,7 +284,7 @@ void open_write_vector_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
             mapvect = NULL;
             mapvect = NULL;
             /*Open the map */
             /*Open the map */
             mapvect =
             mapvect =
-                Rast3d_openCellOld(param.vectormaps->answers[i],
+                Rast3d_open_cell_old(param.vectormaps->answers[i],
                                 G_find_grid3(param.vectormaps->answers[i],
                                 G_find_grid3(param.vectormaps->answers[i],
                                              ""), &region,
                                              ""), &region,
                                 RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
                                 RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
@@ -296,10 +296,10 @@ void open_write_vector_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
 
 
             /*if requested set the Mask on */
             /*if requested set the Mask on */
             if (param.mask->answer) {
             if (param.mask->answer) {
-                if (Rast3d_maskFileExists()) {
+                if (Rast3d_mask_file_exists()) {
                     changemask[i] = 0;
                     changemask[i] = 0;
-                    if (Rast3d_maskIsOff(mapvect)) {
-                        Rast3d_maskOn(mapvect);
+                    if (Rast3d_mask_is_off(mapvect)) {
+                        Rast3d_mask_on(mapvect);
                         changemask[i] = 1;
                         changemask[i] = 1;
                     }
                     }
                 }
                 }
@@ -328,13 +328,13 @@ void open_write_vector_maps(input_maps * in, RASTER3D_Region region, FILE * fp,
 
 
             /*We set the Mask off, if it was off before */
             /*We set the Mask off, if it was off before */
             if (param.mask->answer) {
             if (param.mask->answer) {
-                if (Rast3d_maskFileExists())
-                    if (Rast3d_maskIsOn(mapvect) && changemask[i])
-                        Rast3d_maskOff(mapvect);
+                if (Rast3d_mask_file_exists())
+                    if (Rast3d_mask_is_on(mapvect) && changemask[i])
+                        Rast3d_mask_off(mapvect);
             }
             }
 
 
             /* Close the 3d raster map */
             /* Close the 3d raster map */
-            if (!Rast3d_closeCell(mapvect)) {
+            if (!Rast3d_close_cell(mapvect)) {
                 fatal_error(_("Error closing g3d vector map."), in);
                 fatal_error(_("Error closing g3d vector map."), in);
             }
             }
             /*Set the pointer to null so we know later that these files are already closed */
             /*Set the pointer to null so we know later that these files are already closed */
@@ -423,8 +423,8 @@ int main(int argc, char *argv[])
         fp = stdout;
         fp = stdout;
 
 
     /* Figure out the region from the map */
     /* Figure out the region from the map */
-    Rast3d_initDefaults();
-    Rast3d_getWindow(&region);
+    Rast3d_init_defaults();
+    Rast3d_get_window(&region);
 
 
     /*initiate the input mpas structure */
     /*initiate the input mpas structure */
     in = create_input_maps_struct();
     in = create_input_maps_struct();
@@ -503,7 +503,7 @@ int main(int argc, char *argv[])
 
 
             /*Open the map */
             /*Open the map */
             in->map =
             in->map =
-                Rast3d_openCellOld(param.input->answers[i],
+                Rast3d_open_cell_old(param.input->answers[i],
                                 G_find_grid3(param.input->answers[i], ""),
                                 G_find_grid3(param.input->answers[i], ""),
                                 &region, RASTER3D_TILE_SAME_AS_FILE,
                                 &region, RASTER3D_TILE_SAME_AS_FILE,
                                 RASTER3D_USE_CACHE_DEFAULT);
                                 RASTER3D_USE_CACHE_DEFAULT);
@@ -515,10 +515,10 @@ int main(int argc, char *argv[])
 
 
             /*if requested set the Mask on */
             /*if requested set the Mask on */
             if (param.mask->answer) {
             if (param.mask->answer) {
-                if (Rast3d_maskFileExists()) {
+                if (Rast3d_mask_file_exists()) {
                     changemask = 0;
                     changemask = 0;
-                    if (Rast3d_maskIsOff(in->map)) {
-                        Rast3d_maskOn(in->map);
+                    if (Rast3d_mask_is_off(in->map)) {
+                        Rast3d_mask_on(in->map);
                         changemask = 1;
                         changemask = 1;
                     }
                     }
                 }
                 }
@@ -529,13 +529,13 @@ int main(int argc, char *argv[])
 
 
             /*We set the Mask off, if it was off before */
             /*We set the Mask off, if it was off before */
             if (param.mask->answer) {
             if (param.mask->answer) {
-                if (Rast3d_maskFileExists())
-                    if (Rast3d_maskIsOn(in->map) && changemask)
-                        Rast3d_maskOff(in->map);
+                if (Rast3d_mask_file_exists())
+                    if (Rast3d_mask_is_on(in->map) && changemask)
+                        Rast3d_mask_off(in->map);
             }
             }
 
 
             /* Close the 3d raster map */
             /* Close the 3d raster map */
-            if (!Rast3d_closeCell(in->map)) {
+            if (!Rast3d_close_cell(in->map)) {
                 in->map = NULL;
                 in->map = NULL;
                 fatal_error(_("Error closing 3d raster map, the VTK file may be incomplete."),
                 fatal_error(_("Error closing 3d raster map, the VTK file may be incomplete."),
                             in);
                             in);

+ 11 - 11
raster3d/r3.out.vtk/writeVTKData.c

@@ -79,14 +79,14 @@ double get_g3d_raster_value_as_double(void *map, int x, int y, int z,
     double dvalue;
     double dvalue;
 
 
     if (type == FCELL_TYPE) {
     if (type == FCELL_TYPE) {
-        Rast3d_getValue(map, x, y, z, &fvalue, type);
-        if (Rast3d_isNullValueNum(&fvalue, FCELL_TYPE))
+        Rast3d_get_value(map, x, y, z, &fvalue, type);
+        if (Rast3d_is_null_value_num(&fvalue, FCELL_TYPE))
             val = nullval;
             val = nullval;
         else
         else
             val = (double) fvalue;
             val = (double) fvalue;
     } else {
     } else {
-        Rast3d_getValue(map, x, y, z, &dvalue, type);
-        if (Rast3d_isNullValueNum(&dvalue, DCELL_TYPE))
+        Rast3d_get_value(map, x, y, z, &dvalue, type);
+        if (Rast3d_is_null_value_num(&dvalue, DCELL_TYPE))
             val = nullval;
             val = nullval;
         else
         else
             val = dvalue;
             val = dvalue;
@@ -338,7 +338,7 @@ void write_vtk_data(FILE * fp, void *map, RASTER3D_Region region, char *varname,
     fprintf(fp, "SCALARS %s float 1\n", varname);
     fprintf(fp, "SCALARS %s float 1\n", varname);
     fprintf(fp, "LOOKUP_TABLE default\n");
     fprintf(fp, "LOOKUP_TABLE default\n");
 
 
-    typeIntern = Rast3d_tileTypeMap(map);
+    typeIntern = Rast3d_tile_type_map(map);
 
 
     percentage = 0;
     percentage = 0;
 
 
@@ -398,9 +398,9 @@ void write_vtk_rgb_data(void *map_r, void *map_g, void *map_b,
     cols = region.cols;
     cols = region.cols;
     depths = region.depths;
     depths = region.depths;
 
 
-    typeIntern[0] = Rast3d_tileTypeMap(map_r);
-    typeIntern[1] = Rast3d_tileTypeMap(map_g);
-    typeIntern[2] = Rast3d_tileTypeMap(map_b);
+    typeIntern[0] = Rast3d_tile_type_map(map_r);
+    typeIntern[1] = Rast3d_tile_type_map(map_g);
+    typeIntern[2] = Rast3d_tile_type_map(map_b);
 
 
     percentage = 0;
     percentage = 0;
 
 
@@ -473,9 +473,9 @@ void write_vtk_vector_data(void *map_x, void *map_y, void *map_z,
     cols = region.cols;
     cols = region.cols;
     depths = region.depths;
     depths = region.depths;
 
 
-    typeIntern[0] = Rast3d_tileTypeMap(map_x);
-    typeIntern[1] = Rast3d_tileTypeMap(map_y);
-    typeIntern[2] = Rast3d_tileTypeMap(map_z);
+    typeIntern[0] = Rast3d_tile_type_map(map_x);
+    typeIntern[1] = Rast3d_tile_type_map(map_y);
+    typeIntern[2] = Rast3d_tile_type_map(map_z);
 
 
     percentage = 0;
     percentage = 0;
 
 

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

@@ -50,8 +50,8 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
 
 
     /* Close files and exit */
     /* Close files and exit */
     if (map != NULL) {
     if (map != NULL) {
-        if (!Rast3d_closeCell(map))
-            Rast3d_fatalError(_("Unable to close the 3d raster map"));
+        if (!Rast3d_close_cell(map))
+            Rast3d_fatal_error(_("Unable to close the 3d raster map"));
     }
     }
 
 
     if (fd != NULL) {
     if (fd != NULL) {
@@ -59,7 +59,7 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
             Rast_unopen(fd[i]);
             Rast_unopen(fd[i]);
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
     exit(EXIT_FAILURE);
     exit(EXIT_FAILURE);
 
 
 }
 }
@@ -115,29 +115,29 @@ int main(int argc, char *argv[])
     mapset = G_find_grid3(param.input->answer, "");
     mapset = G_find_grid3(param.input->answer, "");
     
     
     if (mapset == NULL)
     if (mapset == NULL)
-        Rast3d_fatalError(_("3d raster map <%s> not found"),
+        Rast3d_fatal_error(_("3d raster map <%s> not found"),
                        param.input->answer);
                        param.input->answer);
 
 
     /*Set the defaults */
     /*Set the defaults */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
     
     
     if(!param.cache->answer)
     if(!param.cache->answer)
-        map = Rast3d_openCellOld(param.input->answer, mapset, RASTER3D_DEFAULT_WINDOW, 
+        map = Rast3d_open_cell_old(param.input->answer, mapset, RASTER3D_DEFAULT_WINDOW, 
                           RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
                           RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
     else
     else
-        map = Rast3d_openCellOld(param.input->answer, mapset, RASTER3D_DEFAULT_WINDOW, 
+        map = Rast3d_open_cell_old(param.input->answer, mapset, RASTER3D_DEFAULT_WINDOW, 
                           RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
                           RASTER3D_TILE_SAME_AS_FILE, RASTER3D_NO_CACHE);
 
 
     if (map == NULL)
     if (map == NULL)
-        Rast3d_fatalError(_("Unable to open 3d raster map <%s>"),
+        Rast3d_fatal_error(_("Unable to open 3d raster map <%s>"),
                        param.input->answer);
                        param.input->answer);
 
 
     /* Get the tile dimension */
     /* Get the tile dimension */
-    Rast3d_getTileDimension(&tileX, &tileY, &tileZ);    
+    Rast3d_get_tile_dimension(&tileX, &tileY, &tileZ);    
     if (strcmp(param.tiling->answer, "default") != 0) {
     if (strcmp(param.tiling->answer, "default") != 0) {
 	if (sscanf(param.tiling->answer, "%dx%dx%d",
 	if (sscanf(param.tiling->answer, "%dx%dx%d",
 		   &tileX, &tileY, &tileZ) != 3) {
 		   &tileX, &tileY, &tileZ) != 3) {
-	    Rast3d_fatalError(_("Rast3d_getStandard3dParams: tile dimension value invalid"));
+	    Rast3d_fatal_error(_("Rast3d_get_standard3d_params: tile dimension value invalid"));
 	}
 	}
     }
     }
     
     
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
     Rast3d_retile(map, param.output->answer, tileX, tileY, tileZ);
     Rast3d_retile(map, param.output->answer, tileX, tileY, tileZ);
 
 
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
         fatal_error(map, NULL, 0, _("Error closing 3d raster map"));
         fatal_error(map, NULL, 0, _("Error closing 3d raster map"));
 
 
     map = NULL;
     map = NULL;

+ 3 - 3
raster3d/r3.showdspf/main_ogl.c

@@ -163,7 +163,7 @@ int main(int argc, char **argv)
 	/* opens grid3 file to read in original data 
 	/* opens grid3 file to read in original data 
 	 */
 	 */
 
 
-	Rast3d_setErrorFun(Rast3d_printError);
+	Rast3d_set_error_fun(Rast3d_print_error);
 
 
 	/* open g3 file for reading */
 	/* open g3 file for reading */
 	if (NULL == (mapset = G_find_file2("grid3", g3->answer, ""))) {
 	if (NULL == (mapset = G_find_file2("grid3", g3->answer, ""))) {
@@ -171,7 +171,7 @@ int main(int argc, char **argv)
 	    G_fatal_error(buff);
 	    G_fatal_error(buff);
 	}
 	}
 
 
-	g3map = Rast3d_openCellOld(g3->answer, mapset, RASTER3D_DEFAULT_WINDOW,
+	g3map = Rast3d_open_cell_old(g3->answer, mapset, RASTER3D_DEFAULT_WINDOW,
 				RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 				RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
 	if (NULL == g3map) {
 	if (NULL == g3map) {
@@ -184,7 +184,7 @@ int main(int argc, char **argv)
 	    G_fatal_error(buff);
 	    G_fatal_error(buff);
 	}
 	}
 	Rast3d_range_min_max(g3map, &dmin, &dmax);
 	Rast3d_range_min_max(g3map, &dmin, &dmax);
-	Rast3d_getRegionStructMap(g3map, &g3reg);
+	Rast3d_get_region_struct_map(g3map, &g3reg);
 
 
 	viz_make_header(&G3header, dmin, dmax, &g3reg);
 	viz_make_header(&G3header, dmin, dmax, &g3reg);
 	init_caps(&D_Cap, &g3reg);
 	init_caps(&D_Cap, &g3reg);

+ 1 - 1
raster3d/r3.showdspf/r3_data.c

@@ -10,7 +10,7 @@ int r3read_level(g3map, Headfax, data, n_lev)
      int n_lev;
      int n_lev;
 {
 {
 
 
-    Rast3d_getBlock(g3map, 0, 0, n_lev,
+    Rast3d_get_block(g3map, 0, 0, n_lev,
 		 Headfax->xdim, Headfax->ydim, 1, (char *)data, FCELL_TYPE);
 		 Headfax->xdim, Headfax->ydim, 1, (char *)data, FCELL_TYPE);
 
 
     return 0;
     return 0;

+ 14 - 14
raster3d/r3.stats/main.c

@@ -591,10 +591,10 @@ int main(int argc, char *argv[])
 
 
 
 
     /*Set the defaults */
     /*Set the defaults */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /*get the current region */
     /*get the current region */
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     cols = region.cols;
     cols = region.cols;
     rows = region.rows;
     rows = region.rows;
@@ -609,16 +609,16 @@ int main(int argc, char *argv[])
     infile = inputfile->answer;
     infile = inputfile->answer;
 
 
     if (NULL == G_find_grid3(infile, ""))
     if (NULL == G_find_grid3(infile, ""))
-	Rast3d_fatalError(_("3D raster map <%s> not found"), infile);
+	Rast3d_fatal_error(_("3D raster map <%s> not found"), infile);
 
 
     map =
     map =
-	Rast3d_openCellOld(infile, G_find_grid3(infile, ""), &region,
+	Rast3d_open_cell_old(infile, G_find_grid3(infile, ""), &region,
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 			RASTER3D_TILE_SAME_AS_FILE, RASTER3D_USE_CACHE_DEFAULT);
 
 
     if (map == NULL)
     if (map == NULL)
-	Rast3d_fatalError(_("Unable to open 3D raster map <%s>"), infile);
+	Rast3d_fatal_error(_("Unable to open 3D raster map <%s>"), infile);
 
 
-    map_type = Rast3d_tileTypeMap(map);
+    map_type = Rast3d_tile_type_map(map);
 
 
     /* calculate statistics for groups of equal values */
     /* calculate statistics for groups of equal values */
     if ((equal->answer)) {
     if ((equal->answer)) {
@@ -631,8 +631,8 @@ int main(int argc, char *argv[])
 	    for (y = 0; y < rows; y++) {
 	    for (y = 0; y < rows; y++) {
 		for (x = 0; x < cols; x++) {
 		for (x = 0; x < cols; x++) {
 		    if (map_type == FCELL_TYPE) {
 		    if (map_type == FCELL_TYPE) {
-			Rast3d_getValue(map, x, y, z, &val_f, map_type);
-			if (!Rast3d_isNullValueNum(&val_f, map_type)) {
+			Rast3d_get_value(map, x, y, z, &val_f, map_type);
+			if (!Rast3d_is_null_value_num(&val_f, map_type)) {
 			    /*the first entry */
 			    /*the first entry */
 			    if (eqvals == NULL)
 			    if (eqvals == NULL)
 				eqvals =
 				eqvals =
@@ -645,8 +645,8 @@ int main(int argc, char *argv[])
 			}
 			}
 		    }
 		    }
 		    else if (map_type == DCELL_TYPE) {
 		    else if (map_type == DCELL_TYPE) {
-			Rast3d_getValue(map, x, y, z, &val_d, map_type);
-			if (!Rast3d_isNullValueNum(&val_d, map_type)) {
+			Rast3d_get_value(map, x, y, z, &val_d, map_type);
+			if (!Rast3d_is_null_value_num(&val_d, map_type)) {
 			    /*the first entry */
 			    /*the first entry */
 			    if (eqvals == NULL)
 			    if (eqvals == NULL)
 				eqvals =
 				eqvals =
@@ -690,15 +690,15 @@ int main(int argc, char *argv[])
 	    for (y = 0; y < rows; y++) {
 	    for (y = 0; y < rows; y++) {
 		for (x = 0; x < cols; x++) {
 		for (x = 0; x < cols; x++) {
 		    if (map_type == FCELL_TYPE) {
 		    if (map_type == FCELL_TYPE) {
-			Rast3d_getValue(map, x, y, z, &val_f, map_type);
-			if (!Rast3d_isNullValueNum(&val_f, map_type)) {
+			Rast3d_get_value(map, x, y, z, &val_f, map_type);
+			if (!Rast3d_is_null_value_num(&val_f, map_type)) {
 			    check_range_value(stats, (double)val_f);
 			    check_range_value(stats, (double)val_f);
 			    n++;
 			    n++;
 			}
 			}
 		    }
 		    }
 		    else if (map_type == DCELL_TYPE) {
 		    else if (map_type == DCELL_TYPE) {
-			Rast3d_getValue(map, x, y, z, &val_d, map_type);
-			if (!Rast3d_isNullValueNum(&val_d, map_type)) {
+			Rast3d_get_value(map, x, y, z, &val_d, map_type);
+			if (!Rast3d_is_null_value_num(&val_d, map_type)) {
 			    check_range_value(stats, val_d);
 			    check_range_value(stats, val_d);
 			    n++;
 			    n++;
 			}
 			}

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

@@ -51,8 +51,8 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
 
 
     /* Close files and exit */
     /* Close files and exit */
     if (map != NULL) {
     if (map != NULL) {
-        if (!Rast3d_closeCell(map))
-            Rast3d_fatalError(_("Unable to close 3Draster map"));
+        if (!Rast3d_close_cell(map))
+            Rast3d_fatal_error(_("Unable to close 3Draster map"));
     }
     }
 
 
     if (fd != NULL) {
     if (fd != NULL) {
@@ -60,7 +60,7 @@ void fatal_error(void *map, int *fd, int depths, char *errorMsg)
             Rast_unopen(fd[i]);
             Rast_unopen(fd[i]);
     }
     }
 
 
-    Rast3d_fatalError(errorMsg);
+    Rast3d_fatal_error(errorMsg);
     exit(EXIT_FAILURE);
     exit(EXIT_FAILURE);
 
 
 }
 }
@@ -118,7 +118,7 @@ void g3d_to_raster(void *map, RASTER3D_Region region, int *fd)
     G_debug(2, "g3d_to_raster: Writing %i raster maps with %i rows %i cols.",
     G_debug(2, "g3d_to_raster: Writing %i raster maps with %i rows %i cols.",
             depths, rows, cols);
             depths, rows, cols);
 
 
-    typeIntern = Rast3d_tileTypeMap(map);
+    typeIntern = Rast3d_tile_type_map(map);
 
 
     if (typeIntern == FCELL_TYPE)
     if (typeIntern == FCELL_TYPE)
         fcell = Rast_allocate_f_buf();
         fcell = Rast_allocate_f_buf();
@@ -134,14 +134,14 @@ void g3d_to_raster(void *map, RASTER3D_Region region, int *fd)
 
 
             for (x = 0; x < cols; x++) {
             for (x = 0; x < cols; x++) {
                 if (typeIntern == FCELL_TYPE) {
                 if (typeIntern == FCELL_TYPE) {
-                    Rast3d_getValue(map, x, y, z, &f1, typeIntern);
-                    if (Rast3d_isNullValueNum(&f1, FCELL_TYPE))
+                    Rast3d_get_value(map, x, y, z, &f1, typeIntern);
+                    if (Rast3d_is_null_value_num(&f1, FCELL_TYPE))
                         Rast_set_null_value(&fcell[x], 1, FCELL_TYPE);
                         Rast_set_null_value(&fcell[x], 1, FCELL_TYPE);
                     else
                     else
                         fcell[x] = f1;
                         fcell[x] = f1;
                 } else {
                 } else {
-                    Rast3d_getValue(map, x, y, z, &d1, typeIntern);
-                    if (Rast3d_isNullValueNum(&d1, DCELL_TYPE))
+                    Rast3d_get_value(map, x, y, z, &d1, typeIntern);
+                    if (Rast3d_is_null_value_num(&d1, DCELL_TYPE))
                         Rast_set_null_value(&dcell[x], 1, DCELL_TYPE);
                         Rast_set_null_value(&dcell[x], 1, DCELL_TYPE);
                     else
                     else
                         dcell[x] = d1;
                         dcell[x] = d1;
@@ -218,46 +218,46 @@ int main(int argc, char *argv[])
     G_debug(3, _("Open 3D raster map <%s>"), param.input->answer);
     G_debug(3, _("Open 3D raster map <%s>"), param.input->answer);
 
 
     if (NULL == G_find_grid3(param.input->answer, ""))
     if (NULL == G_find_grid3(param.input->answer, ""))
-        Rast3d_fatalError(_("3D raster map <%s> not found"),
+        Rast3d_fatal_error(_("3D raster map <%s> not found"),
                        param.input->answer);
                        param.input->answer);
 
 
     /*Set the defaults */
     /*Set the defaults */
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
     /*Set the resolution of the output maps */
     /*Set the resolution of the output maps */
     if (param.res->answer) {
     if (param.res->answer) {
 
 
         /*Open the map with current region */
         /*Open the map with current region */
-        map = Rast3d_openCellOld(param.input->answer,
+        map = Rast3d_open_cell_old(param.input->answer,
                               G_find_grid3(param.input->answer, ""),
                               G_find_grid3(param.input->answer, ""),
                               RASTER3D_DEFAULT_WINDOW, RASTER3D_TILE_SAME_AS_FILE,
                               RASTER3D_DEFAULT_WINDOW, RASTER3D_TILE_SAME_AS_FILE,
                               RASTER3D_USE_CACHE_DEFAULT);
                               RASTER3D_USE_CACHE_DEFAULT);
         if (map == NULL)
         if (map == NULL)
-            Rast3d_fatalError(_("Error opening 3d raster map <%s>"),
+            Rast3d_fatal_error(_("Error opening 3d raster map <%s>"),
                            param.input->answer);
                            param.input->answer);
 
 
 
 
         /*Get the region of the map */
         /*Get the region of the map */
-        Rast3d_getRegionStructMap(map, &region);
+        Rast3d_get_region_struct_map(map, &region);
         /*set this region as current 3d window for map */
         /*set this region as current 3d window for map */
-        Rast3d_setWindowMap(map, &region);
+        Rast3d_set_window_map(map, &region);
         /*Set the 2d region appropriate */
         /*Set the 2d region appropriate */
-        Rast3d_extract2dRegion(&region, &region2d);
+        Rast3d_extract2d_region(&region, &region2d);
         /*Make the new 2d region the default */
         /*Make the new 2d region the default */
         Rast_set_window(&region2d);
         Rast_set_window(&region2d);
 
 
     } else {
     } else {
         /* Figure out the region from the map */
         /* Figure out the region from the map */
-        Rast3d_getWindow(&region);
+        Rast3d_get_window(&region);
 
 
         /*Open the 3d raster map */
         /*Open the 3d raster map */
-        map = Rast3d_openCellOld(param.input->answer,
+        map = Rast3d_open_cell_old(param.input->answer,
                               G_find_grid3(param.input->answer, ""),
                               G_find_grid3(param.input->answer, ""),
                               &region, RASTER3D_TILE_SAME_AS_FILE,
                               &region, RASTER3D_TILE_SAME_AS_FILE,
                               RASTER3D_USE_CACHE_DEFAULT);
                               RASTER3D_USE_CACHE_DEFAULT);
 
 
         if (map == NULL)
         if (map == NULL)
-            Rast3d_fatalError(_("Error opening 3D raster map <%s>"),
+            Rast3d_fatal_error(_("Error opening 3D raster map <%s>"),
                            param.input->answer);
                            param.input->answer);
     }
     }
 
 
@@ -275,16 +275,16 @@ int main(int argc, char *argv[])
         region.rows = region2d.rows;
         region.rows = region2d.rows;
         region.cols = region2d.cols;
         region.cols = region2d.cols;
         
         
-        Rast3d_adjustRegion(&region);
+        Rast3d_adjust_region(&region);
         
         
-        Rast3d_setWindowMap(map, &region);
+        Rast3d_set_window_map(map, &region);
     }
     }
 
 
     /* save the input map region for later use (history meta-data) */
     /* save the input map region for later use (history meta-data) */
-    Rast3d_getRegionStructMap(map, &inputmap_bounds);
+    Rast3d_get_region_struct_map(map, &inputmap_bounds);
 
 
     /*Get the output type */
     /*Get the output type */
-    output_type = Rast3d_fileTypeMap(map);
+    output_type = Rast3d_file_type_map(map);
 
 
 
 
     /*prepare the filehandler */
     /*prepare the filehandler */
@@ -316,10 +316,10 @@ int main(int argc, char *argv[])
 
 
     /*if requested set the Mask on */
     /*if requested set the Mask on */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists()) {
+        if (Rast3d_mask_file_exists()) {
             changemask = 0;
             changemask = 0;
-            if (Rast3d_maskIsOff(map)) {
-                Rast3d_maskOn(map);
+            if (Rast3d_mask_is_off(map)) {
+                Rast3d_mask_on(map);
                 changemask = 1;
                 changemask = 1;
             }
             }
         }
         }
@@ -364,9 +364,9 @@ int main(int argc, char *argv[])
 
 
     /*We set the Mask off, if it was off before */
     /*We set the Mask off, if it was off before */
     if (param.mask->answer) {
     if (param.mask->answer) {
-        if (Rast3d_maskFileExists())
-            if (Rast3d_maskIsOn(map) && changemask)
-                Rast3d_maskOff(map);
+        if (Rast3d_mask_file_exists())
+            if (Rast3d_mask_is_on(map) && changemask)
+                Rast3d_mask_off(map);
     }
     }
 
 
 
 
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
         G_free(fd);
         G_free(fd);
 
 
     /* Close files and exit */
     /* Close files and exit */
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
         fatal_error(map, NULL, 0, _("Error closing 3d raster map"));
         fatal_error(map, NULL, 0, _("Error closing 3d raster map"));
 
 
     map = NULL;
     map = NULL;

+ 1 - 1
vector/v.colors/main.c

@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
             if (!cmapset)
             if (!cmapset)
                 G_fatal_error(_("3D raster map <%s> not found"), cmap);
                 G_fatal_error(_("3D raster map <%s> not found"), cmap);
 
 
-            if (Rast3d_readColors(cmap, cmapset, &colors) < 0)
+            if (Rast3d_read_colors(cmap, cmapset, &colors) < 0)
                 G_fatal_error(_("Unable to read color table for 3D raster map <%s>"), cmap);
                 G_fatal_error(_("Unable to read color table for 3D raster map <%s>"), cmap);
         }
         }
     }
     }

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

@@ -64,9 +64,9 @@ int main(int argc, char *argv[])
     if (G_parser(argc, argv))
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
     
     
-    Rast3d_initDefaults();
+    Rast3d_init_defaults();
 
 
-    Rast3d_getWindow(&region);
+    Rast3d_get_window(&region);
 
 
     Vect_set_open_level(2);
     Vect_set_open_level(2);
     Vect_open_old2(&Map, in_opt->answer, "", field_opt->answer);
     Vect_open_old2(&Map, in_opt->answer, "", field_opt->answer);
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
 
 
     db_close_database_shutdown_driver(Driver);
     db_close_database_shutdown_driver(Driver);
 
 
-    map = Rast3d_openNewOptTileSize(out_opt->answer,
+    map = Rast3d_open_new_opt_tile_size(out_opt->answer,
 			  RASTER3D_USE_CACHE_DEFAULT, &region, FCELL_TYPE, 32);
 			  RASTER3D_USE_CACHE_DEFAULT, &region, FCELL_TYPE, 32);
 
 
     if (map == NULL)
     if (map == NULL)
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
 	    continue;
 	    continue;
 	}
 	}
         /* Check if the coordinates are located in the cube */
         /* Check if the coordinates are located in the cube */
-	if (!Rast3d_isValidLocation(&(map->region), Points->y[0], Points->x[0], Points->z[0])) {
+	if (!Rast3d_is_valid_location(&(map->region), Points->y[0], Points->x[0], Points->z[0])) {
 	    continue;
 	    continue;
 	}
 	}
         /* Convert the north, east and top coorindate into row, col and depth*/
         /* Convert the north, east and top coorindate into row, col and depth*/
@@ -145,12 +145,12 @@ int main(int argc, char *argv[])
 
 
 	G_debug(3, "col,row,depth,val: %d %d %d %f", col, row, depth, value);
 	G_debug(3, "col,row,depth,val: %d %d %d %f", col, row, depth, value);
 
 
-	Rast3d_putFloat(map, col, row, depth, (float)value);
+	Rast3d_put_float(map, col, row, depth, (float)value);
     }
     }
 
 
     Vect_close(&Map);
     Vect_close(&Map);
 
 
-    if (!Rast3d_closeCell(map))
+    if (!Rast3d_close_cell(map))
 	G_fatal_error(_("Unable to close new 3d raster map"));
 	G_fatal_error(_("Unable to close new 3d raster map"));
     
     
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 2 - 2
vector/v.vol.rst/main.c

@@ -449,8 +449,8 @@ int main(int argc, char *argv[])
 
 
     G_get_set_window(&cellhd);
     G_get_set_window(&cellhd);
 
 
-    Rast3d_getWindow(&current_region);
-    Rast3d_readWindow(&current_region, NULL);
+    Rast3d_get_window(&current_region);
+    Rast3d_read_window(&current_region, NULL);
 
 
     ew_res = current_region.ew_res;
     ew_res = current_region.ew_res;
     ns_res = current_region.ns_res;
     ns_res = current_region.ns_res;

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

@@ -423,7 +423,7 @@ int OUTGR()
   /*** Write elevation results ***/
   /*** Write elevation results ***/
     if (outz != NULL) {
     if (outz != NULL) {
 
 
-	cf1 = Rast3d_openNewOptTileSize(outz, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf1 = Rast3d_open_new_opt_tile_size(outz, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf1 == NULL) {
 	if (cf1 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", outz);
 	    sprintf(buff, "Can't open %s for writing ", outz);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -449,8 +449,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf1, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf1, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -464,7 +464,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf1) == 0) {
+	if (Rast3d_close_cell(cf1) == 0) {
 	    sprintf(buff, "Error closing output file %s ", outz);
 	    sprintf(buff, "Error closing output file %s ", outz);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}
@@ -473,7 +473,7 @@ int OUTGR()
   /*** Write out the gradient results ***/
   /*** Write out the gradient results ***/
     if (gradient != NULL) {
     if (gradient != NULL) {
 
 
-	cf2 = Rast3d_openNewOptTileSize(gradient, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf2 = Rast3d_open_new_opt_tile_size(gradient, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf2 == NULL) {
 	if (cf2 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", gradient);
 	    sprintf(buff, "Can't open %s for writing ", gradient);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -499,8 +499,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf2, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf2, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -514,7 +514,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf2) == 0) {
+	if (Rast3d_close_cell(cf2) == 0) {
 	    sprintf(buff, "Error closing output file %s ", gradient);
 	    sprintf(buff, "Error closing output file %s ", gradient);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}
@@ -523,7 +523,7 @@ int OUTGR()
   /*** Write out aspect1 results ***/
   /*** Write out aspect1 results ***/
     if (aspect1 != NULL) {
     if (aspect1 != NULL) {
 
 
-	cf3 = Rast3d_openNewOptTileSize(aspect1, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf3 = Rast3d_open_new_opt_tile_size(aspect1, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf3 == NULL) {
 	if (cf3 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", aspect1);
 	    sprintf(buff, "Can't open %s for writing ", aspect1);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -549,8 +549,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf3, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf3, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -564,7 +564,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf3) == 0) {
+	if (Rast3d_close_cell(cf3) == 0) {
 	    sprintf(buff, "Error closing output file %s ", aspect1);
 	    sprintf(buff, "Error closing output file %s ", aspect1);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}
@@ -573,7 +573,7 @@ int OUTGR()
   /*** Write out aspect2 results ***/
   /*** Write out aspect2 results ***/
     if (aspect2 != NULL) {
     if (aspect2 != NULL) {
 
 
-	cf4 = Rast3d_openNewOptTileSize(aspect2, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf4 = Rast3d_open_new_opt_tile_size(aspect2, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf4 == NULL) {
 	if (cf4 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", aspect2);
 	    sprintf(buff, "Can't open %s for writing ", aspect2);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -599,8 +599,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf4, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf4, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -614,7 +614,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf4) == 0) {
+	if (Rast3d_close_cell(cf4) == 0) {
 	    sprintf(buff, "Error closing output file %s ", aspect2);
 	    sprintf(buff, "Error closing output file %s ", aspect2);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}
@@ -623,7 +623,7 @@ int OUTGR()
   /*** Write out ncurv results ***/
   /*** Write out ncurv results ***/
     if (ncurv != NULL) {
     if (ncurv != NULL) {
 
 
-	cf5 = Rast3d_openNewOptTileSize(ncurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf5 = Rast3d_open_new_opt_tile_size(ncurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf5 == NULL) {
 	if (cf5 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", ncurv);
 	    sprintf(buff, "Can't open %s for writing ", ncurv);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -649,8 +649,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf5, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf5, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -664,7 +664,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf5) == 0) {
+	if (Rast3d_close_cell(cf5) == 0) {
 	    sprintf(buff, "Error closing output file %s ", ncurv);
 	    sprintf(buff, "Error closing output file %s ", ncurv);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}
@@ -673,7 +673,7 @@ int OUTGR()
   /*** Write out gcurv results ***/
   /*** Write out gcurv results ***/
     if (gcurv != NULL) {
     if (gcurv != NULL) {
 
 
-	cf6 = Rast3d_openNewOptTileSize(gcurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf6 = Rast3d_open_new_opt_tile_size(gcurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf6 == NULL) {
 	if (cf6 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", gcurv);
 	    sprintf(buff, "Can't open %s for writing ", gcurv);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -699,8 +699,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf6, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf6, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -714,7 +714,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf6) == 0) {
+	if (Rast3d_close_cell(cf6) == 0) {
 	    sprintf(buff, "Error closing output file %s ", gcurv);
 	    sprintf(buff, "Error closing output file %s ", gcurv);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}
@@ -723,7 +723,7 @@ int OUTGR()
   /*** Write mcurv results ***/
   /*** Write mcurv results ***/
     if (mcurv != NULL) {
     if (mcurv != NULL) {
 
 
-	cf7 = Rast3d_openNewOptTileSize(mcurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
+	cf7 = Rast3d_open_new_opt_tile_size(mcurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf7 == NULL) {
 	if (cf7 == NULL) {
 	    sprintf(buff, "Can't open %s for writing ", mcurv);
 	    sprintf(buff, "Can't open %s for writing ", mcurv);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
@@ -749,8 +749,8 @@ int OUTGR()
 			bmask = 1;
 			bmask = 1;
 		    value = data[cnt];
 		    value = data[cnt];
 		    if (!bmask)
 		    if (!bmask)
-			Rast3d_setNullValue(&value, 1, FCELL_TYPE);
-		    if (Rast3d_putFloat(cf7, x, y, iarc, value) == 0) {
+			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
+		    if (Rast3d_put_float(cf7, x, y, iarc, value) == 0) {
 			sprintf(buff,
 			sprintf(buff,
 				"Error writing cell (%d,%d,%d) with value %f",
 				"Error writing cell (%d,%d,%d) with value %f",
 				x, y, iarc, value);
 				x, y, iarc, value);
@@ -764,7 +764,7 @@ int OUTGR()
 	}
 	}
 
 
 	/* Close the file */
 	/* Close the file */
-	if (Rast3d_closeCell(cf7) == 0) {
+	if (Rast3d_close_cell(cf7) == 0) {
 	    sprintf(buff, "Error closing output file %s ", mcurv);
 	    sprintf(buff, "Error closing output file %s ", mcurv);
 	    clean_fatal_error(buff);
 	    clean_fatal_error(buff);
 	}
 	}