34 sprintf(buf,
"group/%s/subgroup", group);
37 if (
G_lstat(path, &sb) || !S_ISDIR(sb.st_mode))
40 subgs =
G_ls2(path, subgs_num);
82 const char *subgroup,
const struct Ref *ref, FILE * fd)
90 fprintf(fd,
_(
"subgroup <%s> of group <%s> is empty\n"),
95 for (i = 0; i < ref->
nfiles; i++) {
97 len = strlen(buf) + 4;
103 (
"subgroup <%s> of group <%s> references the following raster maps\n"),
105 fprintf(fd,
"-------------\n");
107 for (i = 0; i < ref->
nfiles; i++) {
114 fprintf(fd,
"%-*s", max, buf);
118 fprintf(fd,
"-------------\n");
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
char ** I_list_subgroups(const char *group, int *subgs_num)
Get list of subgroups which a group contatins.
char ** G_ls2(const char *, int *)
Stores a sorted directory listing in an array.
char ** list_subgroups(const char *group, const char *mapset, int *subgs_num)
char ** I_list_subgroups2(const char *group, const char *mapset, int *subgs_num)
Get list of subgroups which a group contatins.
int I_find_group2(const char *, const char *)
Does the group exists?
const char * G_mapset(void)
Get current mapset name.
int I_list_group_simple(const struct Ref *, FILE *)
Prints maps in a group (simple version)
int I_list_subgroup(const char *group, const char *subgroup, const struct Ref *ref, FILE *fd)
Prints maps in a subgroup (fancy version)
int I_list_subgroup_simple(const struct Ref *ref, FILE *fd)
Prints maps in a subgroup (simple version)
int G_lstat(const char *, struct stat *)
Get file status.