13 #include <grass/gis.h> 
   14 #include <grass/glocale.h> 
   29                 _(
"category information for [%s] in [%s] missing or invalid"),
 
   36     out = fopen(tempfile, 
"w");
 
   39         sprintf(buf, _(
"G_put_title - can't create a temp file"));
 
   44     for (line = 0; 
G_getl(buf, 
sizeof buf, in); line++) {
 
   49         fprintf(out, 
"%s\n", buf);
 
   56         sprintf(buf, _(
"category information for [%s] in [%s] invalid"), name,
 
   62     in = fopen(tempfile, 
"r");
 
   64         sprintf(buf, _(
"G_put_title - can't reopen temp file"));
 
   72         sprintf(buf, _(
"can't write category information for [%s] in [%s]"),
 
   78     while (fgets(buf, 
sizeof buf, in))
 
   79         fprintf(out, 
"%s", buf);
 
char * G_mapset(void)
current mapset name 
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
char * G_tempfile(void)
Returns a temporary file name. 
int G_strip(char *buf)
Removes all leading and trailing white space from string. 
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
int G_getl(char *buf, int n, FILE *fd)
gets a line of text from a file 
FILE * G_fopen_new(const char *element, const char *name)
Open a new database file. 
G_warning("category support for [%s] in mapset [%s] %s", name, mapset, type)
FILE * G_fopen_old(const char *element, const char *name, const char *mapset)
Open a database file for reading. 
int G_put_cell_title(const char *name, const char *title)