Переглянути джерело

rasterlib: Rast_unopen_cell -> Rast_unopen
Rast_close_cell -> Rast_close
see http://trac.osgeo.org/grass/wiki/Grass7/RasterLib


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

Martin Landa 16 роки тому
батько
коміт
fb2523dcf1
100 змінених файлів з 295 додано та 295 видалено
  1. 3 3
      display/d.his/main.c
  2. 1 1
      display/d.nviz/main.c
  3. 2 2
      display/d.rast.arrow/main.c
  4. 1 1
      display/d.rast.num/main.c
  5. 1 1
      display/d.rast/display.c
  6. 1 1
      display/d.rgb/main.c
  7. 2 2
      doc/raster/r.example/main.c
  8. 1 1
      general/g.region/zoom.c
  9. 2 2
      imagery/i.albedo/main.c
  10. 4 4
      imagery/i.atcorr/main.cpp
  11. 7 7
      imagery/i.biomass/main.c
  12. 2 2
      imagery/i.cca/main.c
  13. 1 1
      imagery/i.class/band_files.c
  14. 1 1
      imagery/i.class/draw_cell.c
  15. 1 1
      imagery/i.class/signature.c
  16. 1 1
      imagery/i.cluster/main.c
  17. 4 4
      imagery/i.eb.eta/main.c
  18. 5 5
      imagery/i.eb.evapfr/main.c
  19. 3 3
      imagery/i.eb.h_SEBAL01/main.c
  20. 6 6
      imagery/i.eb.soilheatflux/main.c
  21. 2 2
      imagery/i.emissivity/main.c
  22. 4 4
      imagery/i.evapo.time_integration/main.c
  23. 3 3
      imagery/i.fft/main.c
  24. 2 2
      imagery/i.gensig/closefiles.c
  25. 2 2
      imagery/i.gensigset/closefiles.c
  26. 1 1
      imagery/i.his.rgb/closefiles.c
  27. 4 4
      imagery/i.ifft/main.c
  28. 2 2
      imagery/i.latlong/main.c
  29. 2 2
      imagery/i.maxlik/main.c
  30. 2 2
      imagery/i.modis.qc/main.c
  31. 2 2
      imagery/i.pca/main.c
  32. 1 1
      imagery/i.points/drawcell.c
  33. 1 1
      imagery/i.rectify/rectify.c
  34. 1 1
      imagery/i.rectify/write.c
  35. 1 1
      imagery/i.rgb.his/closefiles.c
  36. 2 2
      imagery/i.smap/closefiles.c
  37. 3 3
      imagery/i.sunhours/main.c
  38. 7 7
      imagery/i.vi/main.c
  39. 1 1
      imagery/i.vpoints/drawcell.c
  40. 2 2
      imagery/i.zc/main.c
  41. 2 2
      include/raster.h
  42. 6 6
      lib/gpde/N_arrays_io.c
  43. 6 6
      lib/ogsf/Gs3.c
  44. 2 2
      lib/raster/auto_mask.c
  45. 2 2
      lib/raster/closecell.c
  46. 1 1
      lib/raster/opencell.c
  47. 1 1
      lib/raster/set_window.c
  48. 6 6
      lib/rst/interp_float/output2d.c
  49. 6 6
      lib/rst/interp_float/resout2d.c
  50. 1 1
      ps/ps.map/outl_io.c
  51. 2 2
      ps/ps.map/ps_raster.c
  52. 1 1
      ps/ps.map/r_cell.c
  53. 1 1
      ps/ps.map/r_group.c
  54. 1 1
      ps/ps.map/r_rgb.c
  55. 1 1
      raster/r.basins.fill/main.c
  56. 1 1
      raster/r.basins.fill/read_map.c
  57. 2 2
      raster/r.bitpattern/main.c
  58. 1 1
      raster/r.buffer/read_map.c
  59. 2 2
      raster/r.buffer/write_map.c
  60. 2 2
      raster/r.carve/main.c
  61. 1 1
      raster/r.category/cats.c
  62. 1 1
      raster/r.category/main.c
  63. 1 1
      raster/r.circle/main.c
  64. 2 2
      raster/r.clump/main.c
  65. 2 2
      raster/r.colors/stats.c
  66. 2 2
      raster/r.composite/main.c
  67. 4 4
      raster/r.compress/main.c
  68. 4 4
      raster/r.cost/main.c
  69. 4 4
      raster/r.cross/main.c
  70. 1 1
      raster/r.describe/describe.c
  71. 4 4
      raster/r.distance/distance.c
  72. 1 1
      raster/r.distance/edges.c
  73. 3 3
      raster/r.drain/main.c
  74. 4 4
      raster/r.fill.dir/main.c
  75. 5 5
      raster/r.flow/io.c
  76. 1 1
      raster/r.flow/main.c
  77. 3 3
      raster/r.grow.distance/main.c
  78. 2 2
      raster/r.grow/main.c
  79. 6 6
      raster/r.his/main.c
  80. 2 2
      raster/r.horizon/main.c
  81. 2 2
      raster/r.in.arc/main.c
  82. 2 2
      raster/r.in.ascii/main.c
  83. 2 2
      raster/r.in.bin/main.c
  84. 3 3
      raster/r.in.gdal/main.c
  85. 1 1
      raster/r.in.gridatb/file_io.c
  86. 3 3
      raster/r.in.mat/main.c
  87. 2 2
      raster/r.in.poly/poly2rast.c
  88. 2 2
      raster/r.in.xyz/main.c
  89. 3 3
      raster/r.lake/main.c
  90. 46 46
      raster/r.le/r.le.patch/driver.c
  91. 3 3
      raster/r.le/r.le.patch/trace.c
  92. 1 1
      raster/r.le/r.le.pixel/cellclip.c
  93. 21 21
      raster/r.le/r.le.pixel/driver.c
  94. 2 2
      raster/r.le/r.le.pixel/texture.c
  95. 1 1
      raster/r.le/r.le.setup/mv_wind.c
  96. 2 2
      raster/r.le/r.le.setup/polytocell/bmf_to_cll.c
  97. 3 3
      raster/r.le/r.le.setup/sample.c
  98. 1 1
      raster/r.li/r.li.daemon/daemon.c
  99. 1 1
      raster/r.li/r.li.daemon/worker.c
  100. 0 0
      raster/r.los/main.c

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

@@ -246,11 +246,11 @@ int main(int argc, char **argv)
     D_close_driver();
 
     /* Close the raster maps */
-    Rast_close_cell(hue_file);
+    Rast_close(hue_file);
     if (int_used)
-	Rast_close_cell(int_file);
+	Rast_close(int_file);
     if (sat_used)
-	Rast_close_cell(sat_file);
+	Rast_close(sat_file);
 
     exit(EXIT_SUCCESS);
 }

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

@@ -315,7 +315,7 @@ int main(int argc, char *argv[])
     fprintf(fp, "SendScriptLine \"set ScriptPlaying 0\"\n");
     fprintf(fp, "puts \"DONE!\"\n");
 
-    Rast_close_cell(fd);
+    Rast_close(fd);
     fclose(fp);
 
     sprintf(buf1, _("Created NVIZ script <%s>."), outfile);

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

@@ -501,9 +501,9 @@ int main(int argc, char **argv)
 	}
     }
 
-    Rast_close_cell(layer_fd);
+    Rast_close(layer_fd);
     if (opt7->answer)
-	Rast_close_cell(mag_fd);
+	Rast_close(mag_fd);
 
     D_close_driver();
 

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

@@ -241,7 +241,7 @@ int main(int argc, char **argv)
 	}
     }
 
-    Rast_close_cell(layer_fd);
+    Rast_close(layer_fd);
 
     D_close_driver();
 

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

@@ -81,7 +81,7 @@ static int cell_draw(const char *name,
     G_percent(nrows, nrows, 2);
 
     /* Wrap up and return */
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
     G_free(xarray);
     return (0);
 }

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

@@ -132,7 +132,7 @@ int main(int argc, char **argv)
 
     /* Close the raster maps */
     for (i = 0; i < 3; i++)
-	Rast_close_cell(B[i].file);
+	Rast_close(B[i].file);
 
     exit(EXIT_SUCCESS);
 }

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

@@ -184,8 +184,8 @@ int main(int argc, char *argv[])
     G_free(outrast);
 
     /* closing raster maps */
-    Rast_close_cell(infd);
-    Rast_close_cell(outfd);
+    Rast_close(infd);
+    Rast_close(outfd);
 
     /* add command line incantation to history file */
     Rast_short_history(result, "raster", &history);

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

@@ -55,7 +55,7 @@ int zoom(struct Cell_head *window, const char *name, const char *mapset)
 	if (mark > right)
 	    right = mark;
     }
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(raster);
 
     /* no data everywhere? */

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

@@ -394,10 +394,10 @@ int main(int argc, char *argv[])
     }
     for (i = 1; i <= nfiles; i++) {
 	G_free(inrast[i]);
-	Rast_close_cell(infd[i]);
+	Rast_close(infd[i]);
     }
     G_free(outrast);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
 
     /* Color table from 0.0 to 1.0 */
     Rast_init_colors(&colors);

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

@@ -647,10 +647,10 @@ int main(int argc, char* argv[])
 
     /* Close the input and output file descriptors */
     Rast_short_history(opts.oimg->answer, "raster", &hist);
-    Rast_close_cell(iimg_fd);
-    if(opts.ialt->answer) Rast_close_cell(ialt_fd);
-    if(opts.ivis->answer) Rast_close_cell(ivis_fd);
-    Rast_close_cell(oimg_fd);
+    Rast_close(iimg_fd);
+    if(opts.ialt->answer) Rast_close(ialt_fd);
+    if(opts.ivis->answer) Rast_close(ivis_fd);
+    Rast_close(oimg_fd);
 
     Rast_command_history(&hist);
     Rast_write_history(opts.oimg->answer, &hist);

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

@@ -191,13 +191,13 @@ int main(int argc, char *argv[])
     G_free(inrast_tsw);
     G_free(inrast_wa);
     G_free(outrast1);
-    Rast_close_cell(infd_fpar);
-    Rast_close_cell(infd_luf);
-    Rast_close_cell(infd_lat);
-    Rast_close_cell(infd_doy);
-    Rast_close_cell(infd_tsw);
-    Rast_close_cell(infd_wa);
-    Rast_close_cell(outfd1);
+    Rast_close(infd_fpar);
+    Rast_close(infd_luf);
+    Rast_close(infd_lat);
+    Rast_close(infd_doy);
+    Rast_close(infd_tsw);
+    Rast_close(infd_wa);
+    Rast_close(outfd1);
     Rast_short_history(result1, "raster", &history);
     Rast_command_history(&history);
     Rast_write_history(result1, &history);

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

@@ -188,8 +188,8 @@ int main(int argc, char *argv[])
 
     /* close the cell maps */
     for (i = 1; i <= bands; i++) {
-	Rast_close_cell(datafds[i]);
-	Rast_close_cell(outfds[i]);
+	Rast_close(datafds[i]);
+	Rast_close(outfds[i]);
 
 	if (outbandmin[i] < (CELL) 0 || outbandmax[i] > (CELL) 255) {
 	    G_warning(_("The output cell map <%s.%d> has values "

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

@@ -34,7 +34,7 @@ int close_band_files(void)
     nbands = Refer.nfiles;
     for (n = 0; n < nbands; n++) {
 	G_free(Bandbuf[n]);
-	Rast_close_cell(Bandfd[n]);
+	Rast_close(Bandfd[n]);
     }
     G_free(Bandbuf);
     G_free(Bandfd);

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

@@ -56,7 +56,7 @@ int draw_cell(View * view, int overlay)
 	D_draw_d_raster(row, dcell, &colr);
     }
     D_cell_draw_end();
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(dcell);
     Rast_free_colors(&colr);
 

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

@@ -294,7 +294,7 @@ int display_signature(void)
 	    Rast_put_raster_row(fd, buffer, CELL_TYPE);
 	}
 
-	Rast_close_cell(fd);
+	Rast_close(fd);
 	close_band_files();
     }				/* end of if first_display */
 

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

@@ -303,7 +303,7 @@ int main(int argc, char *argv[])
 
     for (n = 0; n < ref.nfiles; n++) {
 	G_free(cell[n]);
-	Rast_close_cell(cellfd[n]);
+	Rast_close(cellfd[n]);
     }
     G_free(x);
 

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

@@ -133,11 +133,11 @@ int main(int argc, char *argv[])
     G_free(inrast_rnetday);
     G_free(inrast_evapfr);
     G_free(inrast_tempk);
-    Rast_close_cell(infd_rnetday);
-    Rast_close_cell(infd_evapfr);
-    Rast_close_cell(infd_tempk);
+    Rast_close(infd_rnetday);
+    Rast_close(infd_evapfr);
+    Rast_close(infd_tempk);
     G_free(outrast1);
-    Rast_close_cell(outfd1);
+    Rast_close(outfd1);
     Rast_short_history(result1, "raster", &history);
     Rast_command_history(&history);
     Rast_write_history(result1, &history);

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

@@ -177,14 +177,14 @@ int main(int argc, char *argv[])
     G_free(inrast_rnet);
     G_free(inrast_g0);
     G_free(inrast_h0);
-    Rast_close_cell(infd_rnet);
-    Rast_close_cell(infd_g0);
-    Rast_close_cell(infd_h0);
+    Rast_close(infd_rnet);
+    Rast_close(infd_g0);
+    Rast_close(infd_h0);
     G_free(outrast1);
     G_free(outrast2);
     if (makin) {
-	Rast_close_cell(outfd1);
-	Rast_close_cell(outfd2);
+	Rast_close(outfd1);
+	Rast_close(outfd2);
     }
     Rast_short_history(result1, "raster", &history);
     Rast_command_history(&history);

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

@@ -635,12 +635,12 @@ int main(int argc, char *argv[])
 
 
     G_free(inrast_z0m);
-    Rast_close_cell(infd_z0m);
+    Rast_close(infd_z0m);
     G_free(inrast_t0dem);
-    Rast_close_cell(infd_t0dem);
+    Rast_close(infd_t0dem);
 
     G_free(outrast);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
 
     /* add command line incantation to history file */
     Rast_short_history(h0, "raster", &history);

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

@@ -176,13 +176,13 @@ int main(int argc, char *argv[])
     G_free(inrast_tempk);
     G_free(inrast_rnet);
     G_free(inrast_time);
-    Rast_close_cell(infd_albedo);
-    Rast_close_cell(infd_ndvi);
-    Rast_close_cell(infd_tempk);
-    Rast_close_cell(infd_rnet);
-    Rast_close_cell(infd_time);
+    Rast_close(infd_albedo);
+    Rast_close(infd_ndvi);
+    Rast_close(infd_tempk);
+    Rast_close(infd_rnet);
+    Rast_close(infd_time);
     G_free(outrast);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
     
     /* Colors in grey shade */ 
     Rast_init_colors(&colors);

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

@@ -103,9 +103,9 @@ int main(int argc, char *argv[])
 	    G_fatal_error(_("Cannot write to output raster file"));
     }
     G_free(inr);
-    Rast_close_cell(infd);
+    Rast_close(infd);
     G_free(outr);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
 
     Rast_short_history(result1, "raster", &history);
     Rast_command_history(&history);

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

@@ -418,14 +418,14 @@ int main(int argc, char *argv[])
 
     for (i = 1; i <= nfiles; i++) {
 	G_free(inrast[i]);
-	Rast_close_cell(infd[i]);
+	Rast_close(infd[i]);
 	G_free(inrast1[i]);
-	Rast_close_cell(infd1[i]);
+	Rast_close(infd1[i]);
 	G_free(inrast2[i]);
-	Rast_close_cell(infd2[i]);
+	Rast_close(infd2[i]);
     }
     G_free(outrast);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
 
     /* Color table from 0.0 to 10.0 */
     Rast_init_colors(&colors);

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

@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
     }
 
     /* close input cell map */
-    Rast_close_cell(inputfd);
+    Rast_close(inputfd);
 
     /* perform FFT */
     G_message(_("Starting FFT..."));
@@ -190,8 +190,8 @@ int main(int argc, char *argv[])
 	G_percent(i+1, rows, 2);
     }
 
-    Rast_close_cell(realfd);
-    Rast_close_cell(imagfd);
+    Rast_close(realfd);
+    Rast_close(imagfd);
 
     G_free(cell_real);
     G_free(cell_imag);

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

@@ -7,9 +7,9 @@ int closefiles(struct files *files)
     int n;
 
 
-    Rast_close_cell(files->train_fd);
+    Rast_close(files->train_fd);
     for (n = 0; n < files->nbands; n++)
-	Rast_close_cell(files->band_fd[n]);
+	Rast_close(files->band_fd[n]);
 
     return 0;
 }

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

@@ -8,9 +8,9 @@ int closefiles(struct files *files)
     int n;
 
 
-    Rast_close_cell(files->train_fd);
+    Rast_close(files->train_fd);
     for (n = 0; n < files->nbands; n++)
-	Rast_close_cell(files->band_fd[n]);
+	Rast_close(files->band_fd[n]);
 
     return 0;
 }

+ 1 - 1
imagery/i.his.rgb/closefiles.c

@@ -17,7 +17,7 @@ int closefiles(char *r_name, char *g_name, char *b_name,
     const char *mapset;
 
     for (i = 0; i < 3; i++) {
-	Rast_close_cell(fd_output[i]);
+	Rast_close(fd_output[i]);
 	G_free(rowbuf[i]);
     }
 

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

@@ -161,8 +161,8 @@ int main(int argc, char *argv[])
     }
 
     /* close input cell maps */
-    Rast_close_cell(realfd);
-    Rast_close_cell(imagfd);
+    Rast_close(realfd);
+    Rast_close(imagfd);
 
     /* Read in cell map values */
     G_message(_("Masking raster maps..."));
@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
 	    G_percent(i+1, rows, 2);
 	}
 
-	Rast_close_cell(maskfd);
+	Rast_close(maskfd);
 	G_free(maskbuf);
     }
 
@@ -228,7 +228,7 @@ int main(int argc, char *argv[])
 	G_percent(i+1, rows, 2);
     }
 
-    Rast_close_cell(outputfd);
+    Rast_close(outputfd);
 
     G_free(cell_real);
     G_free(cell_imag);

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

@@ -146,9 +146,9 @@ int main(int argc, char *argv[])
 	    G_fatal_error(_("Cannot write to output raster file"));
     }
     G_free(inrast);
-    Rast_close_cell(infd);
+    Rast_close(infd);
     G_free(outrast1);
-    Rast_close_cell(outfd1);
+    Rast_close(outfd1);
 
     Rast_short_history(result1, "raster", &history);
     Rast_command_history(&history);

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

@@ -120,9 +120,9 @@ int main(int argc, char *argv[])
     }
     G_percent(nrows, nrows, 2);
 
-    Rast_close_cell(class_fd);
+    Rast_close(class_fd);
     if (reject_fd > 0)
-	Rast_close_cell(reject_fd);
+	Rast_close(reject_fd);
 
     Rast_init_cats("Maximum Likelihood Classification", &cats);
     for (i = 0; i < S.nsigs; i++) {

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

@@ -328,9 +328,9 @@ int main(int argc, char *argv[])
     }
 
     G_free(inrast);
-    Rast_close_cell(infd);
+    Rast_close(infd);
     G_free(outrast);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
 
     /* Color from 0 to 10 in grey */ 
     Rast_init_colors(&colors);

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

@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
 	write_support(bands, outname, eigmat, eigval);
 
 	/* close output file */
-	Rast_unopen_cell(inp_fd[i]);
+	Rast_unopen(inp_fd[i]);
     }
 
     exit(EXIT_SUCCESS);
@@ -523,7 +523,7 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename,
 
 	    /* close output file */
 	    if (pass == PASSES)
-		Rast_close_cell(out_fd);
+		Rast_close(out_fd);
 	}
     }
 

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

@@ -64,7 +64,7 @@ int drawcell(View * view)
 	D_draw_d_raster(row, dcell, colors);
     }
     D_cell_draw_end();
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(dcell);
     if (colors != &VIEW_MAP1->cell.colors)
 	set_colors(&VIEW_MAP1->cell.colors);

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

@@ -105,7 +105,7 @@ int rectify(char *name, char *mapset, char *result, int order)
     }
 
     target_window.compressed = cellhd.compressed;
-    Rast_close_cell(infd);		/* (pmx) 17 april 2000 */
+    Rast_close(infd);		/* (pmx) 17 april 2000 */
     write_map(result);
     select_current_env();
 

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

@@ -63,7 +63,7 @@ int write_map(char *name)
     }
     close(temp_fd);
     unlink(temp_name);
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     return 0;
 }

+ 1 - 1
imagery/i.rgb.his/closefiles.c

@@ -17,7 +17,7 @@ int closefiles(char *h_name, char *i_name, char *s_name,
     const char *mapset;
 
     for (i = 0; i < 3; i++) {
-	Rast_close_cell(fd_output[i]);
+	Rast_close(fd_output[i]);
 	G_free(rowbuf[i]);
     }
 

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

@@ -14,9 +14,9 @@ int closefiles(struct parms *parms, struct files *files)
     G_debug(1, "Creating support files for <%s>...", parms->output_map);
 
     for (n = 0; n < files->nbands; n++)
-	Rast_close_cell(files->band_fd[n]);
+	Rast_close(files->band_fd[n]);
 
-    Rast_close_cell(files->output_fd);
+    Rast_close(files->output_fd);
     Rast_write_cats(parms->output_map, &files->output_labels);
     make_history(parms->output_map,
 		 parms->group, parms->subgroup, parms->sigfile);

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

@@ -123,10 +123,10 @@ int main(int argc, char *argv[])
     }
     G_free(inrast_lat);
     G_free(inrast_doy);
-    Rast_close_cell(infd_lat);
-    Rast_close_cell(infd_doy);
+    Rast_close(infd_lat);
+    Rast_close(infd_doy);
     G_free(outrast1);
-    Rast_close_cell(outfd1);
+    Rast_close(outfd1);
 
     Rast_short_history(result1, "raster", &history);
     Rast_command_history(&history);

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

@@ -375,28 +375,28 @@ int main(int argc, char *argv[])
     }
 
     G_free(inrast_redchan);
-    Rast_close_cell(infd_redchan);
+    Rast_close(infd_redchan);
     G_free(inrast_nirchan);
-    Rast_close_cell(infd_nirchan);
+    Rast_close(infd_nirchan);
     if (greenchan) {
 	G_free(inrast_greenchan);
-	Rast_close_cell(infd_greenchan);
+	Rast_close(infd_greenchan);
     }
     if (bluechan) {
 	G_free(inrast_bluechan);
-	Rast_close_cell(infd_bluechan);
+	Rast_close(infd_bluechan);
     }
     if (chan5chan) {
 	G_free(inrast_chan5chan);
-	Rast_close_cell(infd_chan5chan);
+	Rast_close(infd_chan5chan);
     }
     if (chan7chan) {
 	G_free(inrast_chan7chan);
-	Rast_close_cell(infd_chan7chan);
+	Rast_close(infd_chan7chan);
     }
 
     G_free(outrast);
-    Rast_close_cell(outfd);
+    Rast_close(outfd);
 
     /* Color from -1.0 to +1.0 in grey */ 
     Rast_init_colors(&colors);

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

@@ -79,7 +79,7 @@ int drawcell(View * view, int initflag)
     if (view == VIEW_MAP2 || view == VIEW_MAP2_ZOOM)
 	cellmap_present = 1;	/* for drawcell */
 
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(dcell);
 
 

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

@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
 	    *(data[0] + (i * size) + j) = (double)cell_row[j];
     }
     /* close input cell map and release the row buffer */
-    Rast_close_cell(inputfd);
+    Rast_close(inputfd);
     G_free(cell_row);
 
     /* take the del**2g of image */
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
 	}
 	Rast_put_raster_row(zcfd, cell_row, CELL_TYPE);
     }
-    Rast_close_cell(zcfd);
+    Rast_close(zcfd);
 
     G_free(cell_row);
 

+ 2 - 2
include/raster.h

@@ -81,8 +81,8 @@ int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
 			  void (*)(CELL, CELL, CELL));
 
 /* closecell.c */
-int Rast_close_cell(int);
-int Rast_unopen_cell(int);
+int Rast_close(int);
+int Rast_unopen(int);
 
 /* color_compat.c */
 void Rast_make_ryg_colors(struct Colors *, CELL, CELL);

+ 6 - 6
lib/gpde/N_arrays_io.c

@@ -101,7 +101,7 @@ N_array_2d *N_read_rast_to_array_2d(char *name, N_array_2d * array)
 	G_percent(y, rows - 1, 10);
 
 	if (!Rast_get_raster_row(map, rast, y, type)) {
-	    Rast_close_cell(map);
+	    Rast_close(map);
 	    G_fatal_error(_("Could not get raster row"));
 	}
 
@@ -159,7 +159,7 @@ N_array_2d *N_read_rast_to_array_2d(char *name, N_array_2d * array)
     }
 
     /* Close file */
-    if (Rast_close_cell(map) < 0)
+    if (Rast_close(map) < 0)
 	G_fatal_error(_("Unable to close input map"));
 
     return data;
@@ -225,23 +225,23 @@ void N_write_array_2d_to_rast(N_array_2d * array, char *name)
 	}
 	if (type == CELL_TYPE)
 	    if (!Rast_put_c_raster_row(map, rast)) {
-		Rast_unopen_cell(map);	/*unopen the new raster map */
+		Rast_unopen(map);	/*unopen the new raster map */
 		G_fatal_error(_("Unable to write raster row %i"), y);
 	    }
 	if (type == FCELL_TYPE)
 	    if (!Rast_put_f_raster_row(map, frast)) {
-		Rast_unopen_cell(map);	/*unopen the new raster map */
+		Rast_unopen(map);	/*unopen the new raster map */
 		G_fatal_error(_("Unable to write raster row %i"), y);
 	    }
 	if (type == DCELL_TYPE)
 	    if (!Rast_put_d_raster_row(map, drast)) {
-		Rast_unopen_cell(map);	/*unopen the new raster map */
+		Rast_unopen(map);	/*unopen the new raster map */
 		G_fatal_error(_("Unable to write raster row %i"), y);
 	    }
     }
 
     /* Close file */
-    if (Rast_close_cell(map) < 0)
+    if (Rast_close(map) < 0)
 	G_fatal_error(_("Unable to close input map"));
 
     return;

+ 6 - 6
lib/ogsf/Gs3.c

@@ -160,7 +160,7 @@ int Gs_loadmap_as_float(struct Cell_head *wind, const char *map_name,
 
     G_debug(4, "  has_null=%d", *has_null);
 
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
 
     G_free(nullflags);
 
@@ -234,7 +234,7 @@ int Gs_loadmap_as_int(struct Cell_head *wind, const char *map_name, int *buff,
     }
     G_percent(1, 1, 1);
     
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
 
     G_free(nullflags);
 
@@ -413,7 +413,7 @@ int Gs_loadmap_as_short(struct Cell_head *wind, const char *map_name,
     }
     G_percent(1, 1, 1);
     
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
 
     G_free(tmp_buf);
     G_free(nullflags);
@@ -530,7 +530,7 @@ int Gs_loadmap_as_char(struct Cell_head *wind, const char *map_name,
     }
     G_percent(1, 1, 1);
     
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
 
     G_free(tmp_buf);
     G_free(nullflags);
@@ -605,7 +605,7 @@ int Gs_loadmap_as_bitmap(struct Cell_head *wind, const char *map_name,
 	}
     }
 
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
 
     G_free(tmp_buf);
     G_free(nullflags);
@@ -885,7 +885,7 @@ int Gs_get_cat_label(const char *filename, int drow, int dcol, char *catstr)
     /* TODO: may want to keep these around for multiple queries */
     Rast_free_cats(&cats);
 
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     return (1);
 }

+ 2 - 2
lib/raster/auto_mask.c

@@ -60,7 +60,7 @@ int Rast__check_for_auto_masking(void)
 	}
     }
 
-    Rast_unopen_cell(R__.mask_fd);
+    Rast_unopen(R__.mask_fd);
     R__.mask_fd = Rast__open_cell_old("MASK", G_mapset());
     if (R__.mask_fd < 0) {
 	R__.auto_mask = 0;
@@ -85,7 +85,7 @@ int Rast__check_for_auto_masking(void)
 void Rast_suppress_masking(void)
 {
     if (R__.auto_mask > 0) {
-	Rast_close_cell(R__.mask_fd);
+	Rast_close(R__.mask_fd);
 	/* G_free (R__.mask_buf); */
 	R__.mask_fd = -1;
     }

+ 2 - 2
lib/raster/closecell.c

@@ -67,7 +67,7 @@ static int write_fp_format(int fd);
  * \return -1 on error
  * \return 1 on success
  */
-int Rast_close_cell(int fd)
+int Rast_close(int fd)
 {
     struct fileinfo *fcb = &R__.fileinfo[fd];
 
@@ -100,7 +100,7 @@ int Rast_close_cell(int fd)
  * \return -1 on error
  * \return 1 on success
  */
-int Rast_unopen_cell(int fd)
+int Rast_unopen(int fd)
 {
     struct fileinfo *fcb = &R__.fileinfo[fd];
 

+ 1 - 1
lib/raster/opencell.c

@@ -362,7 +362,7 @@ int Rast__open_cell_old(const char *name, const char *mapset)
   The file must be written sequentially. Use Rast_open_cell_new_random()
   for non sequential writes.
   
-  Note: the open actually creates a temporary file Rast_close_cell() will
+  Note: the open actually creates a temporary file Rast_close() will
   move the temporary file to the cell file and write out the necessary
   support files (cellhd, cats, hist, etc.).
 

+ 1 - 1
lib/raster/set_window.c

@@ -64,7 +64,7 @@ int Rast_set_window(struct Cell_head *window)
 
     /* close the mask */
     if (R__.auto_mask > 0) {
-	Rast_close_cell(maskfd);
+	Rast_close(maskfd);
 	/* G_free (R__.mask_buf); */
 	R__.mask_fd = -1;
 	R__.auto_mask = -1;	/* turn off masking */

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

@@ -245,17 +245,17 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd,	/* curr
     }
 
     if (cf1)
-	Rast_close_cell(cf1);
+	Rast_close(cf1);
     if (cf2)
-	Rast_close_cell(cf2);
+	Rast_close(cf2);
     if (cf3)
-	Rast_close_cell(cf3);
+	Rast_close(cf3);
     if (cf4)
-	Rast_close_cell(cf4);
+	Rast_close(cf4);
     if (cf5)
-	Rast_close_cell(cf5);
+	Rast_close(cf5);
     if (cf6)
-	Rast_close_cell(cf6);
+	Rast_close(cf6);
 
 
     /* colortable for elevations */

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

@@ -247,17 +247,17 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax
     }
 
     if (cf1)
-	Rast_close_cell(cf1);
+	Rast_close(cf1);
     if (cf2)
-	Rast_close_cell(cf2);
+	Rast_close(cf2);
     if (cf3)
-	Rast_close_cell(cf3);
+	Rast_close(cf3);
     if (cf4)
-	Rast_close_cell(cf4);
+	Rast_close(cf4);
     if (cf5)
-	Rast_close_cell(cf5);
+	Rast_close(cf5);
     if (cf6)
-	Rast_close_cell(cf6);
+	Rast_close(cf6);
 
     /* write colormaps and history for output cell files */
     /* colortable for elevations */

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

@@ -78,7 +78,7 @@ RASTER_MAP_TYPE o_open_file(char *cell)
 
 int o_close_file(void)
 {
-    Rast_close_cell(in_file_d);
+    Rast_close(in_file_d);
 
     return 0;
 }

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

@@ -194,13 +194,13 @@ int PS_raster_plot(void)
     if (PS.do_raster) {
 	if (!PS.do_colortable)
 	    Rast_free_colors(&PS.colors);
-	Rast_close_cell(PS.cell_fd);
+	Rast_close(PS.cell_fd);
 	G_free(cellbuf);
     }
     else {
 	for (i = 0; i < 3; i++) {
 	    Rast_free_colors(&(grp.colors[i]));
-	    Rast_close_cell(grp.fd[i]);
+	    Rast_close(grp.fd[i]);
 	    G_free(cbuf[i]);
 	}
 	I_free_group_ref(&grp.ref);

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

@@ -15,7 +15,7 @@ int read_cell(char *name, char *mapset)
 
     PS.do_colortable = 0;
     if (PS.cell_fd >= 0) {
-	Rast_close_cell(PS.cell_fd);
+	Rast_close(PS.cell_fd);
 	G_free(PS.cell_name);
 	Rast_free_colors(&PS.colors);
 	PS.cell_fd = -1;

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

@@ -19,7 +19,7 @@ int read_group(void)
     PS.do_raster = 0;
     PS.do_colortable = 0;
     if (PS.cell_fd >= 0) {
-	Rast_close_cell(PS.cell_fd);
+	Rast_close(PS.cell_fd);
 	G_free(PS.cell_name);
 	Rast_free_colors(&PS.colors);
 	PS.cell_fd = -1;

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

@@ -24,7 +24,7 @@ int read_rgb(char *key, char *data)
     PS.do_raster = 0;
     PS.do_colortable = 0;
     if (PS.cell_fd >= 0) {
-	Rast_close_cell(PS.cell_fd);
+	Rast_close(PS.cell_fd);
 	G_free(PS.cell_name);
 	Rast_free_colors(&PS.colors);
 	PS.cell_fd = -1;

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

@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
 	Rast_put_raster_row(partfd, drain + (row * ncols), CELL_TYPE);
 
     G_message(_("Creating support files for <%s>..."), part_name);
-    Rast_close_cell(partfd);
+    Rast_close(partfd);
 
     exit(EXIT_SUCCESS);
 }

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

@@ -51,7 +51,7 @@ CELL *read_map(const char *name, int nomask, int nrows, int ncols)
     }
     G_percent(nrows, nrows, 10);
 
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     return map;
 }

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

@@ -146,8 +146,8 @@ int main(int argc, char *argv[])
 
     G_free(inrast);
     G_free(outrast);
-    Rast_close_cell(infd);
-    Rast_close_cell(outfd);
+    Rast_close(infd);
+    Rast_close(outfd);
 
     return (EXIT_SUCCESS);
 }

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

@@ -100,7 +100,7 @@ int read_input_map(char *input, char *mapset, int ZEROFLAG)
 	cell -= window.cols;
     }
     G_percent(row, window.rows, 2);
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(cell);
 
     return 0;

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

@@ -84,9 +84,9 @@ int write_output_map(char *output, int offset)
     G_free(cell);
 
     if (offset)
-	Rast_close_cell(fd_in);
+	Rast_close(fd_in);
 
-    Rast_close_cell(fd_out);
+    Rast_close(fd_out);
 
     return 0;
 }

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

@@ -179,8 +179,8 @@ int main(int argc, char **argv)
 
     enforce_downstream(infd, outfd, &Map, &outMap, &parm);
 
-    Rast_close_cell(infd);
-    Rast_close_cell(outfd);
+    Rast_close(infd);
+    Rast_close(outfd);
     close_vect(&Map, 0);
 
     if (parm.outvect->answer)

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

@@ -60,7 +60,7 @@ int get_cats(const char *name, const char *mapset)
     /* done */
     if (G_verbose() > G_verbose_std())
 	G_percent(row, nrows, 2);
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(cell);
     Rast_rewind_cell_stats(&statf);
 

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

@@ -160,7 +160,7 @@ int main(int argc, char *argv[])
 		G_message(_("Category table for <%s> set from <%s>"), name,
 			  parm.raster->answer);
 
-	    Rast_close_cell(fd);
+	    Rast_close(fd);
 	}
 
 	/* load cats from rules file */

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

@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
 	}
     }
     G_free(int_buf);
-    Rast_close_cell(cellfile);
+    Rast_close(cellfile);
     Rast_short_history(out_file->answer, "raster", &history);
     Rast_command_history(&history);
     Rast_write_history(out_file->answer, &history);

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

@@ -81,8 +81,8 @@ int main(int argc, char *argv[])
 
     G_debug(1, "Creating support files...");
 
-    Rast_close_cell(in_fd);
-    Rast_close_cell(out_fd);
+    Rast_close(in_fd);
+    Rast_close(out_fd);
 
 
     /* build title */

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

@@ -49,7 +49,7 @@ int get_stats(const char *name, const char *mapset, struct Cell_stats *statf)
 	Rast_update_cell_stats(cell, ncols, statf);
     }
     G_percent(row, nrows, 2);
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(cell);
 
     return 1;
@@ -136,6 +136,6 @@ void get_fp_stats(const char *name, const char *mapset,
     }
 
     G_percent(row, nrows, 2);
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(dcell);
 }

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

@@ -254,10 +254,10 @@ int main(int argc, char **argv)
 
     /* Close the input files */
     for (i = 0; i < 3; i++)
-	Rast_close_cell(B[i].file);
+	Rast_close(B[i].file);
 
     /* Close the output file */
-    Rast_close_cell(out_file);
+    Rast_close(out_file);
     Rast_write_colors(out_name, G_mapset(), &out_colors);
     Rast_short_history(out_name, "raster", &history);
     Rast_command_history(&history);

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

@@ -224,15 +224,15 @@ static int doit(char *name, int uncompress, RASTER_MAP_TYPE map_type)
 	    break;
     }
     G_free(rast);
-    Rast_close_cell(old);
+    Rast_close(old);
     if (row < nrows) {
-	Rast_unopen_cell(new);
+	Rast_unopen(new);
 	return 1;
     }
-    Rast_close_cell(new);
+    Rast_close(new);
     newsize = 0;
     old = Rast_open_cell_old(name, G_mapset());
     newsize = lseek(old, (off_t) 0, SEEK_END);
-    Rast_close_cell(old);
+    Rast_close(old);
     return 0;
 }

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

@@ -675,7 +675,7 @@ int main(int argc, char *argv[])
 	}
 	G_percent(1, 1, 2);
 
-	Rast_close_cell(fd);
+	Rast_close(fd);
 	G_free(cell2);
 
 	if (!got_one)
@@ -1120,10 +1120,10 @@ int main(int argc, char *argv[])
     if (dir == 1) {
 	segment_release(&out_seg2);
     }
-    Rast_close_cell(cost_fd);
-    Rast_close_cell(cum_fd);
+    Rast_close(cost_fd);
+    Rast_close(cum_fd);
     if (dir == 1) {
-	Rast_close_cell(dir_fd);
+	Rast_close(dir_fd);
     }
     close(in_fd);		/* close all files */
     close(out_fd);

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

@@ -146,8 +146,8 @@ int main(int argc, char *argv[])
 
     /* now close all files */
     for (i = 0; i < nfiles; i++)
-	Rast_close_cell(fd[i]);
-    Rast_close_cell(outfd);
+	Rast_close(fd[i]);
+    Rast_close(outfd);
 
     if (result <= 0)
 	exit(0);
@@ -176,8 +176,8 @@ int main(int argc, char *argv[])
     renumber(fd[0], outfd);
 
     G_message(_("Creating support files for <%s>..."), output);
-    Rast_close_cell(fd[0]);
-    Rast_close_cell(outfd);
+    Rast_close(fd[0]);
+    Rast_close(outfd);
     Rast_write_cats(output, &pcats);
     Rast_free_cats(&pcats);
     if (result > 0) {

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

@@ -127,7 +127,7 @@ int describe(const char *name, int compact, char *no_data_str,
 	    Rast_update_cell_stats(buf, ncols, &statf);
     }
     G_percent(nrows, nrows, 2);
-    Rast_close_cell(fd);
+    Rast_close(fd);
     G_free(buf);
 
     if (range) {

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

@@ -150,8 +150,8 @@ int null_distance(const char *name1, const char *name2, int *zerro_row, int *zer
 		G_free(inrast2);
 
 		/* closing raster maps */
-		Rast_close_cell(mapd1);
-		Rast_close_cell(mapd2);
+		Rast_close(mapd1);
+		Rast_close(mapd2);
 		return 1;
 	    }
 	}
@@ -161,8 +161,8 @@ int null_distance(const char *name1, const char *name2, int *zerro_row, int *zer
     G_free(inrast2);
 
     /* closing raster maps */
-    Rast_close_cell(mapd1);
-    Rast_close_cell(mapd2);
+    Rast_close(mapd1);
+    Rast_close(mapd2);
 
     return 0;
 }

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

@@ -86,7 +86,7 @@ void find_edge_cells(struct Map *map)
     }
     G_percent(row, nrows, 2);
 
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     G_free(buf0);
     G_free(buf1);

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

@@ -357,7 +357,7 @@ int main(int argc, char **argv)
 	get_row(map_id, in_buf, i);
 	write(fe, in_buf, bnd.sz);
     }
-    Rast_close_cell(map_id);
+    Rast_close(map_id);
 
     if (costmode == 1) {
 	dir_buf = Rast_allocate_d_buf();
@@ -369,7 +369,7 @@ int main(int argc, char **argv)
 	    Rast_get_d_raster_row(dir_id, dir_buf, i);
 	    write(dir_fd, dir_buf, ncols * sizeof(DCELL));
 	}
-	Rast_close_cell(dir_id);
+	Rast_close(dir_id);
     }
 
     /* only necessary for non-dir drain */
@@ -546,7 +546,7 @@ int main(int argc, char **argv)
     }
 
     /* close files and free buffers */
-    Rast_close_cell(new_id);
+    Rast_close(new_id);
 
     Rast_put_cell_title(new_map_name, "Surface flow trace");
 

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

@@ -216,7 +216,7 @@ int main(int argc, char **argv)
 	get_row(map_id, in_buf, i);
 	write(fe, in_buf, bnd.sz);
     }
-    Rast_close_cell(map_id);
+    Rast_close(map_id);
 
     /* fill single-cell holes and take a first stab at flow directions */
     G_message(_("Filling sinks..."));
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
 	    Rast_put_raster_row(bas_id, out_buf, CELL_TYPE);
 	}
 
-	Rast_close_cell(bas_id);
+	Rast_close(bas_id);
 	close(fm);
     }
 
@@ -285,10 +285,10 @@ int main(int argc, char **argv)
 
     }
 
-    Rast_close_cell(new_id);
+    Rast_close(new_id);
     close(fe);
 
-    Rast_close_cell(dir_id);
+    Rast_close(dir_id);
     close(fd);
 
     G_free(in_buf);

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

@@ -89,7 +89,7 @@ void read_input_files(void)
     }
     if (parm.seg)
 	segment_flush(el.seg);
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     if (parm.aspin) {
 	G_message(_("Reading input files: aspect"));
@@ -106,7 +106,7 @@ void read_input_files(void)
 	}
 	if (parm.seg)
 	    segment_flush(as.seg);
-	Rast_close_cell(fd);
+	Rast_close(fd);
     }
 
     if (parm.barin) {
@@ -122,7 +122,7 @@ void read_input_files(void)
 		    put(ds, row, col, -1);
 	    }
 	}
-	Rast_close_cell(fd);
+	Rast_close(fd);
     }
 }
 
@@ -180,7 +180,7 @@ void close_files(void)
 	    close(ds.sfd);
     }
     /*   if (parm.lgout)
-       Rast_close_cell(lgfd); */
+       Rast_close(lgfd); */
     if (parm.flout) {
 	Vect_build(&fl);
 	Vect_close(&fl);
@@ -208,7 +208,7 @@ void write_density_file(void)
 	    if (ds.buf[row][col] > dsmax)
 		dsmax = ds.buf[row][col];
     }
-    Rast_close_cell(dsfd);
+    Rast_close(dsfd);
 
     Rast_init_colors(&colors);
 

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

@@ -396,7 +396,7 @@ static void calculate(void)
     Vect_destroy_cats_struct(cats);
 
     if (parm.lgout)
-	Rast_close_cell(lgfd);
+	Rast_close(lgfd);
 }
 
 int main(int argc, char *argv[])

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

@@ -296,7 +296,7 @@ int main(int argc, char **argv)
 
     G_percent(row, nrows, 2);
 
-    Rast_close_cell(in_fd);
+    Rast_close(in_fd);
 
     Rast_set_c_null_value(old_x_row, ncols);
     Rast_set_c_null_value(old_y_row, ncols);
@@ -351,9 +351,9 @@ int main(int argc, char **argv)
     remove(temp_name);
 
     if (dist_name)
-	Rast_close_cell(dist_fd);
+	Rast_close(dist_fd);
     if (val_name)
-	Rast_close_cell(val_fd);
+	Rast_close(val_fd);
 
     if (val_name) {
 	if (Rast_read_colors(in_name, "", &colors) < 0)

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

@@ -276,8 +276,8 @@ int main(int argc, char **argv)
 
     G_percent(row, nrows, 2);
 
-    Rast_close_cell(in_fd);
-    Rast_close_cell(out_fd);
+    Rast_close(in_fd);
+    Rast_close(out_fd);
 
     if (Rast_write_cats(out_name, &cats) == -1)
 	G_warning(_("Error writing category file for <%s>"), out_name);

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

@@ -271,14 +271,14 @@ int main(int argc, char **argv)
     G_percent(window.rows, window.rows, 5);
 
     /* Close the cell files */
-    Rast_close_cell(hue_file);
+    Rast_close(hue_file);
     if (int_used)
-	Rast_close_cell(int_file);
+	Rast_close(int_file);
     if (sat_used)
-	Rast_close_cell(sat_file);
+	Rast_close(sat_file);
 
     if (r_used) {
-	Rast_close_cell(r_file);
+	Rast_close(r_file);
 	Rast_write_colors(name_r, G_mapset(), &gray_colors);
 	Rast_short_history(name_r, "raster", &history);
 	Rast_command_history(&history);
@@ -286,7 +286,7 @@ int main(int argc, char **argv)
 	Rast_put_cell_title(name_r, "Red extracted from HIS");
     }
     if (g_used) {
-	Rast_close_cell(g_file);
+	Rast_close(g_file);
 	Rast_write_colors(name_g, G_mapset(), &gray_colors);
 	Rast_short_history(name_g, "raster", &history);
 	Rast_command_history(&history);
@@ -294,7 +294,7 @@ int main(int argc, char **argv)
 	Rast_put_cell_title(name_g, "Green extracted from HIS");
     }
     if (b_used) {
-	Rast_close_cell(b_file);
+	Rast_close(b_file);
 	Rast_write_colors(name_b, G_mapset(), &gray_colors);
 	Rast_short_history(name_b, "raster", &history);
 	Rast_command_history(&history);

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

@@ -568,7 +568,7 @@ int INPUT(void)
 
 	}
     }
-    Rast_close_cell(fd1);
+    Rast_close(fd1);
 
     /*create low resolution array 100 */
     for (i = 0; i < m100; i++) {
@@ -647,7 +647,7 @@ int OUTGR(int numrows, int numcols)
 
     }				/* End loop over rows. */
 
-    Rast_close_cell(fd1);
+    Rast_close(fd1);
 
 
 

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

@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
 	G_percent(row, nrows, 5);
 	for (col = 0; col < ncols; col++) {
 	    if (fscanf(fd, "%lf", &x) != 1) {
-		Rast_unopen_cell(cf);
+		Rast_unopen(cf);
 		G_fatal_error(_("Data conversion failed at row %d, col %d"),
 			      row + 1, col + 1);
 	    }
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
 	}
     }
     /* G_message(_("CREATING SUPPORT FILES FOR %s"), output); */
-    Rast_close_cell(cf);
+    Rast_close(cf);
     if (title)
 	Rast_put_cell_title(output, title);
     Rast_short_history(output, "raster", &history);

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

@@ -209,7 +209,7 @@ int main(int argc, char *argv[])
 	G_percent(row, nrows, 2);
 	for (col = 0; col < ncols; col++) {
 	    if (fscanf(fd, "%s", y) != 1) {
-		Rast_unopen_cell(cf);
+		Rast_unopen(cf);
 		G_fatal_error(_("Data conversion failed at row %d, col %d"),
 			      row + 1, col + 1);
 	    }
@@ -252,7 +252,7 @@ int main(int argc, char *argv[])
     fclose(ft);
     unlink(temp);
 
-    Rast_close_cell(cf);
+    Rast_close(cf);
 
     if (title)
 	Rast_put_cell_title(output, title);

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

@@ -515,7 +515,7 @@ int main(int argc, char *argv[])
 
     for (row = 0; row < grass_nrows; row++) {
 	if (fread(x_v, bytes * ncols, 1, fd) != 1) {
-	    Rast_unopen_cell(cf);
+	    Rast_unopen(cf);
 	    G_fatal_error(_("Conversion failed at row %d"), row);
 	    exit(EXIT_FAILURE);
 	}
@@ -581,7 +581,7 @@ int main(int argc, char *argv[])
     }
 
     G_debug(1, "Creating support files for %s", output);
-    Rast_close_cell(cf);
+    Rast_close(cf);
 
     if (title)
 	Rast_put_cell_title(output, title);

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

@@ -863,13 +863,13 @@ static void ImportBand(GDALRasterBandH hBand, const char *output,
     /* -------------------------------------------------------------------- */
     if (complex) {
 	G_debug(1, "Creating support files for %s", outputReal);
-	Rast_close_cell(cfR);
+	Rast_close(cfR);
 	Rast_short_history((char *)outputReal, "raster", &history);
 	Rast_command_history(&history);
 	Rast_write_history((char *)outputReal, &history);
 
 	G_debug(1, "Creating support files for %s", outputImg);
-	Rast_close_cell(cfI);
+	Rast_close(cfI);
 	Rast_short_history((char *)outputImg, "raster", &history);
 	Rast_command_history(&history);
 	Rast_write_history((char *)outputImg, &history);
@@ -878,7 +878,7 @@ static void ImportBand(GDALRasterBandH hBand, const char *output,
     }
     else {
 	G_debug(1, "Creating support files for %s", output);
-	Rast_close_cell(cf);
+	Rast_close(cf);
 	Rast_short_history((char *)output, "raster", &history);
 	Rast_command_history(&history);
 	Rast_write_history((char *)output, &history);

+ 1 - 1
raster/r.in.gridatb/file_io.c

@@ -64,7 +64,7 @@ void rdwr_gridatb(void)
     }
     G_percent(i, cellhd.rows, 2);
     fclose(fp);
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     Rast_put_cell_title(oname, buf);
     Rast_put_cellhd(oname, &cellhd);

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

@@ -448,7 +448,7 @@ int main(int argc, char *argv[])
 					 map_type);
 		    break;
 		default:
-		    Rast_close_cell(cf);
+		    Rast_close(cf);
 		    G_fatal_error(_("Please contact the GRASS development team"));
 		}
 	    }
@@ -471,7 +471,7 @@ int main(int argc, char *argv[])
 #endif
 
 	if (1 != Rast_put_raster_row(cf, raster, map_type)) {
-	    Rast_close_cell(cf);
+	    Rast_close(cf);
 	    G_fatal_error(_("Writing raster map, row %d"), row);
 	}
 
@@ -480,7 +480,7 @@ int main(int argc, char *argv[])
 
     G_percent(row, mrows, 5);	/* finish it off */
 
-    Rast_close_cell(cf);
+    Rast_close(cf);
 
     G_free(array_data);
     G_free(raster);

+ 2 - 2
raster/r.in.poly/poly2rast.c

@@ -81,11 +81,11 @@ int poly_to_rast(char *input_file, char *raster_map, char *title, int nrows)
      */
 
     if (stat < 0) {
-	Rast_unopen_cell(rfd);
+	Rast_unopen(rfd);
 	return 1;
     }
 
-    Rast_close_cell(rfd);
+    Rast_close(rfd);
     Rast_write_cats(raster_map, &labels);
     Rast_short_history(raster_map, "raster", &history);
     Rast_command_history(&history);

+ 2 - 2
raster/r.in.xyz/main.c

@@ -1012,7 +1012,7 @@ int main(int argc, char *argv[])
 
 	    /* write out line of raster data */
 	    if (1 != Rast_put_raster_row(out_fd, raster_row, rtype)) {
-		Rast_close_cell(out_fd);
+		Rast_close(out_fd);
 		G_fatal_error(_("Writing map, row %d"),
 			      ((pass - 1) * rows) + row);
 	    }
@@ -1047,7 +1047,7 @@ int main(int argc, char *argv[])
 	fclose(in_fp);
 
     /* close raster file & write history */
-    Rast_close_cell(out_fd);
+    Rast_close(out_fd);
 
     sprintf(title, "Raw x,y,z data binned into a raster grid by cell %s",
 	    method_opt->answer);

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

@@ -285,7 +285,7 @@ int main(int argc, char *argv[])
 
     /* Close seed map for reading. */
     if (smap_opt->answer)
-	Rast_close_cell(out_fd);
+	Rast_close(out_fd);
 
     /* Open output map for writing. */
     if (lakemap) {
@@ -368,8 +368,8 @@ int main(int argc, char *argv[])
     G_warning(_("Volume is correct only if lake depth (terrain raster map) is in meters"));
 
     /* Close all files. Lake map gets written only now. */
-    Rast_close_cell(in_terran_fd);
-    Rast_close_cell(out_fd);
+    Rast_close(in_terran_fd);
+    Rast_close(out_fd);
 
     /* Add blue color gradient from light bank to dark depth */
     Rast_init_colors(&colr);

+ 46 - 46
raster/r.le/r.le.patch/driver.c

@@ -122,7 +122,7 @@ void patch_fore()
     /* when everything is done, close the raster map
        and print a completion message */
 
-    Rast_close_cell(finput);
+    Rast_close(finput);
     fputs("\nR.LE.PATCH IS DONE;  ", stderr);
     if (choice->wrum != 'm')
 	fputs("OUTPUT FILES IN SUBDIRECTORY \"r.le.out\"\n", stderr);
@@ -1964,259 +1964,259 @@ void mv_driver()
 
 
     if (choice->att[1]) {
-	Rast_close_cell(a1);
+	Rast_close(a1);
 	set_colors("a1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a1");
 	system(cmdbuf);
     }
     if (choice->att[2]) {
-	Rast_close_cell(a2);
+	Rast_close(a2);
 	set_colors("a2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a2");
 	system(cmdbuf);
     }
     if (choice->att[3]) {
-	Rast_close_cell(a3);
+	Rast_close(a3);
 	set_colors("a3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a3");
 	system(cmdbuf);
     }
     if (choice->att[4]) {
-	Rast_close_cell(a4);
+	Rast_close(a4);
 	set_colors("a4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a4");
 	system(cmdbuf);
     }
     if (choice->att[5]) {
-	Rast_close_cell(a5);
+	Rast_close(a5);
 	set_colors("a5");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a5");
 	system(cmdbuf);
     }
     if (choice->att[6]) {
-	Rast_close_cell(a6);
+	Rast_close(a6);
 	set_colors("a6");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a6");
 	system(cmdbuf);
     }
     if (choice->att[7]) {
-	Rast_close_cell(a7);
+	Rast_close(a7);
 	set_colors("a7");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a7");
 	system(cmdbuf);
     }
     if (choice->att[8]) {
-	Rast_close_cell(a8);
+	Rast_close(a8);
 	set_colors("a8");
 	sprintf(cmdbuf, "%s %s", "r.compress", "a8");
 	system(cmdbuf);
     }
     if (choice->size[1]) {
-	Rast_close_cell(s1);
+	Rast_close(s1);
 	set_colors("s1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s1");
 	system(cmdbuf);
     }
     if (choice->size[2]) {
-	Rast_close_cell(s2);
+	Rast_close(s2);
 	set_colors("s2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s2");
 	system(cmdbuf);
     }
     if (choice->size[3]) {
-	Rast_close_cell(s3);
+	Rast_close(s3);
 	set_colors("s3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s3");
 	system(cmdbuf);
     }
     if (choice->size[4]) {
-	Rast_close_cell(s4);
+	Rast_close(s4);
 	set_colors("s4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s4");
 	system(cmdbuf);
     }
     if (choice->size[5]) {
-	Rast_close_cell(s5);
+	Rast_close(s5);
 	set_colors("s5");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s5");
 	system(cmdbuf);
     }
     if (choice->size[6]) {
-	Rast_close_cell(s6);
+	Rast_close(s6);
 	set_colors("s6");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s6");
 	system(cmdbuf);
     }
     if (choice->size[7]) {
-	Rast_close_cell(s7);
+	Rast_close(s7);
 	set_colors("s7");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s7");
 	system(cmdbuf);
     }
     if (choice->size[8]) {
-	Rast_close_cell(s8);
+	Rast_close(s8);
 	set_colors("s8");
 	sprintf(cmdbuf, "%s %s", "r.compress", "s8");
 	system(cmdbuf);
     }
     if (choice->core[1]) {
-	Rast_close_cell(c1);
+	Rast_close(c1);
 	set_colors("c1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c1");
 	system(cmdbuf);
     }
     if (choice->core[2]) {
-	Rast_close_cell(c2);
+	Rast_close(c2);
 	set_colors("c2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c2");
 	system(cmdbuf);
     }
     if (choice->core[3]) {
-	Rast_close_cell(c3);
+	Rast_close(c3);
 	set_colors("c3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c3");
 	system(cmdbuf);
     }
     if (choice->core[4]) {
-	Rast_close_cell(c4);
+	Rast_close(c4);
 	set_colors("c4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c4");
 	system(cmdbuf);
     }
     if (choice->core[5]) {
-	Rast_close_cell(c5);
+	Rast_close(c5);
 	set_colors("c5");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c5");
 	system(cmdbuf);
     }
     if (choice->core[6]) {
-	Rast_close_cell(c6);
+	Rast_close(c6);
 	set_colors("c6");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c6");
 	system(cmdbuf);
     }
     if (choice->core[7]) {
-	Rast_close_cell(c7);
+	Rast_close(c7);
 	set_colors("c7");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c7");
 	system(cmdbuf);
     }
     if (choice->core[8]) {
-	Rast_close_cell(c8);
+	Rast_close(c8);
 	set_colors("c8");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c8");
 	system(cmdbuf);
     }
     if (choice->core[9]) {
-	Rast_close_cell(c9);
+	Rast_close(c9);
 	set_colors("c9");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c9");
 	system(cmdbuf);
     }
     if (choice->core[10]) {
-	Rast_close_cell(c10);
+	Rast_close(c10);
 	set_colors("c10");
 	sprintf(cmdbuf, "%s %s", "r.compress", "c10");
 	system(cmdbuf);
     }
     if (choice->shape[1]) {
-	Rast_close_cell(h1);
+	Rast_close(h1);
 	set_colors("h1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "h1");
 	system(cmdbuf);
     }
     if (choice->shape[2]) {
-	Rast_close_cell(h2);
+	Rast_close(h2);
 	set_colors("h2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "h2");
 	system(cmdbuf);
     }
     if (choice->shape[3]) {
-	Rast_close_cell(h3);
+	Rast_close(h3);
 	set_colors("h3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "h3");
 	system(cmdbuf);
     }
     if (choice->shape[4]) {
-	Rast_close_cell(h4);
+	Rast_close(h4);
 	set_colors("h4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "h4");
 	system(cmdbuf);
     }
     if (choice->shape[5]) {
-	Rast_close_cell(h5);
+	Rast_close(h5);
 	set_colors("h5");
 	sprintf(cmdbuf, "%s %s", "r.compress", "h5");
 	system(cmdbuf);
     }
     if (choice->shape[6]) {
-	Rast_close_cell(h6);
+	Rast_close(h6);
 	set_colors("h6");
 	sprintf(cmdbuf, "%s %s", "r.compress", "h6");
 	system(cmdbuf);
     }
     if (choice->boundary[1]) {
-	Rast_close_cell(n1);
+	Rast_close(n1);
 	set_colors("n1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "n1");
 	system(cmdbuf);
     }
     if (choice->boundary[2]) {
-	Rast_close_cell(n2);
+	Rast_close(n2);
 	set_colors("n2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "n2");
 	system(cmdbuf);
     }
     if (choice->boundary[3]) {
-	Rast_close_cell(n3);
+	Rast_close(n3);
 	set_colors("n3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "n3");
 	system(cmdbuf);
     }
     if (choice->boundary[4]) {
-	Rast_close_cell(n4);
+	Rast_close(n4);
 	set_colors("n4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "n4");
 	system(cmdbuf);
     }
     if (choice->perim[1]) {
-	Rast_close_cell(p1);
+	Rast_close(p1);
 	set_colors("p1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "p1");
 	system(cmdbuf);
     }
     if (choice->perim[2]) {
-	Rast_close_cell(p2);
+	Rast_close(p2);
 	set_colors("p2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "p2");
 	system(cmdbuf);
     }
     if (choice->perim[3]) {
-	Rast_close_cell(p3);
+	Rast_close(p3);
 	set_colors("p3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "p3");
 	system(cmdbuf);
     }
     if (choice->perim[4]) {
-	Rast_close_cell(p4);
+	Rast_close(p4);
 	set_colors("p4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "p4");
 	system(cmdbuf);
     }
     if (choice->perim[5]) {
-	Rast_close_cell(p5);
+	Rast_close(p5);
 	set_colors("p5");
 	sprintf(cmdbuf, "%s %s", "r.compress", "p5");
 	system(cmdbuf);
     }
     if (choice->perim[6]) {
-	Rast_close_cell(p6);
+	Rast_close(p6);
 	set_colors("p6");
 	sprintf(cmdbuf, "%s %s", "r.compress", "p6");
 	system(cmdbuf);
     }
 
-    Rast_close_cell(fmask);
+    Rast_close(fmask);
 
     return;
 }
@@ -2713,7 +2713,7 @@ void unit_driver()
 		}
 		Rast_put_raster_row(fd, unit_buf, CELL_TYPE);
 	    }
-	    Rast_close_cell(fd);
+	    Rast_close(fd);
 	    G_free(unit_buf);
 	}
     }
@@ -2872,7 +2872,7 @@ void whole_reg_driver()
 			  0.0);
 	    ptrthis = ptrthis->next;
 	}
-	Rast_close_cell(fr);
+	Rast_close(fr);
 	G_free(row_buf);
 	G_free(ptrnew);
     }

+ 3 - 3
raster/r.le/r.le.patch/trace.c

@@ -356,7 +356,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value,
        memory allocated for it */
 
     if (choice->patchmap) {
-	Rast_close_cell(fd);
+	Rast_close(fd);
 	G_free(pat_buf);
     }
 
@@ -367,7 +367,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value,
        memory allocated for the cor_buf */
 
     if (choice->coremap) {
-	Rast_close_cell(fe);
+	Rast_close(fe);
 	Rast_rewind_cell_stats(&stats);
 	Rast_rewind_cats(&cats);
 
@@ -773,7 +773,7 @@ void cell_clip(DCELL ** buf, DCELL ** null_buf, int row0, int col0, int nrows,
     }
     if (choice->wrum == 'r') {
 	G_free(tmp1);
-	Rast_close_cell(fr);
+	Rast_close(fr);
     }
     return;
 }

+ 1 - 1
raster/r.le/r.le.pixel/cellclip.c

@@ -437,7 +437,7 @@ void cell_clip(DCELL ** buf, DCELL ** null_buf, int row0, int col0, int nrows,
     }
     if (choice->wrum == 'r') {
 	G_free(tmp1);
-	Rast_close_cell(fr);
+	Rast_close(fr);
     }
     G_free(nulltmp);
     return;

+ 21 - 21
raster/r.le/r.le.pixel/driver.c

@@ -138,7 +138,7 @@ void texture_fore()
 	    unit_driver();
     }
 
-    Rast_close_cell(finput);
+    Rast_close(finput);
 
     fputs("R.LE.PIXEL IS DONE;  ", stderr);
 
@@ -980,109 +980,109 @@ void mv_driver()
 
 
     if (choice->att[1]) {
-	Rast_close_cell(b1);
+	Rast_close(b1);
 	set_colors("b1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "b1");
 	system(cmdbuf);
     }
     if (choice->att[2]) {
-	Rast_close_cell(b2);
+	Rast_close(b2);
 	set_colors("b2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "b2");
 	system(cmdbuf);
     }
     if (choice->att[3]) {
-	Rast_close_cell(b3);
+	Rast_close(b3);
 	set_colors("b3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "b3");
 	system(cmdbuf);
     }
     if (choice->att[4]) {
-	Rast_close_cell(b4);
+	Rast_close(b4);
 	set_colors("b4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "b4");
 	system(cmdbuf);
     }
     if (choice->div[1]) {
-	Rast_close_cell(d1);
+	Rast_close(d1);
 	set_colors("d1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "d1");
 	system(cmdbuf);
     }
     if (choice->div[2]) {
-	Rast_close_cell(d2);
+	Rast_close(d2);
 	set_colors("d2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "d2");
 	system(cmdbuf);
     }
     if (choice->div[3]) {
-	Rast_close_cell(d3);
+	Rast_close(d3);
 	set_colors("d3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "d3");
 	system(cmdbuf);
     }
     if (choice->div[4]) {
-	Rast_close_cell(d4);
+	Rast_close(d4);
 	set_colors("d4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "d4");
 	system(cmdbuf);
     }
     if (choice->te2[1]) {
-	Rast_close_cell(t1);
+	Rast_close(t1);
 	set_colors("t1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "t1");
 	system(cmdbuf);
     }
     if (choice->te2[2]) {
-	Rast_close_cell(t2);
+	Rast_close(t2);
 	set_colors("t2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "t2");
 	system(cmdbuf);
     }
     if (choice->te2[3]) {
-	Rast_close_cell(t3);
+	Rast_close(t3);
 	set_colors("t3");
 	sprintf(cmdbuf, "%s %s", "r.compress", "t3");
 	system(cmdbuf);
     }
     if (choice->te2[4]) {
-	Rast_close_cell(t4);
+	Rast_close(t4);
 	set_colors("t4");
 	sprintf(cmdbuf, "%s %s", "r.compress", "t4");
 	system(cmdbuf);
     }
     if (choice->te2[5]) {
-	Rast_close_cell(t5);
+	Rast_close(t5);
 	set_colors("t5");
 	sprintf(cmdbuf, "%s %s", "r.compress", "t5");
 	system(cmdbuf);
     }
     if (choice->jux[1]) {
-	Rast_close_cell(j1);
+	Rast_close(j1);
 	set_colors("j1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "j1");
 	system(cmdbuf);
     }
     if (choice->jux[2]) {
-	Rast_close_cell(j2);
+	Rast_close(j2);
 	set_colors("j2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "j2");
 	system(cmdbuf);
     }
     if (choice->edg[1]) {
-	Rast_close_cell(e1);
+	Rast_close(e1);
 	set_colors("e1");
 	sprintf(cmdbuf, "%s %s", "r.compress", "e1");
 	system(cmdbuf);
     }
     if (choice->edg[2]) {
-	Rast_close_cell(e2);
+	Rast_close(e2);
 	set_colors("e2");
 	sprintf(cmdbuf, "%s %s", "r.compress", "e2");
 	system(cmdbuf);
     }
 
-    Rast_close_cell(fmask);
+    Rast_close(fmask);
 
     return;
 }
@@ -1535,7 +1535,7 @@ void unit_driver()
 		}
 		Rast_put_raster_row(fd, unit_buf, CELL_TYPE);
 	    }
-	    Rast_close_cell(fd);
+	    Rast_close(fd);
 	    G_free(unit_buf);
 	}
     }
@@ -1805,7 +1805,7 @@ void whole_reg_driver()
 			  cntwhole, 0.0);
 	    ptrthis = ptrthis->next;
 	}
-	Rast_close_cell(fr);
+	Rast_close(fr);
 	G_free(row_buf);
 	G_free(ptrnew);
     }

+ 2 - 2
raster/r.le/r.le.pixel/texture.c

@@ -526,7 +526,7 @@ void df_texture(int nrows, int ncols, double **buf, double **null_buf,
 	for (i = 0; i < nrows + 3; i++)
 	    G_free(edgenull[i]);
 	G_free(edgenull);
-	Rast_close_cell(fc);
+	Rast_close(fc);
     }
 
     /* if the zscore map was requested */
@@ -547,7 +547,7 @@ void df_texture(int nrows, int ncols, double **buf, double **null_buf,
 	    Rast_put_raster_row(fd, zscor_buf, DCELL_TYPE);
 	}
 	G_free(zscor_buf);
-	Rast_close_cell(fd);
+	Rast_close(fd);
     }
 
     /* open the output files and 

+ 1 - 1
raster/r.le/r.le.setup/mv_wind.c

@@ -337,7 +337,7 @@ void mov_wind(int t, int b, int l, int r, char *n1, char *n2, char *n3,
 	    t = t0;
 	}
 
-	Rast_close_cell(fmask);
+	Rast_close(fmask);
     }
 
     /* if neither, then exit */

+ 2 - 2
raster/r.le/r.le.setup/polytocell/bmf_to_cll.c

@@ -94,7 +94,7 @@ int main(argc, argv)
 		Rast_put_map_row(newmap, record);
 		atrow++;
 	    }
-	    Rast_close_cell(newmap);
+	    Rast_close(newmap);
 	    goto finish;
 	}
 
@@ -116,7 +116,7 @@ int main(argc, argv)
 
 	Rast_put_map_row(newmap, record);
     }
-    fprintf(stderr, "Close: %d\n", Rast_close_cell(newmap));
+    fprintf(stderr, "Close: %d\n", Rast_close(newmap));
 
   finish:
     G_suppress_warnings(1);

+ 3 - 3
raster/r.le/r.le.setup/sample.c

@@ -117,7 +117,7 @@ void sample(int t0, int b0, int l0, int r0, char *name, char *name1,
 	else if (d == 2)
 	    graph_unit(t0, b0, l0, r0, name, name1, name2, msc, fmask);
 
-	Rast_close_cell(fmask);
+	Rast_close(fmask);
     }
     /* if neither, then exit */
     else
@@ -363,7 +363,7 @@ static void man_unit(int t, int b, int l, int r, char *n1, char *n2, char *n3,
 			}
 		    }
 		    G_free(row_buf);
-		    Rast_close_cell(fr);
+		    Rast_close(fr);
 		    cnt = (double)(count);
 		    if (cnt)
 			cnt = sqrt(cnt);
@@ -420,7 +420,7 @@ static void man_unit(int t, int b, int l, int r, char *n1, char *n2, char *n3,
 			    }
 			}
 			G_free(row_buf);
-			Rast_close_cell(fr);
+			Rast_close(fr);
 			cnt = (double)(count);
 			if (cnt)
 			    cnt = sqrt(cnt);

+ 1 - 1
raster/r.li/r.li.daemon/daemon.c

@@ -268,7 +268,7 @@ int calculateIndex(char *file, int f(int, char **, area_des, double *),
 	write_raster(mv_fd, random_access, g);
 	close(random_access);
 	unlink(random_access_name);
-	Rast_close_cell(mv_fd);
+	Rast_close(mv_fd);
 	Rast_short_history(output, "raster", &history);
 	Rast_command_history(&history);
 	Rast_write_history(output, &history);

+ 1 - 1
raster/r.li/r.li.daemon/worker.c

@@ -210,7 +210,7 @@ void worker(char *raster, int f(int, char **, area_des, double *),
 	receive(rec_ch, &toReceive);
     }
     /* close raster map */
-    Rast_close_cell(fd);
+    Rast_close(fd);
 
     /* close channels */
     close(rec_ch);

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


Деякі файли не було показано, через те що забагато файлів було змінено