• Main Page
  • Related Pages
  • Data Structures
  • Files
  • File List
  • Globals

put_cellhd.c

Go to the documentation of this file.
00001 
00002 /**********************************************************************
00003  *
00004  *  G_put_cellhd (name, cellhd)
00005  *      char *name                   name of map
00006  *      struct Cell_head *cellhd    structure holding cell header info
00007  *
00008  *  Writes the cell file header information associated with map layer "map"
00009  *  into current mapset from the structure "cellhd".
00010  *
00011  *  returns:     0  if successful
00012  *              -1  on fail
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 }

Generated on Thu Dec 9 2010 20:46:05 for GRASS Programmer's Manual by  doxygen 1.7.2