Преглед на файлове

rasterlib: fns from opencell.c renamed, see
http://trac.osgeo.org/grass/wiki/Grass7/RasterLib


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

Martin Landa преди 16 години
родител
ревизия
a9e9d10f82
променени са 100 файла, в които са добавени 295 реда и са изтрити 295 реда
  1. 1 1
      display/d.colors/main.c
  2. 1 1
      display/d.colortable/main.c
  3. 3 3
      display/d.his/main.c
  4. 1 1
      display/d.histogram/get_stats.c
  5. 1 1
      display/d.legend/main.c
  6. 2 2
      display/d.nviz/main.c
  7. 2 2
      display/d.profile/main.c
  8. 4 4
      display/d.rast.arrow/main.c
  9. 2 2
      display/d.rast.num/main.c
  10. 1 1
      display/d.rast/display.c
  11. 1 1
      display/d.rast/main.c
  12. 2 2
      display/d.rgb/main.c
  13. 1 1
      display/d.what.rast/opencell.c
  14. 1 1
      display/d.what.rast/what.c
  15. 4 4
      doc/raster/r.example/main.c
  16. 2 2
      general/g.region/zoom.c
  17. 4 4
      imagery/i.albedo/main.c
  18. 5 5
      imagery/i.atcorr/main.cpp
  19. 7 7
      imagery/i.biomass/main.c
  20. 2 2
      imagery/i.cca/main.c
  21. 1 1
      imagery/i.class/band_files.c
  22. 1 1
      imagery/i.class/draw_cell.c
  23. 1 1
      imagery/i.class/signature.c
  24. 1 1
      imagery/i.cluster/open_files.c
  25. 4 4
      imagery/i.eb.eta/main.c
  26. 5 5
      imagery/i.eb.evapfr/main.c
  27. 5 5
      imagery/i.eb.h_SEBAL01/main.c
  28. 6 6
      imagery/i.eb.soilheatflux/main.c
  29. 2 2
      imagery/i.emissivity/main.c
  30. 10 10
      imagery/i.evapo.time_integration/main.c
  31. 3 3
      imagery/i.fft/main.c
  32. 2 2
      imagery/i.gensig/openfiles.c
  33. 2 2
      imagery/i.gensigset/openfiles.c
  34. 6 6
      imagery/i.his.rgb/openfiles.c
  35. 3 3
      imagery/i.ifft/main.c
  36. 2 2
      imagery/i.latlong/main.c
  37. 3 3
      imagery/i.maxlik/open.c
  38. 2 2
      imagery/i.modis.qc/main.c
  39. 7 7
      imagery/i.pca/main.c
  40. 1 1
      imagery/i.pca/support.c
  41. 1 1
      imagery/i.points/drawcell.c
  42. 2 2
      imagery/i.rectify/rectify.c
  43. 1 1
      imagery/i.rectify/write.c
  44. 6 6
      imagery/i.rgb.his/openfiles.c
  45. 2 2
      imagery/i.smap/opencell.c
  46. 3 3
      imagery/i.sunhours/main.c
  47. 7 7
      imagery/i.vi/main.c
  48. 1 1
      imagery/i.vpoints/drawcell.c
  49. 2 2
      imagery/i.zc/main.c
  50. 12 12
      include/raster.h
  51. 3 3
      lib/gpde/N_arrays_io.c
  52. 8 8
      lib/ogsf/Gs3.c
  53. 1 1
      lib/ogsf/gsd_legend.c
  54. 1 1
      lib/raster/auto_mask.c
  55. 2 2
      lib/raster/cats.c
  56. 1 1
      lib/raster/color_read.c
  57. 1 1
      lib/raster/gdal.c
  58. 1 1
      lib/raster/get_row_colr.c
  59. 24 24
      lib/raster/opencell.c
  60. 2 2
      lib/raster/put_row.c
  61. 1 1
      lib/raster/quant_io.c
  62. 1 1
      lib/raster/quant_rw.c
  63. 3 3
      lib/raster/range.c
  64. 1 1
      lib/rst/interp_float/input2d.c
  65. 6 6
      lib/rst/interp_float/output2d.c
  66. 6 6
      lib/rst/interp_float/resout2d.c
  67. 2 2
      ps/ps.map/outl_io.c
  68. 2 2
      ps/ps.map/ps_raster.c
  69. 1 1
      ps/ps.map/r_cell.c
  70. 1 1
      ps/ps.map/r_colortable.c
  71. 1 1
      ps/ps.map/r_group.c
  72. 1 1
      ps/ps.map/r_rgb.c
  73. 1 1
      raster/r.basins.fill/main.c
  74. 1 1
      raster/r.basins.fill/read_map.c
  75. 3 3
      raster/r.bitpattern/main.c
  76. 1 1
      raster/r.buffer/read_map.c
  77. 2 2
      raster/r.buffer/write_map.c
  78. 3 3
      raster/r.carve/main.c
  79. 1 1
      raster/r.category/cats.c
  80. 2 2
      raster/r.category/main.c
  81. 1 1
      raster/r.circle/main.c
  82. 2 2
      raster/r.clump/main.c
  83. 1 1
      raster/r.colors/main.c
  84. 2 2
      raster/r.colors/stats.c
  85. 3 3
      raster/r.composite/main.c
  86. 6 6
      raster/r.compress/main.c
  87. 1 1
      raster/r.contour/main.c
  88. 6 6
      raster/r.cost/main.c
  89. 1 1
      raster/r.covar/main.c
  90. 4 4
      raster/r.cross/main.c
  91. 2 2
      raster/r.describe/describe.c
  92. 4 4
      raster/r.distance/distance.c
  93. 1 1
      raster/r.distance/edges.c
  94. 6 6
      raster/r.drain/main.c
  95. 5 5
      raster/r.fill.dir/main.c
  96. 3 3
      raster/r.flow/io.c
  97. 3 3
      raster/r.grow.distance/main.c
  98. 3 3
      raster/r.grow/main.c
  99. 6 6
      raster/r.his/main.c
  100. 0 0
      raster/r.horizon/main.c

+ 1 - 1
display/d.colors/main.c

@@ -68,7 +68,7 @@ int main(int argc, char **argv)
 	G_fatal_error(msg);
 	G_fatal_error(msg);
     }
     }
 
 
-    if (Rast_raster_map_is_fp(map->answer, mapset)) {
+    if (Rast_map_is_fp(map->answer, mapset)) {
 	sprintf(buff,
 	sprintf(buff,
 		"Raster file [%s] is floating point! \nd.colors only works with integer maps",
 		"Raster file [%s] is floating point! \nd.colors only works with integer maps",
 		map->answer);
 		map->answer);

+ 1 - 1
display/d.colortable/main.c

@@ -97,7 +97,7 @@ int main(int argc, char **argv)
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
     map_name = opt1->answer;
     map_name = opt1->answer;
-    fp = Rast_raster_map_is_fp(map_name, "");
+    fp = Rast_map_is_fp(map_name, "");
 
 
     if (opt2->answer != NULL) {
     if (opt2->answer != NULL) {
 	new_colr = D_translate_color(opt2->answer);
 	new_colr = D_translate_color(opt2->answer);

+ 3 - 3
display/d.his/main.c

@@ -121,7 +121,7 @@ int main(int argc, char **argv)
     name_h = opt_h->answer;
     name_h = opt_h->answer;
 
 
     /* Make sure map is available */
     /* Make sure map is available */
-    if ((hue_file = Rast_open_cell_old(name_h, "")) == -1)
+    if ((hue_file = Rast_open_old(name_h, "")) == -1)
 	G_fatal_error(_("Unable to open raster map <%s>"), name_h);
 	G_fatal_error(_("Unable to open raster map <%s>"), name_h);
 
 
     hue_r = G_malloc(window.cols);
     hue_r = G_malloc(window.cols);
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
 	int_used = 1;
 	int_used = 1;
 
 
 	/* Make sure map is available */
 	/* Make sure map is available */
-	if ((int_file = Rast_open_cell_old(name_i, "")) == -1)
+	if ((int_file = Rast_open_old(name_i, "")) == -1)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name_i);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name_i);
 
 
 	int_r = G_malloc(window.cols);
 	int_r = G_malloc(window.cols);
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
 	sat_used = 1;
 	sat_used = 1;
 
 
 	/* Make sure map is available */
 	/* Make sure map is available */
-	if ((sat_file = Rast_open_cell_old(name_s, "")) == -1)
+	if ((sat_file = Rast_open_old(name_s, "")) == -1)
 	    G_fatal_error("Unable to open raster map <%s>", name_s);
 	    G_fatal_error("Unable to open raster map <%s>", name_s);
 
 
 	sat_r = G_malloc(window.cols);
 	sat_r = G_malloc(window.cols);

+ 1 - 1
display/d.histogram/get_stats.c

@@ -51,7 +51,7 @@ int get_stats(const char *mapname, struct stat_list *dist_stats,	/* linked list
 
 
     /* write stats to a temp file */
     /* write stats to a temp file */
     tempfile = G_tempfile();
     tempfile = G_tempfile();
-    is_fp = Rast_raster_map_is_fp(mapname, "");
+    is_fp = Rast_map_is_fp(mapname, "");
     if (is_fp) {
     if (is_fp) {
 	if (cat_ranges) {
 	if (cat_ranges) {
 	    if (Rast_read_cats(mapname, "", &cats) < 0)
 	    if (Rast_read_cats(mapname, "", &cats) < 0)

+ 1 - 1
display/d.legend/main.c

@@ -247,7 +247,7 @@ int main(int argc, char **argv)
     if (Rast_read_colors(map_name, "", &colors) == -1)
     if (Rast_read_colors(map_name, "", &colors) == -1)
 	G_fatal_error(_("Color file for <%s> not available"), map_name);
 	G_fatal_error(_("Color file for <%s> not available"), map_name);
 
 
-    fp = Rast_raster_map_is_fp(map_name, "");
+    fp = Rast_map_is_fp(map_name, "");
     if (fp && !use_catlist) {
     if (fp && !use_catlist) {
 	do_smooth = TRUE;
 	do_smooth = TRUE;
 	/* fprintf(stderr, "FP map found - switching gradient legend on\n"); */
 	/* fprintf(stderr, "FP map found - switching gradient legend on\n"); */

+ 2 - 2
display/d.nviz/main.c

@@ -178,7 +178,7 @@ int main(int argc, char *argv[])
     /* Open Raster File */
     /* Open Raster File */
     if (NULL == (mapset = G_find_cell2(name, "")))
     if (NULL == (mapset = G_find_cell2(name, "")))
 	G_fatal_error(_("Raster map <%s> not found"), name);
 	G_fatal_error(_("Raster map <%s> not found"), name);
-    if (0 > (fd = Rast_open_cell_old(name, mapset)))
+    if (0 > (fd = Rast_open_old(name, mapset)))
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
     /* Set Image name */
     /* Set Image name */
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Unable to open file <%s>"), outfile);
 	G_fatal_error(_("Unable to open file <%s>"), outfile);
 
 
     /* Get Raster Type */
     /* Get Raster Type */
-    data_type = Rast_get_raster_map_type(fd);
+    data_type = Rast_get_map_type(fd);
     /* Done with file */
     /* Done with file */
 
 
     /* Output initial startup stuff */
     /* Output initial startup stuff */

+ 2 - 2
display/d.profile/main.c

@@ -60,7 +60,7 @@ static void get_region_range(int fd)
 
 
 static void get_map_range(void)
 static void get_map_range(void)
 {
 {
-    if (Rast_raster_map_type(mapname, "") == CELL_TYPE) {
+    if (Rast_map_type(mapname, "") == CELL_TYPE) {
 	struct Range range;
 	struct Range range;
 	CELL xmin, xmax;
 	CELL xmin, xmax;
 
 
@@ -212,7 +212,7 @@ int main(int argc, char **argv)
 
 
     mapname = map->answer;
     mapname = map->answer;
 
 
-    fd = Rast_open_cell_old(mapname, "");
+    fd = Rast_open_old(mapname, "");
     if (fd < 0)
     if (fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), mapname);
 	G_fatal_error(_("Unable to open raster map <%s>"), mapname);
 
 

+ 4 - 4
display/d.rast.arrow/main.c

@@ -290,11 +290,11 @@ int main(int argc, char **argv)
     }
     }
 
 
     /* open the raster map */
     /* open the raster map */
-    layer_fd = Rast_open_cell_old(layer_name, "");
+    layer_fd = Rast_open_old(layer_name, "");
     if (layer_fd < 0)
     if (layer_fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), layer_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), layer_name);
 
 
-    raster_type = Rast_get_raster_map_type(layer_fd);
+    raster_type = Rast_get_map_type(layer_fd);
 
 
     /* allocate the cell array */
     /* allocate the cell array */
     raster_row = Rast_allocate_buf(raster_type);
     raster_row = Rast_allocate_buf(raster_type);
@@ -302,11 +302,11 @@ int main(int argc, char **argv)
 
 
     if (opt7->answer) {
     if (opt7->answer) {
 	/* open the magnitude raster map */
 	/* open the magnitude raster map */
-	mag_fd = Rast_open_cell_old(mag_map, "");
+	mag_fd = Rast_open_old(mag_map, "");
 	if (mag_fd < 0)
 	if (mag_fd < 0)
 	    G_fatal_error("Unable to open raster map <%s>", mag_map);
 	    G_fatal_error("Unable to open raster map <%s>", mag_map);
 
 
-	mag_raster_type = Rast_get_raster_map_type(mag_fd);
+	mag_raster_type = Rast_get_map_type(mag_fd);
 
 
 	/* allocate the cell array */
 	/* allocate the cell array */
 	mag_raster_row = Rast_allocate_buf(mag_raster_type);
 	mag_raster_row = Rast_allocate_buf(mag_raster_type);

+ 2 - 2
display/d.rast.num/main.c

@@ -126,12 +126,12 @@ int main(int argc, char **argv)
     else
     else
 	fixed_color = 1;
 	fixed_color = 1;
 
 
-    layer_fd = Rast_open_cell_old(map_name, "");
+    layer_fd = Rast_open_old(map_name, "");
     if (layer_fd < 0)
     if (layer_fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 
 
     /* determine the inputmap type (CELL/FCELL/DCELL) */
     /* determine the inputmap type (CELL/FCELL/DCELL) */
-    inmap_type = Rast_get_raster_map_type(layer_fd);
+    inmap_type = Rast_get_map_type(layer_fd);
     map_type = DCELL_TYPE;
     map_type = DCELL_TYPE;
 
 
     /* Read in the map window associated with window */
     /* Read in the map window associated with window */

+ 1 - 1
display/d.rast/display.c

@@ -57,7 +57,7 @@ static int cell_draw(const char *name,
     D_set_overlay_mode(overlay);
     D_set_overlay_mode(overlay);
 
 
     /* Make sure map is available */
     /* Make sure map is available */
-    if ((cellfile = Rast_open_cell_old(name, "")) == -1)
+    if ((cellfile = Rast_open_old(name, "")) == -1)
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
     /* Allocate space for cell buffer */
     /* Allocate space for cell buffer */

+ 1 - 1
display/d.rast/main.c

@@ -105,7 +105,7 @@ int main(int argc, char **argv)
     if (D_open_driver() != 0)
     if (D_open_driver() != 0)
 	G_fatal_error(_("No graphics device selected"));
 	G_fatal_error(_("No graphics device selected"));
 
 
-    fp = Rast_raster_map_is_fp(name, "");
+    fp = Rast_map_is_fp(name, "");
     if (catlist->answer) {
     if (catlist->answer) {
 	if (fp)
 	if (fp)
 	    G_warning(_("Ignoring catlist: map is floating point (please use 'val=')"));
 	    G_warning(_("Ignoring catlist: map is floating point (please use 'val=')"));

+ 2 - 2
display/d.rgb/main.c

@@ -89,10 +89,10 @@ int main(int argc, char **argv)
 	char *name = B[i].opt->answer;
 	char *name = B[i].opt->answer;
 
 
 	/* Make sure map is available */
 	/* Make sure map is available */
-	if ((B[i].file = Rast_open_cell_old(name, "")) == -1)
+	if ((B[i].file = Rast_open_old(name, "")) == -1)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
-	B[i].type = Rast_get_raster_map_type(B[i].file);
+	B[i].type = Rast_get_map_type(B[i].file);
 
 
 	/* Reading color lookup table */
 	/* Reading color lookup table */
 	if (Rast_read_colors(name, "", &B[i].colors) == -1)
 	if (Rast_read_colors(name, "", &B[i].colors) == -1)

+ 1 - 1
display/d.what.rast/opencell.c

@@ -19,7 +19,7 @@ int opencell(char *fullname, char *name, char *mapset)
     else
     else
 	strcpy(mapset, m);
 	strcpy(mapset, m);
 
 
-    fd = Rast_open_cell_old(name, mapset);
+    fd = Rast_open_old(name, mapset);
     if (fd < 0)
     if (fd < 0)
 	G_warning(_("Unable to open raster map <%s>"), name);
 	G_warning(_("Unable to open raster map <%s>"), name);
 
 

+ 1 - 1
display/d.what.rast/what.c

@@ -29,7 +29,7 @@ int what(int once, int terse, int colrow, char *fs, int width, int mwidth)
     screen_y = ((int)D_get_d_north() + (int)D_get_d_south()) / 2;
     screen_y = ((int)D_get_d_north() + (int)D_get_d_south()) / 2;
 
 
     for (i = 0; i < nrasts; i++)
     for (i = 0; i < nrasts; i++)
-	map_type[i] = Rast_get_raster_map_type(fd[i]);
+	map_type[i] = Rast_get_map_type(fd[i]);
 
 
     do {
     do {
 	if (!terse)
 	if (!terse)

+ 4 - 4
doc/raster/r.example/main.c

@@ -113,10 +113,10 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Raster map <%s> not found"), name);
 	G_fatal_error(_("Raster map <%s> not found"), name);
 
 
     /* determine the inputmap type (CELL/FCELL/DCELL) */
     /* determine the inputmap type (CELL/FCELL/DCELL) */
-    data_type = Rast_raster_map_type(name, mapset);
+    data_type = Rast_map_type(name, mapset);
 
 
-    /* Rast_open_cell_old - returns file destriptor (>0) */
-    if ((infd = Rast_open_cell_old(name, mapset)) < 0)
+    /* Rast_open_old - returns file destriptor (>0) */
+    if ((infd = Rast_open_old(name, mapset)) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
 
 
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
     outrast = Rast_allocate_buf(data_type);
     outrast = Rast_allocate_buf(data_type);
 
 
     /* controlling, if we can write the raster */
     /* controlling, if we can write the raster */
-    if ((outfd = Rast_open_raster_new(result, data_type)) < 0)
+    if ((outfd = Rast_open_new(result, data_type)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     /* for each row */
     /* for each row */

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

@@ -19,11 +19,11 @@ int zoom(struct Cell_head *window, const char *name, const char *mapset)
     nrows = window->rows;
     nrows = window->rows;
     ncols = window->cols;
     ncols = window->cols;
 
 
-    fd = Rast_open_cell_old(name, mapset);
+    fd = Rast_open_old(name, mapset);
     if (fd < 0)
     if (fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s> in <%s>"),
 	G_fatal_error(_("Unable to open raster map <%s> in <%s>"),
 		      name, mapset);
 		      name, mapset);
-    map_type = Rast_get_raster_map_type(fd);
+    map_type = Rast_get_map_type(fd);
     raster = Rast_allocate_buf(map_type);
     raster = Rast_allocate_buf(map_type);
 
 
     /* find first non-null row */
     /* find first non-null row */

+ 4 - 4
imagery/i.albedo/main.c

@@ -150,13 +150,13 @@ int main(int argc, char *argv[])
 	    G_fatal_error(_("Too many input maps. Only %d allowed."), MAXFILES);
 	    G_fatal_error(_("Too many input maps. Only %d allowed."), MAXFILES);
 	name = *ptr;
 	name = *ptr;
 	
 	
-	infd[nfiles] = Rast_open_cell_old(name, "");
+	infd[nfiles] = Rast_open_old(name, "");
 	if (infd[nfiles] < 0)
 	if (infd[nfiles] < 0)
 	    continue;
 	    continue;
 
 
 	/* Allocate input buffer */
 	/* Allocate input buffer */
-	in_data_type[nfiles] = Rast_raster_map_type(name, "");
-	if ((infd[nfiles] = Rast_open_cell_old(name, "")) < 0)
+	in_data_type[nfiles] = Rast_map_type(name, "");
+	if ((infd[nfiles] = Rast_open_old(name, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
 	if ((Rast_get_cellhd(name, "", &cellhd)) < 0)
 	if ((Rast_get_cellhd(name, "", &cellhd)) < 0)
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
     outrast = Rast_allocate_buf(out_data_type);
     outrast = Rast_allocate_buf(out_data_type);
 
 
     /* Create New raster files */
     /* Create New raster files */
-    if ((outfd = Rast_open_raster_new(result, 1)) < 0)
+    if ((outfd = Rast_open_new(result, 1)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     /*START ALBEDO HISTOGRAM STRETCH */
     /*START ALBEDO HISTOGRAM STRETCH */

+ 5 - 5
imagery/i.atcorr/main.cpp

@@ -590,7 +590,7 @@ int main(int argc, char* argv[])
     /* open input raster */
     /* open input raster */
     if ( (iimg_mapset = G_find_cell2 ( opts.iimg->answer, "") ) == NULL )
     if ( (iimg_mapset = G_find_cell2 ( opts.iimg->answer, "") ) == NULL )
 	G_fatal_error ( _("Raster map <%s> not found"), opts.iimg->answer);
 	G_fatal_error ( _("Raster map <%s> not found"), opts.iimg->answer);
-    if((iimg_fd = Rast_open_cell_old(opts.iimg->answer, iimg_mapset)) < 0)
+    if((iimg_fd = Rast_open_old(opts.iimg->answer, iimg_mapset)) < 0)
 	G_fatal_error (_("Unable to open raster map <%s>"),
 	G_fatal_error (_("Unable to open raster map <%s>"),
 		       G_fully_qualified_name(opts.iimg->answer, iimg_mapset));
 		       G_fully_qualified_name(opts.iimg->answer, iimg_mapset));
 
 
@@ -599,7 +599,7 @@ int main(int argc, char* argv[])
     if(opts.ialt->answer) {
     if(opts.ialt->answer) {
 	if ( (ialt_mapset = G_find_cell2 ( opts.ialt->answer, "") ) == NULL )
 	if ( (ialt_mapset = G_find_cell2 ( opts.ialt->answer, "") ) == NULL )
 	    G_fatal_error ( _("Raster map <%s> not found"), opts.ialt->answer);
 	    G_fatal_error ( _("Raster map <%s> not found"), opts.ialt->answer);
-	if((ialt_fd = Rast_open_cell_old(opts.ialt->answer, ialt_mapset)) < 0)
+	if((ialt_fd = Rast_open_old(opts.ialt->answer, ialt_mapset)) < 0)
             G_fatal_error (_("Unable to open raster map <%s>"),
             G_fatal_error (_("Unable to open raster map <%s>"),
 			   G_fully_qualified_name(opts.ialt->answer, ialt_mapset));
 			   G_fully_qualified_name(opts.ialt->answer, ialt_mapset));
     }
     }
@@ -607,7 +607,7 @@ int main(int argc, char* argv[])
     if(opts.ivis->answer) {
     if(opts.ivis->answer) {
 	if ( (iviz_mapset = G_find_cell2 ( opts.ivis->answer, "") ) == NULL )
 	if ( (iviz_mapset = G_find_cell2 ( opts.ivis->answer, "") ) == NULL )
 	    G_fatal_error ( _("Raster map <%s> not found"), opts.ivis->answer);
 	    G_fatal_error ( _("Raster map <%s> not found"), opts.ivis->answer);
-	if((ivis_fd = Rast_open_cell_old(opts.ivis->answer, iviz_mapset)) < 0)
+	if((ivis_fd = Rast_open_old(opts.ivis->answer, iviz_mapset)) < 0)
             G_fatal_error (_("Unable to open raster map <%s>"),
             G_fatal_error (_("Unable to open raster map <%s>"),
 			   G_fully_qualified_name(opts.ivis->answer, iviz_mapset));
 			   G_fully_qualified_name(opts.ivis->answer, iviz_mapset));
     }
     }
@@ -615,13 +615,13 @@ int main(int argc, char* argv[])
     /* open a floating point raster or not? */
     /* open a floating point raster or not? */
     if(opts.oflt->answer)
     if(opts.oflt->answer)
     {
     {
-	if((oimg_fd = Rast_open_fp_cell_new(opts.oimg->answer)) < 0)
+	if((oimg_fd = Rast_open_fp_new(opts.oimg->answer)) < 0)
 	    G_fatal_error (_("Unable to create raster map <%s>"),
 	    G_fatal_error (_("Unable to create raster map <%s>"),
 			   opts.oimg->answer);
 			   opts.oimg->answer);
     }
     }
     else
     else
     {
     {
-	if((oimg_fd = Rast_open_raster_new(opts.oimg->answer, CELL_TYPE)) < 0)
+	if((oimg_fd = Rast_open_new(opts.oimg->answer, CELL_TYPE)) < 0)
 	    G_fatal_error (_("Unable to create raster map <%s>"),
 	    G_fatal_error (_("Unable to create raster map <%s>"),
 			   opts.oimg->answer);
 			   opts.oimg->answer);
     }
     }

+ 7 - 7
imagery/i.biomass/main.c

@@ -99,27 +99,27 @@ int main(int argc, char *argv[])
     result1 = output1->answer;
     result1 = output1->answer;
     
     
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd_fpar = Rast_open_cell_old(fpar, "")) < 0)
+    if ((infd_fpar = Rast_open_old(fpar, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), fpar);
 	G_fatal_error(_("Unable to open raster map <%s>"), fpar);
     inrast_fpar = Rast_allocate_d_buf();
     inrast_fpar = Rast_allocate_d_buf();
 
 
-    if ((infd_luf = Rast_open_cell_old(luf, "")) < 0)
+    if ((infd_luf = Rast_open_old(luf, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), luf);
 	G_fatal_error(_("Unable to open raster map <%s>"), luf);
     inrast_luf = Rast_allocate_d_buf();
     inrast_luf = Rast_allocate_d_buf();
     
     
-    if ((infd_lat = Rast_open_cell_old(lat, "")) < 0)
+    if ((infd_lat = Rast_open_old(lat, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), lat);
 	G_fatal_error(_("Unable to open raster map <%s>"), lat);
     inrast_lat = Rast_allocate_d_buf();
     inrast_lat = Rast_allocate_d_buf();
     
     
-    if ((infd_doy = Rast_open_cell_old(doy, "")) < 0)
+    if ((infd_doy = Rast_open_old(doy, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), doy);
 	G_fatal_error(_("Unable to open raster map <%s>"), doy);
     inrast_doy = Rast_allocate_d_buf();
     inrast_doy = Rast_allocate_d_buf();
 
 
-    if ((infd_tsw = Rast_open_cell_old(tsw, "")) < 0)
+    if ((infd_tsw = Rast_open_old(tsw, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), tsw);
 	G_fatal_error(_("Unable to open raster map <%s>"), tsw);
     inrast_tsw = Rast_allocate_d_buf();
     inrast_tsw = Rast_allocate_d_buf();
     
     
-    if ((infd_wa = Rast_open_cell_old(wa, "")) < 0)
+    if ((infd_wa = Rast_open_old(wa, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), wa);
 	G_fatal_error(_("Unable to open raster map <%s>"), wa);
     inrast_wa = Rast_allocate_d_buf();
     inrast_wa = Rast_allocate_d_buf();
     
     
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
     outrast1 = Rast_allocate_d_buf();
     outrast1 = Rast_allocate_d_buf();
     
     
     /* Create New raster files */ 
     /* Create New raster files */ 
-    if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
+    if ((outfd1 = Rast_open_new(result1, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result1);
 	G_fatal_error(_("Unable to create raster map <%s>"), result1);
      
      
     /* Process pixels */ 
     /* Process pixels */ 

+ 2 - 2
imagery/i.cca/main.c

@@ -168,14 +168,14 @@ int main(int argc, char *argv[])
 	outbandmax[i] = (CELL) 0;
 	outbandmax[i] = (CELL) 0;
 	outbandmin[i] = (CELL) 0;
 	outbandmin[i] = (CELL) 0;
 
 
-	if ((datafds[i] = Rast_open_cell_old(refs.file[i - 1].name,
+	if ((datafds[i] = Rast_open_old(refs.file[i - 1].name,
 					  refs.file[i - 1].mapset)) < 0) {
 					  refs.file[i - 1].mapset)) < 0) {
 	    G_fatal_error(_("Cannot open raster map <%s>"),
 	    G_fatal_error(_("Cannot open raster map <%s>"),
 			  refs.file[i - 1].name);
 			  refs.file[i - 1].name);
 	}
 	}
 
 
 	sprintf(tempname, "%s.%d", out_opt->answer, i);
 	sprintf(tempname, "%s.%d", out_opt->answer, i);
-	if ((outfds[i] = Rast_open_cell_new(tempname)) < 0)
+	if ((outfds[i] = Rast_open_c_new(tempname)) < 0)
 	    G_fatal_error(_("Cannot create raster map <%s>"), tempname);
 	    G_fatal_error(_("Cannot create raster map <%s>"), tempname);
     }
     }
 
 

+ 1 - 1
imagery/i.class/band_files.c

@@ -18,7 +18,7 @@ int open_band_files(void)
 	Bandbuf[n] = Rast_allocate_c_buf();
 	Bandbuf[n] = Rast_allocate_c_buf();
 	name = Refer.file[n].name;
 	name = Refer.file[n].name;
 	mapset = Refer.file[n].mapset;
 	mapset = Refer.file[n].mapset;
-	if ((Bandfd[n] = Rast_open_cell_old(name, mapset)) < 0)
+	if ((Bandfd[n] = Rast_open_old(name, mapset)) < 0)
 	    G_fatal_error(_("Unable to open band files."));
 	    G_fatal_error(_("Unable to open band files."));
     }
     }
 
 

+ 1 - 1
imagery/i.class/draw_cell.c

@@ -38,7 +38,7 @@ int draw_cell(View * view, int overlay)
 	return 1;
 	return 1;
     }
     }
 
 
-    fd = Rast_open_cell_old(view->cell.name, view->cell.mapset);
+    fd = Rast_open_old(view->cell.name, view->cell.mapset);
     if (fd < 0) {
     if (fd < 0) {
 	Rast_free_colors(&colr);
 	Rast_free_colors(&colr);
 	return 0;
 	return 0;

+ 1 - 1
imagery/i.class/signature.c

@@ -272,7 +272,7 @@ int display_signature(void)
 	Rast_set_window(&VIEW_MAP1->cell.head);
 	Rast_set_window(&VIEW_MAP1->cell.head);
 	open_band_files();
 	open_band_files();
 
 
-	if ((fd = Rast_open_cell_new(MASK)) < 0)
+	if ((fd = Rast_open_c_new(MASK)) < 0)
 	    G_fatal_error(_("Unable to open the cell map MASK."));
 	    G_fatal_error(_("Unable to open the cell map MASK."));
 	if ((buffer = Rast_allocate_c_buf()) == NULL)
 	if ((buffer = Rast_allocate_c_buf()) == NULL)
 	    G_fatal_error(_("Unable to allocate the cell buffer in display_signature()."));
 	    G_fatal_error(_("Unable to allocate the cell buffer in display_signature()."));

+ 1 - 1
imagery/i.cluster/open_files.c

@@ -54,7 +54,7 @@ int open_files(void)
 	
 	
 	name = ref.file[n].name;
 	name = ref.file[n].name;
 	mapset = ref.file[n].mapset;
 	mapset = ref.file[n].mapset;
-	if ((cellfd[n] = Rast_open_cell_old(name, mapset)) < 0)
+	if ((cellfd[n] = Rast_open_old(name, mapset)) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 			  G_fully_qualified_name(name, mapset));
 			  G_fully_qualified_name(name, mapset));
     }
     }

+ 4 - 4
imagery/i.eb.eta/main.c

@@ -76,15 +76,15 @@ int main(int argc, char *argv[])
     tempk = input3->answer;
     tempk = input3->answer;
     result1 = output1->answer;
     result1 = output1->answer;
     
     
-    if ((infd_rnetday = Rast_open_cell_old(rnetday, "")) < 0)
+    if ((infd_rnetday = Rast_open_old(rnetday, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), rnetday);
 	G_fatal_error(_("Unable to open raster map <%s>"), rnetday);
     inrast_rnetday = Rast_allocate_d_buf();
     inrast_rnetday = Rast_allocate_d_buf();
     
     
-    if ((infd_evapfr = Rast_open_cell_old(evapfr, "")) < 0)
+    if ((infd_evapfr = Rast_open_old(evapfr, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), evapfr);
 	G_fatal_error(_("Unable to open raster map <%s>"), evapfr);
     inrast_evapfr = Rast_allocate_d_buf();
     inrast_evapfr = Rast_allocate_d_buf();
     
     
-    if ((infd_tempk = Rast_open_cell_old(tempk, "")) < 0)
+    if ((infd_tempk = Rast_open_old(tempk, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), tempk);
 	G_fatal_error(_("Unable to open raster map <%s>"), tempk);
     inrast_tempk = Rast_allocate_d_buf();
     inrast_tempk = Rast_allocate_d_buf();
     
     
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
     ncols = G_window_cols();
     ncols = G_window_cols();
     outrast1 = Rast_allocate_d_buf();
     outrast1 = Rast_allocate_d_buf();
     
     
-    if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
+    if ((outfd1 = Rast_open_new(result1, DCELL_TYPE)) < 0)
         G_fatal_error(_("Unable to create raster map <%s>"), result1);
         G_fatal_error(_("Unable to create raster map <%s>"), result1);
     
     
     /* Process pixels */ 
     /* Process pixels */ 

+ 5 - 5
imagery/i.eb.evapfr/main.c

@@ -95,17 +95,17 @@ int main(int argc, char *argv[])
     makin = flag1->answer;
     makin = flag1->answer;
     
     
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd_rnet = Rast_open_cell_old(rnet, "")) < 0)
+    if ((infd_rnet = Rast_open_old(rnet, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), rnet);
 	G_fatal_error(_("Unable to open raster map <%s>"), rnet);
     inrast_rnet = Rast_allocate_d_buf();
     inrast_rnet = Rast_allocate_d_buf();
     
     
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd_g0 = Rast_open_cell_old(g0, "")) < 0)
+    if ((infd_g0 = Rast_open_old(g0, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), g0);
 	G_fatal_error(_("Unable to open raster map <%s>"), g0);
     inrast_g0 = Rast_allocate_d_buf();
     inrast_g0 = Rast_allocate_d_buf();
     
     
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd_h0 = Rast_open_cell_old(h0, "")) < 0)
+    if ((infd_h0 = Rast_open_old(h0, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), h0);
 	G_fatal_error(_("Unable to open raster map <%s>"), h0);
     inrast_h0 = Rast_allocate_d_buf();
     inrast_h0 = Rast_allocate_d_buf();
     
     
@@ -118,10 +118,10 @@ int main(int argc, char *argv[])
 	outrast2 = Rast_allocate_d_buf();
 	outrast2 = Rast_allocate_d_buf();
     
     
     /* Create New raster files */ 
     /* Create New raster files */ 
-    if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
+    if ((outfd1 = Rast_open_new(result1, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result1);
 	G_fatal_error(_("Unable to create raster map <%s>"), result1);
     if (makin) 
     if (makin) 
-	if ((outfd2 = Rast_open_raster_new(result2, DCELL_TYPE)) < 0)
+	if ((outfd2 = Rast_open_new(result2, DCELL_TYPE)) < 0)
 	    G_fatal_error(_("Unable to create raster map <%s>"), result2);
 	    G_fatal_error(_("Unable to create raster map <%s>"), result2);
         
         
     /* Process pixels */ 
     /* Process pixels */ 

+ 5 - 5
imagery/i.eb.h_SEBAL01/main.c

@@ -204,13 +204,13 @@ int main(int argc, char *argv[])
     if (G_legal_filename(h0) < 0)
     if (G_legal_filename(h0) < 0)
 	G_fatal_error(_("<%s> is an illegal name"), h0);
 	G_fatal_error(_("<%s> is an illegal name"), h0);
 
 
-    if ((infd_Rn = Rast_open_cell_old(Rn, "")) < 0)
+    if ((infd_Rn = Rast_open_old(Rn, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), Rn);
 	G_fatal_error(_("Unable to open raster map <%s>"), Rn);
-    if ((infd_g0 = Rast_open_cell_old(g0, "")) < 0)
+    if ((infd_g0 = Rast_open_old(g0, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), g0);
 	G_fatal_error(_("Unable to open raster map <%s>"), g0);
-    if ((infd_z0m = Rast_open_cell_old(z0m, "")) < 0)
+    if ((infd_z0m = Rast_open_old(z0m, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), z0m);
 	G_fatal_error(_("Unable to open raster map <%s>"), z0m);
-    if ((infd_t0dem = Rast_open_cell_old(t0dem, "")) < 0)
+    if ((infd_t0dem = Rast_open_old(t0dem, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), t0dem);
 	G_fatal_error(_("Unable to open raster map <%s>"), t0dem);
 
 
     if (Rast_get_cellhd(Rn, "", &cellhd) < 0)
     if (Rast_get_cellhd(Rn, "", &cellhd) < 0)
@@ -247,7 +247,7 @@ int main(int argc, char *argv[])
     /***************************************************/
     /***************************************************/
     outrast = Rast_allocate_d_buf();
     outrast = Rast_allocate_d_buf();
 
 
-    if ((outfd = Rast_open_raster_new(h0, DCELL_TYPE)) < 0)
+    if ((outfd = Rast_open_new(h0, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), h0);
 	G_fatal_error(_("Unable to create raster map <%s>"), h0);
 
 
     /***************************************************/
     /***************************************************/

+ 6 - 6
imagery/i.eb.soilheatflux/main.c

@@ -94,23 +94,23 @@ int main(int argc, char *argv[])
     result = output1->answer;
     result = output1->answer;
     roerink = flag1->answer;
     roerink = flag1->answer;
 
 
-    if ((infd_albedo = Rast_open_cell_old(albedo, "")) < 0)
+    if ((infd_albedo = Rast_open_old(albedo, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), albedo);
 	G_fatal_error(_("Unable to open raster map <%s>"), albedo);
     inrast_albedo = Rast_allocate_d_buf();
     inrast_albedo = Rast_allocate_d_buf();
 
 
-    if ((infd_ndvi = Rast_open_cell_old(ndvi, "")) < 0)
+    if ((infd_ndvi = Rast_open_old(ndvi, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), ndvi);
 	G_fatal_error(_("Unable to open raster map <%s>"), ndvi);
     inrast_ndvi = Rast_allocate_d_buf();
     inrast_ndvi = Rast_allocate_d_buf();
 
 
-    if ((infd_tempk = Rast_open_cell_old(tempk, "")) < 0)
+    if ((infd_tempk = Rast_open_old(tempk, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), tempk);
 	G_fatal_error(_("Unable to open raster map <%s>"), tempk);
     inrast_tempk = Rast_allocate_d_buf();
     inrast_tempk = Rast_allocate_d_buf();
 
 
-    if ((infd_rnet = Rast_open_cell_old(rnet, "")) < 0)
+    if ((infd_rnet = Rast_open_old(rnet, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), rnet);
 	G_fatal_error(_("Unable to open raster map <%s>"), rnet);
     inrast_rnet = Rast_allocate_d_buf();
     inrast_rnet = Rast_allocate_d_buf();
 
 
-    if ((infd_time = Rast_open_cell_old(time, "")) < 0)
+    if ((infd_time = Rast_open_old(time, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), time);
 	G_fatal_error(_("Unable to open raster map <%s>"), time);
     inrast_time = Rast_allocate_d_buf();
     inrast_time = Rast_allocate_d_buf();
 
 
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
     outrast = Rast_allocate_d_buf();
     outrast = Rast_allocate_d_buf();
     
     
     /* Create New raster files */ 
     /* Create New raster files */ 
-    if ((outfd = Rast_open_raster_new(result,DCELL_TYPE)) < 0)
+    if ((outfd = Rast_open_new(result,DCELL_TYPE)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     /* Process pixels */ 
     /* Process pixels */ 

+ 2 - 2
imagery/i.emissivity/main.c

@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
     result1 = output->answer;
     result1 = output->answer;
     
     
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd = Rast_open_cell_old(ndvi, "")) < 0)
+    if ((infd = Rast_open_old(ndvi, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), ndvi);
 	G_fatal_error(_("Cannot open cell file [%s]"), ndvi);
     inr = Rast_allocate_d_buf();
     inr = Rast_allocate_d_buf();
     
     
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
     outr = Rast_allocate_d_buf();
     outr = Rast_allocate_d_buf();
     
     
     /* Create New raster files */ 
     /* Create New raster files */ 
-    if ((outfd = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
+    if ((outfd = Rast_open_new(result1, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Could not open <%s>"), result1);
 	G_fatal_error(_("Could not open <%s>"), result1);
     
     
     /* Process pixels */ 
     /* Process pixels */ 

+ 10 - 10
imagery/i.evapo.time_integration/main.c

@@ -165,14 +165,14 @@ int main(int argc, char *argv[])
 	}
 	}
 	if (!ok)
 	if (!ok)
 	    continue;
 	    continue;
-	infd[nfiles] = Rast_open_cell_old(name, mapset);
+	infd[nfiles] = Rast_open_old(name, mapset);
 	if (infd[nfiles] < 0) {
 	if (infd[nfiles] < 0) {
 	    ok = 0;
 	    ok = 0;
 	    continue;
 	    continue;
 	}
 	}
 	/* Allocate input buffer */
 	/* Allocate input buffer */
-	in_data_type[nfiles] = Rast_raster_map_type(name, mapset);
-	if ((infd[nfiles] = Rast_open_cell_old(name, mapset)) < 0)
+	in_data_type[nfiles] = Rast_map_type(name, mapset);
+	if ((infd[nfiles] = Rast_open_old(name, mapset)) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	if ((Rast_get_cellhd(name, mapset, &cellhd)) < 0)
 	if ((Rast_get_cellhd(name, mapset, &cellhd)) < 0)
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name);
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name);
@@ -198,14 +198,14 @@ int main(int argc, char *argv[])
 	}
 	}
 	if (!ok)
 	if (!ok)
 	    continue;
 	    continue;
-	infd1[nfiles1] = Rast_open_cell_old(name1, mapset);
+	infd1[nfiles1] = Rast_open_old(name1, mapset);
 	if (infd1[nfiles1] < 0) {
 	if (infd1[nfiles1] < 0) {
 	    ok = 0;
 	    ok = 0;
 	    continue;
 	    continue;
 	}
 	}
 	/* Allocate input buffer */
 	/* Allocate input buffer */
-	in_data_type1[nfiles1] = Rast_raster_map_type(name1, mapset);
-	if ((infd1[nfiles1] = Rast_open_cell_old(name1, mapset)) < 0)
+	in_data_type1[nfiles1] = Rast_map_type(name1, mapset);
+	if ((infd1[nfiles1] = Rast_open_old(name1, mapset)) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name1);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name1);
 	if ((Rast_get_cellhd(name1, mapset, &cellhd)) < 0)
 	if ((Rast_get_cellhd(name1, mapset, &cellhd)) < 0)
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name1);
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name1);
@@ -237,14 +237,14 @@ int main(int argc, char *argv[])
 	}
 	}
 	if (!ok)
 	if (!ok)
 	    continue;
 	    continue;
-	infd2[nfiles2] = Rast_open_cell_old(name2, mapset);
+	infd2[nfiles2] = Rast_open_old(name2, mapset);
 	if (infd2[nfiles2] < 0) {
 	if (infd2[nfiles2] < 0) {
 	    ok = 0;
 	    ok = 0;
 	    continue;
 	    continue;
 	}
 	}
 	/* Allocate input buffer */
 	/* Allocate input buffer */
-	in_data_type2[nfiles2] = Rast_raster_map_type(name2, mapset);
-	if ((infd2[nfiles2] = Rast_open_cell_old(name2, mapset)) < 0) {
+	in_data_type2[nfiles2] = Rast_map_type(name2, mapset);
+	if ((infd2[nfiles2] = Rast_open_old(name2, mapset)) < 0) {
 	    G_fatal_error(_("Unable to open raster map <%s>"), name2);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name2);
 	}
 	}
 	if ((Rast_get_cellhd(name2, mapset, &cellhd)) < 0) {
 	if ((Rast_get_cellhd(name2, mapset, &cellhd)) < 0) {
@@ -264,7 +264,7 @@ int main(int argc, char *argv[])
 
 
    
    
     /* Create New raster files */
     /* Create New raster files */
-    if ((outfd = Rast_open_raster_new(result, 1)) < 0)
+    if ((outfd = Rast_open_new(result, 1)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     /*******************/
     /*******************/

+ 3 - 3
imagery/i.fft/main.c

@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
     Cellmap_real = opt.real->answer;
     Cellmap_real = opt.real->answer;
     Cellmap_imag = opt.imag->answer;
     Cellmap_imag = opt.imag->answer;
 
 
-    inputfd = Rast_open_cell_old(Cellmap_orig, "");
+    inputfd = Rast_open_old(Cellmap_orig, "");
     if (inputfd < 0)
     if (inputfd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), Cellmap_orig);
 	G_fatal_error(_("Unable to open raster map <%s>"), Cellmap_orig);
 
 
@@ -150,9 +150,9 @@ int main(int argc, char *argv[])
     fft2(-1, data, totsize, cols, rows);
     fft2(-1, data, totsize, cols, rows);
 
 
     /* open the output cell maps */
     /* open the output cell maps */
-    if ((realfd = Rast_open_fp_cell_new(Cellmap_real)) < 0)
+    if ((realfd = Rast_open_fp_new(Cellmap_real)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), Cellmap_real);
 	G_fatal_error(_("Unable to create raster map <%s>"), Cellmap_real);
-    if ((imagfd = Rast_open_fp_cell_new(Cellmap_imag)) < 0)
+    if ((imagfd = Rast_open_fp_new(Cellmap_imag)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), Cellmap_imag);
 	G_fatal_error(_("Unable to create raster map <%s>"), Cellmap_imag);
 
 
 #define SWAP1(a, b)				\
 #define SWAP1(a, b)				\

+ 2 - 2
imagery/i.gensig/openfiles.c

@@ -30,7 +30,7 @@ int openfiles(struct parms *parms, struct files *files)
 
 
     /* open training map for reading */
     /* open training map for reading */
     mapset = G_find_cell2(parms->training_map, "");
     mapset = G_find_cell2(parms->training_map, "");
-    files->train_fd = Rast_open_cell_old(parms->training_map, mapset);
+    files->train_fd = Rast_open_old(parms->training_map, mapset);
     if (files->train_fd < 0)
     if (files->train_fd < 0)
 	G_fatal_error(_("Unable to open training map <%s>"),
 	G_fatal_error(_("Unable to open training map <%s>"),
 		      parms->training_map);
 		      parms->training_map);
@@ -39,7 +39,7 @@ int openfiles(struct parms *parms, struct files *files)
     /* open all maps for reading */
     /* open all maps for reading */
     for (n = 0; n < Ref.nfiles; n++) {
     for (n = 0; n < Ref.nfiles; n++) {
 	files->band_fd[n] =
 	files->band_fd[n] =
-	    Rast_open_cell_old(Ref.file[n].name, Ref.file[n].mapset);
+	    Rast_open_old(Ref.file[n].name, Ref.file[n].mapset);
 	if (files->band_fd[n] < 0)
 	if (files->band_fd[n] < 0)
 	    G_fatal_error(_("Unable to open training map <%s in %s>"),
 	    G_fatal_error(_("Unable to open training map <%s in %s>"),
 			  Ref.file[n].name, Ref.file[n].mapset);
 			  Ref.file[n].name, Ref.file[n].mapset);

+ 2 - 2
imagery/i.gensigset/openfiles.c

@@ -30,7 +30,7 @@ int openfiles(struct parms *parms, struct files *files)
 
 
     /* open training map for reading */
     /* open training map for reading */
     mapset = G_find_cell2(parms->training_map, "");
     mapset = G_find_cell2(parms->training_map, "");
-    files->train_fd = Rast_open_cell_old(parms->training_map, mapset);
+    files->train_fd = Rast_open_old(parms->training_map, mapset);
     if (files->train_fd < 0)
     if (files->train_fd < 0)
 	G_fatal_error(_("Unable to open training map <%s>"),
 	G_fatal_error(_("Unable to open training map <%s>"),
 		      parms->training_map);
 		      parms->training_map);
@@ -39,7 +39,7 @@ int openfiles(struct parms *parms, struct files *files)
     /* open all maps for reading */
     /* open all maps for reading */
     for (n = 0; n < Ref.nfiles; n++) {
     for (n = 0; n < Ref.nfiles; n++) {
 	files->band_fd[n] =
 	files->band_fd[n] =
-	    Rast_open_cell_old(Ref.file[n].name, Ref.file[n].mapset);
+	    Rast_open_old(Ref.file[n].name, Ref.file[n].mapset);
 	if (files->band_fd[n] < 0)
 	if (files->band_fd[n] < 0)
 	    G_fatal_error(_("Unable to open training map <%s in %s>"),
 	    G_fatal_error(_("Unable to open training map <%s in %s>"),
 			  Ref.file[n].name, Ref.file[n].mapset);
 			  Ref.file[n].name, Ref.file[n].mapset);

+ 6 - 6
imagery/i.his.rgb/openfiles.c

@@ -10,11 +10,11 @@ void openfiles(char *h_name, char *i_name, char *s_name,
 	       int fd_input[3], int fd_output[3], CELL * rowbuf[3])
 	       int fd_input[3], int fd_output[3], CELL * rowbuf[3])
 {
 {
     /* open output files */
     /* open output files */
-    if ((fd_output[0] = Rast_open_cell_new(r_name)) < 0)
+    if ((fd_output[0] = Rast_open_c_new(r_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), r_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), r_name);
-    if ((fd_output[1] = Rast_open_cell_new(g_name)) < 0)
+    if ((fd_output[1] = Rast_open_c_new(g_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), g_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), g_name);
-    if ((fd_output[2] = Rast_open_cell_new(b_name)) < 0)
+    if ((fd_output[2] = Rast_open_c_new(b_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), b_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), b_name);
 
 
     /* allocate the cell row buffer */
     /* allocate the cell row buffer */
@@ -26,12 +26,12 @@ void openfiles(char *h_name, char *i_name, char *s_name,
 	G_fatal_error(_("Unable to allocate the input row buffer"));
 	G_fatal_error(_("Unable to allocate the input row buffer"));
 
 
     /* open input files (maps can be in different mapsets) */
     /* open input files (maps can be in different mapsets) */
-    if ((fd_input[0] = Rast_open_cell_old(h_name, "")) < 0)
+    if ((fd_input[0] = Rast_open_old(h_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), h_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), h_name);
 
 
-    if ((fd_input[1] = Rast_open_cell_old(i_name, "")) < 0)
+    if ((fd_input[1] = Rast_open_old(i_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), i_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), i_name);
 
 
-    if ((fd_input[2] = Rast_open_cell_old(s_name, "")) < 0)
+    if ((fd_input[2] = Rast_open_old(s_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), s_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), s_name);
 }
 }

+ 3 - 3
imagery/i.ifft/main.c

@@ -101,12 +101,12 @@ int main(int argc, char *argv[])
     Cellmap_orig = opt.orig->answer;
     Cellmap_orig = opt.orig->answer;
 
 
     /* open input raster map */
     /* open input raster map */
-    realfd = Rast_open_cell_old(Cellmap_real, "");
+    realfd = Rast_open_old(Cellmap_real, "");
     if (realfd < 0)
     if (realfd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"),
 	G_fatal_error(_("Unable to open raster map <%s>"),
 		      Cellmap_real);
 		      Cellmap_real);
 
 
-    imagfd = Rast_open_cell_old(Cellmap_imag, "");
+    imagfd = Rast_open_old(Cellmap_imag, "");
     if (imagfd < 0)	
     if (imagfd < 0)	
 	G_fatal_error(_("Unable to open raster map <%s>"),
 	G_fatal_error(_("Unable to open raster map <%s>"),
 		      Cellmap_imag);
 		      Cellmap_imag);
@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
     fft2(1, data, totsize, cols, rows);
     fft2(1, data, totsize, cols, rows);
 
 
     /* open the output cell map */
     /* open the output cell map */
-    if ((outputfd = Rast_open_fp_cell_new(Cellmap_orig)) < 0)
+    if ((outputfd = Rast_open_fp_new(Cellmap_orig)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"),
 	G_fatal_error(_("Unable to create raster map <%s>"),
 		      Cellmap_orig);
 		      Cellmap_orig);
 
 

+ 2 - 2
imagery/i.latlong/main.c

@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
     result1 = output1->answer;
     result1 = output1->answer;
 
 
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd = Rast_open_cell_old(in, "")) < 0)
+    if ((infd = Rast_open_old(in, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), in);
 	G_fatal_error(_("Cannot open cell file [%s]"), in);
     if (Rast_get_cellhd(in, "", &cellhd) < 0)
     if (Rast_get_cellhd(in, "", &cellhd) < 0)
 	G_fatal_error(_("Cannot read file header of [%s])"), in);
 	G_fatal_error(_("Cannot read file header of [%s])"), in);
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
 
 
     outrast1 = Rast_allocate_d_buf();
     outrast1 = Rast_allocate_d_buf();
 
 
-    if ((outfd1 = Rast_open_raster_new(result1,DCELL_TYPE)) < 0)
+    if ((outfd1 = Rast_open_new(result1,DCELL_TYPE)) < 0)
 	G_fatal_error(_("Could not open <%s>"), result1);
 	G_fatal_error(_("Could not open <%s>"), result1);
 
 
     for (row = 0; row < nrows; row++)
     for (row = 0; row < nrows; row++)

+ 3 - 3
imagery/i.maxlik/open.c

@@ -38,7 +38,7 @@ int open_files(void)
 	cell[n] = Rast_allocate_d_buf();
 	cell[n] = Rast_allocate_d_buf();
 	name = Ref.file[n].name;
 	name = Ref.file[n].name;
 	mapset = Ref.file[n].mapset;
 	mapset = Ref.file[n].mapset;
-	if ((cellfd[n] = Rast_open_cell_old(name, mapset)) < 0)
+	if ((cellfd[n] = Rast_open_old(name, mapset)) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 			  G_fully_qualified_name(name, mapset));
 			  G_fully_qualified_name(name, mapset));
     }
     }
@@ -62,7 +62,7 @@ int open_files(void)
     B = (double *)G_malloc(S.nsigs * sizeof(double));
     B = (double *)G_malloc(S.nsigs * sizeof(double));
     invert_signatures();
     invert_signatures();
 
 
-    class_fd = Rast_open_cell_new(class_name);
+    class_fd = Rast_open_c_new(class_name);
     if (class_fd < 0)
     if (class_fd < 0)
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
@@ -70,7 +70,7 @@ int open_files(void)
 
 
     reject_cell = NULL;
     reject_cell = NULL;
     if (reject_name) {
     if (reject_name) {
-	reject_fd = Rast_open_cell_new(reject_name);
+	reject_fd = Rast_open_c_new(reject_name);
 	if (reject_fd < 0)
 	if (reject_fd < 0)
 	    G_fatal_error(_("Unable to create raster map <%s>"),
 	    G_fatal_error(_("Unable to create raster map <%s>"),
 			  reject_name);
 			  reject_name);

+ 2 - 2
imagery/i.modis.qc/main.c

@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
 	(!strcmp(qcflag, "pixel_adjacent_to_cloud") && (strcmp(product, "mod09A1s"))))
 	(!strcmp(qcflag, "pixel_adjacent_to_cloud") && (strcmp(product, "mod09A1s"))))
 	G_fatal_error(_("This flag is only available for MOD09A1s @ 500m products"));
 	G_fatal_error(_("This flag is only available for MOD09A1s @ 500m products"));
 
 
-    if ((infd = Rast_open_cell_old(qcchan, "")) < 0)
+    if ((infd = Rast_open_old(qcchan, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), qcchan);
 	G_fatal_error(_("Unable to open raster map <%s>"), qcchan);
 
 
     if (Rast_get_cellhd(qcchan, "", &cellhd) < 0)
     if (Rast_get_cellhd(qcchan, "", &cellhd) < 0)
@@ -211,7 +211,7 @@ int main(int argc, char *argv[])
     outrast = Rast_allocate_c_buf();
     outrast = Rast_allocate_c_buf();
 
 
     /* Create New raster files */ 
     /* Create New raster files */ 
-    if ((outfd = Rast_open_raster_new(result, data_type_output)) < 0)
+    if ((outfd = Rast_open_new(result, data_type_output)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     /* Process pixels */ 
     /* Process pixels */ 

+ 7 - 7
imagery/i.pca/main.c

@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
 	sprintf(tmpbuf, "%s.%d", opt_out->answer, i + 1);
 	sprintf(tmpbuf, "%s.%d", opt_out->answer, i + 1);
 	G_check_input_output_name(opt_in->answers[i], tmpbuf, GR_FATAL_EXIT);
 	G_check_input_output_name(opt_in->answers[i], tmpbuf, GR_FATAL_EXIT);
 
 
-	if ((inp_fd[i] = Rast_open_cell_old(opt_in->answers[i], "")) < 0)
+	if ((inp_fd[i] = Rast_open_old(opt_in->answers[i], "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 			  opt_in->answers[i]);
 			  opt_in->answers[i]);
     }
     }
@@ -239,7 +239,7 @@ static int calc_mu(int *fds, double *mu, int bands)
 	int row, col;
 	int row, col;
 	double sum = 0.;
 	double sum = 0.;
 
 
-	maptype = Rast_get_raster_map_type(fds[i]);
+	maptype = Rast_get_map_type(fds[i]);
 
 
 	/* don't assume each image is of the same type */
 	/* don't assume each image is of the same type */
 	if (rowbuf)
 	if (rowbuf)
@@ -287,7 +287,7 @@ static int calc_covariance(int *fds, double **covar, double *mu, int bands)
     int row, col;
     int row, col;
 
 
     for (j = 0; j < bands; j++) {
     for (j = 0; j < bands; j++) {
-	RASTER_MAP_TYPE maptype = Rast_get_raster_map_type(fds[j]);
+	RASTER_MAP_TYPE maptype = Rast_get_map_type(fds[j]);
 	void *rowbuf1 = NULL;
 	void *rowbuf1 = NULL;
 	void *rowbuf2 = NULL;
 	void *rowbuf2 = NULL;
 
 
@@ -309,7 +309,7 @@ static int calc_covariance(int *fds, double **covar, double *mu, int bands)
 		G_fatal_error(_("Unable to read raster map row %d"), row);
 		G_fatal_error(_("Unable to read raster map row %d"), row);
 
 
 	    for (k = j; k < bands; k++) {
 	    for (k = j; k < bands; k++) {
-		RASTER_MAP_TYPE maptype2 = Rast_get_raster_map_type(fds[k]);
+		RASTER_MAP_TYPE maptype2 = Rast_get_map_type(fds[k]);
 
 
 		/* don't assume each image is of the same type */
 		/* don't assume each image is of the same type */
 		if (rowbuf2)
 		if (rowbuf2)
@@ -390,9 +390,9 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
 
 
 	/* open a new file for output */
 	/* open a new file for output */
 	if (scale)
 	if (scale)
-	    out_fd = Rast_open_cell_new(name);
+	    out_fd = Rast_open_c_new(name);
 	else {
 	else {
-	    out_fd = Rast_open_fp_cell_new(name);
+	    out_fd = Rast_open_fp_new(name);
 	    Rast_set_fp_type(DCELL_TYPE);
 	    Rast_set_fp_type(DCELL_TYPE);
 	}
 	}
 
 
@@ -424,7 +424,7 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
 
 
 		for (j = 0; j < bands; j++) {
 		for (j = 0; j < bands; j++) {
 		    RASTER_MAP_TYPE maptype =
 		    RASTER_MAP_TYPE maptype =
-			Rast_get_raster_map_type(inp_fd[j]);
+			Rast_get_map_type(inp_fd[j]);
 
 
 		    /* don't assume each image is of the same type */
 		    /* don't assume each image is of the same type */
 		    if (rowbuf)
 		    if (rowbuf)

+ 1 - 1
imagery/i.pca/support.c

@@ -21,7 +21,7 @@ int write_support(int bands, char *outname, double **eigmat, double *eigval)
 
 
     Rast_make_grey_scale_fp_colors(&colors, min, max);
     Rast_make_grey_scale_fp_colors(&colors, min, max);
 
 
-    if (Rast_raster_map_is_fp(outname, mapset))
+    if (Rast_map_is_fp(outname, mapset))
 	Rast_mark_colors_as_fp(&colors);
 	Rast_mark_colors_as_fp(&colors);
 
 
     if (Rast_write_colors(outname, mapset, &colors) < 0)
     if (Rast_write_colors(outname, mapset, &colors) < 0)

+ 1 - 1
imagery/i.points/drawcell.c

@@ -49,7 +49,7 @@ int drawcell(View * view)
     if (getenv("NO_DRAW"))
     if (getenv("NO_DRAW"))
 	return 1;
 	return 1;
 
 
-    fd = Rast_open_cell_old(view->cell.name, view->cell.mapset);
+    fd = Rast_open_old(view->cell.name, view->cell.mapset);
     if (fd < 0)
     if (fd < 0)
 	return 0;
 	return 0;
     dcell = Rast_allocate_d_buf();
     dcell = Rast_allocate_d_buf();

+ 2 - 2
imagery/i.rectify/rectify.c

@@ -42,12 +42,12 @@ int rectify(char *name, char *mapset, char *result, int order)
      * set window to cellhd first to be able to read file exactly
      * set window to cellhd first to be able to read file exactly
      */
      */
     Rast_set_window(&cellhd);
     Rast_set_window(&cellhd);
-    infd = Rast_open_cell_old(name, mapset);
+    infd = Rast_open_old(name, mapset);
     if (infd < 0) {
     if (infd < 0) {
 	close(infd);
 	close(infd);
 	return 0;
 	return 0;
     }
     }
-    map_type = Rast_get_raster_map_type(infd);
+    map_type = Rast_get_map_type(infd);
     rast = (void *)G_calloc(G_window_cols() + 1, Rast_cell_size(map_type));
     rast = (void *)G_calloc(G_window_cols() + 1, Rast_cell_size(map_type));
     Rast_set_null_value(rast, G_window_cols() + 1, map_type);
     Rast_set_null_value(rast, G_window_cols() + 1, map_type);
 
 

+ 1 - 1
imagery/i.rectify/write.c

@@ -46,7 +46,7 @@ int write_map(char *name)
     rast = Rast_allocate_buf(map_type);
     rast = Rast_allocate_buf(map_type);
     close(temp_fd);
     close(temp_fd);
     temp_fd = open(temp_name, 0);
     temp_fd = open(temp_name, 0);
-    fd = Rast_open_raster_new(name, map_type);
+    fd = Rast_open_new(name, map_type);
 
 
     if (fd <= 0)
     if (fd <= 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
 	G_fatal_error(_("Unable to create raster map <%s>"), name);

+ 6 - 6
imagery/i.rgb.his/openfiles.c

@@ -9,19 +9,19 @@ void openfiles(char *r_name, char *g_name, char *b_name,
 	       char *h_name, char *i_name, char *s_name,
 	       char *h_name, char *i_name, char *s_name,
 	       int fd_input[3], int fd_output[3], CELL * rowbuf[3])
 	       int fd_input[3], int fd_output[3], CELL * rowbuf[3])
 {
 {
-    if ((fd_input[0] = Rast_open_cell_old(r_name, "")) < 0)
+    if ((fd_input[0] = Rast_open_old(r_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), r_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), r_name);
-    if ((fd_input[1] = Rast_open_cell_old(g_name, "")) < 0)
+    if ((fd_input[1] = Rast_open_old(g_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), g_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), g_name);
-    if ((fd_input[2] = Rast_open_cell_old(b_name, "")) < 0)
+    if ((fd_input[2] = Rast_open_old(b_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), b_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), b_name);
 
 
     /* open output files */
     /* open output files */
-    if ((fd_output[0] = Rast_open_cell_new(h_name)) < 0)
+    if ((fd_output[0] = Rast_open_c_new(h_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), h_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), h_name);
-    if ((fd_output[1] = Rast_open_cell_new(i_name)) < 0)
+    if ((fd_output[1] = Rast_open_c_new(i_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), i_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), i_name);
-    if ((fd_output[2] = Rast_open_cell_new(s_name)) < 0)
+    if ((fd_output[2] = Rast_open_c_new(s_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), s_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), s_name);
 
 
     /* allocate the cell row buffer */
     /* allocate the cell row buffer */

+ 2 - 2
imagery/i.smap/opencell.c

@@ -10,7 +10,7 @@ int open_cell_old(const char *name, const char *mapset)
 
 
     if (mapset == NULL)
     if (mapset == NULL)
 	mapset = G_find_cell2(name, "");
 	mapset = G_find_cell2(name, "");
-    fd = Rast_open_cell_old(name, mapset);
+    fd = Rast_open_old(name, mapset);
     if (fd >= 0)
     if (fd >= 0)
 	return fd;
 	return fd;
 
 
@@ -24,7 +24,7 @@ int open_cell_new(const char *name)
 {
 {
     int fd;
     int fd;
 
 
-    fd = Rast_open_cell_new(name);
+    fd = Rast_open_c_new(name);
     if (fd >= 0)
     if (fd >= 0)
 	return fd;
 	return fd;
 
 

+ 3 - 3
imagery/i.sunhours/main.c

@@ -70,12 +70,12 @@ int main(int argc, char *argv[])
     result1 = output1->answer;
     result1 = output1->answer;
 
 
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd_doy = Rast_open_cell_old(doy, "")) < 0)
+    if ((infd_doy = Rast_open_old(doy, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), doy);
 	G_fatal_error(_("Cannot open cell file [%s]"), doy);
     inrast_doy = Rast_allocate_d_buf();
     inrast_doy = Rast_allocate_d_buf();
 
 
     /***************************************************/ 
     /***************************************************/ 
-    if ((infd_lat = Rast_open_cell_old(lat, "")) < 0)
+    if ((infd_lat = Rast_open_old(lat, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), lat);
 	G_fatal_error(_("Cannot open cell file [%s]"), lat);
     inrast_lat = Rast_allocate_d_buf();
     inrast_lat = Rast_allocate_d_buf();
 
 
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
 
 
     outrast1 = Rast_allocate_d_buf();
     outrast1 = Rast_allocate_d_buf();
 
 
-    if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
+    if ((outfd1 = Rast_open_new(result1, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Could not open <%s>"), result1);
 	G_fatal_error(_("Could not open <%s>"), result1);
 
 
     for (row = 0; row < nrows; row++)
     for (row = 0; row < nrows; row++)

+ 7 - 7
imagery/i.vi/main.c

@@ -210,36 +210,36 @@ int main(int argc, char *argv[])
                 || !(input6->answer) || !(input7->answer)) )
                 || !(input6->answer) || !(input7->answer)) )
 	G_fatal_error(_("gvi index requires blue, green, red, nir, chan5 and chan7 maps"));
 	G_fatal_error(_("gvi index requires blue, green, red, nir, chan5 and chan7 maps"));
 
 
-    if ((infd_redchan = Rast_open_cell_old(redchan, "")) < 0)
+    if ((infd_redchan = Rast_open_old(redchan, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), redchan);
 	G_fatal_error(_("Unable to open raster map <%s>"), redchan);
     inrast_redchan = Rast_allocate_d_buf();
     inrast_redchan = Rast_allocate_d_buf();
 
 
     if (nirchan) {
     if (nirchan) {
-        if ((infd_nirchan = Rast_open_cell_old(nirchan, "")) < 0)
+        if ((infd_nirchan = Rast_open_old(nirchan, "")) < 0)
             G_fatal_error(_("Unable to open raster map <%s>"), nirchan);
             G_fatal_error(_("Unable to open raster map <%s>"), nirchan);
         inrast_nirchan = Rast_allocate_d_buf();
         inrast_nirchan = Rast_allocate_d_buf();
     }
     }
 
 
     if (greenchan) {
     if (greenchan) {
-	if ((infd_greenchan = Rast_open_cell_old(greenchan, "")) < 0)
+	if ((infd_greenchan = Rast_open_old(greenchan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), greenchan);
 	    G_fatal_error(_("Unable to open raster map <%s>"), greenchan);
 	inrast_greenchan = Rast_allocate_d_buf();
 	inrast_greenchan = Rast_allocate_d_buf();
     }
     }
 
 
     if (bluechan) {
     if (bluechan) {
-	if ((infd_bluechan = Rast_open_cell_old(bluechan, "")) < 0)
+	if ((infd_bluechan = Rast_open_old(bluechan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), bluechan);
 	    G_fatal_error(_("Unable to open raster map <%s>"), bluechan);
 	inrast_bluechan = Rast_allocate_d_buf();
 	inrast_bluechan = Rast_allocate_d_buf();
     }
     }
 
 
     if (chan5chan) {
     if (chan5chan) {
-	if ((infd_chan5chan = Rast_open_cell_old(chan5chan, "")) < 0)
+	if ((infd_chan5chan = Rast_open_old(chan5chan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), chan5chan);
 	    G_fatal_error(_("Unable to open raster map <%s>"), chan5chan);
 	inrast_chan5chan = Rast_allocate_d_buf();
 	inrast_chan5chan = Rast_allocate_d_buf();
     }
     }
 
 
     if (chan7chan) {
     if (chan7chan) {
-	if ((infd_chan7chan = Rast_open_cell_old(chan7chan, "")) < 0)
+	if ((infd_chan7chan = Rast_open_old(chan7chan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), chan7chan);
 	    G_fatal_error(_("Unable to open raster map <%s>"), chan7chan);
 	inrast_chan7chan = Rast_allocate_d_buf();
 	inrast_chan7chan = Rast_allocate_d_buf();
     }
     }
@@ -249,7 +249,7 @@ int main(int argc, char *argv[])
     outrast = Rast_allocate_d_buf();
     outrast = Rast_allocate_d_buf();
 
 
     /* Create New raster files */ 
     /* Create New raster files */ 
-    if ((outfd = Rast_open_raster_new(result, DCELL_TYPE)) < 0)
+    if ((outfd = Rast_open_new(result, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     /* Process pixels */ 
     /* Process pixels */ 

+ 1 - 1
imagery/i.vpoints/drawcell.c

@@ -59,7 +59,7 @@ int drawcell(View * view, int initflag)
     if (getenv("NO_DRAW"))
     if (getenv("NO_DRAW"))
 	return 1;
 	return 1;
 
 
-    fd = Rast_open_cell_old(view->cell.name, view->cell.mapset);
+    fd = Rast_open_old(view->cell.name, view->cell.mapset);
     if (fd < 0)
     if (fd < 0)
 	return 0;
 	return 0;
     dcell = Rast_allocate_d_buf();
     dcell = Rast_allocate_d_buf();

+ 2 - 2
imagery/i.zc/main.c

@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
     /* open input cell map */
     /* open input cell map */
-    inputfd = Rast_open_cell_old(input_map->answer, "");
+    inputfd = Rast_open_old(input_map->answer, "");
     if (inputfd < 0)
     if (inputfd < 0)
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
@@ -172,7 +172,7 @@ int main(int argc, char *argv[])
 
 
     /* open the output cell maps and allocate cell row buffers */
     /* open the output cell maps and allocate cell row buffers */
     G_message(_("Writing transformed data to file..."));
     G_message(_("Writing transformed data to file..."));
-    if ((zcfd = Rast_open_cell_new(output_map->answer)) < 0)
+    if ((zcfd = Rast_open_c_new(output_map->answer)) < 0)
 	exit(EXIT_FAILURE);
 	exit(EXIT_FAILURE);
 
 
     cell_row = Rast_allocate_c_buf();
     cell_row = Rast_allocate_c_buf();

+ 12 - 12
include/raster.h

@@ -379,22 +379,22 @@ void Rast__convert_flags_01(char *, const unsigned char *, int);
 void Rast__init_null_bits(unsigned char *, int);
 void Rast__init_null_bits(unsigned char *, int);
 
 
 /* opencell.c */
 /* opencell.c */
-int Rast_open_cell_old(const char *, const char *);
-int Rast__open_cell_old(const char *, const char *);
-int Rast_open_cell_new(const char *);
-int Rast_open_cell_new_uncompressed(const char *);
+int Rast_open_old(const char *, const char *);
+int Rast__open_old(const char *, const char *);
+int Rast_open_new(const char *);
+int Rast_open_new_uncompressed(const char *);
 void Rast_want_histogram(int);
 void Rast_want_histogram(int);
 void Rast_set_cell_format(int);
 void Rast_set_cell_format(int);
-int Rast_cellvalue_format(CELL);
-int Rast_open_fp_cell_new(const char *);
-int Rast_open_fp_cell_new_uncompressed(const char *);
+int Rast_get_cell_format(CELL);
+int Rast_open_fp_new(const char *);
+int Rast_open_fp_new_uncompressed(const char *);
 int Rast_set_fp_type(RASTER_MAP_TYPE);
 int Rast_set_fp_type(RASTER_MAP_TYPE);
-int Rast_raster_map_is_fp(const char *, const char *);
-RASTER_MAP_TYPE Rast_raster_map_type(const char *, const char *);
+int Rast_map_is_fp(const char *, const char *);
+RASTER_MAP_TYPE Rast_map_type(const char *, const char *);
 RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
 RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
-RASTER_MAP_TYPE Rast_get_raster_map_type(int);
-int Rast_open_raster_new(const char *, RASTER_MAP_TYPE);
-int Rast_open_raster_new_uncompressed(const char *, RASTER_MAP_TYPE);
+RASTER_MAP_TYPE Rast_get_map_type(int);
+int Rast_open_new(const char *, RASTER_MAP_TYPE);
+int Rast_open_new_uncompressed(const char *, RASTER_MAP_TYPE);
 int Rast_set_quant_rules(int, struct Quant *);
 int Rast_set_quant_rules(int, struct Quant *);
 
 
 /* put_cellhd.c */
 /* put_cellhd.c */

+ 3 - 3
lib/gpde/N_arrays_io.c

@@ -64,11 +64,11 @@ N_array_2d *N_read_rast_to_array_2d(char *name, N_array_2d * array)
     cols = region.cols;
     cols = region.cols;
 
 
     /*open the raster map */
     /*open the raster map */
-    map = Rast_open_cell_old(name, G_find_cell2(name, ""));
+    map = Rast_open_old(name, G_find_cell2(name, ""));
     if (map < 0)
     if (map < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
-    type = Rast_get_raster_map_type(map);
+    type = Rast_get_map_type(map);
 
 
     /*if the array is NULL create a new one with the data type of the raster map */
     /*if the array is NULL create a new one with the data type of the raster map */
     /*the offset is 0 by default */
     /*the offset is 0 by default */
@@ -199,7 +199,7 @@ void N_write_array_2d_to_rast(N_array_2d * array, char *name)
     type = array->type;
     type = array->type;
 
 
     /*Open the new map */
     /*Open the new map */
-    map = Rast_open_raster_new(name, type);
+    map = Rast_open_new(name, type);
     if (map < 0)
     if (map < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
 
 

+ 8 - 8
lib/ogsf/Gs3.c

@@ -134,7 +134,7 @@ int Gs_loadmap_as_float(struct Cell_head *wind, const char *map_name,
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
     }
     }
 
 
-    if ((cellfile = Rast_open_cell_old(map_name, map_set)) == -1) {
+    if ((cellfile = Rast_open_old(map_name, map_set)) == -1) {
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
     }
     }
 
 
@@ -209,7 +209,7 @@ int Gs_loadmap_as_int(struct Cell_head *wind, const char *map_name, int *buff,
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
     }
     }
 
 
-    if ((cellfile = Rast_open_cell_old(map_name, map_set)) == -1) {
+    if ((cellfile = Rast_open_old(map_name, map_set)) == -1) {
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
     }
     }
 
 
@@ -288,7 +288,7 @@ int Gs_numtype(const char *filename, int *negflag)
 	return -1;
 	return -1;
     }
     }
 
 
-    if (Rast_raster_map_is_fp(filename, mapset)) {
+    if (Rast_map_is_fp(filename, mapset)) {
 	G_debug(3, "Gs_numtype(): fp map detected");
 	G_debug(3, "Gs_numtype(): fp map detected");
 
 
 	return (ATTY_FLOAT);
 	return (ATTY_FLOAT);
@@ -367,7 +367,7 @@ int Gs_loadmap_as_short(struct Cell_head *wind, const char *map_name,
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
     }
     }
 
 
-    if ((cellfile = Rast_open_cell_old(map_name, map_set)) == -1) {
+    if ((cellfile = Rast_open_old(map_name, map_set)) == -1) {
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
     }
     }
 
 
@@ -483,7 +483,7 @@ int Gs_loadmap_as_char(struct Cell_head *wind, const char *map_name,
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
 	G_fatal_error(_("Unable to allocate memory for a null buffer"));
     }
     }
 
 
-    if ((cellfile = Rast_open_cell_old(map_name, map_set)) == -1) {
+    if ((cellfile = Rast_open_old(map_name, map_set)) == -1) {
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
     }
     }
 
 
@@ -574,7 +574,7 @@ int Gs_loadmap_as_bitmap(struct Cell_head *wind, const char *map_name,
 	return -1;
 	return -1;
     }
     }
 
 
-    if ((cellfile = Rast_open_cell_old(map_name, map_set)) == -1) {
+    if ((cellfile = Rast_open_old(map_name, map_set)) == -1) {
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), map_name);
     }
     }
 
 
@@ -838,8 +838,8 @@ int Gs_get_cat_label(const char *filename, int drow, int dcol, char *catstr)
     }
     }
 
 
     if (-1 != Rast_read_cats(filename, mapset, &cats)) {
     if (-1 != Rast_read_cats(filename, mapset, &cats)) {
-	fd = Rast_open_cell_old(filename, mapset);
-	map_type = Rast_get_raster_map_type(fd);
+	fd = Rast_open_old(filename, mapset);
+	map_type = Rast_get_map_type(fd);
 
 
 	if (map_type == CELL_TYPE) {
 	if (map_type == CELL_TYPE) {
 	    buf = Rast_allocate_c_buf();
 	    buf = Rast_allocate_c_buf();

+ 1 - 1
lib/ogsf/gsd_legend.c

@@ -240,7 +240,7 @@ GLuint gsd_put_legend(const char *name, GLuint fontbase, int size, int *flags,
 	return (-1);
 	return (-1);
     }
     }
 
 
-    is_fp = Rast_raster_map_is_fp(name, mapset);
+    is_fp = Rast_map_is_fp(name, mapset);
 
 
     if (Rast_read_colors(name, mapset, &colors) == -1) {
     if (Rast_read_colors(name, mapset, &colors) == -1) {
 	G_warning(_("Unable to read color file of raster map <%s>"), name);
 	G_warning(_("Unable to read color file of raster map <%s>"), name);

+ 1 - 1
lib/raster/auto_mask.c

@@ -61,7 +61,7 @@ int Rast__check_for_auto_masking(void)
     }
     }
 
 
     Rast_unopen(R__.mask_fd);
     Rast_unopen(R__.mask_fd);
-    R__.mask_fd = Rast__open_cell_old("MASK", G_mapset());
+    R__.mask_fd = Rast__open_old("MASK", G_mapset());
     if (R__.mask_fd < 0) {
     if (R__.mask_fd < 0) {
 	R__.auto_mask = 0;
 	R__.auto_mask = 0;
 	G_warning(_("Unable to open automatic MASK file"));
 	G_warning(_("Unable to open automatic MASK file"));

+ 2 - 2
lib/raster/cats.c

@@ -196,7 +196,7 @@ static CELL read_cats(const char *element,
     if (strncmp(element, "dig", 3) == 0)
     if (strncmp(element, "dig", 3) == 0)
 	fp_map = 0;
 	fp_map = 0;
     else
     else
-	fp_map = Rast_raster_map_is_fp(name, mapset);
+	fp_map = Rast_map_is_fp(name, mapset);
 
 
     if (!(fd = G_fopen_old(element, name, mapset)))
     if (!(fd = G_fopen_old(element, name, mapset)))
 	return -2;
 	return -2;
@@ -981,7 +981,7 @@ static int write_cats(const char *element, const char *name, struct Categories *
     if (strncmp(element, "dig", 3) == 0)
     if (strncmp(element, "dig", 3) == 0)
 	fp_map = 0;
 	fp_map = 0;
     else
     else
-	fp_map = Rast_raster_map_is_fp(name, G_mapset());
+	fp_map = Rast_map_is_fp(name, G_mapset());
     if (!fp_map)
     if (!fp_map)
 	Rast_sort_cats(cats);
 	Rast_sort_cats(cats);
 
 

+ 1 - 1
lib/raster/color_read.c

@@ -65,7 +65,7 @@ int Rast_read_colors(const char *name, const char *mapset, struct Colors *colors
     CELL min, max;
     CELL min, max;
     DCELL dmin, dmax;
     DCELL dmin, dmax;
 
 
-    fp = Rast_raster_map_is_fp(name, mapset);
+    fp = Rast_map_is_fp(name, mapset);
     Rast_init_colors(colors);
     Rast_init_colors(colors);
 
 
     strcpy(xname, name);
     strcpy(xname, name);

+ 1 - 1
lib/raster/gdal.c

@@ -186,7 +186,7 @@ struct GDAL_link *Rast_get_gdal_link(const char *name, const char *mapset)
     if (!G_find_cell2(name, mapset))
     if (!G_find_cell2(name, mapset))
 	return NULL;
 	return NULL;
 
 
-    map_type = Rast_raster_map_type(name, mapset);
+    map_type = Rast_map_type(name, mapset);
     if (map_type < 0)
     if (map_type < 0)
 	return NULL;
 	return NULL;
 
 

+ 1 - 1
lib/raster/get_row_colr.c

@@ -42,7 +42,7 @@ int Rast_get_row_colors(int fd, int row, struct Colors *colors,
 			    unsigned char *blu, unsigned char *nul)
 			    unsigned char *blu, unsigned char *nul)
 {
 {
     int cols = G_window_cols();
     int cols = G_window_cols();
-    int type = Rast_get_raster_map_type(fd);
+    int type = Rast_get_map_type(fd);
     int size = Rast_cell_size(type);
     int size = Rast_cell_size(type);
     void *array;
     void *array;
     unsigned char *set;
     unsigned char *set;

+ 24 - 24
lib/raster/opencell.c

@@ -66,7 +66,7 @@ static struct fileinfo *new_fileinfo(int fd)
  * for the map using Rast_read_quant(). If the programmer wants to read
  * for the map using Rast_read_quant(). If the programmer wants to read
  * the floating point map using uing quant rules other than the ones
  * the floating point map using uing quant rules other than the ones
  * stored in map's quant file, he/she should call Rast_set_quant_rules()
  * stored in map's quant file, he/she should call Rast_set_quant_rules()
- * after the call to Rast_open_cell_old().
+ * after the call to Rast_open_old().
  *
  *
  * \param name map name
  * \param name map name
  * \param open_mode mode
  * \param open_mode mode
@@ -105,11 +105,11 @@ static int G__open_raster_new(const char *name, int open_mode,
   \return nonnegative file descriptor (int)
   \return nonnegative file descriptor (int)
   \return -1 on failure
   \return -1 on failure
  */
  */
-int Rast_open_cell_old(const char *name, const char *mapset)
+int Rast_open_old(const char *name, const char *mapset)
 {
 {
     int fd;
     int fd;
 
 
-    if ((fd = Rast__open_cell_old(name, mapset)) < 0) {
+    if ((fd = Rast__open_old(name, mapset)) < 0) {
 	G_warning(_("Unable to open raster map <%s@%s>"), name, mapset);
 	G_warning(_("Unable to open raster map <%s@%s>"), name, mapset);
 	return fd;
 	return fd;
     }
     }
@@ -143,7 +143,7 @@ int Rast_open_cell_old(const char *name, const char *mapset)
   
   
   Note: This routine does NOT open the MASK layer. If it did we would
   Note: This routine does NOT open the MASK layer. If it did we would
   get infinite recursion.  This routine is called to open the mask by
   get infinite recursion.  This routine is called to open the mask by
-  Rast__check_for_auto_masking() which is called by Rast_open_cell_old().
+  Rast__check_for_auto_masking() which is called by Rast_open_old().
  
  
   \param name map name
   \param name map name
   \param mapset mapset of cell file to be opened
   \param mapset mapset of cell file to be opened
@@ -151,7 +151,7 @@ int Rast_open_cell_old(const char *name, const char *mapset)
   \return open file descriptor
   \return open file descriptor
   \return -1 if error
   \return -1 if error
 */
 */
-int Rast__open_cell_old(const char *name, const char *mapset)
+int Rast__open_old(const char *name, const char *mapset)
 {
 {
     struct fileinfo *fcb;
     struct fileinfo *fcb;
     int fd;
     int fd;
@@ -207,7 +207,7 @@ int Rast__open_cell_old(const char *name, const char *mapset)
 	return -1;
 	return -1;
 
 
     /* now check the type */
     /* now check the type */
-    MAP_TYPE = Rast_raster_map_type(r_name, r_mapset);
+    MAP_TYPE = Rast_map_type(r_name, r_mapset);
     if (MAP_TYPE < 0)
     if (MAP_TYPE < 0)
 	return -1;
 	return -1;
 
 
@@ -359,7 +359,7 @@ int Rast__open_cell_old(const char *name, const char *mapset)
   The file is created and filled with no data it is assumed that the
   The file is created and filled with no data it is assumed that the
   new cell file is to conform to the current window.
   new cell file is to conform to the current window.
  
  
-  The file must be written sequentially. Use Rast_open_cell_new_random()
+  The file must be written sequentially. Use Rast_open_new_random()
   for non sequential writes.
   for non sequential writes.
   
   
   Note: the open actually creates a temporary file Rast_close() will
   Note: the open actually creates a temporary file Rast_close() will
@@ -377,7 +377,7 @@ int Rast__open_cell_old(const char *name, const char *mapset)
   \return open file descriptor ( >= 0) if successful
   \return open file descriptor ( >= 0) if successful
   \return negative integer if error
   \return negative integer if error
 */
 */
-int Rast_open_cell_new(const char *name)
+int Rast_open_c_new(const char *name)
 {
 {
     return G__open_raster_new(name, OPEN_NEW_COMPRESSED, CELL_TYPE);
     return G__open_raster_new(name, OPEN_NEW_COMPRESSED, CELL_TYPE);
 }
 }
@@ -385,14 +385,14 @@ int Rast_open_cell_new(const char *name)
 /*!
 /*!
   \brief Opens a new cell file in a database (uncompressed)
   \brief Opens a new cell file in a database (uncompressed)
 
 
-  See also Rast_open_cell_new().
+  See also Rast_open_new().
  
  
   \param name map name
   \param name map name
 
 
   \return open file descriptor ( >= 0) if successful
   \return open file descriptor ( >= 0) if successful
   \return negative integer if error
   \return negative integer if error
 */
 */
-int Rast_open_cell_new_uncompressed(const char *name)
+int Rast_open_c_new_uncompressed(const char *name)
 {
 {
     return G__open_raster_new(name, OPEN_NEW_UNCOMPRESSED, CELL_TYPE);
     return G__open_raster_new(name, OPEN_NEW_UNCOMPRESSED, CELL_TYPE);
 }
 }
@@ -439,7 +439,7 @@ void Rast_set_cell_format(int n)
 
 
   \return cell format
   \return cell format
 */
 */
-int Rast_cellvalue_format(CELL v)
+int Rast_get_cell_format(CELL v)
 {
 {
     unsigned int i;
     unsigned int i;
 
 
@@ -460,14 +460,14 @@ int Rast_cellvalue_format(CELL v)
 
 
   Use Rast_set_fp_type() where type is one of DCELL_TYPE or FCELL_TYPE.
   Use Rast_set_fp_type() where type is one of DCELL_TYPE or FCELL_TYPE.
 
 
-  See warnings and notes for Rast_open_cell_new().
+  See warnings and notes for Rast_open_new().
 
 
   \param name map name
   \param name map name
 
 
   \return nonnegative file descriptor (int)
   \return nonnegative file descriptor (int)
   \return -1 on error
   \return -1 on error
 */
 */
-int Rast_open_fp_cell_new(const char *name)
+int Rast_open_fp_new(const char *name)
 {
 {
     return G__open_raster_new(name, OPEN_NEW_COMPRESSED, R__.fp_type);
     return G__open_raster_new(name, OPEN_NEW_COMPRESSED, R__.fp_type);
 }
 }
@@ -475,14 +475,14 @@ int Rast_open_fp_cell_new(const char *name)
 /*!
 /*!
   \brief Opens new fcell file in a database (uncompressed)
   \brief Opens new fcell file in a database (uncompressed)
 
 
-  See Rast_open_fp_cell_new() for details.
+  See Rast_open_fp_new() for details.
 
 
   \param name map name
   \param name map name
 
 
   \return nonnegative file descriptor (int)
   \return nonnegative file descriptor (int)
   \return -1 on error
   \return -1 on error
 */
 */
-int Rast_open_fp_cell_new_uncompressed(const char *name)
+int Rast_open_fp_new_uncompressed(const char *name)
 {
 {
     return G__open_raster_new(name, OPEN_NEW_UNCOMPRESSED, R__.fp_type);
     return G__open_raster_new(name, OPEN_NEW_UNCOMPRESSED, R__.fp_type);
 }
 }
@@ -751,7 +751,7 @@ int Rast_set_fp_type(RASTER_MAP_TYPE map_type)
   \return 1 floating-point
   \return 1 floating-point
   \return 0 int
   \return 0 int
 */
 */
-int Rast_raster_map_is_fp(const char *name, const char *mapset)
+int Rast_map_is_fp(const char *name, const char *mapset)
 {
 {
     char path[GPATH_MAX];
     char path[GPATH_MAX];
     const char *xmapset;
     const char *xmapset;
@@ -783,7 +783,7 @@ int Rast_raster_map_is_fp(const char *name, const char *mapset)
 
 
   \return raster data type
   \return raster data type
 */
 */
-RASTER_MAP_TYPE Rast_raster_map_type(const char *name, const char *mapset)
+RASTER_MAP_TYPE Rast_map_type(const char *name, const char *mapset)
 {
 {
     char path[GPATH_MAX];
     char path[GPATH_MAX];
     const char *xmapset;
     const char *xmapset;
@@ -820,7 +820,7 @@ RASTER_MAP_TYPE Rast_raster_map_type(const char *name, const char *mapset)
 
 
   \return raster data type
   \return raster data type
  */
  */
-RASTER_MAP_TYPE Rast_get_raster_map_type(int fd)
+RASTER_MAP_TYPE Rast_get_map_type(int fd)
 {
 {
     struct fileinfo *fcb = &R__.fileinfo[fd];
     struct fileinfo *fcb = &R__.fileinfo[fd];
 
 
@@ -892,14 +892,14 @@ RASTER_MAP_TYPE Rast__check_fp_type(const char *name, const char *mapset)
 
 
   Opens a new raster map of type <i>wr_type</i>
   Opens a new raster map of type <i>wr_type</i>
 
 
-  See warnings and notes for Rast_open_cell_new().
+  See warnings and notes for Rast_open_new().
 
 
   Supported data types:
   Supported data types:
    - CELL_TYPE
    - CELL_TYPE
    - FCELL_TYPE
    - FCELL_TYPE
    - DCELL_TYPE
    - DCELL_TYPE
   
   
-  On CELL_TYPE calls Rast_open_cell_new() otherwise Rast_open_fp_cell_new().
+  On CELL_TYPE calls Rast_open_new() otherwise Rast_open_fp_new().
  
  
   \param name map name
   \param name map name
   \param wr_type raster data type
   \param wr_type raster data type
@@ -907,7 +907,7 @@ RASTER_MAP_TYPE Rast__check_fp_type(const char *name, const char *mapset)
   \return nonnegative file descriptor (int)
   \return nonnegative file descriptor (int)
   \return -1 on error
   \return -1 on error
 */
 */
-int Rast_open_raster_new(const char *name, RASTER_MAP_TYPE wr_type)
+int Rast_open_new(const char *name, RASTER_MAP_TYPE wr_type)
 {
 {
     return G__open_raster_new(name, OPEN_NEW_COMPRESSED, wr_type);
     return G__open_raster_new(name, OPEN_NEW_COMPRESSED, wr_type);
 }
 }
@@ -915,7 +915,7 @@ int Rast_open_raster_new(const char *name, RASTER_MAP_TYPE wr_type)
 /*!
 /*!
   \brief Opens a new raster map (uncompressed)
   \brief Opens a new raster map (uncompressed)
 
 
-  See Rast_open_raster_new().
+  See Rast_open_new().
 
 
   \param name map name
   \param name map name
   \param wr_type raster data type
   \param wr_type raster data type
@@ -923,7 +923,7 @@ int Rast_open_raster_new(const char *name, RASTER_MAP_TYPE wr_type)
   \return nonnegative file descriptor (int)
   \return nonnegative file descriptor (int)
   \return -1 on error
   \return -1 on error
 */
 */
-int Rast_open_raster_new_uncompressed(const char *name, RASTER_MAP_TYPE wr_type)
+int Rast_open_new_uncompressed(const char *name, RASTER_MAP_TYPE wr_type)
 {
 {
     return G__open_raster_new(name, OPEN_NEW_UNCOMPRESSED, wr_type);
     return G__open_raster_new(name, OPEN_NEW_UNCOMPRESSED, wr_type);
 }
 }
@@ -932,7 +932,7 @@ int Rast_open_raster_new_uncompressed(const char *name, RASTER_MAP_TYPE wr_type)
   \brief Sets quant translation rules for raster map opened for
   \brief Sets quant translation rules for raster map opened for
   reading.
   reading.
 
 
-  Returned by Rast_open_cell_old(). After calling this function,
+  Returned by Rast_open_old(). After calling this function,
   Rast_get_c_row() and Rast_get_c_row() will use rules defined by q
   Rast_get_c_row() and Rast_get_c_row() will use rules defined by q
   (instead of using rules defined in map's quant file) to convert floats to
   (instead of using rules defined in map's quant file) to convert floats to
   ints.
   ints.

+ 2 - 2
lib/raster/put_row.c

@@ -7,7 +7,7 @@
  *
  *
  *   Writes the next row for the cell file opened on 'fd' from 'buf'
  *   Writes the next row for the cell file opened on 'fd' from 'buf'
  *   All writes go into NEW files that exactly match the current window.
  *   All writes go into NEW files that exactly match the current window.
- *   The file must have been opened with Rast_open_cell_new()
+ *   The file must have been opened with Rast_open_new()
  *   and be written sequentially, ie no skipping rows
  *   and be written sequentially, ie no skipping rows
  *
  *
  *   when the null values are embeded into the data, corresponding cells are 
  *   when the null values are embeded into the data, corresponding cells are 
@@ -38,7 +38,7 @@
  *
  *
  *   Writes the next row for the cell file opened on 'fd' from 'buf'
  *   Writes the next row for the cell file opened on 'fd' from 'buf'
  *   All writes go into NEW files that exactly match the current window.
  *   All writes go into NEW files that exactly match the current window.
- *   The file must have been opened with Rast_open_cell_new()
+ *   The file must have been opened with Rast_open_new()
  *   and be written sequentially, ie no skipping rows
  *   and be written sequentially, ie no skipping rows
  *
  *
  *   NULLS are written into null bitmap file for all cells which are zero,
  *   NULLS are written into null bitmap file for all cells which are zero,

+ 1 - 1
lib/raster/quant_io.c

@@ -120,7 +120,7 @@ int Rast__quant_import(const char *name, const char *mapset, struct Quant *quant
 
 
     Rast_quant_free(quant);
     Rast_quant_free(quant);
 
 
-    if (Rast_raster_map_type(name, mapset) == CELL_TYPE) {
+    if (Rast_map_type(name, mapset) == CELL_TYPE) {
 	G_warning (_("Rast__quant_import: attempt to open quantization"
 	G_warning (_("Rast__quant_import: attempt to open quantization"
 		     " table for CELL_TYPE file [%s] in mapset {%s]"),
 		     " table for CELL_TYPE file [%s] in mapset {%s]"),
 		   name, mapset);
 		   name, mapset);

+ 1 - 1
lib/raster/quant_rw.c

@@ -187,7 +187,7 @@ int Rast_write_quant(const char *name, const char *mapset,
     CELL cell_min, cell_max;
     CELL cell_min, cell_max;
     DCELL d_min, d_max;
     DCELL d_min, d_max;
 
 
-    if (Rast_raster_map_type(name, mapset) == CELL_TYPE) {
+    if (Rast_map_type(name, mapset) == CELL_TYPE) {
 	G_warning(_("Unable to write quant rules: raster map <%s> is integer"),
 	G_warning(_("Unable to write quant rules: raster map <%s> is integer"),
 		  name);
 		  name);
 	return -1;
 	return -1;

+ 3 - 3
lib/raster/range.c

@@ -79,7 +79,7 @@ int Rast_read_fp_range(const char *name, const char *mapset,
 
 
     Rast_init_fp_range(drange);
     Rast_init_fp_range(drange);
 
 
-    if (Rast_raster_map_type(name, mapset) == CELL_TYPE) {
+    if (Rast_map_type(name, mapset) == CELL_TYPE) {
 	/* if map is integer
 	/* if map is integer
 	   read integer range and convert it to double */
 	   read integer range and convert it to double */
 
 
@@ -168,7 +168,7 @@ int Rast_read_range(const char *name, const char *mapset, struct Range *range)
     fd = NULL;
     fd = NULL;
 
 
     /* if map is not integer, read quant rules, and get limits */
     /* if map is not integer, read quant rules, and get limits */
-    if (Rast_raster_map_type(name, mapset) != CELL_TYPE) {
+    if (Rast_map_type(name, mapset) != CELL_TYPE) {
 	DCELL dmin, dmax;
 	DCELL dmin, dmax;
 
 
 	if (Rast_read_quant(name, mapset, &quant) < 0) {
 	if (Rast_read_quant(name, mapset, &quant) < 0) {
@@ -265,7 +265,7 @@ int Rast_write_range(const char *name, const struct Range *range)
 {
 {
     FILE *fd;
     FILE *fd;
 
 
-    if (Rast_raster_map_type(name, G_mapset()) != CELL_TYPE) {
+    if (Rast_map_type(name, G_mapset()) != CELL_TYPE) {
 	G_remove_misc("cell_misc", "range", name);	/* remove the old file with this name */
 	G_remove_misc("cell_misc", "range", name);	/* remove the old file with this name */
 	G_warning(_("Unable to write range file for <%s>"),
 	G_warning(_("Unable to write range file for <%s>"),
 		  name);
 		  name);

+ 1 - 1
lib/rst/interp_float/input2d.c

@@ -50,7 +50,7 @@ struct BM *IL_create_bitmask(struct interp_params *params)
 			      params->maskmap);
 			      params->maskmap);
 
 
 	    cellmask = Rast_allocate_c_buf();
 	    cellmask = Rast_allocate_c_buf();
-	    cfmask = Rast_open_cell_old(params->maskmap, mapsetm);
+	    cfmask = Rast_open_old(params->maskmap, mapsetm);
 	}
 	}
 	else
 	else
 	    cellmask = NULL;
 	    cellmask = NULL;

+ 6 - 6
lib/rst/interp_float/output2d.c

@@ -62,7 +62,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
      * G_set_embedded_null_value_mode(1);
      * G_set_embedded_null_value_mode(1);
      */
      */
     if (params->elev != NULL) {
     if (params->elev != NULL) {
-	cf1 = Rast_open_fp_cell_new(params->elev);
+	cf1 = Rast_open_fp_new(params->elev);
 	if (cf1 < 0) {
 	if (cf1 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"), params->elev);
 	    G_warning(_("Unable to create raster map <%s>"), params->elev);
 	    return -1;
 	    return -1;
@@ -70,7 +70,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
     }
     }
 
 
     if (params->slope != NULL) {
     if (params->slope != NULL) {
-	cf2 = Rast_open_fp_cell_new(params->slope);
+	cf2 = Rast_open_fp_new(params->slope);
 	if (cf2 < 0) {
 	if (cf2 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->slope);
 		      params->slope);
@@ -79,7 +79,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
     }
     }
 
 
     if (params->aspect != NULL) {
     if (params->aspect != NULL) {
-	cf3 = Rast_open_fp_cell_new(params->aspect);
+	cf3 = Rast_open_fp_new(params->aspect);
 	if (cf3 < 0) {
 	if (cf3 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		    params->aspect);
 		    params->aspect);
@@ -88,7 +88,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
     }
     }
 
 
     if (params->pcurv != NULL) {
     if (params->pcurv != NULL) {
-	cf4 = Rast_open_fp_cell_new(params->pcurv);
+	cf4 = Rast_open_fp_new(params->pcurv);
 	if (cf4 < 0) {
 	if (cf4 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->pcurv);
 		      params->pcurv);
@@ -97,7 +97,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
     }
     }
 
 
     if (params->tcurv != NULL) {
     if (params->tcurv != NULL) {
-	cf5 = Rast_open_fp_cell_new(params->tcurv);
+	cf5 = Rast_open_fp_new(params->tcurv);
 	if (cf5 < 0) {
 	if (cf5 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->tcurv);
 		      params->tcurv);
@@ -106,7 +106,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
     }
     }
 
 
     if (params->mcurv != NULL) {
     if (params->mcurv != NULL) {
-	cf6 = Rast_open_fp_cell_new(params->mcurv);
+	cf6 = Rast_open_fp_new(params->mcurv);
 	if (cf6 < 0) {
 	if (cf6 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->mcurv);
 		      params->mcurv);

+ 6 - 6
lib/rst/interp_float/resout2d.c

@@ -67,7 +67,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     cell1 = Rast_allocate_f_buf();
     cell1 = Rast_allocate_f_buf();
 
 
     if (params->elev != NULL) {
     if (params->elev != NULL) {
-	cf1 = Rast_open_fp_cell_new(params->elev);
+	cf1 = Rast_open_fp_new(params->elev);
 	if (cf1 < 0) {
 	if (cf1 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->elev);
 		      params->elev);
@@ -76,7 +76,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
     }
 
 
     if (params->slope != NULL) {
     if (params->slope != NULL) {
-	cf2 = Rast_open_fp_cell_new(params->slope);
+	cf2 = Rast_open_fp_new(params->slope);
 	if (cf2 < 0) {
 	if (cf2 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->elev);
 		      params->elev);
@@ -85,7 +85,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
     }
 
 
     if (params->aspect != NULL) {
     if (params->aspect != NULL) {
-	cf3 = Rast_open_fp_cell_new(params->aspect);
+	cf3 = Rast_open_fp_new(params->aspect);
 	if (cf3 < 0) {
 	if (cf3 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->elev);
 		      params->elev);
@@ -94,7 +94,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
     }
 
 
     if (params->pcurv != NULL) {
     if (params->pcurv != NULL) {
-	cf4 = Rast_open_fp_cell_new(params->pcurv);
+	cf4 = Rast_open_fp_new(params->pcurv);
 	if (cf4 < 0) {
 	if (cf4 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->elev);
 		      params->elev);
@@ -103,7 +103,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
     }
 
 
     if (params->tcurv != NULL) {
     if (params->tcurv != NULL) {
-	cf5 = Rast_open_fp_cell_new(params->tcurv);
+	cf5 = Rast_open_fp_new(params->tcurv);
 	if (cf5 < 0) {
 	if (cf5 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->elev);
 		      params->elev);
@@ -112,7 +112,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
     }
 
 
     if (params->mcurv != NULL) {
     if (params->mcurv != NULL) {
-	cf6 = Rast_open_fp_cell_new(params->mcurv);
+	cf6 = Rast_open_fp_new(params->mcurv);
 	if (cf6 < 0) {
 	if (cf6 < 0) {
 	    G_warning(_("Unable to create raster map <%s>"),
 	    G_warning(_("Unable to create raster map <%s>"),
 		      params->elev);
 		      params->elev);

+ 2 - 2
ps/ps.map/outl_io.c

@@ -64,10 +64,10 @@ RASTER_MAP_TYPE o_open_file(char *cell)
 {
 {
     /* open raster map */
     /* open raster map */
     sscanf(cell, "%s", cell_name);
     sscanf(cell, "%s", cell_name);
-    if ((in_file_d = Rast_open_cell_old(cell_name, "")) < 0)
+    if ((in_file_d = Rast_open_old(cell_name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), cell_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), cell_name);
 
 
-    map_type = Rast_get_raster_map_type(in_file_d);
+    map_type = Rast_get_map_type(in_file_d);
     raster_size = Rast_cell_size(map_type);
     raster_size = Rast_cell_size(map_type);
     first_read = 1;
     first_read = 1;
     last_read = 0;
     last_read = 0;

+ 2 - 2
ps/ps.map/ps_raster.c

@@ -108,7 +108,7 @@ int PS_raster_plot(void)
 
 
     /* build the image RGB string */
     /* build the image RGB string */
     if (PS.do_raster) {
     if (PS.do_raster) {
-	map_type = Rast_get_raster_map_type(PS.cell_fd);
+	map_type = Rast_get_map_type(PS.cell_fd);
 	cellbuf = Rast_allocate_buf(map_type);
 	cellbuf = Rast_allocate_buf(map_type);
 	n = 0;
 	n = 0;
 	for (row = 0; row < PS.w.rows; row++) {
 	for (row = 0; row < PS.w.rows; row++) {
@@ -149,7 +149,7 @@ int PS_raster_plot(void)
 	void *cptr[3];
 	void *cptr[3];
 
 
 	for (i = 0; i < 3; i++) {
 	for (i = 0; i < 3; i++) {
-	    grp_map_type[i] = Rast_get_raster_map_type(grp.fd[i]);
+	    grp_map_type[i] = Rast_get_map_type(grp.fd[i]);
 	    cbuf[i] = Rast_allocate_buf(grp_map_type[i]);
 	    cbuf[i] = Rast_allocate_buf(grp_map_type[i]);
 	}
 	}
 	n = 0;
 	n = 0;

+ 1 - 1
ps/ps.map/r_cell.c

@@ -30,7 +30,7 @@ int read_cell(char *name, char *mapset)
     Rast_get_c_color_range(&PS.min_color, &PS.max_color, &PS.colors);
     Rast_get_c_color_range(&PS.min_color, &PS.max_color, &PS.colors);
 
 
     /* open raster map for reading */
     /* open raster map for reading */
-    if ((PS.cell_fd = Rast_open_cell_old(name, mapset)) < 0) {
+    if ((PS.cell_fd = Rast_open_old(name, mapset)) < 0) {
 	error(fullname, "", "can't open raster map");
 	error(fullname, "", "can't open raster map");
 	Rast_free_colors(&PS.colors);
 	Rast_free_colors(&PS.colors);
 	return 0;
 	return 0;

+ 1 - 1
ps/ps.map/r_colortable.c

@@ -169,7 +169,7 @@ int read_colortable(void)
 
 
     /* set default if legend type was not specified */
     /* set default if legend type was not specified */
     if (ct.discrete == -1) {
     if (ct.discrete == -1) {
-	if (Rast_raster_map_is_fp(ct.name, ct.mapset))
+	if (Rast_map_is_fp(ct.name, ct.mapset))
 	    ct.discrete = FALSE;
 	    ct.discrete = FALSE;
 	else
 	else
 	    ct.discrete = TRUE;
 	    ct.discrete = TRUE;

+ 1 - 1
ps/ps.map/r_group.c

@@ -51,7 +51,7 @@ int read_group(void)
 
 
     /* open raster maps for reading */
     /* open raster maps for reading */
     for (i = 0; i < 3; i++) {
     for (i = 0; i < 3; i++) {
-	if ((grp.fd[i] = Rast_open_cell_old(grp.name[i], grp.mapset[i])) < 0) {
+	if ((grp.fd[i] = Rast_open_old(grp.name[i], grp.mapset[i])) < 0) {
 	    sprintf(fullname, "%s in %s", grp.name[i], grp.mapset[i]);
 	    sprintf(fullname, "%s in %s", grp.name[i], grp.mapset[i]);
 	    error(fullname, "", "can't open raster map");
 	    error(fullname, "", "can't open raster map");
 	    Rast_free_colors(&(grp.colors[i]));
 	    Rast_free_colors(&(grp.colors[i]));

+ 1 - 1
ps/ps.map/r_rgb.c

@@ -74,7 +74,7 @@ int read_rgb(char *key, char *data)
 	}
 	}
 
 
 	/* open raster maps for reading */
 	/* open raster maps for reading */
-	if ((grp.fd[i] = Rast_open_cell_old(grp.name[i], grp.mapset[i])) < 0) {
+	if ((grp.fd[i] = Rast_open_old(grp.name[i], grp.mapset[i])) < 0) {
 	    sprintf(fullname, "%s in %s", grp.name[i], grp.mapset[i]);
 	    sprintf(fullname, "%s in %s", grp.name[i], grp.mapset[i]);
 	    error(fullname, "", "can't open raster map");
 	    error(fullname, "", "can't open raster map");
 	    Rast_free_colors(&(grp.colors[i]));
 	    Rast_free_colors(&(grp.colors[i]));

+ 1 - 1
raster/r.basins.fill/main.c

@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
     drain = read_map(drain_name, NOMASK, nrows, ncols);
     drain = read_map(drain_name, NOMASK, nrows, ncols);
     ridge = read_map(ridge_name, NOMASK, nrows, ncols);
     ridge = read_map(ridge_name, NOMASK, nrows, ncols);
 
 
-    partfd = Rast_open_cell_new(part_name);
+    partfd = Rast_open_c_new(part_name);
     if (partfd < 0)
     if (partfd < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), part_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), part_name);
 
 

+ 1 - 1
raster/r.basins.fill/read_map.c

@@ -33,7 +33,7 @@ CELL *read_map(const char *name, int nomask, int nrows, int ncols)
     map = (CELL *) G_malloc(nrows * ncols * sizeof(CELL));
     map = (CELL *) G_malloc(nrows * ncols * sizeof(CELL));
 
 
     /* open the map */
     /* open the map */
-    if ((fd = Rast_open_cell_old(name, "")) < 0)
+    if ((fd = Rast_open_old(name, "")) < 0)
 	G_fatal_error(_("Unable to open <%s>"), name);
 	G_fatal_error(_("Unable to open <%s>"), name);
 
 
     /* read the map */
     /* read the map */

+ 3 - 3
raster/r.bitpattern/main.c

@@ -97,11 +97,11 @@ int main(int argc, char *argv[])
     patv = atoi(patval->answer);
     patv = atoi(patval->answer);
 
 
     /*if Gispf() error */
     /*if Gispf() error */
-    if ((infd = Rast_open_cell_old(name, "")) < 0)
+    if ((infd = Rast_open_old(name, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
     /* determine the inputmap type (CELL/FCELL/DCELL) */
     /* determine the inputmap type (CELL/FCELL/DCELL) */
-    data_type = Rast_get_raster_map_type(infd);
+    data_type = Rast_get_map_type(infd);
 
 
     if (Rast_get_cellhd(name, "", &cellhd) < 0)
     if (Rast_get_cellhd(name, "", &cellhd) < 0)
 	G_fatal_error(_("Unable to read header of raster map <%s>"), name);
 	G_fatal_error(_("Unable to read header of raster map <%s>"), name);
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
     ncols = G_window_cols();
     ncols = G_window_cols();
     outrast = Rast_allocate_buf(data_type);
     outrast = Rast_allocate_buf(data_type);
 
 
-    if ((outfd = Rast_open_raster_new(result, data_type)) < 0)
+    if ((outfd = Rast_open_new(result, data_type)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 	G_fatal_error(_("Unable to create raster map <%s>"), result);
 
 
     for (row = 0; row < nrows; row++) {
     for (row = 0; row < nrows; row++) {

+ 1 - 1
raster/r.buffer/read_map.c

@@ -38,7 +38,7 @@ int read_input_map(char *input, char *mapset, int ZEROFLAG)
 
 
     map = (MAPTYPE *) G_malloc(window.rows * window.cols * sizeof(MAPTYPE));
     map = (MAPTYPE *) G_malloc(window.rows * window.cols * sizeof(MAPTYPE));
 
 
-    fd = Rast_open_cell_old(input, mapset);
+    fd = Rast_open_old(input, mapset);
     if (fd < 0)
     if (fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), input);
 	G_fatal_error(_("Unable to open raster map <%s>"), input);
 
 

+ 2 - 2
raster/r.buffer/write_map.c

@@ -36,12 +36,12 @@ int write_output_map(char *output, int offset)
     register MAPTYPE *ptr;
     register MAPTYPE *ptr;
     int k;
     int k;
 
 
-    fd_out = Rast_open_cell_new(output);
+    fd_out = Rast_open_c_new(output);
     if (fd_out < 0)
     if (fd_out < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), output);
 	G_fatal_error(_("Unable to create raster map <%s>"), output);
 
 
     if (offset) {
     if (offset) {
-	fd_in = Rast_open_cell_old(output, G_mapset());
+	fd_in = Rast_open_old(output, G_mapset());
 	if (fd_in < 0)
 	if (fd_in < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), output);
 	    G_fatal_error(_("Unable to open raster map <%s>"), output);
     }
     }

+ 3 - 3
raster/r.carve/main.c

@@ -161,15 +161,15 @@ int main(int argc, char **argv)
     if ((rmapset = G_find_file2("cell", parm.inrast->answer, "")) == NULL)
     if ((rmapset = G_find_file2("cell", parm.inrast->answer, "")) == NULL)
 	G_fatal_error(_("Raster map <%s> not found"), parm.inrast->answer);
 	G_fatal_error(_("Raster map <%s> not found"), parm.inrast->answer);
 
 
-    if ((infd = Rast_open_cell_old(parm.inrast->answer, rmapset)) == -1)
+    if ((infd = Rast_open_old(parm.inrast->answer, rmapset)) == -1)
 	G_fatal_error(_("Unable to open raster map <%s>"),
 	G_fatal_error(_("Unable to open raster map <%s>"),
 		      parm.inrast->answer);
 		      parm.inrast->answer);
 
 
-    parm.raster_type = Rast_get_raster_map_type(infd);
+    parm.raster_type = Rast_get_map_type(infd);
 
 
     /* open new map for output */
     /* open new map for output */
     if ((outfd =
     if ((outfd =
-	 Rast_open_raster_new(parm.outrast->answer, parm.raster_type)) < 0)
+	 Rast_open_new(parm.outrast->answer, parm.raster_type)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"),
 	G_fatal_error(_("Unable to create raster map <%s>"),
 		      parm.outrast->answer);
 		      parm.outrast->answer);
 
 

+ 1 - 1
raster/r.category/cats.c

@@ -39,7 +39,7 @@ int get_cats(const char *name, const char *mapset)
     Rast_set_window(&cellhd);
     Rast_set_window(&cellhd);
 
 
     /* open the raster map */
     /* open the raster map */
-    fd = Rast_open_cell_old(name, mapset);
+    fd = Rast_open_old(name, mapset);
     if (fd < 0)
     if (fd < 0)
 	G_fatal_error(_("Cannot open cell file of raster map <%s> in <%s>"),
 	G_fatal_error(_("Cannot open cell file of raster map <%s> in <%s>"),
 		      name, mapset);
 		      name, mapset);

+ 2 - 2
raster/r.category/main.c

@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
     if (mapset == NULL)
     if (mapset == NULL)
 	G_fatal_error(_("Raster map <%s> not found"), name);
 	G_fatal_error(_("Raster map <%s> not found"), name);
 
 
-    map_type = Rast_raster_map_type(name, mapset);
+    map_type = Rast_map_type(name, mapset);
 
 
 
 
     /* create category labels */
     /* create category labels */
@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
 		G_fatal_error(_("Raster map <%s> not found"),
 		G_fatal_error(_("Raster map <%s> not found"),
 			      parm.raster->answer);
 			      parm.raster->answer);
 
 
-	    if ((fd = Rast_open_cell_old(name, mapset)) < 0)
+	    if ((fd = Rast_open_old(name, mapset)) < 0)
 		G_fatal_error(_("Unable to open raster map <%s>"), name);
 		G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 
 	    Rast_init_cats("", &cats);
 	    Rast_init_cats("", &cats);

+ 1 - 1
raster/r.circle/main.c

@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
 
 
     G_get_set_window(&w);
     G_get_set_window(&w);
 
 
-    if ((cellfile = Rast_open_cell_new(out_file->answer)) == -1)
+    if ((cellfile = Rast_open_c_new(out_file->answer)) == -1)
 	G_fatal_error(_("Unable to create raster map <%s>"),
 	G_fatal_error(_("Unable to create raster map <%s>"),
 		      out_file->answer);
 		      out_file->answer);
 
 

+ 2 - 2
raster/r.clump/main.c

@@ -69,11 +69,11 @@ int main(int argc, char *argv[])
 
 
     strcpy(name, INPUT);
     strcpy(name, INPUT);
 
 
-    in_fd = Rast_open_cell_old(name, "");
+    in_fd = Rast_open_old(name, "");
     if (in_fd < 0)
     if (in_fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), INPUT);
 	G_fatal_error(_("Unable to open raster map <%s>"), INPUT);
 
 
-    out_fd = Rast_open_cell_new(OUTPUT);
+    out_fd = Rast_open_c_new(OUTPUT);
     if (out_fd < 0)
     if (out_fd < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), OUTPUT);
 	G_fatal_error(_("Unable to create raster map <%s>"), OUTPUT);
 
 

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

@@ -286,7 +286,7 @@ int main(int argc, char **argv)
 
 
     G_suppress_warnings(0);
     G_suppress_warnings(0);
 
 
-    fp = Rast_raster_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);
     Rast_get_fp_range_min_max(&range, &min, &max);
     Rast_get_fp_range_min_max(&range, &min, &max);
 
 

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

@@ -30,7 +30,7 @@ int get_stats(const char *name, const char *mapset, struct Cell_stats *statf)
     int row, nrows, ncols;
     int row, nrows, ncols;
     int fd;
     int fd;
 
 
-    if ((fd = Rast_open_cell_old(name, mapset)) < 0)
+    if ((fd = Rast_open_old(name, mapset)) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"),
 	G_fatal_error(_("Unable to open raster map <%s>"),
 		      G_fully_qualified_name(name, mapset));
 		      G_fully_qualified_name(name, mapset));
 
 
@@ -63,7 +63,7 @@ void get_fp_stats(const char *name, const char *mapset,
     int row, col, nrows, ncols;
     int row, col, nrows, ncols;
     int fd;
     int fd;
 
 
-    if ((fd = Rast_open_cell_old(name, mapset)) < 0)
+    if ((fd = Rast_open_old(name, mapset)) < 0)
 	G_fatal_error("Unable to open raster map <%s>",
 	G_fatal_error("Unable to open raster map <%s>",
 		      G_fully_qualified_name(name, mapset));
 		      G_fully_qualified_name(name, mapset));
 
 

+ 3 - 3
raster/r.composite/main.c

@@ -152,10 +152,10 @@ int main(int argc, char **argv)
 	b->name = b->opt_name->answer;
 	b->name = b->opt_name->answer;
 
 
 	/* Make sure map is available */
 	/* Make sure map is available */
-	if ((b->file = Rast_open_cell_old(b->name, "")) == -1)
+	if ((b->file = Rast_open_old(b->name, "")) == -1)
 	    G_fatal_error(_("Unable to open raster map <%s>"), b->name);
 	    G_fatal_error(_("Unable to open raster map <%s>"), b->name);
 
 
-	b->type = Rast_get_raster_map_type(b->file);
+	b->type = Rast_get_map_type(b->file);
 
 
 	b->size = Rast_cell_size(b->type);
 	b->size = Rast_cell_size(b->type);
 
 
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
     /* open output files */
     /* open output files */
     out_name = opt_out->answer;
     out_name = opt_out->answer;
 
 
-    if ((out_file = Rast_open_cell_new(out_name)) < 0)
+    if ((out_file = Rast_open_c_new(out_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), out_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), out_name);
 
 
     out_array = Rast_allocate_c_buf();
     out_array = Rast_allocate_c_buf();

+ 6 - 6
raster/r.compress/main.c

@@ -113,7 +113,7 @@ static int process(char *name, int uncompress)
 	return 1;
 	return 1;
     }
     }
 
 
-    map_type = Rast_raster_map_type(name, G_mapset());
+    map_type = Rast_map_type(name, G_mapset());
 
 
     G_suppress_warnings(1);
     G_suppress_warnings(1);
     colr_ok = Rast_read_colors(name, G_mapset(), &colr) > 0;
     colr_ok = Rast_read_colors(name, G_mapset(), &colr) > 0;
@@ -191,22 +191,22 @@ static int doit(char *name, int uncompress, RASTER_MAP_TYPE map_type)
 
 
     Rast_set_window(&cellhd);
     Rast_set_window(&cellhd);
 
 
-    old = Rast_open_cell_old(name, G_mapset());
+    old = Rast_open_old(name, G_mapset());
     if (old < 0)
     if (old < 0)
 	return 1;
 	return 1;
 
 
     if (uncompress) {
     if (uncompress) {
 	if (map_type == CELL_TYPE) {
 	if (map_type == CELL_TYPE) {
 	    Rast_set_cell_format(cellhd.format);
 	    Rast_set_cell_format(cellhd.format);
-	    new = Rast_open_cell_new_uncompressed(name);
+	    new = Rast_open_c_new_uncompressed(name);
 	}
 	}
 	else {
 	else {
 	    Rast_set_fp_type(map_type);
 	    Rast_set_fp_type(map_type);
-	    new = Rast_open_fp_cell_new_uncompressed(name);
+	    new = Rast_open_fp_new_uncompressed(name);
 	}
 	}
     }
     }
     else
     else
-	new = Rast_open_raster_new(name, map_type);
+	new = Rast_open_new(name, map_type);
 
 
     if (new < 0)
     if (new < 0)
 	return 1;
 	return 1;
@@ -231,7 +231,7 @@ static int doit(char *name, int uncompress, RASTER_MAP_TYPE map_type)
     }
     }
     Rast_close(new);
     Rast_close(new);
     newsize = 0;
     newsize = 0;
-    old = Rast_open_cell_old(name, G_mapset());
+    old = Rast_open_old(name, G_mapset());
     newsize = lseek(old, (off_t) 0, SEEK_END);
     newsize = lseek(old, (off_t) 0, SEEK_END);
     Rast_close(old);
     Rast_close(old);
     return 0;
     return 0;

+ 1 - 1
raster/r.contour/main.c

@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
 
 
     name = map->answer;
     name = map->answer;
 
 
-    fd = Rast_open_cell_old(name, "");
+    fd = Rast_open_old(name, "");
     if (fd < 0)
     if (fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
 

+ 6 - 6
raster/r.cost/main.c

@@ -350,12 +350,12 @@ int main(int argc, char *argv[])
 
 
     /*  Open cost cell layer for reading  */
     /*  Open cost cell layer for reading  */
 
 
-    cost_fd = Rast_open_cell_old(cost_layer, cost_mapset);
+    cost_fd = Rast_open_old(cost_layer, cost_mapset);
 
 
     if (cost_fd < 0)
     if (cost_fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), cost_layer);
 	G_fatal_error(_("Unable to open raster map <%s>"), cost_layer);
 
 
-    data_type = Rast_get_raster_map_type(cost_fd);
+    data_type = Rast_get_map_type(cost_fd);
     cell = Rast_allocate_buf(data_type);
     cell = Rast_allocate_buf(data_type);
 
 
     /*   Parameters for map submatrices   */
     /*   Parameters for map submatrices   */
@@ -632,12 +632,12 @@ int main(int argc, char *argv[])
 
 
 	search_mapset = G_find_file("cell", opt9->answer, "");
 	search_mapset = G_find_file("cell", opt9->answer, "");
 
 
-	fd = Rast_open_cell_old(opt9->answer, search_mapset);
+	fd = Rast_open_old(opt9->answer, search_mapset);
 	if (fd < 0)
 	if (fd < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 	    G_fatal_error(_("Unable to open raster map <%s>"),
 			  opt9->answer);
 			  opt9->answer);
 
 
-	data_type2 = Rast_get_raster_map_type(fd);
+	data_type2 = Rast_get_map_type(fd);
 
 
 	dsize2 = Rast_cell_size(data_type2);
 	dsize2 = Rast_cell_size(data_type2);
 
 
@@ -977,10 +977,10 @@ int main(int argc, char *argv[])
   OUT:
   OUT:
     /*  Open cumulative cost layer for writing   */
     /*  Open cumulative cost layer for writing   */
 
 
-    cum_fd = Rast_open_raster_new(cum_cost_layer, data_type);
+    cum_fd = Rast_open_new(cum_cost_layer, data_type);
 
 
     if (dir == 1) {
     if (dir == 1) {
-	dir_fd = Rast_open_raster_new(move_dir_layer, dir_data_type);
+	dir_fd = Rast_open_new(move_dir_layer, dir_data_type);
 	dir_cell = Rast_allocate_buf(dir_data_type);
 	dir_cell = Rast_allocate_buf(dir_data_type);
     }
     }
 
 

+ 1 - 1
raster/r.covar/main.c

@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 	sum2[i] = (double *)G_calloc(nfiles, sizeof(double));
 	sum2[i] = (double *)G_calloc(nfiles, sizeof(double));
 	dcell[i] = Rast_allocate_d_buf();
 	dcell[i] = Rast_allocate_d_buf();
 	name = maps->answers[i];
 	name = maps->answers[i];
-	fd[i] = Rast_open_cell_old(name, "");
+	fd[i] = Rast_open_old(name, "");
 	if (fd[i] < 0)
 	if (fd[i] < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
     }
     }

+ 4 - 4
raster/r.cross/main.c

@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
 	if (!mapset)
 	if (!mapset)
 	    G_fatal_error(_("Raster map <%s> not found"), name);
 	    G_fatal_error(_("Raster map <%s> not found"), name);
 	names[nfiles] = name;
 	names[nfiles] = name;
-	fd[nfiles] = Rast_open_cell_old(name, mapset);
+	fd[nfiles] = Rast_open_old(name, mapset);
 	if (fd[nfiles] < 0)
 	if (fd[nfiles] < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	Rast_read_range(name, mapset, &range);
 	Rast_read_range(name, mapset, &range);
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
     if (nfiles <= 1)
     if (nfiles <= 1)
 	G_fatal_error(_("Must specify 2 or more input maps"));
 	G_fatal_error(_("Must specify 2 or more input maps"));
     output = parm.output->answer;
     output = parm.output->answer;
-    outfd = Rast_open_cell_new(output);
+    outfd = Rast_open_c_new(output);
 
 
     if (outfd < 0)
     if (outfd < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"),
 	G_fatal_error(_("Unable to create raster map <%s>"),
@@ -170,8 +170,8 @@ int main(int argc, char *argv[])
 	Rast_free_cats(&labels[i]);
 	Rast_free_cats(&labels[i]);
 
 
     /* reopen the output cell for reading and for writing */
     /* reopen the output cell for reading and for writing */
-    fd[0] = Rast_open_cell_old(output, G_mapset());
-    outfd = Rast_open_cell_new(output);
+    fd[0] = Rast_open_old(output, G_mapset());
+    outfd = Rast_open_c_new(output);
 
 
     renumber(fd[0], outfd);
     renumber(fd[0], outfd);
 
 

+ 2 - 2
raster/r.describe/describe.c

@@ -49,11 +49,11 @@ int describe(const char *name, int compact, char *no_data_str,
 	Rast_set_window(&window);
 	Rast_set_window(&window);
 	get_row = Rast_get_c_row_nomask;
 	get_row = Rast_get_c_row_nomask;
     }
     }
-    fd = Rast_open_cell_old(name, "");
+    fd = Rast_open_old(name, "");
     if (fd < 0)
     if (fd < 0)
 	return 0;
 	return 0;
 
 
-    map_type = Rast_get_raster_map_type(fd);
+    map_type = Rast_get_map_type(fd);
     if (as_int)
     if (as_int)
 	map_type = CELL_TYPE;	/* read as int */
 	map_type = CELL_TYPE;	/* read as int */
 
 

+ 4 - 4
raster/r.distance/distance.c

@@ -88,13 +88,13 @@ int null_distance(const char *name1, const char *name2, int *zerro_row, int *zer
 
 
     /* NOTE: no need to controll, if the map exists. it should be checked in edge.c */
     /* NOTE: no need to controll, if the map exists. it should be checked in edge.c */
     mapset = G_find_cell2(name1, "");
     mapset = G_find_cell2(name1, "");
-    maptype1 = Rast_raster_map_type(name1, mapset);
-    mapd1 = Rast_open_cell_old(name1, mapset);
+    maptype1 = Rast_map_type(name1, mapset);
+    mapd1 = Rast_open_old(name1, mapset);
     inrast1 = Rast_allocate_buf(maptype1);
     inrast1 = Rast_allocate_buf(maptype1);
 
 
     mapset = G_find_cell2(name2, "");
     mapset = G_find_cell2(name2, "");
-    maptype2 = Rast_raster_map_type(name2, mapset);
-    mapd2 = Rast_open_cell_old(name2, mapset);
+    maptype2 = Rast_map_type(name2, mapset);
+    mapd2 = Rast_open_old(name2, mapset);
     inrast2 = Rast_allocate_buf(maptype2);
     inrast2 = Rast_allocate_buf(maptype2);
 
 
     G_message(_("Reading maps  <%s,%s> while finding 0 distance ..."), name1,
     G_message(_("Reading maps  <%s,%s> while finding 0 distance ..."), name1,

+ 1 - 1
raster/r.distance/edges.c

@@ -57,7 +57,7 @@ void find_edge_cells(struct Map *map)
 	buf2[col] = 0;
 	buf2[col] = 0;
     }
     }
 
 
-    fd = Rast_open_cell_old(map->name, map->mapset);
+    fd = Rast_open_old(map->name, map->mapset);
     if (fd < 0)
     if (fd < 0)
 	exit(1);
 	exit(1);
 
 

+ 6 - 6
raster/r.drain/main.c

@@ -181,7 +181,7 @@ int main(int argc, char **argv)
 			  ("Direction raster not specified, if direction flag is on, a direction raster must be given"));
 			  ("Direction raster not specified, if direction flag is on, a direction raster must be given"));
 	}
 	}
 	strcpy(dir_name, opt3->answer);
 	strcpy(dir_name, opt3->answer);
-	dir_data_type = Rast_raster_map_type(dir_name, "");
+	dir_data_type = Rast_map_type(dir_name, "");
     }
     }
     if (costmode == 0) {
     if (costmode == 0) {
 	if (opt3->answer) {
 	if (opt3->answer) {
@@ -203,7 +203,7 @@ int main(int argc, char **argv)
 	Vect_hist_command(&vout);
 	Vect_hist_command(&vout);
     }
     }
     /*      allocate cell buf for the map layer */
     /*      allocate cell buf for the map layer */
-    in_type = Rast_raster_map_type(map_name, "");
+    in_type = Rast_map_type(map_name, "");
 
 
     /* set the pointers for multi-typed functions */
     /* set the pointers for multi-typed functions */
     set_func_pointers(in_type);
     set_func_pointers(in_type);
@@ -343,7 +343,7 @@ int main(int argc, char **argv)
     in_buf = get_buf();
     in_buf = get_buf();
 
 
     /* open the original map and get its file id  */
     /* open the original map and get its file id  */
-    map_id = Rast_open_cell_old(map_name, "");
+    map_id = Rast_open_old(map_name, "");
 
 
     /* get some temp files */
     /* get some temp files */
     tempfile1 = G_tempfile();
     tempfile1 = G_tempfile();
@@ -361,7 +361,7 @@ int main(int argc, char **argv)
 
 
     if (costmode == 1) {
     if (costmode == 1) {
 	dir_buf = Rast_allocate_d_buf();
 	dir_buf = Rast_allocate_d_buf();
-	dir_id = Rast_open_cell_old(dir_name, "");
+	dir_id = Rast_open_old(dir_name, "");
 	tempfile3 = G_tempfile();
 	tempfile3 = G_tempfile();
 	dir_fd = open(tempfile3, O_RDWR | O_CREAT, 0666);
 	dir_fd = open(tempfile3, O_RDWR | O_CREAT, 0666);
 
 
@@ -416,7 +416,7 @@ int main(int argc, char **argv)
 
 
 	/* Output will be a cell map */
 	/* Output will be a cell map */
 	/* open a new file and allocate an output buffer */
 	/* open a new file and allocate an output buffer */
-	new_id = Rast_open_cell_new(new_map_name);
+	new_id = Rast_open_c_new(new_map_name);
 	out_buf = Rast_allocate_c_buf();
 	out_buf = Rast_allocate_c_buf();
 
 
 	/* mark each cell */
 	/* mark each cell */
@@ -461,7 +461,7 @@ int main(int argc, char **argv)
     else {			/* mode = 1 or 2 */
     else {			/* mode = 1 or 2 */
 	/* Output will be of the same type as input */
 	/* Output will be of the same type as input */
 	/* open a new file and allocate an output buffer */
 	/* open a new file and allocate an output buffer */
-	new_id = Rast_open_raster_new(new_map_name, in_type);
+	new_id = Rast_open_new(new_map_name, in_type);
 	out_buf = get_buf();
 	out_buf = get_buf();
 	bsz = ncols * bpe();
 	bsz = ncols * bpe();
 
 

+ 5 - 5
raster/r.fill.dir/main.c

@@ -174,10 +174,10 @@ int main(int argc, char **argv)
 	G_fatal_error(_("Raster map <%s> not found"), map_name);
 	G_fatal_error(_("Raster map <%s> not found"), map_name);
 
 
     /* open the maps and get their file id  */
     /* open the maps and get their file id  */
-    map_id = Rast_open_cell_old(map_name, map_mapset);
+    map_id = Rast_open_old(map_name, map_mapset);
 
 
     /* allocate cell buf for the map layer */
     /* allocate cell buf for the map layer */
-    in_type = Rast_get_raster_map_type(map_id);
+    in_type = Rast_get_map_type(map_id);
 
 
     /* set the pointers for multi-typed functions */
     /* set the pointers for multi-typed functions */
     set_func_pointers(in_type);
     set_func_pointers(in_type);
@@ -254,14 +254,14 @@ int main(int argc, char **argv)
     bufsz = ncols * sizeof(CELL);
     bufsz = ncols * sizeof(CELL);
 
 
     lseek(fe, 0, SEEK_SET);
     lseek(fe, 0, SEEK_SET);
-    new_id = Rast_open_raster_new(new_map_name, in_type);
+    new_id = Rast_open_new(new_map_name, in_type);
 
 
     lseek(fd, 0, SEEK_SET);
     lseek(fd, 0, SEEK_SET);
-    dir_id = Rast_open_raster_new(dir_name, CELL_TYPE);
+    dir_id = Rast_open_new(dir_name, CELL_TYPE);
 
 
     if (opt5->answer != NULL) {
     if (opt5->answer != NULL) {
 	lseek(fm, 0, SEEK_SET);
 	lseek(fm, 0, SEEK_SET);
-	bas_id = Rast_open_raster_new(bas_name, CELL_TYPE);
+	bas_id = Rast_open_new(bas_name, CELL_TYPE);
 
 
 	for (i = 0; i < nrows; i++) {
 	for (i = 0; i < nrows; i++) {
 	    read(fm, out_buf, bufsz);
 	    read(fm, out_buf, bufsz);

+ 3 - 3
raster/r.flow/io.c

@@ -66,7 +66,7 @@ static int open_existing_cell_file(char *fname, struct Cell_head *chd)
     if (chd && (Rast_get_cellhd(fname, mapset, chd) < 0))
     if (chd && (Rast_get_cellhd(fname, mapset, chd) < 0))
 	G_fatal_error(_("Unable to get header for %s"), fname);
 	G_fatal_error(_("Unable to get header for %s"), fname);
 
 
-    return Rast_open_cell_old(fname, mapset);
+    return Rast_open_old(fname, mapset);
 }
 }
 
 
 void read_input_files(void)
 void read_input_files(void)
@@ -164,7 +164,7 @@ void open_output_files(void)
     }
     }
 
 
     if (parm.lgout &&
     if (parm.lgout &&
-	((lgfd = Rast_open_raster_new(parm.lgout, FCELL_TYPE)) < 0))
+	((lgfd = Rast_open_new(parm.lgout, FCELL_TYPE)) < 0))
 	G_fatal_error(_("Unable to create raster map <%s>"), parm.lgout);
 	G_fatal_error(_("Unable to create raster map <%s>"), parm.lgout);
 
 
     if (parm.flout && (Vect_open_new(&fl, parm.flout, 0) < 0))
     if (parm.flout && (Vect_open_new(&fl, parm.flout, 0) < 0))
@@ -199,7 +199,7 @@ void write_density_file(void)
 	G_fatal_error(_("Cannot reset current region"));
 	G_fatal_error(_("Cannot reset current region"));
 
 
     G_message(_("Writing density file"));
     G_message(_("Writing density file"));
-    dsfd = Rast_open_raster_new(parm.dsout, DCELL_TYPE);
+    dsfd = Rast_open_new(parm.dsout, DCELL_TYPE);
     if (dsfd < 0)
     if (dsfd < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), parm.dsout);
 	G_fatal_error(_("Unable to create raster map <%s>"), parm.dsout);
 
 

+ 3 - 3
raster/r.grow.distance/main.c

@@ -208,18 +208,18 @@ int main(int argc, char **argv)
     if (flag.m->answer)
     if (flag.m->answer)
 	scale = G_database_units_to_meters_factor();
 	scale = G_database_units_to_meters_factor();
 
 
-    in_fd = Rast_open_cell_old(in_name, "");
+    in_fd = Rast_open_old(in_name, "");
     if (in_fd < 0)
     if (in_fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), in_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), in_name);
 
 
     if (dist_name) {
     if (dist_name) {
-	dist_fd = Rast_open_raster_new(dist_name, DCELL_TYPE);
+	dist_fd = Rast_open_new(dist_name, DCELL_TYPE);
 	if (dist_fd < 0)
 	if (dist_fd < 0)
 	    G_fatal_error(_("Unable to create distance map <%s>"), dist_name);
 	    G_fatal_error(_("Unable to create distance map <%s>"), dist_name);
     }
     }
 
 
     if (val_name) {
     if (val_name) {
-	val_fd = Rast_open_raster_new(val_name, DCELL_TYPE);
+	val_fd = Rast_open_new(val_name, DCELL_TYPE);
 	if (val_fd < 0)
 	if (val_fd < 0)
 	    G_fatal_error(_("Unable to create value map <%s>"), val_name);
 	    G_fatal_error(_("Unable to create value map <%s>"), val_name);
     }
     }

+ 3 - 3
raster/r.grow/main.c

@@ -182,13 +182,13 @@ int main(int argc, char **argv)
     else
     else
 	G_fatal_error(_("Unknown metric: [%s]."), opt.met->answer);
 	G_fatal_error(_("Unknown metric: [%s]."), opt.met->answer);
 
 
-    in_fd = Rast_open_cell_old(in_name, "");
+    in_fd = Rast_open_old(in_name, "");
     if (in_fd < 0)
     if (in_fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), in_name);
 	G_fatal_error(_("Unable to open raster map <%s>"), in_name);
 
 
-    type = Rast_get_raster_map_type(in_fd);
+    type = Rast_get_map_type(in_fd);
 
 
-    out_fd = Rast_open_raster_new(out_name, type);
+    out_fd = Rast_open_new(out_name, type);
     if (out_fd < 0)
     if (out_fd < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), out_name);
 	G_fatal_error(_("Unable to create raster map <%s>"), out_name);
 
 

+ 6 - 6
raster/r.his/main.c

@@ -122,7 +122,7 @@ int main(int argc, char **argv)
     name_h = opt_h->answer;
     name_h = opt_h->answer;
 
 
     /* Make sure map is available */
     /* Make sure map is available */
-    if ((hue_file = Rast_open_cell_old(name_h, "")) == -1)
+    if ((hue_file = Rast_open_old(name_h, "")) == -1)
 	G_fatal_error(_("Unable to open raster map <%s>"), name_h);
 	G_fatal_error(_("Unable to open raster map <%s>"), name_h);
 
 
     hue_r = G_malloc(window.cols);
     hue_r = G_malloc(window.cols);
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
 	name_i = opt_i->answer;
 	name_i = opt_i->answer;
 	int_used = 1;
 	int_used = 1;
 	/* Make sure map is available */
 	/* Make sure map is available */
-	if ((int_file = Rast_open_cell_old(name_i, "")) == -1)
+	if ((int_file = Rast_open_old(name_i, "")) == -1)
 	    G_fatal_error(_("Unable to open raster map <%s>"), name_i);
 	    G_fatal_error(_("Unable to open raster map <%s>"), name_i);
 
 
 	int_r = G_malloc(window.cols);
 	int_r = G_malloc(window.cols);
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
 	    sat_used = 1;
 	    sat_used = 1;
 
 
 	    /* Make sure map is available */
 	    /* Make sure map is available */
-	    if ((sat_file = Rast_open_cell_old(name_s, "")) == -1)
+	    if ((sat_file = Rast_open_old(name_s, "")) == -1)
 		G_fatal_error(_("Unable to open raster map <%s>"), name_s);
 		G_fatal_error(_("Unable to open raster map <%s>"), name_s);
 
 
 	    sat_r = G_malloc(window.cols);
 	    sat_r = G_malloc(window.cols);
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
     if (opt_r->answer != NULL) {
     if (opt_r->answer != NULL) {
 	name_r = opt_r->answer;
 	name_r = opt_r->answer;
 
 
-	if ((r_file = Rast_open_cell_new(name_r)) < 0)
+	if ((r_file = Rast_open_c_new(name_r)) < 0)
 	    r_used = 0;
 	    r_used = 0;
 	else
 	else
 	    r_used = 1;
 	    r_used = 1;
@@ -189,7 +189,7 @@ int main(int argc, char **argv)
     if (opt_g->answer != NULL) {
     if (opt_g->answer != NULL) {
 	name_g = opt_g->answer;
 	name_g = opt_g->answer;
 
 
-	if ((g_file = Rast_open_cell_new(name_g)) < 0)
+	if ((g_file = Rast_open_c_new(name_g)) < 0)
 	    g_used = 0;
 	    g_used = 0;
 	else
 	else
 	    g_used = 1;
 	    g_used = 1;
@@ -200,7 +200,7 @@ int main(int argc, char **argv)
     if (opt_b->answer != NULL) {
     if (opt_b->answer != NULL) {
 	name_b = opt_b->answer;
 	name_b = opt_b->answer;
 
 
-	if ((b_file = Rast_open_cell_new(name_b)) < 0)
+	if ((b_file = Rast_open_c_new(name_b)) < 0)
 	    b_used = 0;
 	    b_used = 0;
 	else
 	else
 	    b_used = 1;
 	    b_used = 1;

+ 0 - 0
raster/r.horizon/main.c


Някои файлове не бяха показани, защото твърде много файлове са промени