c_close_cur.c

Go to the documentation of this file.
00001 #include <stdlib.h>
00002 #include <grass/dbmi.h>
00003 #include "macros.h"
00004 
00005 
00012 int
00013 db_close_cursor (dbCursor *cursor)
00014 {
00015     int ret_code;
00016 
00017 /* start the procedure call */
00018     db__set_protocol_fds (cursor->driver->send, cursor->driver->recv);
00019     DB_START_PROCEDURE_CALL(DB_PROC_CLOSE_CURSOR);
00020 
00021 /* send the argument(s) to the procedure */
00022     DB_SEND_TOKEN (&cursor->token);
00023 
00024 /* get the return code for the procedure call */
00025     DB_RECV_RETURN_CODE(&ret_code);
00026 
00027     if (ret_code != DB_OK)
00028         return ret_code; /* ret_code SHOULD == DB_FAILED */
00029 
00030     db_free_cursor (cursor);
00031 
00032 /* no results */
00033     return DB_OK;
00034 }

Generated on Sun Apr 6 17:31:38 2008 for GRASS by  doxygen 1.5.5