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

DBMI Library (base) - default settings. More...

#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/glocale.h>
Include dependency graph for default_name.c:

Go to the source code of this file.

Functions

const char * db_get_default_driver_name (void)
 Get default driver name. More...
 
const char * db_get_default_database_name (void)
 Get default database name. More...
 
const char * db_get_default_schema_name (void)
 Get default schema name. More...
 
const char * db_get_default_group_name (void)
 Get default group name. More...
 
int db_set_default_connection (void)
 Sets up database connection settings using GRASS default from dbmi.h. More...
 

Detailed Description

DBMI Library (base) - default settings.

(C) 1999-2010 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
Joel Jones (CERL/UIUC)
Upgraded to GRASS 5.7 by Radim Blazek

Definition in file default_name.c.

Function Documentation

const char* db_get_default_database_name ( void  )

Get default database name.

Returns
pointer to default database name
NULL if not set

Definition at line 43 of file default_name.c.

References G__getenv2(), G_store(), and NULL.

const char* db_get_default_driver_name ( void  )

Get default driver name.

Returns
pointer to default driver name
NULL if not set

Definition at line 27 of file default_name.c.

References G__getenv2(), G_store(), and NULL.

const char* db_get_default_group_name ( void  )

Get default group name.

Returns
pointer to default group name
NULL if not set

Definition at line 75 of file default_name.c.

References G__getenv2(), G_store(), and NULL.

const char* db_get_default_schema_name ( void  )

Get default schema name.

Returns
pointer to default schema name
NULL if not set

Definition at line 59 of file default_name.c.

References G__getenv2(), G_store(), and NULL.

int db_set_default_connection ( void  )

Sets up database connection settings using GRASS default from dbmi.h.

Todo:
DB_OK on success, DB_* error code on fail
Returns
returns DB_OK

Definition at line 92 of file default_name.c.

References buf, db_get_connection(), db_set_connection(), G__make_mapset_element(), G_debug(), G_fatal_error(), G_location_path(), G_mapset(), and sprintf().

Referenced by Vect_default_field_info().