Debian Codegraph @

imagery/i.rgb.his/openfiles.c

raw
1 #include <stdio.h>
2 #include <grass/gis.h>
3 #include <grass/raster.h>
4 #include <grass/glocale.h>
5 #include "globals.h"
6
7 void openfiles(char *r_name, char *g_name, char *b_name, char *h_name,
8 char *i_name, char *s_name, int fd_input[3], int fd_output[3],
9 CELL *rowbuf[3])
10 {
11 fd_input[0] = Rast_open_old(r_name, "");
12 fd_input[1] = Rast_open_old(g_name, "");
13 fd_input[2] = Rast_open_old(b_name, "");
14
15 /* open output files */
16 fd_output[0] = Rast_open_c_new(h_name);
17 fd_output[1] = Rast_open_c_new(i_name);
18 fd_output[2] = Rast_open_c_new(s_name);
19
20 /* allocate the cell row buffer */
21 rowbuf[0] = Rast_allocate_c_buf();
22 rowbuf[1] = Rast_allocate_c_buf();
23 rowbuf[2] = Rast_allocate_c_buf();
24 }