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_cellhd.c
Go to the documentation of this file.
1
2
/**********************************************************************
3
*
4
* G_put_cellhd (name, cellhd)
5
* char *name name of map
6
* struct Cell_head *cellhd structure holding cell header info
7
*
8
* Writes the cell file header information associated with map layer "map"
9
* into current mapset from the structure "cellhd".
10
*
11
* returns: 0 if successful
12
* -1 on fail
13
*
14
***********************************************************************/
15
16
#include <grass/gis.h>
17
#include <grass/glocale.h>
18
19
int
G_put_cellhd
(
const
char
*
name
,
struct
Cell_head *cellhd)
20
{
21
FILE *fd;
22
23
if
(!(fd =
G_fopen_new
(
"cellhd"
, name))) {
24
char
buf[1024];
25
26
sprintf(buf, _(
"Unable to create header file for [%s]"
), name);
27
G_warning
(buf);
28
return
-1;
29
}
30
31
G__write_Cell_head
(fd, cellhd, 1);
32
fclose(fd);
33
34
return
0;
35
}
lib
gis
put_cellhd.c
Generated on Wed Jun 6 2012 14:04:28 for GRASS Programmer's Manual by
1.8.1