c_version.c

Go to the documentation of this file.
00001 #include "dbmi.h"
00002 #include "macros.h"
00003 
00010 db_version(driver, client_version, driver_version)
00011     dbDriver *driver;
00012     dbString *client_version;
00013     dbString *driver_version;
00014 {
00015     int ret_code;
00016 
00017 /* initialize the strings */
00018     db_init_string (client_version);
00019     db_init_string (driver_version);
00020 
00021 /* set client version from DB_VERSION */
00022     db_set_string (client_version, DB_VERSION);
00023 
00024 /* start the procedure call */
00025     db__set_protocol_fds (driver->send, driver->recv);
00026     DB_START_PROCEDURE_CALL(DB_PROC_VERSION);
00027 
00028 /* no arguments */
00029 
00030 /* get the return code for the procedure call */
00031     DB_RECV_RETURN_CODE(&ret_code);
00032 
00033     if (ret_code != DB_OK)
00034         return ret_code; /* ret_code SHOULD == DB_FAILED */
00035 
00036 /* get the driver version */
00037     DB_RECV_STRING(driver_version);
00038 
00039     return DB_OK;
00040 }

Generated on Mon Jan 1 19:49:04 2007 for GRASS by  doxygen 1.5.1