GRASS Programmer's Manual 6.4.1(2011)
|
#include <grass/gis.h>
Go to the source code of this file.
Functions | |
char * | G_gisbase (void) |
top level module directory |
char* G_gisbase | ( | void | ) |
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:
bin commands run by the user etc modules and data files used by GRASS commands txt help files menu files used by the <i>grass3</i> menu interface
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:
char command[200]; sprintf (command, "%s/etc/sroff", G_gisbase( ) ); G_spawn (command, "sroff", NULL);
void |
Definition at line 42 of file gisbase.c.
References G_getenv().
Referenced by ellipsoid_table_file(), and G_ask_proj_name().