3
#include <grass/glocale.h>
7
/* open and allocate space for the subgroup band files */
8
int open_band_files(void)
13
/* allocate row buffers and open raster maps */
14
nbands = Refer.nfiles;
15
Bandbuf = (CELL **) G_malloc(nbands * sizeof(CELL *));
16
Bandfd = (int *)G_malloc(nbands * sizeof(int));
17
for (n = 0; n < nbands; n++) {
18
Bandbuf[n] = G_allocate_cell_buf();
19
name = Refer.file[n].name;
20
mapset = Refer.file[n].mapset;
21
if ((Bandfd[n] = G_open_cell_old(name, mapset)) < 0)
22
G_fatal_error(_("Unable to open band files."));
29
/* close and free space for the subgroup band files */
30
int close_band_files(void)
34
nbands = Refer.nfiles;
35
for (n = 0; n < nbands; n++) {
37
G_close_cell(Bandfd[n]);