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
put_window.c
Go to the documentation of this file.
1
/*
2
**********************************************************************
3
*
4
* G_put_window (window)
5
* write the current mapset window
6
**********************************************************************
7
*
8
* G__put_window (window, dir, name)
9
* write the window 'name' in 'mapset'
10
* returns -1 error
11
* 1 ok
12
*********************************************************************/
13
14
#include <stdlib.h>
15
#include <grass/gis.h>
16
32
int
G_put_window
(
const
struct
Cell_head *window)
33
{
34
char
*wind =
getenv
(
"WIND_OVERRIDE"
);
35
36
return
wind ?
G__put_window
(window,
"windows"
, wind)
37
:
G__put_window
(window,
""
,
"WIND"
);
38
}
39
40
int
G__put_window
(
const
struct
Cell_head *window,
char
*dir,
char
*
name
)
41
{
42
FILE *fd;
43
44
if
(!(fd =
G_fopen_new
(dir, name)))
45
return
-1;
46
47
G__write_Cell_head3
(fd, window, 0);
48
fclose(fd);
49
50
return
1;
51
}
lib
gis
put_window.c
Generated on Sun Mar 16 2014 05:07:48 for GRASS Programmer's Manual by
1.8.1.2