c_close_cur.c

Go to the documentation of this file.
00001 
00015 #include <stdlib.h>
00016 #include <grass/dbmi.h>
00017 #include "macros.h"
00018 
00027 int db_close_cursor(dbCursor * cursor)
00028 {
00029     int ret_code;
00030 
00031     /* start the procedure call */
00032     db__set_protocol_fds(cursor->driver->send, cursor->driver->recv);
00033     DB_START_PROCEDURE_CALL(DB_PROC_CLOSE_CURSOR);
00034 
00035     /* send the argument(s) to the procedure */
00036     DB_SEND_TOKEN(&cursor->token);
00037 
00038     /* get the return code for the procedure call */
00039     DB_RECV_RETURN_CODE(&ret_code);
00040 
00041     if (ret_code != DB_OK)
00042         return ret_code;        /* ret_code SHOULD == DB_FAILED */
00043 
00044     db_free_cursor(cursor);
00045 
00046     /* no results */
00047     return DB_OK;
00048 }

Generated on Sat Oct 24 03:24:24 2009 for GRASS Programmer's Manual by  doxygen 1.6.1