~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/client.c

  • Committer: Monty Taylor
  • Date: 2008-08-09 23:50:05 UTC
  • mto: (312.1.3 translations)
  • mto: This revision was merged to the branch mainline in revision 295.
  • Revision ID: monty@inaugust.com-20080809235005-otpcpmt1j0ja3nls
Removed STDCALL macros calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#undef max_allowed_packet
48
48
#undef net_buffer_length
49
49
 
50
 
#define CLI_DRIZZLE_CONNECT STDCALL drizzle_connect
 
50
#define CLI_DRIZZLE_CONNECT drizzle_connect
51
51
 
52
52
#include <mysys/my_sys.h>
53
53
#include <mysys/mysys_err.h>
481
481
}
482
482
 
483
483
 
484
 
void STDCALL
 
484
void
485
485
drizzle_free_result(DRIZZLE_RES *result)
486
486
{
487
487
  if (result)
1060
1060
*/
1061
1061
 
1062
1062
 
1063
 
void STDCALL drizzle_server_end()
 
1063
void drizzle_server_end()
1064
1064
{
1065
1065
  if (!drizzle_client_init)
1066
1066
    return;
1194
1194
C_MODE_END
1195
1195
 
1196
1196
 
1197
 
DRIZZLE * STDCALL
 
1197
DRIZZLE *
1198
1198
CLI_DRIZZLE_CONNECT(DRIZZLE *drizzle,const char *host, const char *user,
1199
1199
                       const char *passwd, const char *db,
1200
1200
                       uint32_t port, const char *unix_socket, uint32_t client_flag)
1630
1630
  Set current database
1631
1631
**************************************************************************/
1632
1632
 
1633
 
int STDCALL
 
1633
int
1634
1634
drizzle_select_db(DRIZZLE *drizzle, const char *db)
1635
1635
{
1636
1636
  int error;
1690
1690
}
1691
1691
 
1692
1692
 
1693
 
void STDCALL drizzle_close(DRIZZLE *drizzle)
 
1693
void drizzle_close(DRIZZLE *drizzle)
1694
1694
{
1695
1695
  if (drizzle)          /* Some simple safety */
1696
1696
  {
1775
1775
  finish processing it.
1776
1776
*/
1777
1777
 
1778
 
int32_t STDCALL
 
1778
int32_t
1779
1779
drizzle_send_query(DRIZZLE *drizzle, const char* query, uint32_t length)
1780
1780
{
1781
1781
  return(simple_command(drizzle, COM_QUERY, (uchar*) query, length, 1));
1782
1782
}
1783
1783
 
1784
1784
 
1785
 
int32_t STDCALL
 
1785
int32_t
1786
1786
drizzle_real_query(DRIZZLE *drizzle, const char *query, uint32_t length)
1787
1787
{
1788
1788
  if (drizzle_send_query(drizzle,query,length))
1796
1796
  drizzle_data_seek may be used.
1797
1797
**************************************************************************/
1798
1798
 
1799
 
DRIZZLE_RES * STDCALL drizzle_store_result(DRIZZLE *drizzle)
 
1799
DRIZZLE_RES * drizzle_store_result(DRIZZLE *drizzle)
1800
1800
{
1801
1801
  DRIZZLE_RES *result;
1802
1802
 
1890
1890
  Return next row of the query results
1891
1891
**************************************************************************/
1892
1892
 
1893
 
DRIZZLE_ROW STDCALL
 
1893
DRIZZLE_ROW
1894
1894
drizzle_fetch_row(DRIZZLE_RES *res)
1895
1895
{
1896
1896
  if (!res->data)
1942
1942
  else the lengths are calculated from the offset between pointers.
1943
1943
**************************************************************************/
1944
1944
 
1945
 
uint32_t * STDCALL
 
1945
uint32_t *
1946
1946
drizzle_fetch_lengths(DRIZZLE_RES *res)
1947
1947
{
1948
1948
  DRIZZLE_ROW column;
1955
1955
}
1956
1956
 
1957
1957
 
1958
 
int STDCALL
 
1958
int
1959
1959
drizzle_options(DRIZZLE *drizzle,enum drizzle_option option, const void *arg)
1960
1960
{
1961
1961
  switch (option) {
2035
2035
****************************************************************************/
2036
2036
 
2037
2037
/* DRIZZLE_RES */
2038
 
uint64_t STDCALL drizzle_num_rows(const DRIZZLE_RES *res)
 
2038
uint64_t drizzle_num_rows(const DRIZZLE_RES *res)
2039
2039
{
2040
2040
  return res->row_count;
2041
2041
}
2042
2042
 
2043
 
unsigned int STDCALL drizzle_num_fields(const DRIZZLE_RES *res)
 
2043
unsigned int drizzle_num_fields(const DRIZZLE_RES *res)
2044
2044
{
2045
2045
  return res->field_count;
2046
2046
}
2047
2047
 
2048
 
uint STDCALL drizzle_errno(const DRIZZLE *drizzle)
 
2048
uint drizzle_errno(const DRIZZLE *drizzle)
2049
2049
{
2050
2050
  return drizzle ? drizzle->net.last_errno : drizzle_server_last_errno;
2051
2051
}
2052
2052
 
2053
2053
 
2054
 
const char * STDCALL drizzle_error(const DRIZZLE *drizzle)
 
2054
const char * drizzle_error(const DRIZZLE *drizzle)
2055
2055
{
2056
2056
  return drizzle ? drizzle->net.last_error : drizzle_server_last_error;
2057
2057
}
2074
2074
   Signed number > 323000
2075
2075
*/
2076
2076
 
2077
 
uint32_t STDCALL
 
2077
uint32_t
2078
2078
drizzle_get_server_version(const DRIZZLE *drizzle)
2079
2079
{
2080
2080
  uint major, minor, version;
2092
2092
   and character_set_connection) and updates drizzle->charset so other
2093
2093
   functions like drizzle_real_escape will work correctly.
2094
2094
*/
2095
 
int STDCALL drizzle_set_character_set(DRIZZLE *drizzle, const char *cs_name)
 
2095
int drizzle_set_character_set(DRIZZLE *drizzle, const char *cs_name)
2096
2096
{
2097
2097
  const CHARSET_INFO *cs;
2098
2098
  const char *save_csdir= charsets_dir;