GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
d_close_cur.c
Go to the documentation of this file.
1
15
#include <stdlib.h>
16
#include <grass/dbmi.h>
17
#include "
macros.h
"
18
#include "
dbstubs.h
"
19
26
int
db_d_close_cursor
(
void
)
27
{
28
dbCursor *cursor;
29
dbToken token;
30
int
stat;
31
32
/* get the arg(s) */
33
DB_RECV_TOKEN
(&token);
34
cursor = (dbCursor *)
db_find_token
(token);
35
if
(cursor ==
NULL
) {
36
db_error
(
"** invalid cursor **"
);
37
return
DB_FAILED;
38
}
39
40
/* call the procedure */
41
stat =
db_driver_close_cursor
(cursor);
42
43
/* get rid of the cursor */
44
db_drop_token
(token);
45
db_free_cursor
(cursor);
46
db__drop_cursor_from_driver_state
(cursor);
47
db_free
(cursor);
/* ?? */
48
49
/* send the return code */
50
if
(stat != DB_OK) {
51
DB_SEND_FAILURE
();
52
return
DB_OK;
53
}
54
DB_SEND_SUCCESS
();
55
56
/* no results */
57
return
DB_OK;
58
}
lib
db
dbmi_driver
d_close_cur.c
Generated on Sat Oct 5 2013 12:11:06 for GRASS Programmer's Manual by
1.8.4