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
d_closedb.c
Go to the documentation of this file.
1
15
#include <grass/dbmi.h>
16
#include "
macros.h
"
17
#include "
dbstubs.h
"
18
25
int
db_d_close_database
(
void
)
26
{
27
int
stat;
28
29
/* no arg(s) */
30
31
/* see if a database is open */
32
if
(!
db__test_database_open
()) {
33
db_error
(
"no database is open"
);
34
DB_SEND_FAILURE
();
35
return
DB_OK;
36
};
37
/* make sure all cursors are closed */
38
db__close_all_cursors
();
39
40
/* call the procedure */
41
stat =
db_driver_close_database
();
42
43
/* send the return code */
44
if
(stat != DB_OK) {
45
DB_SEND_FAILURE
();
46
return
DB_OK;
47
}
48
DB_SEND_SUCCESS
();
49
50
/* clear the driver state */
51
db__mark_database_closed
();
52
db__init_driver_state
();
53
54
/* no results */
55
return
DB_OK;
56
}
lib
db
dbmi_driver
d_closedb.c
Generated on Wed Jun 6 2012 14:04:20 for GRASS Programmer's Manual by
1.8.1