GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gisinit.c File Reference

GIS Library - Handles program initialization. More...

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <locale.h>
#include <grass/gis.h>
#include "G.h"
#include <grass/glocale.h>
Include dependency graph for gisinit.c:

Go to the source code of this file.

Functions

int G__gisinit (const char *version, const char *pgm)
 Initialize GRASS GIS engine. More...
 
int G__no_gisinit (const char *version)
 Initialize GRASS GIS engine. More...
 
int G__check_gisinit (void)
 Checks to see if GIS engine is initialized. More...
 

Variables

struct G__ G__
 

Detailed Description

GIS Library - Handles program initialization.

(C) 2001-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
GRASS GIS Development Team
Date
2000-2008

Definition in file gisinit.c.

Function Documentation

int G__check_gisinit ( void  )

Checks to see if GIS engine is initialized.

Returns
1 on success
exit() is called on error

Definition at line 109 of file gisinit.c.

References G_sleep(), and G_warning().

int G__gisinit ( const char *  version,
const char *  pgm 
)

Initialize GRASS GIS engine.

Initializes GIS engine and ensures a valid mapset is available.

Parameters
[in]pgmProgram (module) name
Returns
always returns 0 on success
exit() is called on error

Definition at line 44 of file gisinit.c.

References G__mapset_permissions(), G_fatal_error(), G_location_path(), G_mapset(), and G_set_program_name().

int G__no_gisinit ( const char *  version)

Initialize GRASS GIS engine.

Initializes GIS engine, but does not check for a valid mapset.

Returns
always returns 0 on success

Definition at line 86 of file gisinit.c.

References G_fatal_error().

Variable Documentation

struct G__ G__

Definition at line 28 of file gisinit.c.