33 #include <grass/glocale.h> 
   42     G_warning(_(
"can't get history information for [%s] in mapset [%s]"),
 
   70     G_zero(hist, 
sizeof(
struct History));
 
   74         sprintf(buff, 
"%s/%s", G3D_DIRECTORY, xname);
 
   75         sprintf(buf2, 
"%s@%s", G3D_HISTORY_ELEMENT, xmapset);   
 
   78         sprintf(buff, 
"%s/%s", G3D_DIRECTORY, name);
 
   79         sprintf(buf2, 
"%s", G3D_HISTORY_ELEMENT);
 
   86     if (!
G_getl(hist->mapid, 
sizeof(hist->mapid), fd)) {
 
   92     if (!
G_getl(hist->title, 
sizeof(hist->title), fd)) {
 
   98     if (!
G_getl(hist->mapset, 
sizeof(hist->mapset), fd)) {
 
  104     if (!
G_getl(hist->creator, 
sizeof(hist->creator), fd)) {
 
  110     if (!
G_getl(hist->maptype, 
sizeof(hist->maptype), fd)) {
 
  116     if (!
G_getl(hist->datsrc_1, 
sizeof(hist->datsrc_1), fd)) {
 
  122     if (!
G_getl(hist->datsrc_2, 
sizeof(hist->datsrc_2), fd)) {
 
  128     if (!
G_getl(hist->keywrd, 
sizeof(hist->keywrd), fd)) {
 
  135     while ((hist->edlinecnt < MAXEDLINES) &&
 
  137             (hist->edhist[hist->edlinecnt], 
sizeof(hist->edhist[0]), fd))) {
 
  170         sprintf(buf, 
"%s/%s", G3D_DIRECTORY, xname);
 
  171         sprintf(buf2, 
"%s@%s", G3D_HISTORY_ELEMENT, xmapset);   
 
  174         sprintf(buf, 
"%s/%s", G3D_DIRECTORY, name);
 
  175         sprintf(buf2, 
"%s", G3D_HISTORY_ELEMENT);
 
  181     fprintf(fd, 
"%s\n", hist->mapid);
 
  182     fprintf(fd, 
"%s\n", hist->title);
 
  183     fprintf(fd, 
"%s\n", hist->mapset);
 
  184     fprintf(fd, 
"%s\n", hist->creator);
 
  185     fprintf(fd, 
"%s\n", hist->maptype);
 
  186     fprintf(fd, 
"%s\n", hist->datsrc_1);
 
  187     fprintf(fd, 
"%s\n", hist->datsrc_2);
 
  188     fprintf(fd, 
"%s\n", hist->keywrd);
 
  190     for (i = 0; i < hist->edlinecnt; i++)
 
  191         fprintf(fd, 
"%s\n", hist->edhist[i]);
 
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
 
int G_ascii_check(char *string)
Removes non-ascii characters from buffer. 
 
int G_zero(void *buf, int i)
Zero out a buffer, buf, of length i. 
 
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)
 
int G3d_readHistory(const char *name, const char *mapset, struct History *hist)
read raster3d History file 
 
FILE * G_fopen_old(const char *element, const char *name, const char *mapset)
Open a database file for reading. 
 
int G3d_writeHistory(const char *name, struct History *hist)
write raster3d History file 
 
void SimpleErrorMessage(FILE *fd, const char *name, const char *mapset)
 
int G__name_is_fully_qualified(const char *fullname, char *name, char *mapset)
Check if map name is fully qualified (map @ mapset)