GRASS Programmer's Manual  6.4.1(2011)
find_vect.c
Go to the documentation of this file.
00001 /*
00002  **********************************************************************
00003  *  char *
00004  *  G_find_vector (name, mapset)
00005  *        char *name       file name to look for
00006  *        char *mapset     mapset to search. if mapset is ""
00007  *                         will search in mapset search list
00008  *
00009  *      searches for a vector map from the mapset search list
00010  *      or in a specified mapset.
00011  *      returns the mapset name where the vector map was found.
00012  *
00013  * NOTE: If the user specifies a fully qualified vector map which exists,
00014  *       then <i>G_find_vector()</i> modifies <b>name</b> by removing the
00015  *      "@<i>mapset</i>" part.
00016  *
00017  *  returns:
00018  *      char *  pointer to a string with name of mapset
00019  *              where vector map was found, or NULL if not found
00020  *  note:
00021  *      rejects all names that begin with .
00022  *
00023  *      if name is of the form nnn in ppp then 
00024  *      name = nnn and mapset = ppp
00025  **********************************************************************/
00026 
00027 #include <grass/gis.h>
00028 #include <grass/vect/dig_defines.h>
00029 
00030 
00031 /* \brief searches for a vector map
00032  *
00033  *      searches for a vector map from the mapset search list
00034  *      or in a specified mapset.
00035  *      returns the mapset name where the vector map was found.
00036  *
00037  *  returns:
00038  *      char *  pointer to a string with name of mapset
00039  *              where vector map was found, or NULL if not found
00040  *  NOTES:
00041  *      If the user specifies a fully qualified vector map which exists,
00042  *      then <i>G_find_vector()</i> modifies <b>name</b> by removing the
00043  *      "@<i>mapset</i>" part.
00044  *
00045  *      Rejects all names that begin with "."
00046  *
00047  *      If name is of the form nnn in ppp then 
00048  *      name = nnn and mapset = ppp
00049  *
00050  *  \param name
00051  *  \param mapset
00052  *  \return char *
00053  *
00054  */
00055 char *G_find_vector(char *name, const char *mapset)
00056 {
00057     return G_find_file(GRASS_VECT_DIRECTORY, name, mapset);
00058 }
00059 
00060 
00061 
00075 char *G_find_vector2(const char *name, const char *mapset)
00076 {
00077     return G_find_file2(GRASS_VECT_DIRECTORY, name, mapset);
00078 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines