Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include <stdio.h>
00011 #include <grass/gis.h>
00012
00013 char *G_get_dig_title(const char *name, const char *mapset)
00014 {
00015 FILE *fd;
00016 int stat = -1;
00017 char title[100];
00018
00019 fd = G_fopen_old("dig_cats", name, mapset);
00020 if (fd) {
00021 stat = 1;
00022 if (!fgets(title, sizeof title, fd))
00023 stat = -1;
00024 else if (!G_getl(title, sizeof title, fd))
00025 stat = -1;
00026
00027 fclose(fd);
00028 }
00029
00030 if (stat < 0)
00031 *title = 0;
00032 else
00033 G_strip(title);
00034
00035 return G_store(title);
00036 }