21 #include <grass/bitmap.h>
24 static int dump_map(
struct BM *map);
27 int main(
int argc,
char *argv[])
30 struct BM *map, *map2;
48 for (i = 0; i < SIZE; i++) {
50 BM_set(map, (SIZE - 1) - i, i, 1);
58 fprintf(stdout,
"\n\n");
61 for (y = 0; y < SIZE; y++)
62 for (x = 0; x < SIZE; x++)
71 fp = fopen(
"dumpfile",
"w");
75 fp = fopen(
"dumpfile",
"r");
88 static int dump_map(
struct BM *map)
92 for (y = 0; y < map->rows; y++) {
93 for (x = 0; x < map->cols; x++) {
94 fprintf(stdout,
"%c",
BM_get(map, x, y) ?
'#' :
'.');
97 fprintf(stdout,
"\n");