/********************************************************************** * * char * * G_gisbase() * * returns: pointer to string containing the base directory of * GRASS-GRID **********************************************************************/ #include /*! * \brief top level module directory * * Returns the full * path name of the top level directory for GRASS programs. This directory will * have subdirectories which will contain modules and files required for the * running of the system. Some of these directories are: \code bin commands run by the user etc modules and data files used by GRASS commands txt help files menu files used by the grass3 menu interface \endcode * The use of G_gisbase( ) to find these subdirectories enables GRASS modules * to be written independently of where the GRASS system is actually installed * on the machine. For example, to run the module sroff in the GRASS * etc directory: \code char command[200]; sprintf (command, "%s/etc/sroff", G_gisbase( ) ); G_spawn (command, "sroff", NULL); \endcode * * \param void * \return char * */ const char *G_gisbase(void) { return G_getenv("GISBASE"); }