Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <string.h>
00021 #include <stdio.h>
00022 #include <grass/gis.h>
00023
00024 int G_remove_colors(const char *name, const char *mapset)
00025 {
00026 char element[GMAPSET_MAX + 6];
00027 char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
00028 int stat;
00029
00030 if (G__name_is_fully_qualified(name, xname, xmapset)) {
00031 if (strcmp(xmapset, mapset) != 0)
00032 return -1;
00033 name = xname;
00034 }
00035
00036
00037 sprintf(element, "colr2/%s", mapset);
00038 stat = G_remove(element, name);
00039
00040 if (strcmp(mapset, G_mapset()) == 0)
00041 stat = G_remove("colr", name);
00042
00043 return stat;
00044 }