GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
dbmscap.c File Reference

DBMI Library (base) - DBmscap management. More...

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dirent.h>
#include <unistd.h>
#include <grass/dbmi.h>
#include <grass/gis.h>
Include dependency graph for dbmscap.c:

Go to the source code of this file.

Functions

const char * db_dbmscap_filename (void)
 Get dbmscap file name. More...
 
int db_has_dbms (void)
 Check dbms. More...
 
void db_copy_dbmscap_entry (dbDbmscap *dst, dbDbmscap *src)
 Copy dbmscap entry. More...
 
dbDbmscapdb_read_dbmscap (void)
 Read dbmscap. More...
 
void db_free_dbmscap (dbDbmscap *list)
 Free dbmscap. More...
 

Detailed Description

DBMI Library (base) - DBmscap management.

(C) 1999-2009 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), Radim Blazek

Definition in file dbmscap.c.

Function Documentation

◆ db_copy_dbmscap_entry()

void db_copy_dbmscap_entry ( dbDbmscap dst,
dbDbmscap src 
)

Copy dbmscap entry.

Parameters
dstdestination
srcsource

Definition at line 79 of file dbmscap.c.

References dst, src, and strcpy.

◆ db_dbmscap_filename()

const char* db_dbmscap_filename ( void  )

Get dbmscap file name.

Returns
pointer to string with file name

Definition at line 57 of file dbmscap.c.

Referenced by db_read_dbmscap().

◆ db_free_dbmscap()

void db_free_dbmscap ( dbDbmscap list)

Free dbmscap.

Parameters
listpointer to dbDbmscap

Definition at line 262 of file dbmscap.c.

◆ db_has_dbms()

int db_has_dbms ( void  )

Check dbms.

Returns
1 if true
0 if false

Definition at line 68 of file dbmscap.c.

◆ db_read_dbmscap()

dbDbmscap* db_read_dbmscap ( void  )

Read dbmscap.

dbmscap file was used in grass5.0 but it is not used in grass5.7 until we find it necessary. All code for dbmscap file is commented here.

Instead of in dbmscap file db_read_dbmscap() searches for available dbmi drivers in /driver/db/

Returns
pointer to dbDbmscap

Definition at line 98 of file dbmscap.c.

References db_dbmscap_filename(), db_syserror(), file, and NULL.