Bläddra i källkod

alloc_cell.c updated, see http://trac.osgeo.org/grass/wiki/Grass7/RasterLib
* Rast_raster_size -> Rast_cell_size
* Rast_allocate_cell_buf removed
* Rast_allocate_c_raster_buf -> Rast_allocate_c_buf
* Rast_allocate_f_raster_buf -> Rast_allocare_f_buf
* Rast_allocate_d_raster_buf -> Rast_allocate_d_buf
Modules updated


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

Martin Landa 16 år sedan
förälder
incheckning
8daf2e7064
100 ändrade filer med 278 tillägg och 289 borttagningar
  1. 3 3
      display/d.his/main.c
  2. 3 3
      display/d.nviz/main.c
  3. 3 3
      display/d.profile/main.c
  4. 6 6
      display/d.rast.arrow/main.c
  5. 1 1
      display/d.rast.num/main.c
  6. 1 1
      display/d.rast/display.c
  7. 1 1
      display/d.rgb/main.c
  8. 2 2
      display/d.what.rast/what.c
  9. 2 2
      doc/raster/r.example/main.c
  10. 3 3
      general/g.region/zoom.c
  11. 2 2
      imagery/i.albedo/main.c
  12. 7 7
      imagery/i.biomass/main.c
  13. 1 1
      imagery/i.cca/transform.c
  14. 1 1
      imagery/i.class/band_files.c
  15. 1 1
      imagery/i.class/draw_cell.c
  16. 1 1
      imagery/i.class/signature.c
  17. 1 1
      imagery/i.cluster/open_files.c
  18. 4 4
      imagery/i.eb.eta/main.c
  19. 5 5
      imagery/i.eb.evapfr/main.c
  20. 5 5
      imagery/i.eb.h_SEBAL01/main.c
  21. 6 6
      imagery/i.eb.soilheatflux/main.c
  22. 2 2
      imagery/i.emissivity/main.c
  23. 4 4
      imagery/i.evapo.time_integration/main.c
  24. 2 2
      imagery/i.fft/main.c
  25. 2 2
      imagery/i.gensig/openfiles.c
  26. 2 2
      imagery/i.gensigset/openfiles.c
  27. 3 3
      imagery/i.his.rgb/openfiles.c
  28. 3 3
      imagery/i.ifft/main.c
  29. 2 2
      imagery/i.latlong/main.c
  30. 3 3
      imagery/i.maxlik/open.c
  31. 2 2
      imagery/i.modis.qc/main.c
  32. 16 16
      imagery/i.pca/main.c
  33. 1 1
      imagery/i.points/drawcell.c
  34. 1 1
      imagery/i.rectify/exec.c
  35. 1 1
      imagery/i.rectify/perform.c
  36. 1 1
      imagery/i.rectify/rectify.c
  37. 6 6
      imagery/i.rectify/write.c
  38. 3 3
      imagery/i.rgb.his/openfiles.c
  39. 2 2
      imagery/i.smap/openfiles.c
  40. 3 3
      imagery/i.sunhours/main.c
  41. 7 7
      imagery/i.vi/main.c
  42. 1 1
      imagery/i.vpoints/drawcell.c
  43. 2 2
      imagery/i.zc/main.c
  44. 5 6
      include/raster.h
  45. 4 4
      lib/display/raster.c
  46. 2 2
      lib/gis/alloc.c
  47. 5 5
      lib/gpde/N_arrays_io.c
  48. 2 2
      lib/ogsf/Gs3.c
  49. 24 34
      lib/raster/alloc_cell.c
  50. 1 1
      lib/raster/auto_mask.c
  51. 1 1
      lib/raster/cats.c
  52. 1 1
      lib/raster/color_look.c
  53. 3 3
      lib/raster/get_row.c
  54. 1 1
      lib/raster/get_row_colr.c
  55. 1 1
      lib/raster/null_val.c
  56. 3 3
      lib/raster/opencell.c
  57. 1 1
      lib/raster/put_row.c
  58. 2 2
      lib/raster/range.c
  59. 1 1
      lib/raster/raster.c
  60. 4 4
      lib/raster/sample.c
  61. 1 1
      lib/raster/set_window.c
  62. 3 3
      lib/raster/zero_cell.c
  63. 2 2
      lib/rst/interp_float/input2d.c
  64. 1 1
      lib/rst/interp_float/output2d.c
  65. 1 1
      lib/rst/interp_float/resout2d.c
  66. 2 2
      lib/rst/interp_float/ressegm2d.c
  67. 1 1
      ps/ps.map/outl_io.c
  68. 1 1
      ps/ps.map/ps_outline.c
  69. 5 5
      ps/ps.map/ps_raster.c
  70. 2 2
      raster/r.bitpattern/main.c
  71. 1 1
      raster/r.buffer/read_map.c
  72. 1 1
      raster/r.buffer/write_map.c
  73. 1 1
      raster/r.carve/enforce_ds.c
  74. 2 2
      raster/r.carve/raster.c
  75. 1 1
      raster/r.category/cats.c
  76. 2 2
      raster/r.colors/stats.c
  77. 2 2
      raster/r.composite/main.c
  78. 1 1
      raster/r.compress/main.c
  79. 6 6
      raster/r.cost/main.c
  80. 1 1
      raster/r.covar/main.c
  81. 1 1
      raster/r.cross/cross.c
  82. 1 1
      raster/r.cross/renumber.c
  83. 1 1
      raster/r.describe/describe.c
  84. 2 2
      raster/r.distance/distance.c
  85. 4 4
      raster/r.drain/main.c
  86. 3 3
      raster/r.drain/tinf.c
  87. 1 1
      raster/r.fill.dir/main.c
  88. 3 3
      raster/r.fill.dir/tinf.c
  89. 1 1
      raster/r.flow/io.c
  90. 1 1
      raster/r.flow/main.c
  91. 4 4
      raster/r.flow/mem.c
  92. 9 9
      raster/r.grow.distance/main.c
  93. 2 2
      raster/r.grow/main.c
  94. 3 3
      raster/r.his/main.c
  95. 2 2
      raster/r.horizon/main.c
  96. 3 3
      raster/r.in.arc/main.c
  97. 5 5
      raster/r.in.ascii/main.c
  98. 3 3
      raster/r.in.bin/main.c
  99. 3 3
      raster/r.in.gdal/main.c
  100. 0 0
      raster/r.in.mat/main.c

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

@@ -173,9 +173,9 @@ int main(int argc, char **argv)
 	    G_fatal_error(_("Color file for <%s> not available"), name_s);
     }
 
-    r_array = Rast_allocate_cell_buf();
-    g_array = Rast_allocate_cell_buf();
-    b_array = Rast_allocate_cell_buf();
+    r_array = Rast_allocate_c_buf();
+    g_array = Rast_allocate_c_buf();
+    b_array = Rast_allocate_c_buf();
 
     /* Make color table */
     make_gray_scale(&gray_colors);

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

@@ -442,7 +442,7 @@ int read_rast
 
 
     if (data_type == CELL_TYPE) {
-	cell = Rast_allocate_c_raster_buf();
+	cell = Rast_allocate_c_buf();
 	if (Rast_get_c_raster_row(fd, cell, row) < 0)
 	    exit(1);
 
@@ -453,7 +453,7 @@ int read_rast
     }
 
     if (data_type == FCELL_TYPE) {
-	fcell = Rast_allocate_f_raster_buf();
+	fcell = Rast_allocate_f_buf();
 	if (Rast_get_f_raster_row(fd, fcell, row) < 0)
 	    exit(1);
 	if (Rast_is_f_null_value(&fcell[col]))
@@ -463,7 +463,7 @@ int read_rast
     }
 
     if (data_type == DCELL_TYPE) {
-	dcell = Rast_allocate_d_raster_buf();
+	dcell = Rast_allocate_c_buf();
 	if (Rast_get_d_raster_row(fd, dcell, row) < 0)
 	    exit(1);
 	if (Rast_is_d_null_value(&dcell[col]))

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

@@ -38,7 +38,7 @@ struct point
 
 static void get_region_range(int fd)
 {
-    DCELL *buf = Rast_allocate_d_raster_buf();
+    DCELL *buf = Rast_allocate_c_buf();
     int nrows = G_window_rows();
     int ncols = G_window_cols();
     int row, col;
@@ -123,8 +123,8 @@ static int get_cell(DCELL *result, int fd, double x, double y)
     DCELL *tmp;
 
     if (!row1) {
-	row1 = Rast_allocate_d_raster_buf();
-	row2 = Rast_allocate_d_raster_buf();
+	row1 = Rast_allocate_c_buf();
+	row2 = Rast_allocate_c_buf();
     }
 
     col = (int)floor(x - 0.5);

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

@@ -297,7 +297,7 @@ int main(int argc, char **argv)
     raster_type = Rast_get_raster_map_type(layer_fd);
 
     /* allocate the cell array */
-    raster_row = Rast_allocate_raster_buf(raster_type);
+    raster_row = Rast_allocate_buf(raster_type);
 
 
     if (opt7->answer) {
@@ -309,7 +309,7 @@ int main(int argc, char **argv)
 	mag_raster_type = Rast_get_raster_map_type(mag_fd);
 
 	/* allocate the cell array */
-	mag_raster_row = Rast_allocate_raster_buf(mag_raster_type);
+	mag_raster_row = Rast_allocate_buf(mag_raster_type);
     }
 
 
@@ -367,11 +367,11 @@ int main(int argc, char **argv)
 	    }
 
 	    if (no_arrow) {
-		ptr = G_incr_void_ptr(ptr, Rast_raster_size(raster_type));
+		ptr = G_incr_void_ptr(ptr, Rast_cell_size(raster_type));
 		if (opt7->answer)
 		    mag_ptr =
 			G_incr_void_ptr(mag_ptr,
-					Rast_raster_size(mag_raster_type));
+					Rast_cell_size(mag_raster_type));
 		no_arrow = FALSE;
 		continue;
 	    }
@@ -494,10 +494,10 @@ int main(int argc, char **argv)
 		}
 	    }
 
-	    ptr = G_incr_void_ptr(ptr, Rast_raster_size(raster_type));
+	    ptr = G_incr_void_ptr(ptr, Rast_cell_size(raster_type));
 	    if (opt7->answer)
 		mag_ptr =
-		    G_incr_void_ptr(mag_ptr, Rast_raster_size(mag_raster_type));
+		    G_incr_void_ptr(mag_ptr, Rast_cell_size(mag_raster_type));
 	}
     }
 

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

@@ -216,7 +216,7 @@ int main(int argc, char **argv)
     }
 
     /* allocate the cell array */
-    cell = Rast_allocate_raster_buf(map_type);
+    cell = Rast_allocate_buf(map_type);
 
     /* read the color table in the color structures of the displayed map */
     if (Rast_read_colors(map_name, "", &colors) == -1)

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

@@ -61,7 +61,7 @@ static int cell_draw(const char *name,
 	G_fatal_error(_("Unable to open raster map <%s>"), name);
 
     /* Allocate space for cell buffer */
-    xarray = Rast_allocate_raster_buf(data_type);
+    xarray = Rast_allocate_buf(data_type);
 
     D_cell_draw_begin();
 

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

@@ -98,7 +98,7 @@ int main(int argc, char **argv)
 	if (Rast_read_colors(name, "", &B[i].colors) == -1)
 	    G_fatal_error(_("Color file for <%s> not available"), name);
 
-	B[i].array = Rast_allocate_raster_buf(B[i].type);
+	B[i].array = Rast_allocate_buf(B[i].type);
     }
 
     /* read in current window */

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

@@ -22,8 +22,8 @@ int what(int once, int terse, int colrow, char *fs, int width, int mwidth)
     G_get_set_window(&window);
     nrows = window.rows;
     ncols = window.cols;
-    buf = Rast_allocate_c_raster_buf();
-    dbuf = Rast_allocate_d_raster_buf();
+    buf = Rast_allocate_c_buf();
+    dbuf = Rast_allocate_c_buf();
 
     screen_x = ((int)D_get_d_west() + (int)D_get_d_east()) / 2;
     screen_y = ((int)D_get_d_north() + (int)D_get_d_south()) / 2;

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

@@ -127,12 +127,12 @@ int main(int argc, char *argv[])
     G_debug(3, "number of rows %d", cellhd.rows);
 
     /* Allocate input buffer */
-    inrast = Rast_allocate_raster_buf(data_type);
+    inrast = Rast_allocate_buf(data_type);
 
     /* Allocate output buffer, use input map data_type */
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_raster_buf(data_type);
+    outrast = Rast_allocate_buf(data_type);
 
     /* controlling, if we can write the raster */
     if ((outfd = Rast_open_raster_new(result, data_type)) < 0)

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

@@ -24,7 +24,7 @@ int zoom(struct Cell_head *window, const char *name, const char *mapset)
 	G_fatal_error(_("Unable to open raster map <%s> in <%s>"),
 		      name, mapset);
     map_type = Rast_get_raster_map_type(fd);
-    raster = Rast_allocate_raster_buf(map_type);
+    raster = Rast_allocate_buf(map_type);
 
     /* find first non-null row */
     top = nrows;
@@ -37,7 +37,7 @@ int zoom(struct Cell_head *window, const char *name, const char *mapset)
 	for (col = 0; col < ncols; col++) {
 	    if (!Rast_is_null_value(rast_ptr, map_type))
 		break;
-	    rast_ptr = G_incr_void_ptr(rast_ptr, Rast_raster_size(map_type));
+	    rast_ptr = G_incr_void_ptr(rast_ptr, Rast_cell_size(map_type));
 	}
 	if (col == ncols)
 	    continue;
@@ -50,7 +50,7 @@ int zoom(struct Cell_head *window, const char *name, const char *mapset)
 	for (mark = col; col < ncols; col++) {
 	    if (!Rast_is_null_value(rast_ptr, map_type))
 		mark = col;
-	    rast_ptr = G_incr_void_ptr(rast_ptr, Rast_raster_size(map_type));
+	    rast_ptr = G_incr_void_ptr(rast_ptr, Rast_cell_size(map_type));
 	}
 	if (mark > right)
 	    right = mark;

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

@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
 	if ((Rast_get_cellhd(name, "", &cellhd)) < 0)
 	    G_fatal_error(_("Unable to read header of raster map <%s>"), name);
 
-	inrast[nfiles] = Rast_allocate_raster_buf(in_data_type[nfiles]);
+	inrast[nfiles] = Rast_allocate_buf(in_data_type[nfiles]);
 	nfiles++;
     }
     nfiles--;
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
     /* Allocate output buffer, use input map data_type */
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_raster_buf(out_data_type);
+    outrast = Rast_allocate_buf(out_data_type);
 
     /* Create New raster files */
     if ((outfd = Rast_open_raster_new(result, 1)) < 0)

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

@@ -99,31 +99,31 @@ int main(int argc, char *argv[])
     /***************************************************/ 
     if ((infd_fpar = Rast_open_cell_old(fpar, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), fpar);
-    inrast_fpar = Rast_allocate_d_raster_buf();
+    inrast_fpar = Rast_allocate_c_buf();
 
     if ((infd_luf = Rast_open_cell_old(luf, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), luf);
-    inrast_luf = Rast_allocate_d_raster_buf();
+    inrast_luf = Rast_allocate_c_buf();
     
     if ((infd_lat = Rast_open_cell_old(lat, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), lat);
-    inrast_lat = Rast_allocate_d_raster_buf();
+    inrast_lat = Rast_allocate_c_buf();
     
     if ((infd_doy = Rast_open_cell_old(doy, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), doy);
-    inrast_doy = Rast_allocate_d_raster_buf();
+    inrast_doy = Rast_allocate_c_buf();
     
     if ((infd_tsw = Rast_open_cell_old(tsw, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), tsw);
-    inrast_tsw = Rast_allocate_d_raster_buf();
+    inrast_tsw = Rast_allocate_c_buf();
     
     if ((infd_wa = Rast_open_cell_old(wa, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), wa);
-    inrast_wa = Rast_allocate_d_raster_buf();
+    inrast_wa = Rast_allocate_c_buf();
     
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast1 = Rast_allocate_d_raster_buf();
+    outrast1 = Rast_allocate_c_buf();
     
     /* Create New raster files */ 
     if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)

+ 1 - 1
imagery/i.cca/transform.c

@@ -15,7 +15,7 @@ transform(int datafds[MX], int outfds[MX], int rows, int cols,
 
     /* allocate row buffers for each band */
     for (i = 1; i <= bands; i++)
-	if ((rowbufs[i] = Rast_allocate_cell_buf()) == NULL)
+	if ((rowbufs[i] = Rast_allocate_c_buf()) == NULL)
 	    G_fatal_error(_("Unable to allocate cell buffers."));
 
     for (i = 0; i < rows; i++) {

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

@@ -15,7 +15,7 @@ int open_band_files(void)
     Bandbuf = (CELL **) G_malloc(nbands * sizeof(CELL *));
     Bandfd = (int *)G_malloc(nbands * sizeof(int));
     for (n = 0; n < nbands; n++) {
-	Bandbuf[n] = Rast_allocate_cell_buf();
+	Bandbuf[n] = Rast_allocate_c_buf();
 	name = Refer.file[n].name;
 	mapset = Refer.file[n].mapset;
 	if ((Bandfd[n] = Rast_open_cell_old(name, mapset)) < 0)

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

@@ -43,7 +43,7 @@ int draw_cell(View * view, int overlay)
 	Rast_free_colors(&colr);
 	return 0;
     }
-    dcell = Rast_allocate_d_raster_buf();
+    dcell = Rast_allocate_c_buf();
 
 
     sprintf(msg, "Plotting %s ...", view->cell.name);

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

@@ -274,7 +274,7 @@ int display_signature(void)
 
 	if ((fd = Rast_open_cell_new(MASK)) < 0)
 	    G_fatal_error(_("Unable to open the cell map MASK."));
-	if ((buffer = Rast_allocate_cell_buf()) == NULL)
+	if ((buffer = Rast_allocate_c_buf()) == NULL)
 	    G_fatal_error(_("Unable to allocate the cell buffer in display_signature()."));
 	nrows = G_window_rows();
 	ncols = G_window_cols();

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

@@ -50,7 +50,7 @@ int open_files(void)
     cell = (DCELL **) G_malloc(ref.nfiles * sizeof(DCELL *));
     cellfd = (int *)G_malloc(ref.nfiles * sizeof(int));
     for (n = 0; n < ref.nfiles; n++) {
-	cell[n] = Rast_allocate_d_raster_buf();
+	cell[n] = Rast_allocate_c_buf();
 	name = ref.file[n].name;
 	mapset = ref.file[n].mapset;
 	if ((cellfd[n] = Rast_open_cell_old(name, mapset)) < 0)

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

@@ -78,19 +78,19 @@ int main(int argc, char *argv[])
     
     if ((infd_rnetday = Rast_open_cell_old(rnetday, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), rnetday);
-    inrast_rnetday = Rast_allocate_d_raster_buf();
+    inrast_rnetday = Rast_allocate_c_buf();
     
     if ((infd_evapfr = Rast_open_cell_old(evapfr, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), evapfr);
-    inrast_evapfr = Rast_allocate_d_raster_buf();
+    inrast_evapfr = Rast_allocate_c_buf();
     
     if ((infd_tempk = Rast_open_cell_old(tempk, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), tempk);
-    inrast_tempk = Rast_allocate_d_raster_buf();
+    inrast_tempk = Rast_allocate_c_buf();
     
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast1 = Rast_allocate_d_raster_buf();
+    outrast1 = Rast_allocate_c_buf();
     
     if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
         G_fatal_error(_("Unable to create raster map <%s>"), result1);

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

@@ -97,24 +97,24 @@ int main(int argc, char *argv[])
     /***************************************************/ 
     if ((infd_rnet = Rast_open_cell_old(rnet, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), rnet);
-    inrast_rnet = Rast_allocate_d_raster_buf();
+    inrast_rnet = Rast_allocate_c_buf();
     
     /***************************************************/ 
     if ((infd_g0 = Rast_open_cell_old(g0, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), g0);
-    inrast_g0 = Rast_allocate_d_raster_buf();
+    inrast_g0 = Rast_allocate_c_buf();
     
     /***************************************************/ 
     if ((infd_h0 = Rast_open_cell_old(h0, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), h0);
-    inrast_h0 = Rast_allocate_d_raster_buf();
+    inrast_h0 = Rast_allocate_c_buf();
     
     /***************************************************/ 
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast1 = Rast_allocate_d_raster_buf();
+    outrast1 = Rast_allocate_c_buf();
     if (makin) 
-	outrast2 = Rast_allocate_d_raster_buf();
+	outrast2 = Rast_allocate_c_buf();
     
     /* Create New raster files */ 
     if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)

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

@@ -223,10 +223,10 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Unable to read header of raster map <%s>"), t0dem);
 
     /* Allocate input buffer */
-    inrast_Rn = Rast_allocate_d_raster_buf();
-    inrast_g0 = Rast_allocate_d_raster_buf();
-    inrast_z0m = Rast_allocate_d_raster_buf();
-    inrast_t0dem = Rast_allocate_d_raster_buf();
+    inrast_Rn = Rast_allocate_c_buf();
+    inrast_g0 = Rast_allocate_c_buf();
+    inrast_z0m = Rast_allocate_c_buf();
+    inrast_t0dem = Rast_allocate_c_buf();
 
     /***************************************************/
     /* Setup pixel location variables */
@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
     /***************************************************/
     /* Allocate output buffer */
     /***************************************************/
-    outrast = Rast_allocate_d_raster_buf();
+    outrast = Rast_allocate_c_buf();
 
     if ((outfd = Rast_open_raster_new(h0, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), h0);

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

@@ -95,27 +95,27 @@ int main(int argc, char *argv[])
 
     if ((infd_albedo = Rast_open_cell_old(albedo, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), albedo);
-    inrast_albedo = Rast_allocate_d_raster_buf();
+    inrast_albedo = Rast_allocate_c_buf();
 
     if ((infd_ndvi = Rast_open_cell_old(ndvi, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), ndvi);
-    inrast_ndvi = Rast_allocate_d_raster_buf();
+    inrast_ndvi = Rast_allocate_c_buf();
 
     if ((infd_tempk = Rast_open_cell_old(tempk, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), tempk);
-    inrast_tempk = Rast_allocate_d_raster_buf();
+    inrast_tempk = Rast_allocate_c_buf();
 
     if ((infd_rnet = Rast_open_cell_old(rnet, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), rnet);
-    inrast_rnet = Rast_allocate_d_raster_buf();
+    inrast_rnet = Rast_allocate_c_buf();
 
     if ((infd_time = Rast_open_cell_old(time, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), time);
-    inrast_time = Rast_allocate_d_raster_buf();
+    inrast_time = Rast_allocate_c_buf();
 
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_d_raster_buf();
+    outrast = Rast_allocate_c_buf();
     
     /* Create New raster files */ 
     if ((outfd = Rast_open_raster_new(result,DCELL_TYPE)) < 0)

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

@@ -64,12 +64,12 @@ int main(int argc, char *argv[])
     /***************************************************/ 
     if ((infd = Rast_open_cell_old(ndvi, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), ndvi);
-    inr = Rast_allocate_d_raster_buf();
+    inr = Rast_allocate_c_buf();
     
     /***************************************************/ 
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outr = Rast_allocate_d_raster_buf();
+    outr = Rast_allocate_c_buf();
     
     /* Create New raster files */ 
     if ((outfd = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)

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

@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
 	    G_fatal_error(_("Unable to open raster map <%s>"), name);
 	if ((Rast_get_cellhd(name, mapset, &cellhd)) < 0)
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name);
-	inrast[nfiles] = Rast_allocate_raster_buf(in_data_type[nfiles]);
+	inrast[nfiles] = Rast_allocate_buf(in_data_type[nfiles]);
 	nfiles++;
     }
     nfiles--;
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
 	    G_fatal_error(_("Unable to open raster map <%s>"), name1);
 	if ((Rast_get_cellhd(name1, mapset, &cellhd)) < 0)
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name1);
-	inrast1[nfiles1] = Rast_allocate_raster_buf(in_data_type1[nfiles1]);
+	inrast1[nfiles1] = Rast_allocate_buf(in_data_type1[nfiles1]);
 	nfiles1++;
     }
     nfiles1--;
@@ -249,7 +249,7 @@ int main(int argc, char *argv[])
 	if ((Rast_get_cellhd(name2, mapset, &cellhd)) < 0) {
 	    G_fatal_error(_("Unable to read file header of raster map <%s>"), name2);
 	}
-	inrast2[nfiles2] = Rast_allocate_d_raster_buf();
+	inrast2[nfiles2] = Rast_allocate_c_buf();
 	nfiles2++;
     }
     nfiles2--;
@@ -259,7 +259,7 @@ int main(int argc, char *argv[])
     /* Allocate output buffer, use input map data_type */
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_raster_buf(out_data_type);
+    outrast = Rast_allocate_buf(out_data_type);
 
    
     /* Create New raster files */

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

@@ -122,8 +122,8 @@ int main(int argc, char *argv[])
     data = G_malloc(rows * cols * 2 * sizeof(double));
 
     /* allocate the space for one row of cell map data */
-    cell_real = Rast_allocate_d_raster_buf();
-    cell_imag = Rast_allocate_d_raster_buf();
+    cell_real = Rast_allocate_c_buf();
+    cell_imag = Rast_allocate_c_buf();
 
 #define C(i, j) ((i) * cols + (j))
 

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

@@ -34,7 +34,7 @@ int openfiles(struct parms *parms, struct files *files)
     if (files->train_fd < 0)
 	G_fatal_error(_("Unable to open training map <%s>"),
 		      parms->training_map);
-    files->train_cell = Rast_allocate_c_raster_buf();
+    files->train_cell = Rast_allocate_c_buf();
 
     /* open all maps for reading */
     for (n = 0; n < Ref.nfiles; n++) {
@@ -43,7 +43,7 @@ int openfiles(struct parms *parms, struct files *files)
 	if (files->band_fd[n] < 0)
 	    G_fatal_error(_("Unable to open training map <%s in %s>"),
 			  Ref.file[n].name, Ref.file[n].mapset);
-	files->band_cell[n] = Rast_allocate_d_raster_buf();
+	files->band_cell[n] = Rast_allocate_c_buf();
     }
 
     return 0;

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

@@ -34,7 +34,7 @@ int openfiles(struct parms *parms, struct files *files)
     if (files->train_fd < 0)
 	G_fatal_error(_("Unable to open training map <%s>"),
 		      parms->training_map);
-    files->train_cell = Rast_allocate_c_raster_buf();
+    files->train_cell = Rast_allocate_c_buf();
 
     /* open all maps for reading */
     for (n = 0; n < Ref.nfiles; n++) {
@@ -43,7 +43,7 @@ int openfiles(struct parms *parms, struct files *files)
 	if (files->band_fd[n] < 0)
 	    G_fatal_error(_("Unable to open training map <%s in %s>"),
 			  Ref.file[n].name, Ref.file[n].mapset);
-	files->band_cell[n] = Rast_allocate_d_raster_buf();
+	files->band_cell[n] = Rast_allocate_c_buf();
     }
 
     return 0;

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

@@ -18,11 +18,11 @@ void openfiles(char *h_name, char *i_name, char *s_name,
 	G_fatal_error(_("Unable to create raster map <%s>"), b_name);
 
     /* allocate the cell row buffer */
-    if ((rowbuf[0] = Rast_allocate_cell_buf()) == NULL)
+    if ((rowbuf[0] = Rast_allocate_c_buf()) == NULL)
 	G_fatal_error(_("Unable to allocate the input row buffer"));
-    if ((rowbuf[1] = Rast_allocate_cell_buf()) == NULL)
+    if ((rowbuf[1] = Rast_allocate_c_buf()) == NULL)
 	G_fatal_error(_("Unable to allocate the input row buffer"));
-    if ((rowbuf[2] = Rast_allocate_cell_buf()) == NULL)
+    if ((rowbuf[2] = Rast_allocate_c_buf()) == NULL)
 	G_fatal_error(_("Unable to allocate the input row buffer"));
 
     /* open input files (maps can be in different mapsets) */

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

@@ -139,8 +139,8 @@ int main(int argc, char *argv[])
     data = G_malloc(rows * cols * 2 * sizeof(double));
 
     /* allocate the space for one row of cell map data */
-    cell_real = Rast_allocate_d_raster_buf();
-    cell_imag = Rast_allocate_d_raster_buf();
+    cell_real = Rast_allocate_c_buf();
+    cell_imag = Rast_allocate_c_buf();
 
 #define C(i, j) ((i) * cols + (j))
 
@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
     G_message(_("Masking raster maps..."));
     maskfd = Rast_maskfd();
     if (maskfd >= 0) {
-	maskbuf = Rast_allocate_cell_buf();
+	maskbuf = Rast_allocate_c_buf();
 
 	for (i = 0; i < rows; i++) {
 	    Rast_get_map_row(maskfd, maskbuf, i);

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

@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Cannot open cell file [%s]"), in);
     if (Rast_get_cellhd(in, "", &cellhd) < 0)
 	G_fatal_error(_("Cannot read file header of [%s])"), in);
-    inrast = Rast_allocate_d_raster_buf();
+    inrast = Rast_allocate_c_buf();
     
     /***************************************************/ 
     stepx = cellhd.ew_res;
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
 	    G_fatal_error(_("Unable to set up lat/long projection parameters"));
     }	/* End of stolen from r.sun */
 
-    outrast1 = Rast_allocate_d_raster_buf();
+    outrast1 = Rast_allocate_c_buf();
 
     if ((outfd1 = Rast_open_raster_new(result1,DCELL_TYPE)) < 0)
 	G_fatal_error(_("Could not open <%s>"), result1);

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

@@ -35,7 +35,7 @@ int open_files(void)
     cellfd = (int *)G_malloc(Ref.nfiles * sizeof(int));
     P = (double *)G_malloc(Ref.nfiles * sizeof(double));
     for (n = 0; n < Ref.nfiles; n++) {
-	cell[n] = Rast_allocate_d_raster_buf();
+	cell[n] = Rast_allocate_c_buf();
 	name = Ref.file[n].name;
 	mapset = Ref.file[n].mapset;
 	if ((cellfd[n] = Rast_open_cell_old(name, mapset)) < 0)
@@ -66,7 +66,7 @@ int open_files(void)
     if (class_fd < 0)
 	exit(EXIT_FAILURE);
 
-    class_cell = Rast_allocate_cell_buf();
+    class_cell = Rast_allocate_c_buf();
 
     reject_cell = NULL;
     if (reject_name) {
@@ -75,7 +75,7 @@ int open_files(void)
 	    G_fatal_error(_("Unable to create raster map <%s>"),
 			  reject_name);
 	else
-	    reject_cell = Rast_allocate_cell_buf();
+	    reject_cell = Rast_allocate_c_buf();
     }
 
     return 0;

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

@@ -202,12 +202,12 @@ int main(int argc, char *argv[])
     if (Rast_get_cellhd(qcchan, "", &cellhd) < 0)
 	G_fatal_error(_("Unable to read header of raster map <%s> "), qcchan);
 
-    inrast = Rast_allocate_c_raster_buf();
+    inrast = Rast_allocate_c_buf();
 
     G_debug(3, "number of rows %d", cellhd.rows);
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_c_raster_buf();
+    outrast = Rast_allocate_c_buf();
 
     /* Create New raster files */ 
     if ((outfd = Rast_open_raster_new(result, data_type_output)) < 0)

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

@@ -244,7 +244,7 @@ static int calc_mu(int *fds, double *mu, int bands)
 	/* don't assume each image is of the same type */
 	if (rowbuf)
 	    G_free(rowbuf);
-	if ((rowbuf = Rast_allocate_raster_buf(maptype)) == NULL)
+	if ((rowbuf = Rast_allocate_buf(maptype)) == NULL)
 	    G_fatal_error(_("Unable allocate memory for row buffer"));
 
 	G_verbose_message(_("Computing means for band %d..."), i + 1);
@@ -260,12 +260,12 @@ static int calc_mu(int *fds, double *mu, int bands)
 	    for (col = 0; col < cols; col++) {
 		/* skip null cells */
 		if (Rast_is_null_value(rowbuf, maptype)) {
-		    ptr = G_incr_void_ptr(ptr, Rast_raster_size(maptype));
+		    ptr = G_incr_void_ptr(ptr, Rast_cell_size(maptype));
 		    continue;
 		}
 
 		sum += Rast_get_raster_value_d(rowbuf, maptype);
-		ptr = G_incr_void_ptr(ptr, Rast_raster_size(maptype));
+		ptr = G_incr_void_ptr(ptr, Rast_cell_size(maptype));
 	    }
 	}
 
@@ -294,7 +294,7 @@ static int calc_covariance(int *fds, double **covar, double *mu, int bands)
 	/* don't assume each image is of the same type */
 	if (rowbuf1)
 	    G_free(rowbuf1);
-	if ((rowbuf1 = Rast_allocate_raster_buf(maptype)) == NULL)
+	if ((rowbuf1 = Rast_allocate_buf(maptype)) == NULL)
 	    G_fatal_error(_("Unable allocate memory for row buffer"));
 
 	G_verbose_message(_("Computing row %d of covariance matrix..."),
@@ -314,7 +314,7 @@ static int calc_covariance(int *fds, double **covar, double *mu, int bands)
 		/* don't assume each image is of the same type */
 		if (rowbuf2)
 		    G_free(rowbuf2);
-		if ((rowbuf2 = Rast_allocate_raster_buf(maptype2)) == NULL)
+		if ((rowbuf2 = Rast_allocate_buf(maptype2)) == NULL)
 		    G_fatal_error(_("Unable to allocate memory for row buffer"));
 
 		if (Rast_get_raster_row(fds[k], rowbuf2, row, maptype2) < 0)
@@ -327,8 +327,8 @@ static int calc_covariance(int *fds, double **covar, double *mu, int bands)
 		    /* skip null cells */
 		    if (Rast_is_null_value(ptr1, maptype) ||
 			Rast_is_null_value(ptr2, maptype2)) {
-			ptr1 = G_incr_void_ptr(ptr1, Rast_raster_size(maptype));
-			ptr2 = G_incr_void_ptr(ptr2, Rast_raster_size(maptype2));
+			ptr1 = G_incr_void_ptr(ptr1, Rast_cell_size(maptype));
+			ptr2 = G_incr_void_ptr(ptr2, Rast_cell_size(maptype2));
 			continue;
 		    }
 
@@ -337,8 +337,8 @@ static int calc_covariance(int *fds, double **covar, double *mu, int bands)
 			 mu[j]) * ((double)Rast_get_raster_value_d(ptr2,
 						   maptype2) - mu[k]);
 
-		    ptr1 = G_incr_void_ptr(ptr1, Rast_raster_size(maptype));
-		    ptr2 = G_incr_void_ptr(ptr2, Rast_raster_size(maptype2));
+		    ptr1 = G_incr_void_ptr(ptr1, Rast_cell_size(maptype));
+		    ptr2 = G_incr_void_ptr(ptr2, Rast_cell_size(maptype2));
 		}
 
 		covar[k][j] = covar[j][k];
@@ -362,8 +362,8 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
     double new_range = 0.;
     int rows = G_window_rows();
     int cols = G_window_cols();
-    int cell_mapsiz = Rast_raster_size(CELL_TYPE);
-    int dcell_mapsiz = Rast_raster_size(DCELL_TYPE);
+    int cell_mapsiz = Rast_cell_size(CELL_TYPE);
+    int dcell_mapsiz = Rast_cell_size(DCELL_TYPE);
     DCELL *d_buf;
 
     /* 2 passes for rescale.  1 pass for no rescale */
@@ -373,8 +373,8 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
     d_buf = (DCELL *) G_malloc(cols * sizeof(double));
 
     /* allocate memory for output row buffer */
-    outbuf = (scale) ? Rast_allocate_raster_buf(CELL_TYPE) :
-	Rast_allocate_raster_buf(DCELL_TYPE);
+    outbuf = (scale) ? Rast_allocate_buf(CELL_TYPE) :
+	Rast_allocate_buf(DCELL_TYPE);
 
     if (!outbuf)
 	G_fatal_error(_("Unable to allocate memory for raster row"));
@@ -429,7 +429,7 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
 		    /* don't assume each image is of the same type */
 		    if (rowbuf)
 			G_free(rowbuf);
-		    if (!(rowbuf = Rast_allocate_raster_buf(maptype)))
+		    if (!(rowbuf = Rast_allocate_buf(maptype)))
 			G_fatal_error(_("Unable allocate memory for row buffer"));
 
 		    if (Rast_get_raster_row(inp_fd[j], rowbuf, row, maptype) < 0)
@@ -455,7 +455,7 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
 
 			    rowptr =
 				G_incr_void_ptr(rowptr,
-						Rast_raster_size(maptype));
+						Rast_cell_size(maptype));
 			    continue;
 			}
 
@@ -506,7 +506,7 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
 			    G_incr_void_ptr(outptr, dcell_mapsiz);
 
 			rowptr =
-			    G_incr_void_ptr(rowptr, Rast_raster_size(maptype));
+			    G_incr_void_ptr(rowptr, Rast_cell_size(maptype));
 		    }
 		}		/* for j = 0 to bands */
 

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

@@ -52,7 +52,7 @@ int drawcell(View * view)
     fd = Rast_open_cell_old(view->cell.name, view->cell.mapset);
     if (fd < 0)
 	return 0;
-    dcell = Rast_allocate_d_raster_buf();
+    dcell = Rast_allocate_c_buf();
 
     sprintf(msg, "Plotting %s ...", view->cell.name);
     Menu_msg(msg);

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

@@ -36,7 +36,7 @@ int exec_rectify(int order, char *extension)
 
     /* allocate the output cell matrix */
     cell_buf = (void **)G_calloc(NROWS, sizeof(void *));
-    n = NCOLS * Rast_raster_size(map_type);
+    n = NCOLS * Rast_cell_size(map_type);
     for (i = 0; i < NROWS; i++) {
 	cell_buf[i] = (void *)G_malloc(n);
 	Rast_set_null_value(cell_buf[i], NCOLS, map_type);

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

@@ -15,7 +15,7 @@ int perform_georef(int infd, void *rast)
     int idx;
     int i;
 
-    rast_size = Rast_raster_size(map_type);
+    rast_size = Rast_cell_size(map_type);
 
     for (row = 0; row < matrix_rows; row++)
 	Rast_set_null_value(cell_buf[row], matrix_cols, map_type);

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

@@ -48,7 +48,7 @@ int rectify(char *name, char *mapset, char *result, int order)
 	return 0;
     }
     map_type = Rast_get_raster_map_type(infd);
-    rast = (void *)G_calloc(G_window_cols() + 1, Rast_raster_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);
 
     G_copy(&win, &target_window, sizeof(win));

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

@@ -21,11 +21,11 @@ int write_matrix(int row, int col)
     for (n = 0; n < matrix_rows; n++) {
 	offset =
 	    ((off_t) row++ * target_window.cols +
-	     col) * Rast_raster_size(map_type);
+	     col) * Rast_cell_size(map_type);
 	lseek(temp_fd, offset, SEEK_SET);
 
-	if (write(temp_fd, cell_buf[n], Rast_raster_size(map_type) * matrix_cols)
-	    != Rast_raster_size(map_type) * matrix_cols) {
+	if (write(temp_fd, cell_buf[n], Rast_cell_size(map_type) * matrix_cols)
+	    != Rast_cell_size(map_type) * matrix_cols) {
 	    unlink(temp_name);
 	    G_fatal_error(_("Error while writing to temp file"));
 	}
@@ -43,7 +43,7 @@ int write_map(char *name)
 
     Rast_set_window(&target_window);
 
-    rast = Rast_allocate_raster_buf(map_type);
+    rast = Rast_allocate_buf(map_type);
     close(temp_fd);
     temp_fd = open(temp_name, 0);
     fd = Rast_open_raster_new(name, map_type);
@@ -52,8 +52,8 @@ int write_map(char *name)
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
 
     for (row = 0; row < target_window.rows; row++) {
-	if (read(temp_fd, rast, target_window.cols * Rast_raster_size(map_type))
-	    != target_window.cols * Rast_raster_size(map_type))
+	if (read(temp_fd, rast, target_window.cols * Rast_cell_size(map_type))
+	    != target_window.cols * Rast_cell_size(map_type))
 	    G_fatal_error(_("Error writing row %d"), row);
 	if (Rast_put_raster_row(fd, rast, map_type) < 0) {
 	    G_fatal_error(_("Failed writing raster map <%s> row %d"),

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

@@ -25,10 +25,10 @@ void openfiles(char *r_name, char *g_name, char *b_name,
 	G_fatal_error(_("Unable to create raster map <%s>"), s_name);
 
     /* allocate the cell row buffer */
-    if ((rowbuf[0] = Rast_allocate_cell_buf()) == NULL)
+    if ((rowbuf[0] = Rast_allocate_c_buf()) == NULL)
 	G_fatal_error(_("Unable to allocate the input row buffer"));
-    if ((rowbuf[1] = Rast_allocate_cell_buf()) == NULL)
+    if ((rowbuf[1] = Rast_allocate_c_buf()) == NULL)
 	G_fatal_error(_("Unable to allocate the input row buffer"));
-    if ((rowbuf[2] = Rast_allocate_cell_buf()) == NULL)
+    if ((rowbuf[2] = Rast_allocate_c_buf()) == NULL)
 	G_fatal_error(_("Unable to allocate the input row buffer"));
 }

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

@@ -23,8 +23,8 @@ int openfiles(struct parms *parms, struct files *files)
 		      parms->subgroup, parms->group);
 
     /* allocate file descriptors, and io buffer */
-    files->cellbuf = Rast_allocate_d_raster_buf();
-    files->outbuf = Rast_allocate_c_raster_buf();
+    files->cellbuf = Rast_allocate_c_buf();
+    files->outbuf = Rast_allocate_c_buf();
     files->isdata = G_malloc(G_window_cols());
 
     files->nbands = Ref.nfiles;

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

@@ -72,18 +72,18 @@ int main(int argc, char *argv[])
     /***************************************************/ 
     if ((infd_doy = Rast_open_cell_old(doy, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), doy);
-    inrast_doy = Rast_allocate_d_raster_buf();
+    inrast_doy = Rast_allocate_c_buf();
 
     /***************************************************/ 
     if ((infd_lat = Rast_open_cell_old(lat, "")) < 0)
 	G_fatal_error(_("Cannot open cell file [%s]"), lat);
-    inrast_lat = Rast_allocate_d_raster_buf();
+    inrast_lat = Rast_allocate_c_buf();
 
     /***************************************************/ 
     nrows = G_window_rows();
     ncols = G_window_cols();
 
-    outrast1 = Rast_allocate_d_raster_buf();
+    outrast1 = Rast_allocate_c_buf();
     if ((outfd1 = Rast_open_raster_new(result1, DCELL_TYPE)) < 0)
 	G_fatal_error(_("Could not open <%s>"), result1);
 

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

@@ -211,41 +211,41 @@ int main(int argc, char *argv[])
 
     if ((infd_redchan = Rast_open_cell_old(redchan, "")) < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), redchan);
-    inrast_redchan = Rast_allocate_d_raster_buf();
+    inrast_redchan = Rast_allocate_c_buf();
 
     if (nirchan) {
         if ((infd_nirchan = Rast_open_cell_old(nirchan, "")) < 0)
             G_fatal_error(_("Unable to open raster map <%s>"), nirchan);
-        inrast_nirchan = Rast_allocate_d_raster_buf();
+        inrast_nirchan = Rast_allocate_c_buf();
     }
 
     if (greenchan) {
 	if ((infd_greenchan = Rast_open_cell_old(greenchan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), greenchan);
-	inrast_greenchan = Rast_allocate_d_raster_buf();
+	inrast_greenchan = Rast_allocate_c_buf();
     }
 
     if (bluechan) {
 	if ((infd_bluechan = Rast_open_cell_old(bluechan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), bluechan);
-	inrast_bluechan = Rast_allocate_d_raster_buf();
+	inrast_bluechan = Rast_allocate_c_buf();
     }
 
     if (chan5chan) {
 	if ((infd_chan5chan = Rast_open_cell_old(chan5chan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), chan5chan);
-	inrast_chan5chan = Rast_allocate_d_raster_buf();
+	inrast_chan5chan = Rast_allocate_c_buf();
     }
 
     if (chan7chan) {
 	if ((infd_chan7chan = Rast_open_cell_old(chan7chan, "")) < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), chan7chan);
-	inrast_chan7chan = Rast_allocate_d_raster_buf();
+	inrast_chan7chan = Rast_allocate_c_buf();
     }
 
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_d_raster_buf();
+    outrast = Rast_allocate_c_buf();
 
     /* Create New raster files */ 
     if ((outfd = Rast_open_raster_new(result, DCELL_TYPE)) < 0)

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

@@ -62,7 +62,7 @@ int drawcell(View * view, int initflag)
     fd = Rast_open_cell_old(view->cell.name, view->cell.mapset);
     if (fd < 0)
 	return 0;
-    dcell = Rast_allocate_d_raster_buf();
+    dcell = Rast_allocate_c_buf();
 
     sprintf(msg, "Displaying %s ...", view->cell.name);
     Menu_msg(msg);

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

@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
     }
 
     /* allocate the space for one row of cell map data */
-    cell_row = Rast_allocate_cell_buf();
+    cell_row = Rast_allocate_c_buf();
 
     /* Read in cell map values */
     G_message(_("Reading raster map..."));
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
     if ((zcfd = Rast_open_cell_new(output_map->answer)) < 0)
 	exit(EXIT_FAILURE);
 
-    cell_row = Rast_allocate_cell_buf();
+    cell_row = Rast_allocate_c_buf();
 
     /* Write out result to a new cell map */
     for (i = 0; i < or; i++) {

+ 5 - 6
include/raster.h

@@ -5,12 +5,11 @@
 /* --- ANSI prototypes for the lib/raster functions --- */
 
 /* alloc_cell.c */
-size_t Rast_raster_size(RASTER_MAP_TYPE);
-CELL *Rast_allocate_cell_buf(void);
-void *Rast_allocate_raster_buf(RASTER_MAP_TYPE);
-CELL *Rast_allocate_c_raster_buf(void);
-FCELL *Rast_allocate_f_raster_buf(void);
-DCELL *Rast_allocate_d_raster_buf(void);
+size_t Rast_cell_size(RASTER_MAP_TYPE);
+void *Rast_allocate_buf(RASTER_MAP_TYPE);
+CELL *Rast_allocate_c_buf(void);
+FCELL *Rast_allocate_f_buf(void);
+DCELL *Rast_allocate_d_buf(void);
 char *Rast_allocate_null_buf(void);
 unsigned char *Rast__allocate_null_bits(int);
 int Rast__null_bitstream_size(int);

+ 4 - 4
lib/display/raster.c

@@ -106,7 +106,7 @@ static int draw_cell(int A_row,
     if (D__overlay_mode)
 	for (i = 0; i < ncols; i++) {
 	    set[i] = Rast_is_null_value(array, data_type);
-	    array = G_incr_void_ptr(array, Rast_raster_size(data_type));
+	    array = G_incr_void_ptr(array, Rast_cell_size(data_type));
 	}
 
     A_row =
@@ -149,9 +149,9 @@ int D_draw_raster_RGB(int A_row,
     static unsigned char *r_buf, *g_buf, *b_buf, *n_buf;
     static int nalloc;
 
-    int r_size = Rast_raster_size(r_type);
-    int g_size = Rast_raster_size(g_type);
-    int b_size = Rast_raster_size(b_type);
+    int r_size = Rast_cell_size(r_type);
+    int g_size = Rast_cell_size(g_type);
+    int b_size = Rast_cell_size(b_type);
     int ncols = src[0][1] - src[0][0];
     int i;
 

+ 2 - 2
lib/gis/alloc.c

@@ -145,7 +145,7 @@ void G_free(void *buf)
  *
  * Now 
  \code
- rast = G_incr_void_ptr(rast, Rast_raster_size(data_type))
+ rast = G_incr_void_ptr(rast, Rast_cell_size(data_type))
  \endcode
  *
  * (where rast is void* and <i>data_type</i> is RASTER_MAP_TYPE can be
@@ -153,7 +153,7 @@ void G_free(void *buf)
  *
  * Very useful to generalize the row processing - loop i.e.
  * \code
- *   void * buf_ptr += Rast_raster_size(data_type)
+ *   void * buf_ptr += Rast_cell_size(data_type)
  * \endcode
  *
  * \param ptr pointer

+ 5 - 5
lib/gpde/N_arrays_io.c

@@ -93,7 +93,7 @@ N_array_2d *N_read_rast_to_array_2d(char *name, N_array_2d * array)
 		("N_read_rast_to_array_2d: the data array size is different from the current region settings");
     }
 
-    rast = Rast_allocate_raster_buf(type);
+    rast = Rast_allocate_buf(type);
 
     G_message(_("Reading raster map <%s> into memory"), name);
 
@@ -106,7 +106,7 @@ N_array_2d *N_read_rast_to_array_2d(char *name, N_array_2d * array)
 	}
 
 	for (x = 0, ptr = rast; x < cols;
-	     x++, ptr = G_incr_void_ptr(ptr, Rast_raster_size(type))) {
+	     x++, ptr = G_incr_void_ptr(ptr, Rast_cell_size(type))) {
 	    if (type == CELL_TYPE) {
 		if (Rast_is_c_null_value(ptr)) {
 		    N_put_array_2d_value_null(data, x, y);
@@ -204,11 +204,11 @@ void N_write_array_2d_to_rast(N_array_2d * array, char *name)
 	G_fatal_error(_("Unable to create raster map <%s>"), name);
 
     if (type == CELL_TYPE)
-	rast = Rast_allocate_raster_buf(type);
+	rast = Rast_allocate_buf(type);
     if (type == FCELL_TYPE)
-	frast = Rast_allocate_raster_buf(type);
+	frast = Rast_allocate_buf(type);
     if (type == DCELL_TYPE)
-	drast = Rast_allocate_raster_buf(type);
+	drast = Rast_allocate_buf(type);
 
     G_message(_("Write 2d array to raster map <%s>"), name);
 

+ 2 - 2
lib/ogsf/Gs3.c

@@ -842,7 +842,7 @@ int Gs_get_cat_label(const char *filename, int drow, int dcol, char *catstr)
 	map_type = Rast_get_raster_map_type(fd);
 
 	if (map_type == CELL_TYPE) {
-	    buf = Rast_allocate_c_raster_buf();
+	    buf = Rast_allocate_c_buf();
 
 	    if (Rast_get_c_raster_row(fd, buf, drow) < 0) {
 		sprintf(catstr, "error");
@@ -861,7 +861,7 @@ int Gs_get_cat_label(const char *filename, int drow, int dcol, char *catstr)
 
 	else {
 	    /* fp map */
-	    dbuf = Rast_allocate_d_raster_buf();
+	    dbuf = Rast_allocate_c_buf();
 
 	    if (Rast_get_d_raster_row(fd, dbuf, drow) < 0) {
 		sprintf(catstr, "error");

+ 24 - 34
lib/raster/alloc_cell.c

@@ -23,7 +23,7 @@
 static const int type_size[3] = { sizeof(CELL), sizeof(FCELL), sizeof(DCELL) };
 
 /*!
- * \brief Returns size of a raster CELL in bytes.
+ * \brief Returns size of a raster cell in bytes.
  *
  *  - If <i>data_type</i> is CELL_TYPE, returns sizeof(CELL)
  *  - If <i>data_type</i> is FCELL_TYPE, returns sizeof(FCELL)
@@ -34,39 +34,12 @@ static const int type_size[3] = { sizeof(CELL), sizeof(FCELL), sizeof(DCELL) };
  * \return raster type size
  */
 
-size_t Rast_raster_size(RASTER_MAP_TYPE data_type)
+size_t Rast_cell_size(RASTER_MAP_TYPE data_type)
 {
     return (type_size[F2I(data_type)]);
 }
 
 /*!
- * \brief Allocate memory for a CELL type raster map.
- *
- * This routine allocates a buffer of type CELL just large enough to 
- * hold one row of raster data based on the number of columns in the 
- * active region.
- *
- \code
- CELL *cell;
- cell = Rast_allocate_cell_buf();
- \endcode
- *
- * If larger buffers are required, the routine G_malloc() can be used.
- * The routine is generally used with each open cell file.
- *
- * <b>Note:</b> Rast_allocate_raster_buf() or G_alloc_c_raster_buf() is
- * preferred over Rast_allocate_cell_buf().
- *
- * Prints error message and calls exit() on error.
- *
- * \return CELL * pointer to allocated buffer
- */
-CELL *Rast_allocate_cell_buf(void)
-{
-    return (CELL *) G_calloc(G_window_cols() + 1, sizeof(CELL));
-}
-
-/*!
  * \brief Allocate memory for a raster map of given type
  *
  * Allocate an array of CELL, FCELL, or DCELL (depending on
@@ -77,20 +50,37 @@ CELL *Rast_allocate_cell_buf(void)
  *
  * \return pointer to allocated buffer
  */
-void *Rast_allocate_raster_buf(RASTER_MAP_TYPE data_type)
+void *Rast_allocate_buf(RASTER_MAP_TYPE data_type)
 {
-    return (void *)G_calloc(G_window_cols() + 1, Rast_raster_size(data_type));
+    return (void *)G_calloc(G_window_cols() + 1, Rast_cell_size(data_type));
 }
 
 /*!
  * \brief Allocates memory for a raster map of type CELL.
  *
+/*!
+ * \brief Allocate memory for a CELL type raster map.
+ *
  * Allocate an array of CELL based on the number of columns in the
  * current region.
  *
+ * This routine allocates a buffer of type CELL just large enough to 
+ * hold one row of raster data based on the number of columns in the 
+ * active region.
+ *
+ \code
+ CELL *cell;
+ cell = Rast_allocate_c_buf();
+ \endcode
+ *
+ * If larger buffers are required, the routine G_malloc() can be used.
+ * The routine is generally used with each open cell file.
+ *
+ * Prints error message and calls exit() on error.
+ *
  * \return pointer to allocated buffer
  */
-CELL *Rast_allocate_c_raster_buf(void)
+CELL *Rast_allocate_c_buf(void)
 {
     return (CELL *) G_calloc(G_window_cols() + 1, sizeof(CELL));
 }
@@ -103,7 +93,7 @@ CELL *Rast_allocate_c_raster_buf(void)
  *
  * \return pointer to allocated buffer
  */
-FCELL *Rast_allocate_f_raster_buf(void)
+FCELL *Rast_allocate_f_buf(void)
 {
     return (FCELL *) G_calloc(G_window_cols() + 1, sizeof(FCELL));
 }
@@ -116,7 +106,7 @@ FCELL *Rast_allocate_f_raster_buf(void)
  *
  * \return pointer to allocated buffer
  */
-DCELL *Rast_allocate_d_raster_buf(void)
+DCELL *Rast_allocate_d_buf(void)
 {
     return (DCELL *) G_calloc(G_window_cols() + 1, sizeof(DCELL));
 }

+ 1 - 1
lib/raster/auto_mask.c

@@ -68,7 +68,7 @@ int Rast__check_for_auto_masking(void)
 	return 0;
     }
 
-    /*    R__.mask_buf = Rast_allocate_cell_buf(); */
+    /*    R__.mask_buf = Rast_allocate_c_buf(); */
 
     R__.auto_mask = 1;
 

+ 1 - 1
lib/raster/cats.c

@@ -634,7 +634,7 @@ int Rast_mark_raster_cats(const void *rast_row,
 	if (i > pcats->ncats)
 	    return -1;
 	pcats->marks[i]++;
-	rast_row = G_incr_void_ptr(rast_row, Rast_raster_size(data_type));
+	rast_row = G_incr_void_ptr(rast_row, Rast_cell_size(data_type));
     }
     return 1;
 }

+ 1 - 1
lib/raster/color_look.c

@@ -280,7 +280,7 @@ void Rast__lookup_colors(const void *raster, unsigned char *red,
 
     for (; n-- > 0;
 	 ptr =
-	 G_incr_void_ptr(ptr, Rast_raster_size(data_type)), red++, grn++, blu++,
+	 G_incr_void_ptr(ptr, Rast_cell_size(data_type)), red++, grn++, blu++,
 	 *set++ = found) {
 	/* if the cell is the same as last one, use the prev color values */
 	if (ptr != raster && Rast_raster_cmp(ptr, last_ptr, data_type) == 0) {

+ 3 - 3
lib/raster/get_row.c

@@ -639,7 +639,7 @@ static int get_map_row(int fd, void *rast, int row, RASTER_MAP_TYPE data_type,
 		       int null_is_zero, int with_mask)
 {
     struct fileinfo *fcb = &R__.fileinfo[fd];
-    int size = Rast_raster_size(data_type);
+    int size = Rast_cell_size(data_type);
     CELL *temp_buf = NULL;
     void *buf;
     int type;
@@ -1099,7 +1099,7 @@ static void get_null_value_row_nomask(int fd, char *flags, int row)
 static void get_null_value_row_gdal(int fd, char *flags, int row)
 {
     struct fileinfo *fcb = &R__.fileinfo[fd];
-    DCELL *tmp_buf = Rast_allocate_d_raster_buf();
+    DCELL *tmp_buf = Rast_allocate_c_buf();
     int i;
 
     if (get_map_row_nomask(fd, tmp_buf, row, DCELL_TYPE) <= 0) {
@@ -1183,7 +1183,7 @@ static int embed_nulls(int fd, void *buf, int row, RASTER_MAP_TYPE map_type,
 	       is not set and calls G_set_[f/d]_null_value() otherwise */
 	    Rast__set_null_value(buf, 1, null_is_zero, map_type);
 	}
-	buf = G_incr_void_ptr(buf, Rast_raster_size(map_type));
+	buf = G_incr_void_ptr(buf, Rast_cell_size(map_type));
     }
 
     G__freea(null_buf);

+ 1 - 1
lib/raster/get_row_colr.c

@@ -43,7 +43,7 @@ int Rast_get_raster_row_colors(int fd, int row, struct Colors *colors,
 {
     int cols = G_window_cols();
     int type = Rast_get_raster_map_type(fd);
-    int size = Rast_raster_size(type);
+    int size = Rast_cell_size(type);
     void *array;
     unsigned char *set;
     void *p;

+ 1 - 1
lib/raster/null_val.c

@@ -81,7 +81,7 @@ void Rast__set_null_value(void *rast, int numVals, int null_is_zero,
 		       RASTER_MAP_TYPE data_type)
 {
     if (null_is_zero) {
-	G_zero((char *)rast, numVals * Rast_raster_size(data_type));
+	G_zero((char *)rast, numVals * Rast_cell_size(data_type));
 	return;
     }
 

+ 3 - 3
lib/raster/opencell.c

@@ -118,7 +118,7 @@ int Rast_open_cell_old(const char *name, const char *mapset)
     Rast__check_for_auto_masking();
     /*
        if(R__.auto_mask <= 0)
-       R__.mask_buf = Rast_allocate_cell_buf();
+       R__.mask_buf = Rast_allocate_c_buf();
        now we don't ever free it!, so no need to allocate it  (Olga)
      */
     /* mask_buf is used for reading MASK file when mask is set and
@@ -511,7 +511,7 @@ static int G__open_raster_new_gdal(char *map, char *mapset, RASTER_MAP_TYPE map_
 
     fcb->cellhd = R__.window;
     fcb->cellhd.compressed = 0;
-    fcb->nbytes = Rast_raster_size(fcb->map_type);
+    fcb->nbytes = Rast_cell_size(fcb->map_type);
     /* for writing fcb->data is allocated to be R__.window.cols * 
        sizeof(CELL or DCELL or FCELL)  */
     fcb->data = G_calloc(R__.window.cols, fcb->nbytes);
@@ -627,7 +627,7 @@ static int G__open_raster_new(const char *name, int open_mode,
     /* for writing fcb->data is allocated to be R__.window.cols * 
        sizeof(CELL or DCELL or FCELL)  */
     fcb->data = (unsigned char *)G_calloc(R__.window.cols,
-					  Rast_raster_size(fcb->map_type));
+					  Rast_cell_size(fcb->map_type));
 
     /*
      * copy current window into cell header

+ 1 - 1
lib/raster/put_row.c

@@ -571,7 +571,7 @@ static int put_data_gdal(int fd, const void *rast, int row, int n,
 {
 #ifdef HAVE_GDAL
     struct fileinfo *fcb = &R__.fileinfo[fd];
-    int size = Rast_raster_size(map_type);
+    int size = Rast_cell_size(map_type);
     DCELL null_val = fcb->gdal->null_val;
     const void *src;
     void *work_buf, *dst;

+ 2 - 2
lib/raster/range.c

@@ -483,7 +483,7 @@ void Rast_row_update_fp_range(const void *rast, int n,
 	}
 
 	if (Rast_is_null_value(rast, data_type)) {
-	    rast = G_incr_void_ptr(rast, Rast_raster_size(data_type));
+	    rast = G_incr_void_ptr(rast, Rast_cell_size(data_type));
 	    continue;
 	}
 	if (range->first_time) {
@@ -498,7 +498,7 @@ void Rast_row_update_fp_range(const void *rast, int n,
 		range->max = val;
 	}
 
-	rast = G_incr_void_ptr(rast, Rast_raster_size(data_type));
+	rast = G_incr_void_ptr(rast, Rast_cell_size(data_type));
     }
 }
 

+ 1 - 1
lib/raster/raster.c

@@ -74,7 +74,7 @@ int Rast_raster_cmp(const void *v1, const void *v2, RASTER_MAP_TYPE data_type)
  */
 void Rast_raster_cpy(void *v1, const void *v2, int n, RASTER_MAP_TYPE data_type)
 {
-    G_copy(v1, v2, n * Rast_raster_size(data_type));
+    G_copy(v1, v2, n * Rast_cell_size(data_type));
 }
 
 /*!

+ 4 - 4
lib/raster/sample.c

@@ -95,7 +95,7 @@ DCELL Rast_get_raster_sample_nearest(int fd,
 {
     int row, col;
     DCELL result;
-    DCELL *maprow = Rast_allocate_d_raster_buf();
+    DCELL *maprow = Rast_allocate_c_buf();
 
     /* convert northing and easting to row and col, resp */
     row = (int)floor(G_northing_to_row(north, window));
@@ -153,8 +153,8 @@ DCELL Rast_get_raster_sample_bilinear(int fd,
 {
     int row, col;
     double grid[2][2];
-    DCELL *arow = Rast_allocate_d_raster_buf();
-    DCELL *brow = Rast_allocate_d_raster_buf();
+    DCELL *arow = Rast_allocate_c_buf();
+    DCELL *brow = Rast_allocate_c_buf();
     double frow, fcol, trow, tcol;
     DCELL result;
 
@@ -247,7 +247,7 @@ DCELL Rast_get_raster_sample_cubic(int fd,
     DCELL result;
 
     for (i = 0; i < 4; i++)
-	rows[i] = Rast_allocate_d_raster_buf();
+	rows[i] = Rast_allocate_c_buf();
 
     frow = G_northing_to_row(north, window);
     fcol = G_easting_to_col(east, window);

+ 1 - 1
lib/raster/set_window.c

@@ -97,7 +97,7 @@ int Rast_set_window(struct Cell_head *window)
 	    /* opened for writing */
 	    G_free (fcb->data);
 	    fcb->data = (unsigned char *) G_calloc (R__.window.cols,
-						    Rast_raster_size(fcb->map_type));
+						    Rast_cell_size(fcb->map_type));
 	}
 
 	/* allocate null bitstream buffers for reading/writing null rows */

+ 3 - 3
lib/raster/zero_cell.c

@@ -19,7 +19,7 @@
  *
  * This routines assigns each member of the raster buffer array
  * <i>buf</i> to zero. It assumes that <i>buf</i> has been allocated
- * using Rast_allocate_cell_buf().
+ * using Rast_allocate_c_buf().
  *
  * \param buf data buffer
  */
@@ -37,7 +37,7 @@ void Rast_zero_cell_buf(CELL * buf)
  *
  * This routines assigns each member of the raster buffer array
  * <i>rast</i> to zero. It assumes that <i>rast</i> has been allocated
- * using Rast_allocate_cell_buf().
+ * using Rast_allocate_c_buf().
  *
  * \param rast data buffer
  * \param data_type raster type (CELL, FCELL, DCELL)
@@ -48,7 +48,7 @@ void Rast_zero_raster_buf(void *rast, RASTER_MAP_TYPE data_type)
     unsigned char *ptr;
 
     /* assuming that the size of unsigned char is 1 byte */
-    i = G_window_cols() * Rast_raster_size(data_type);
+    i = G_window_cols() * Rast_cell_size(data_type);
     ptr = (unsigned char *)rast;
 
     while (i--)

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

@@ -36,7 +36,7 @@ struct BM *IL_create_bitmask(struct interp_params *params)
     struct BM *bitmask;
 
     if ((MASKfd = Rast_maskfd()) >= 0)
-	MASK = Rast_allocate_cell_buf();
+	MASK = Rast_allocate_c_buf();
     else
 	MASK = NULL;
 
@@ -49,7 +49,7 @@ struct BM *IL_create_bitmask(struct interp_params *params)
 		G_fatal_error(_("Mask raster map <%s> not found"),
 			      params->maskmap);
 
-	    cellmask = Rast_allocate_cell_buf();
+	    cellmask = Rast_allocate_c_buf();
 	    cfmask = Rast_open_cell_old(params->maskmap, mapsetm);
 	}
 	else

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

@@ -56,7 +56,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
 	     || (params->mcurv != NULL));
     cond1 = ((params->slope != NULL) || (params->aspect != NULL) || cond2);
 
-    cell1 = Rast_allocate_f_raster_buf();
+    cell1 = Rast_allocate_f_buf();
 
     /*
      * G_set_embedded_null_value_mode(1);

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

@@ -64,7 +64,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
     mapset = G_mapset();
 
-    cell1 = Rast_allocate_f_raster_buf();
+    cell1 = Rast_allocate_f_buf();
 
     if (params->elev != NULL) {
 	cf1 = Rast_open_fp_cell_new(params->elev);

+ 2 - 2
lib/rst/interp_float/ressegm2d.c

@@ -499,9 +499,9 @@ static int input_data(struct interp_params *params,
 
 
     if (!cellinp)
-	cellinp = Rast_allocate_f_raster_buf();
+	cellinp = Rast_allocate_f_buf();
     if (!cellsmooth)
-	cellsmooth = Rast_allocate_f_raster_buf();
+	cellsmooth = Rast_allocate_f_buf();
 
     for (m1 = 0; m1 <= last_row - first_row; m1++) {
 	ret_val =

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

@@ -68,7 +68,7 @@ RASTER_MAP_TYPE o_open_file(char *cell)
 	G_fatal_error(_("Unable to open raster map <%s>"), cell_name);
 
     map_type = Rast_get_raster_map_type(in_file_d);
-    raster_size = Rast_raster_size(map_type);
+    raster_size = Rast_cell_size(map_type);
     first_read = 1;
     last_read = 0;
     row_count = 0;

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

@@ -114,7 +114,7 @@ int draw_outline(void)
     bottom = 1;			/*   line from raster map */
     scan_length = read_next();
     k = 0;
-    raster_size = Rast_raster_size(map_type);
+    raster_size = Rast_cell_size(map_type);
     while (read_next()) {	/* read rest of file, one row at *//*   a time */
 	n1 = G_row_to_northing((double)row - 1., &(PS.w));
 	n2 = G_row_to_northing((double)row, &(PS.w));

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

@@ -36,7 +36,7 @@ int PS_make_mask(void)
 	return 0;
     }
     if (maskfd >= 0)
-	maskbuf = Rast_allocate_cell_buf();
+	maskbuf = Rast_allocate_c_buf();
 
     /* if masked, open a file to hold the PostScript mask data */
     if (maskfd >= 0 && PS.mask_needed) {
@@ -109,7 +109,7 @@ int PS_raster_plot(void)
     /* build the image RGB string */
     if (PS.do_raster) {
 	map_type = Rast_get_raster_map_type(PS.cell_fd);
-	cellbuf = Rast_allocate_raster_buf(map_type);
+	cellbuf = Rast_allocate_buf(map_type);
 	n = 0;
 	for (row = 0; row < PS.w.rows; row++) {
 	    Rast_get_raster_row(PS.cell_fd, cellbuf, row, map_type);
@@ -139,7 +139,7 @@ int PS_raster_plot(void)
 		    }
 		    ptr =
 			G_incr_void_ptr(ptr,
-					Rast_raster_size(map_type) *
+					Rast_cell_size(map_type) *
 					PS.col_delta);
 		}
 	    }
@@ -150,7 +150,7 @@ int PS_raster_plot(void)
 
 	for (i = 0; i < 3; i++) {
 	    grp_map_type[i] = Rast_get_raster_map_type(grp.fd[i]);
-	    cbuf[i] = Rast_allocate_raster_buf(grp_map_type[i]);
+	    cbuf[i] = Rast_allocate_buf(grp_map_type[i]);
 	}
 	n = 0;
 	for (row = 0; row < PS.w.rows; row++) {
@@ -171,7 +171,7 @@ int PS_raster_plot(void)
 			if (i == 2)
 			    b = bb;
 			cptr[i] = G_incr_void_ptr(cptr[i],
-						  Rast_raster_size(grp_map_type
+						  Rast_cell_size(grp_map_type
 								[0]) *
 						  PS.col_delta);
 		    }

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

@@ -107,12 +107,12 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Unable to read header of raster map <%s>"), name);
 
     /* Allocate input buffer */
-    inrast = Rast_allocate_raster_buf(data_type);
+    inrast = Rast_allocate_buf(data_type);
 
     /* Allocate output buffer, use input map data_type */
     nrows = G_window_rows();
     ncols = G_window_cols();
-    outrast = Rast_allocate_raster_buf(data_type);
+    outrast = Rast_allocate_buf(data_type);
 
     if ((outfd = Rast_open_raster_new(result, data_type)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), result);

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

@@ -42,7 +42,7 @@ int read_input_map(char *input, char *mapset, int ZEROFLAG)
     if (fd < 0)
 	G_fatal_error(_("Unable to open raster map <%s>"), input);
 
-    cell = Rast_allocate_cell_buf();
+    cell = Rast_allocate_c_buf();
 
     ptr = map;
 

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

@@ -45,7 +45,7 @@ int write_output_map(char *output, int offset)
 	if (fd_in < 0)
 	    G_fatal_error(_("Unable to open raster map <%s>"), output);
     }
-    cell = Rast_allocate_cell_buf();
+    cell = Rast_allocate_c_buf();
     G_message(_("Writing output raster map <%s>..."), output);
 
     ptr = map;

+ 1 - 1
raster/r.carve/enforce_ds.c

@@ -74,7 +74,7 @@ int enforce_downstream(int infd, int outfd,
     /* allocate and clear memory for entire raster */
     rbuf =
 	G_calloc(G_window_rows() * G_window_cols(),
-		 Rast_raster_size(parm->raster_type));
+		 Rast_cell_size(parm->raster_type));
 
     /* first read whole elevation file into buf */
     read_raster(rbuf, infd, parm->raster_type);

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

@@ -17,7 +17,7 @@ void *read_raster(void *buf, const int fd, const RASTER_MAP_TYPE rtype)
 
 	Rast_get_raster_row(fd, tmpbuf, i, rtype);
 	tmpbuf =
-	    G_incr_void_ptr(tmpbuf, Rast_raster_size(rtype) * G_window_cols());
+	    G_incr_void_ptr(tmpbuf, Rast_cell_size(rtype) * G_window_cols());
     }
 
     return tmpbuf;
@@ -37,7 +37,7 @@ void *write_raster(void *buf, const int fd, const RASTER_MAP_TYPE rtype)
 
 	Rast_put_raster_row(fd, tmpbuf, rtype);
 	tmpbuf =
-	    G_incr_void_ptr(tmpbuf, Rast_raster_size(rtype) * G_window_cols());
+	    G_incr_void_ptr(tmpbuf, Rast_cell_size(rtype) * G_window_cols());
     }
 
     return tmpbuf;

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

@@ -45,7 +45,7 @@ int get_cats(const char *name, const char *mapset)
 		      name, mapset);
     nrows = G_window_rows();
     ncols = G_window_cols();
-    cell = Rast_allocate_cell_buf();
+    cell = Rast_allocate_c_buf();
     Rast_init_cell_stats(&statf);
 
     /* read the raster map */

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

@@ -34,7 +34,7 @@ int get_stats(const char *name, const char *mapset, struct Cell_stats *statf)
 	G_fatal_error(_("Unable to open raster map <%s>"),
 		      G_fully_qualified_name(name, mapset));
 
-    cell = Rast_allocate_cell_buf();
+    cell = Rast_allocate_c_buf();
     nrows = G_window_rows();
     ncols = G_window_cols();
 
@@ -67,7 +67,7 @@ void get_fp_stats(const char *name, const char *mapset,
 	G_fatal_error("Unable to open raster map <%s>",
 		      G_fully_qualified_name(name, mapset));
 
-    dcell = Rast_allocate_d_raster_buf();
+    dcell = Rast_allocate_c_buf();
     nrows = G_window_rows();
     ncols = G_window_cols();
 

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

@@ -157,7 +157,7 @@ int main(int argc, char **argv)
 
 	b->type = Rast_get_raster_map_type(b->file);
 
-	b->size = Rast_raster_size(b->type);
+	b->size = Rast_cell_size(b->type);
 
 	/* Reading color lookup table */
 	if (Rast_read_colors(b->name, "", &b->colors) == -1)
@@ -184,7 +184,7 @@ int main(int argc, char **argv)
     if ((out_file = Rast_open_cell_new(out_name)) < 0)
 	G_fatal_error(_("Unable to create raster map <%s>"), out_name);
 
-    out_array = Rast_allocate_cell_buf();
+    out_array = Rast_allocate_c_buf();
 
     /* Make color table */
     make_color_cube(&out_colors);

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

@@ -211,7 +211,7 @@ static int doit(char *name, int uncompress, RASTER_MAP_TYPE map_type)
     if (new < 0)
 	return 1;
     nrows = G_window_rows();
-    rast = Rast_allocate_raster_buf(map_type);
+    rast = Rast_allocate_buf(map_type);
 
     oldsize = lseek(old, (off_t) 0, SEEK_END);
 

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

@@ -356,7 +356,7 @@ int main(int argc, char *argv[])
 	G_fatal_error(_("Unable to open raster map <%s>"), cost_layer);
 
     data_type = Rast_get_raster_map_type(cost_fd);
-    cell = Rast_allocate_raster_buf(data_type);
+    cell = Rast_allocate_buf(data_type);
 
     /*   Parameters for map submatrices   */
 
@@ -422,7 +422,7 @@ int main(int argc, char *argv[])
 	int i;
 	double p;
 
-	dsize = Rast_raster_size(data_type);
+	dsize = Rast_cell_size(data_type);
 	p = 0.0;
 
 	for (row = 0; row < nrows; row++) {
@@ -639,9 +639,9 @@ int main(int argc, char *argv[])
 
 	data_type2 = Rast_get_raster_map_type(fd);
 
-	dsize2 = Rast_raster_size(data_type2);
+	dsize2 = Rast_cell_size(data_type2);
 
-	cell2 = Rast_allocate_raster_buf(data_type2);
+	cell2 = Rast_allocate_buf(data_type2);
 
 	if (!cell2)
 	    G_fatal_error(_("Unable to allocate memory"));
@@ -981,7 +981,7 @@ int main(int argc, char *argv[])
 
     if (dir == 1) {
 	dir_fd = Rast_open_raster_new(move_dir_layer, dir_data_type);
-	dir_cell = Rast_allocate_raster_buf(dir_data_type);
+	dir_cell = Rast_allocate_buf(dir_data_type);
     }
 
     /*  Write pending updates by segment_put() to output map   */
@@ -995,7 +995,7 @@ int main(int argc, char *argv[])
     G_message(_("Writing raster map <%s>..."), cum_cost_layer);
 
     if (keep_nulls) {
-	cell2 = Rast_allocate_raster_buf(data_type);
+	cell2 = Rast_allocate_buf(data_type);
     }
 
     if (data_type == CELL_TYPE) {

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

@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
     sum2 = (double **)G_malloc(nfiles * sizeof(double *));
     for (i = 0; i < nfiles; i++) {
 	sum2[i] = (double *)G_calloc(nfiles, sizeof(double));
-	dcell[i] = Rast_allocate_d_raster_buf();
+	dcell[i] = Rast_allocate_c_buf();
 	name = maps->answers[i];
 	fd[i] = Rast_open_cell_old(name, "");
 	if (fd[i] < 0)

+ 1 - 1
raster/r.cross/cross.c

@@ -39,7 +39,7 @@ CELL cross(int fd[], int non_zero, int primary, int outfd)
     /* allocate i/o buffers for each raster map */
 
     for (i = 0; i < nfiles; i++)
-	cell[i] = Rast_allocate_cell_buf();
+	cell[i] = Rast_allocate_c_buf();
     result_cell = cell[0];
 
     /* initialize the reclass table */

+ 1 - 1
raster/r.cross/renumber.c

@@ -28,7 +28,7 @@ int renumber(int in, int out)
     CELL *cell, *c;
     int row, col;
 
-    cell = Rast_allocate_cell_buf();
+    cell = Rast_allocate_c_buf();
 
     G_message(_("%s: STEP 3 ... "), G_program_name());
     for (row = 0; row < nrows; row++) {

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

@@ -58,7 +58,7 @@ int describe(const char *name, int compact, char *no_data_str,
 	map_type = CELL_TYPE;	/* read as int */
 
     /* allocate the cell buffer */
-    buf = Rast_allocate_cell_buf();
+    buf = Rast_allocate_c_buf();
 
     if (map_type != CELL_TYPE && range)
 	/* this will make it report fp range */

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

@@ -90,12 +90,12 @@ int null_distance(const char *name1, const char *name2, int *zerro_row, int *zer
     mapset = G_find_cell2(name1, "");
     maptype1 = Rast_raster_map_type(name1, mapset);
     mapd1 = Rast_open_cell_old(name1, mapset);
-    inrast1 = Rast_allocate_raster_buf(maptype1);
+    inrast1 = Rast_allocate_buf(maptype1);
 
     mapset = G_find_cell2(name2, "");
     maptype2 = Rast_raster_map_type(name2, mapset);
     mapd2 = Rast_open_cell_old(name2, mapset);
-    inrast2 = Rast_allocate_raster_buf(maptype2);
+    inrast2 = Rast_allocate_buf(maptype2);
 
     G_message(_("Reading maps  <%s,%s> while finding 0 distance ..."), name1,
 	      name2);

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

@@ -360,7 +360,7 @@ int main(int argc, char **argv)
     Rast_close_cell(map_id);
 
     if (costmode == 1) {
-	dir_buf = Rast_allocate_d_raster_buf();
+	dir_buf = Rast_allocate_c_buf();
 	dir_id = Rast_open_cell_old(dir_name, "");
 	tempfile3 = G_tempfile();
 	dir_fd = open(tempfile3, O_RDWR | O_CREAT, 0666);
@@ -417,7 +417,7 @@ int main(int argc, char **argv)
 	/* Output will be a cell map */
 	/* open a new file and allocate an output buffer */
 	new_id = Rast_open_cell_new(new_map_name);
-	out_buf = Rast_allocate_c_raster_buf();
+	out_buf = Rast_allocate_c_buf();
 
 	/* mark each cell */
 	thispoint = list;
@@ -578,7 +578,7 @@ struct point *drain(int fd, struct point *list, int nrow, int ncol)
     CELL direction;
     CELL *dir;
 
-    dir = Rast_allocate_c_raster_buf();
+    dir = Rast_allocate_c_buf();
     next_row = list->row;
     next_col = list->col;
 
@@ -644,7 +644,7 @@ struct point *drain_cost(int dir_fd, struct point *list, int nrow, int ncol)
     DCELL direction;
     DCELL *dir_buf;
 
-    dir_buf = Rast_allocate_d_raster_buf();
+    dir_buf = Rast_allocate_c_buf();
 
     next_row = list->row;
     next_col = list->col;

+ 3 - 3
raster/r.drain/tinf.c

@@ -231,17 +231,17 @@ int put_row_d(int fd, void *row)
 /* Allocate memory for one line of data */
 void *get_buf_c(void)
 {
-    return (void *)Rast_allocate_c_raster_buf();
+    return (void *)Rast_allocate_c_buf();
 }
 
 void *get_buf_f(void)
 {
-    return (void *)Rast_allocate_f_raster_buf();
+    return (void *)Rast_allocate_f_buf();
 }
 
 void *get_buf_d(void)
 {
-    return (void *)Rast_allocate_d_raster_buf();
+    return (void *)Rast_allocate_c_buf();
 }
 
 /* initialize memory to a minimum value */

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

@@ -250,7 +250,7 @@ int main(int argc, char **argv)
     G_free(bnd.b[1]);
     G_free(bnd.b[2]);
 
-    out_buf = Rast_allocate_c_raster_buf();
+    out_buf = Rast_allocate_c_buf();
     bufsz = ncols * sizeof(CELL);
 
     lseek(fe, 0, SEEK_SET);

+ 3 - 3
raster/r.fill.dir/tinf.c

@@ -212,17 +212,17 @@ int put_row_d(int fd, void *row)
 /* Allocate memory for one line of data */
 void *get_buf_c()
 {
-    return (void *)Rast_allocate_c_raster_buf();
+    return (void *)Rast_allocate_c_buf();
 }
 
 void *get_buf_f()
 {
-    return (void *)Rast_allocate_f_raster_buf();
+    return (void *)Rast_allocate_f_buf();
 }
 
 void *get_buf_d()
 {
-    return (void *)Rast_allocate_d_raster_buf();
+    return (void *)Rast_allocate_c_buf();
 }
 
 /* initialize memory to a minimum value */

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

@@ -111,7 +111,7 @@ void read_input_files(void)
 
     if (parm.barin) {
 	G_message(_("Reading input files: barrier"));
-	barc = Rast_allocate_d_raster_buf();
+	barc = Rast_allocate_c_buf();
 	fd = open_existing_cell_file(parm.barin, &hd);
 
 	for (row = 0; row < region.rows; row++) {

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

@@ -308,7 +308,7 @@ static void calculate(void)
 
     /*    double     x, y, length, xstep, ystep, roffset, coffset; */
     double x, y, length, xstep, ystep;
-    FCELL *lg = Rast_allocate_f_raster_buf();
+    FCELL *lg = Rast_allocate_f_buf();
     struct line_pnts *points = Vect_new_line_struct();
     struct line_cats *cats = Vect_new_cats_struct();
     int loopstep = (!parm.dsout && !parm.lgout && parm.flout) ? parm.skip : 1;

+ 4 - 4
raster/r.flow/mem.c

@@ -76,10 +76,10 @@ void allocate_heap(void)
     if (!parm.mem) {
 	G_debug(1, "Allocating memory: aspect");
 	as.buf = (DCELL **) G_calloc(region.rows, sizeof(DCELL *));
-	as.buf[0] = (DCELL *) Rast_allocate_raster_buf(DCELL_TYPE);
+	as.buf[0] = (DCELL *) Rast_allocate_buf(DCELL_TYPE);
 	for (row = 0; row < region.rows; row++)
 	    as.buf[row] = parm.seg ?
-		as.buf[0] : (DCELL *) Rast_allocate_raster_buf(DCELL_TYPE);
+		as.buf[0] : (DCELL *) Rast_allocate_buf(DCELL_TYPE);
     }
 
     if (parm.barin) {
@@ -90,10 +90,10 @@ void allocate_heap(void)
     if (parm.dsout) {
 	G_debug(1, "Allocating memory: density");
 	ds.buf = (DCELL **) G_calloc(region.rows, sizeof(DCELL *));
-	ds.buf[0] = (DCELL *) Rast_allocate_raster_buf(DCELL_TYPE);
+	ds.buf[0] = (DCELL *) Rast_allocate_buf(DCELL_TYPE);
 	for (row = 0; row < region.rows; row++)
 	    ds.buf[row] = parm.seg ?
-		ds.buf[0] : (DCELL *) Rast_allocate_raster_buf(DCELL_TYPE);
+		ds.buf[0] : (DCELL *) Rast_allocate_buf(DCELL_TYPE);
     }
 
     if (parm.flout) {

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

@@ -234,20 +234,20 @@ int main(int argc, char **argv)
     xres = window.ew_res;
     yres = window.ns_res;
 
-    in_row = Rast_allocate_d_raster_buf();
+    in_row = Rast_allocate_c_buf();
 
-    old_val_row = Rast_allocate_d_raster_buf();
-    new_val_row = Rast_allocate_d_raster_buf();
+    old_val_row = Rast_allocate_c_buf();
+    new_val_row = Rast_allocate_c_buf();
 
-    old_x_row = Rast_allocate_c_raster_buf();
-    old_y_row = Rast_allocate_c_raster_buf();
-    new_x_row = Rast_allocate_c_raster_buf();
-    new_y_row = Rast_allocate_c_raster_buf();
+    old_x_row = Rast_allocate_c_buf();
+    old_y_row = Rast_allocate_c_buf();
+    new_x_row = Rast_allocate_c_buf();
+    new_y_row = Rast_allocate_c_buf();
 
-    dist_row = Rast_allocate_d_raster_buf();
+    dist_row = Rast_allocate_c_buf();
 
     if (dist_name && strcmp(opt.met->answer, "euclidean") == 0)
-	out_row = Rast_allocate_d_raster_buf();
+	out_row = Rast_allocate_c_buf();
     else
 	out_row = dist_row;
 

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

@@ -213,9 +213,9 @@ int main(int argc, char **argv)
     in_rows = G_malloc((size * 2 + 1) * sizeof(DCELL *));
 
     for (row = 0; row <= size * 2; row++)
-	in_rows[row] = Rast_allocate_d_raster_buf();
+	in_rows[row] = Rast_allocate_c_buf();
 
-    out_row = Rast_allocate_d_raster_buf();
+    out_row = Rast_allocate_c_buf();
 
     for (row = 0; row < size; row++)
 	Rast_get_d_raster_row(in_fd, in_rows[size + row], row);

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

@@ -206,9 +206,9 @@ int main(int argc, char **argv)
 	    b_used = 1;
     }
 
-    r_array = Rast_allocate_cell_buf();
-    g_array = Rast_allocate_cell_buf();
-    b_array = Rast_allocate_cell_buf();
+    r_array = Rast_allocate_c_buf();
+    g_array = Rast_allocate_c_buf();
+    b_array = Rast_allocate_c_buf();
 
     /* Make color table */
     make_gray_scale(&gray_colors);

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

@@ -537,7 +537,7 @@ int INPUT(void)
     int l, i, j, k;
     int lmax, kmax;
 
-    cell1 = Rast_allocate_f_raster_buf();
+    cell1 = Rast_allocate_f_buf();
 
     z = (float **)G_malloc(sizeof(float *) * (m));
     z100 = (float **)G_malloc(sizeof(float *) * (m100));
@@ -617,7 +617,7 @@ int OUTGR(int numrows, int numcols)
 	exit(EXIT_FAILURE);
 
     if (horizon != NULL) {
-	cell1 = Rast_allocate_f_raster_buf();
+	cell1 = Rast_allocate_f_buf();
 	fd1 = Rast_open_fp_cell_new(shad_filename);
 	if (fd1 < 0)
 	    G_fatal_error(_("Unable to create raster map %s"), shad_filename);

+ 3 - 3
raster/r.in.arc/main.c

@@ -141,13 +141,13 @@ int main(int argc, char *argv[])
 
     switch (rtype) {
     case CELL_TYPE:
-	cell = Rast_allocate_c_raster_buf();
+	cell = Rast_allocate_c_buf();
 	break;
     case FCELL_TYPE:
-	fcell = Rast_allocate_f_raster_buf();
+	fcell = Rast_allocate_f_buf();
 	break;
     case DCELL_TYPE:
-	dcell = Rast_allocate_d_raster_buf();
+	dcell = Rast_allocate_c_buf();
 	break;
     }
     cf = Rast_open_raster_new(output, rtype);

+ 5 - 5
raster/r.in.ascii/main.c

@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
 		      G_window_cols());
 
 
-    rast_ptr = Rast_allocate_raster_buf(data_type);
+    rast_ptr = Rast_allocate_buf(data_type);
     rast = rast_ptr;
     cf = Rast_open_raster_new(output, data_type);
     if (cf < 0)
@@ -226,9 +226,9 @@ int main(int argc, char *argv[])
 	    else {
 		Rast_set_null_value(rast_ptr, 1, data_type);
 	    }
-	    rast_ptr = G_incr_void_ptr(rast_ptr, Rast_raster_size(data_type));
+	    rast_ptr = G_incr_void_ptr(rast_ptr, Rast_cell_size(data_type));
 	}
-	fwrite(rast, Rast_raster_size(data_type), ncols, ft);
+	fwrite(rast, Rast_cell_size(data_type), ncols, ft);
 	rast_ptr = rast;
     }
     G_percent(nrows, nrows, 2);
@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
 
     sz = 0;
     if (direction < 0) {
-	sz = -ncols * Rast_raster_size(data_type);
+	sz = -ncols * Rast_cell_size(data_type);
 	fseek(ft, sz, SEEK_END);
 	sz *= 2;
     }
@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
     }
 
     for (row = 0; row < nrows; row += 1) {
-	fread(rast, Rast_raster_size(data_type), ncols, ft);
+	fread(rast, Rast_cell_size(data_type), ncols, ft);
 	Rast_put_raster_row(cf, rast, data_type);
 	fseek(ft, sz, SEEK_CUR);
     }

+ 3 - 3
raster/r.in.bin/main.c

@@ -482,14 +482,14 @@ int main(int argc, char *argv[])
 
     if (flag.f->answer) {
 	map_type = FCELL_TYPE;
-	fcell = Rast_allocate_f_raster_buf();
+	fcell = Rast_allocate_f_buf();
     }
     else if (flag.d->answer) {
 	map_type = DCELL_TYPE;
-	dcell = Rast_allocate_d_raster_buf();
+	dcell = Rast_allocate_c_buf();
     }
     else {
-	cell = Rast_allocate_c_raster_buf();
+	cell = Rast_allocate_c_buf();
 	map_type = CELL_TYPE;
     }
 

+ 3 - 3
raster/r.in.gdal/main.c

@@ -738,8 +738,8 @@ static void ImportBand(GDALRasterBandH hBand, const char *output,
 	if (cfI < 0)
 	    G_fatal_error(_("Unable to create raster map <%s>"), outputImg);
 
-	cellReal = Rast_allocate_raster_buf(data_type);
-	cellImg = Rast_allocate_raster_buf(data_type);
+	cellReal = Rast_allocate_buf(data_type);
+	cellImg = Rast_allocate_buf(data_type);
 	bufComplex = (float *)G_malloc(sizeof(float) * ncols * 2);
 
 	if (group_ref != NULL) {
@@ -755,7 +755,7 @@ static void ImportBand(GDALRasterBandH hBand, const char *output,
 	if (group_ref != NULL)
 	    I_add_file_to_group_ref((char *)output, G_mapset(), group_ref);
 
-	cell = Rast_allocate_raster_buf(data_type);
+	cell = Rast_allocate_buf(data_type);
     }
 
     /* -------------------------------------------------------------------- */

+ 0 - 0
raster/r.in.mat/main.c


Vissa filer visades inte eftersom för många filer har ändrats