GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
list_gp.c File Reference

Imagery Library - List group. More...

#include <string.h>
#include <grass/imagery.h>
#include <grass/glocale.h>
Include dependency graph for list_gp.c:

Go to the source code of this file.

Functions

int I_list_group (const char *group, const struct Ref *ref, FILE *fd)
 Prints maps in a group (fancy version) More...
 
int I_list_group_simple (const struct Ref *ref, FILE *fd)
 Prints maps in a group (simple version) More...
 
void I__list_group_name_fit (char *buf, const char *name, const char *mapset)
 Formats map name to fit in a 80 column layout. More...
 

Detailed Description

Imagery Library - List group.

(C) 2001-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
USA CERL

Definition in file list_gp.c.

Function Documentation

◆ I__list_group_name_fit()

void I__list_group_name_fit ( char *  buf,
const char *  name,
const char *  mapset 
)

Formats map name to fit in a 80 column layout.

Results in a map name in the "<map@mapset>" form. If necessary truncates relevant part(s) and denotes with ellipsis, e.g. "<verylongmapname...@mapset>".

Parameters
[out]bufformatted map name
namemap name
mapsetmapset name

Definition at line 98 of file list_gp.c.

Referenced by I_list_group(), and I_list_subgroup().

◆ I_list_group()

int I_list_group ( const char *  group,
const struct Ref ref,
FILE *  fd 
)

Prints maps in a group (fancy version)

Parameters
groupgroup name
refgroup reference (set with I_get_group_ref())
fdwhere to print (typically stdout)
Returns
0

Definition at line 26 of file list_gp.c.

References _, Ref::file, I__list_group_name_fit(), Ref_Files::mapset, max, Ref_Files::name, and Ref::nfiles.

◆ I_list_group_simple()

int I_list_group_simple ( const struct Ref ref,
FILE *  fd 
)

Prints maps in a group (simple version)

Same as I_list_group(), but without all the fancy stuff. Prints one map per line in map form.

Parameters
refgroup reference (set with I_get_group_ref())
fdwhere to print (typically stdout)
Returns
0

Definition at line 74 of file list_gp.c.

References Ref::file, Ref_Files::mapset, Ref_Files::name, and Ref::nfiles.

Referenced by I_list_subgroup_simple().