Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include <stdlib.h>
00015 #include <grass/gis.h>
00016
00032 int G_put_window(const struct Cell_head *window)
00033 {
00034 char *wind = getenv("WIND_OVERRIDE");
00035
00036 return wind ? G__put_window(window, "windows", wind)
00037 : G__put_window(window, "", "WIND");
00038 }
00039
00040 int G__put_window(const struct Cell_head *window, char *dir, char *name)
00041 {
00042 FILE *fd;
00043
00044 if (!(fd = G_fopen_new(dir, name)))
00045 return -1;
00046
00047 G__write_Cell_head3(fd, window, 0);
00048 fclose(fd);
00049
00050 return 1;
00051 }