gisbase.c File Reference

#include <grass/gis.h>

Include dependency graph for gisbase.c:

Go to the source code of this file.

Functions

char * G_gisbase ()
 top level module directory


Function Documentation

char* G_gisbase (  ) 

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( ) );
  system (command);

Parameters:
void 
Returns:
char *

Definition at line 42 of file gisbase.c.

References G_getenv().

Referenced by ellipsoid_table_file(), and G_ask_proj_name().


Generated on Sun Apr 6 17:32:20 2008 for GRASS by  doxygen 1.5.5