18 #include <grass/gis.h>
21 #define F2I(map_type) \
22 (map_type == CELL_TYPE ? 0 : (map_type == FCELL_TYPE ? 1 : 2))
24 static int type_size[3] = {
sizeof(CELL),
sizeof(FCELL),
sizeof(DCELL) };
40 return (type_size[
F2I(data_type)]);
113 return (FCELL *) G_calloc(
G_window_cols() + 1,
sizeof(FCELL));
128 return (DCELL *) G_calloc(
G_window_cols() + 1,
sizeof(DCELL));
159 sizeof(
unsigned char));
176 return (cols / 8 + (cols % 8 != 0));
CELL * G_allocate_c_raster_buf(void)
Allocates memory for a raster map of type CELL.
FCELL * G_allocate_f_raster_buf(void)
Allocates memory for a raster map of type FCELL.
char * G_allocate_null_buf(void)
Allocates memory for a null buffer.
CELL * G_allocate_cell_buf(void)
Allocate memory for a CELL type raster map.
size_t G_raster_size(RASTER_MAP_TYPE data_type)
Returns size of a raster CELL in bytes.
int G_window_cols(void)
Number of columns in active window.
unsigned char * G__allocate_null_bits(int cols)
Allocates memory for null bits.
void * G_allocate_raster_buf(RASTER_MAP_TYPE data_type)
Allocate memory for a raster map of type data_type.
int G__null_bitstream_size(int cols)
Determines null bitstream size.
DCELL * G_allocate_d_raster_buf(void)
Allocates memory for a raster map of type DCELL.