GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-b4e4cb0fe9
find_vect.c File Reference

GIS library - Find a vector map. More...

#include <string.h>
#include <grass/config.h>
#include <grass/gis.h>
#include <grass/vect/dig_defines.h>
#include <grass/glocale.h>
Include dependency graph for find_vect.c:

Go to the source code of this file.

Functions

const char * G_find_vector (char *name, const char *mapset)
 Finds a vector map. More...
 
const char * G_find_vector2 (const char *name, const char *mapset)
 Find a vector map (look but don't touch) More...
 

Detailed Description

GIS library - Find a vector map.

(C) 2001-2009 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
Original author CERL

Definition in file find_vect.c.

Function Documentation

◆ G_find_vector()

const char* G_find_vector ( char *  name,
const char *  mapset 
)

Finds a vector map.

Searches for a vector map from the mapset search list or in a specified mapset. Returns the mapset name where the vector map was found.

NOTES: If the user specifies a fully qualified vector map which exists, then G_find_vector() modifies name by removing the "@<i>mapset</i>" part.

Rejects all names that begin with "."

Parameters
namevector map name
mapsetmapset name or "" for search path
Returns
pointer to a string with name of mapset where vector map was found
NULL if not found

Definition at line 41 of file find_vect.c.

References G_debug(), G_find_file(), GV_DIRECTORY, and name.

◆ G_find_vector2()

const char* G_find_vector2 ( const char *  name,
const char *  mapset 
)

Find a vector map (look but don't touch)

The same as G_find_vector() but doesn't remove the "@<i>mapset</i>" qualification from name, if present.

Returns NULL if the map wasn't found, or the mapset the vector was found in if it was.

Parameters
namevector map name
mapsetmapset name where to search
Returns
pointer to buffer containing mapset name
NULL when vector map not found

Definition at line 62 of file find_vect.c.

References G_debug(), G_find_file2(), GV_DIRECTORY, and name.

Referenced by M_do_remove(), M_do_rename(), and Vect_copy().