Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include <grass/gis.h>
00011
00012
00027 char *G_get_cell_title(const char *name, const char *mapset)
00028 {
00029 FILE *fd;
00030 int stat;
00031 char title[1024];
00032
00033 stat = -1;
00034 fd = G_fopen_old("cats", name, mapset);
00035 if (fd) {
00036 stat = 1;
00037 if (!fgets(title, sizeof title, fd))
00038 stat = -1;
00039 else if (!G_getl(title, sizeof title, fd))
00040 stat = -1;
00041
00042 fclose(fd);
00043 }
00044
00045 if (stat < 0)
00046 *title = 0;
00047 else
00048 G_strip(title);
00049 return G_store(title);
00050 }