GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
c_list_drivers.c
Go to the documentation of this file.
1
15
#include <grass/dbmi.h>
16
22
const
char
*
db_list_drivers
(
void
)
23
{
24
dbDbmscap *list, *cur;
25
dbString drivernames;
26
27
db_init_string
(&drivernames);
28
29
/* read the dbmscap info */
30
if
(
NULL
== (list =
db_read_dbmscap
()))
31
return
NULL
;
32
else
{
33
/* build the comma separated string of existing drivers */
34
for
(cur = list; cur; cur = cur->next) {
35
if
(cur->driverName ==
'\0'
)
36
break
;
37
else
{
38
if
(cur != list)
39
db_append_string
(&drivernames,
","
);
40
db_append_string
(&drivernames, cur->driverName);
41
}
42
}
43
}
44
45
return
db_get_string
(&drivernames);
46
}
lib
db
dbmi_client
c_list_drivers.c
Generated on Wed Jun 6 2012 14:04:19 for GRASS Programmer's Manual by
1.8.1