00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <grass/gis.h>
00017 #include <grass/glocale.h>
00018
00019 int G_put_cellhd(const char *name, struct Cell_head *cellhd)
00020 {
00021 FILE *fd;
00022
00023 if (!(fd = G_fopen_new("cellhd", name))) {
00024 char buf[1024];
00025
00026 sprintf(buf, _("Unable to create header file for [%s]"), name);
00027 G_warning(buf);
00028 return -1;
00029 }
00030
00031 G__write_Cell_head(fd, cellhd, 1);
00032 fclose(fd);
00033
00034 return 0;
00035 }