34 fprintf(fd,
_(
"group <%s> is empty\n"), group);
38 for (i = 0; i < ref->
nfiles; i++) {
40 len = strlen(buf) + 4;
44 fprintf(fd,
_(
"group <%s> references the following raster maps\n"), group);
45 fprintf(fd,
"-------------\n");
47 for (i = 0; i < ref->
nfiles; i++) {
54 fprintf(fd,
"%-*s",
max, buf);
58 fprintf(fd,
"-------------\n");
80 for (i = 0; i < ref->
nfiles; i++)
101 int name_length = (int)strlen(
name);
102 int mapset_length = (int)strlen(mapset);
104 if (name_length + mapset_length + 3 < 75) {
107 else if (name_length > 35 && mapset_length > 35) {
108 frmt =
"<%.33s...@%.32s...>";
110 else if (name_length > 35) {
111 sprintf(fr,
"<%%.%ds...@%%s>", 68 - mapset_length);
115 sprintf(fr,
"<%%s@%%.%ds...>", 68 - name_length);
118 snprintf(buf, 75, frmt,
name, mapset);
void I__list_group_name_fit(char *buf, const char *name, const char *mapset)
Formats map name to fit in a 80 column layout.
int I_list_group(const char *group, const struct Ref *ref, FILE *fd)
Prints maps in a group (fancy version)
int I_list_group_simple(const struct Ref *ref, FILE *fd)
Prints maps in a group (simple version)