GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
find_vect.c
Go to the documentation of this file.
1 /*
2  **********************************************************************
3  * char *
4  * G_find_vector (name, mapset)
5  * char *name file name to look for
6  * char *mapset mapset to search. if mapset is ""
7  * will search in mapset search list
8  *
9  * searches for a vector map from the mapset search list
10  * or in a specified mapset.
11  * returns the mapset name where the vector map was found.
12  *
13  * NOTE: If the user specifies a fully qualified vector map which exists,
14  * then <i>G_find_vector()</i> modifies <b>name</b> by removing the
15  * "@<i>mapset</i>" part.
16  *
17  * returns:
18  * char * pointer to a string with name of mapset
19  * where vector map was found, or NULL if not found
20  * note:
21  * rejects all names that begin with .
22  *
23  * if name is of the form nnn in ppp then
24  * name = nnn and mapset = ppp
25  **********************************************************************/
26 
27 #include <grass/gis.h>
28 #include <grass/vect/dig_defines.h>
29 
30 
31 /* \brief searches for a vector map
32  *
33  * searches for a vector map from the mapset search list
34  * or in a specified mapset.
35  * returns the mapset name where the vector map was found.
36  *
37  * returns:
38  * char * pointer to a string with name of mapset
39  * where vector map was found, or NULL if not found
40  * NOTES:
41  * If the user specifies a fully qualified vector map which exists,
42  * then <i>G_find_vector()</i> modifies <b>name</b> by removing the
43  * "@<i>mapset</i>" part.
44  *
45  * Rejects all names that begin with "."
46  *
47  * If name is of the form nnn in ppp then
48  * name = nnn and mapset = ppp
49  *
50  * \param name
51  * \param mapset
52  * \return char *
53  *
54  */
55 char *G_find_vector(char *name, const char *mapset)
56 {
57  return G_find_file(GRASS_VECT_DIRECTORY, name, mapset);
58 }
59 
60 
61 
75 char *G_find_vector2(const char *name, const char *mapset)
76 {
77  return G_find_file2(GRASS_VECT_DIRECTORY, name, mapset);
78 }
char * G_find_vector(char *name, const char *mapset)
Definition: find_vect.c:55
string name
Definition: render.py:1314
char * G_find_vector2(const char *name, const char *mapset)
find a vector map (look but don&#39;t touch)
Definition: find_vect.c:75
char * G_find_file2(const char *element, const char *name, const char *mapset)
searches for a file from the mapset search list or in a specified mapset. (look but don&#39;t touch) retu...
Definition: find_file.c:191
char * G_find_file(const char *element, char *name, const char *mapset)
searches for a file from the mapset search list or in a specified mapset. returns the mapset name whe...
Definition: find_file.c:159