GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
zero_cell.c
Go to the documentation of this file.
1
17
#include <grass/gis.h>
18
19
31
int
G_zero_cell_buf
(CELL * buf)
32
{
33
int
i =
G_window_cols
();
34
35
while
(i--)
36
*buf++ = 0;
37
38
return
0;
39
}
40
41
54
int
G_zero_raster_buf
(
void
*rast, RASTER_MAP_TYPE data_type)
55
{
56
int
i;
57
unsigned
char
*ptr;
58
59
/* assuming that the size of unsigned char is 1 byte */
60
i =
G_window_cols
() *
G_raster_size
(data_type);
61
ptr = (
unsigned
char
*)rast;
62
63
while
(i--)
64
*ptr++ = 0;
65
66
return
0;
67
}
lib
gis
zero_cell.c
Generated on Wed Jun 6 2012 14:04:30 for GRASS Programmer's Manual by
1.8.1