Another pgindent run. Fixes enum indenting, and improves #endif
authorBruce Momjian <bruce@momjian.us>
Sun, 28 Oct 2001 06:26:15 +0000 (06:26 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 28 Oct 2001 06:26:15 +0000 (06:26 +0000)
spacing.  Also adds space for one-line comments.

43 files changed:
bind.c
bind.h
columninfo.c
columninfo.h
connection.c
connection.h
convert.c
convert.h
dlg_specific.c
dlg_specific.h
drvconn.c
environ.c
environ.h
gpps.c
gpps.h
info.c
iodbc.h
isql.h
isqlext.h
lobj.c
lobj.h
misc.h
odbcapi.c
odbcapi30.c
options.c
parse.c
pgapifunc.h
pgtypes.c
pgtypes.h
psqlodbc.h
qresult.c
qresult.h
resource.h
results.c
setup.c
socket.c
socket.h
statement.c
statement.h
tuple.c
tuple.h
tuplelist.c
tuplelist.h

diff --git a/bind.c b/bind.c
index 4bd2c0ce0824ca9eae5d5ffe43f4888085f68fec..d176acee6b132071f0a32262bede2849ebe8da58 100644 (file)
--- a/bind.c
+++ b/bind.c
@@ -431,7 +431,7 @@ create_empty_bindings(int num_columns)
 
 
 void
-extend_bindings(StatementClass * stmt, int num_columns)
+extend_bindings(StatementClass *stmt, int num_columns)
 {
    static char *func = "extend_bindings";
    BindInfoClass *new_bindings;
diff --git a/bind.h b/bind.h
index a792c38951949e4143316112d28d7668d722614f..444d30f2d22a0e8e10fc64a2eba60737d4e1c605 100644 (file)
--- a/bind.h
+++ b/bind.h
@@ -48,5 +48,6 @@ struct ParameterInfoClass_
 };
 
 BindInfoClass *create_empty_bindings(int num_columns);
-void       extend_bindings(StatementClass * stmt, int num_columns);
+void       extend_bindings(StatementClass *stmt, int num_columns);
+
 #endif
index d05de1ffb7fe042888f670daa44f56014073c392..d9a22a163a111b8cb684850bf4dbfbc0182bc63d 100644 (file)
@@ -42,7 +42,7 @@ CI_Constructor()
 
 
 void
-CI_Destructor(ColumnInfoClass * self)
+CI_Destructor(ColumnInfoClass *self)
 {
    CI_free_memory(self);
 
@@ -56,7 +56,7 @@ CI_Destructor(ColumnInfoClass * self)
  * If self is null, then just read, don't store.
  */
 char
-CI_read_fields(ColumnInfoClass * self, ConnectionClass * conn)
+CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn)
 {
    Int2        lf;
    int         new_num_fields;
@@ -112,7 +112,7 @@ CI_read_fields(ColumnInfoClass * self, ConnectionClass * conn)
 
 
 void
-CI_free_memory(ColumnInfoClass * self)
+CI_free_memory(ColumnInfoClass *self)
 {
    register Int2 lf;
    int         num_fields = self->num_fields;
@@ -148,7 +148,7 @@ CI_free_memory(ColumnInfoClass * self)
 
 
 void
-CI_set_num_fields(ColumnInfoClass * self, int new_num_fields)
+CI_set_num_fields(ColumnInfoClass *self, int new_num_fields)
 {
    CI_free_memory(self);       /* always safe to call */
 
@@ -164,7 +164,7 @@ CI_set_num_fields(ColumnInfoClass * self, int new_num_fields)
 
 
 void
-CI_set_field_info(ColumnInfoClass * self, int field_num, char *new_name,
+CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name,
                  Oid new_adtid, Int2 new_adtsize, Int4 new_atttypmod)
 {
    /* check bounds */
index 1c805cc977c10fb8ac6368ccbb10de7ada922501..41e9400dceaad9856b9588590f5ccbe3da37b46b 100644 (file)
@@ -29,13 +29,14 @@ struct ColumnInfoClass_
 #define CI_get_atttypmod(self, col)        (self->atttypmod[col])
 
 ColumnInfoClass *CI_Constructor(void);
-void       CI_Destructor(ColumnInfoClass * self);
-void       CI_free_memory(ColumnInfoClass * self);
-char       CI_read_fields(ColumnInfoClass * self, ConnectionClass * conn);
+void       CI_Destructor(ColumnInfoClass *self);
+void       CI_free_memory(ColumnInfoClass *self);
+char       CI_read_fields(ColumnInfoClass *self, ConnectionClass *conn);
 
 /* functions for setting up the fields from within the program, */
 /* without reading from a socket */
-void       CI_set_num_fields(ColumnInfoClass * self, int new_num_fields);
-void CI_set_field_info(ColumnInfoClass * self, int field_num, char *new_name,
+void       CI_set_num_fields(ColumnInfoClass *self, int new_num_fields);
+void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name,
                  Oid new_adtid, Int2 new_adtsize, Int4 atttypmod);
+
 #endif
index 408bef8f80b4965ae02d2f284296a7408873e79a..c5aac61c4ae432035f6b018b6eef8f47d9e1f800 100644 (file)
@@ -297,7 +297,7 @@ CC_Constructor()
 
 
 char
-CC_Destructor(ConnectionClass * self)
+CC_Destructor(ConnectionClass *self)
 {
    mylog("enter CC_Destructor, self=%u\n", self);
 
@@ -349,7 +349,7 @@ CC_Destructor(ConnectionClass * self)
 
 /* Return how many cursors are opened on this connection */
 int
-CC_cursor_count(ConnectionClass * self)
+CC_cursor_count(ConnectionClass *self)
 {
    StatementClass *stmt;
    int         i,
@@ -371,7 +371,7 @@ CC_cursor_count(ConnectionClass * self)
 
 
 void
-CC_clear_error(ConnectionClass * self)
+CC_clear_error(ConnectionClass *self)
 {
    self->errornumber = 0;
    self->errormsg = NULL;
@@ -384,7 +384,7 @@ CC_clear_error(ConnectionClass * self)
  * We are almost always in the middle of a transaction.
  */
 char
-CC_abort(ConnectionClass * self)
+CC_abort(ConnectionClass *self)
 {
    QResultClass *res;
 
@@ -410,7 +410,7 @@ CC_abort(ConnectionClass * self)
 
 /* This is called by SQLDisconnect also */
 char
-CC_cleanup(ConnectionClass * self)
+CC_cleanup(ConnectionClass *self)
 {
    int         i;
    StatementClass *stmt;
@@ -466,7 +466,7 @@ CC_cleanup(ConnectionClass * self)
 
 
 int
-CC_set_translation(ConnectionClass * self)
+CC_set_translation(ConnectionClass *self)
 {
 
 #ifdef WIN32
@@ -510,7 +510,7 @@ CC_set_translation(ConnectionClass * self)
 
 
 char
-CC_connect(ConnectionClass * self, char do_password)
+CC_connect(ConnectionClass *self, char do_password)
 {
    StartupPacket sp;
    StartupPacket6_2 sp62;
@@ -854,7 +854,7 @@ another_version_retry:
 
 
 char
-CC_add_statement(ConnectionClass * self, StatementClass * stmt)
+CC_add_statement(ConnectionClass *self, StatementClass *stmt)
 {
    int         i;
 
@@ -887,7 +887,7 @@ CC_add_statement(ConnectionClass * self, StatementClass * stmt)
 
 
 char
-CC_remove_statement(ConnectionClass * self, StatementClass * stmt)
+CC_remove_statement(ConnectionClass *self, StatementClass *stmt)
 {
    int         i;
 
@@ -909,7 +909,7 @@ CC_remove_statement(ConnectionClass * self, StatementClass * stmt)
  * error message with its socket error message.
  */
 char *
-CC_create_errormsg(ConnectionClass * self)
+CC_create_errormsg(ConnectionClass *self)
 {
    SocketClass *sock = self->sock;
    int         pos;
@@ -936,7 +936,7 @@ CC_create_errormsg(ConnectionClass * self)
 
 
 char
-CC_get_error(ConnectionClass * self, int *number, char **message)
+CC_get_error(ConnectionClass *self, int *number, char **message)
 {
    int         rv;
 
@@ -974,7 +974,7 @@ CC_get_error(ConnectionClass * self, int *number, char **message)
  * 'declare cursor C3326857 for ...' and 'fetch 100 in C3326857' statements.
  */
 QResultClass *
-CC_send_query(ConnectionClass * self, char *query, QueryInfo * qi)
+CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi)
 {
    QResultClass *result_in = NULL,
               *res = NULL,
@@ -1335,7 +1335,7 @@ CC_send_query(ConnectionClass * self, char *query, QueryInfo * qi)
 
 
 int
-CC_send_function(ConnectionClass * self, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG * args, int nargs)
+CC_send_function(ConnectionClass *self, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG *args, int nargs)
 {
    char        id,
                c,
@@ -1487,7 +1487,7 @@ CC_send_function(ConnectionClass * self, int fnid, void *result_buf, int *actual
 
 
 char
-CC_send_settings(ConnectionClass * self)
+CC_send_settings(ConnectionClass *self)
 {
    /* char ini_query[MAX_MESSAGE_LEN]; */
    ConnInfo   *ci = &(self->connInfo);
@@ -1596,7 +1596,7 @@ CC_send_settings(ConnectionClass * self)
  * will go away and the define 'PG_TYPE_LO' will be updated.
  */
 void
-CC_lookup_lo(ConnectionClass * self)
+CC_lookup_lo(ConnectionClass *self)
 {
    HSTMT       hstmt;
    StatementClass *stmt;
@@ -1648,7 +1648,7 @@ CC_lookup_lo(ConnectionClass * self)
  * h-inoue 01-2-2001
  */
 void
-CC_initialize_pg_version(ConnectionClass * self)
+CC_initialize_pg_version(ConnectionClass *self)
 {
    strcpy(self->pg_version, self->connInfo.protocol);
    if (PROTOCOL_62(&self->connInfo))
@@ -1678,7 +1678,7 @@ CC_initialize_pg_version(ConnectionClass * self)
  * DJP - 25-1-2001
  */
 void
-CC_lookup_pg_version(ConnectionClass * self)
+CC_lookup_pg_version(ConnectionClass *self)
 {
    HSTMT       hstmt;
    StatementClass *stmt;
@@ -1744,7 +1744,7 @@ CC_lookup_pg_version(ConnectionClass * self)
 
 
 void
-CC_log_error(char *func, char *desc, ConnectionClass * self)
+CC_log_error(char *func, char *desc, ConnectionClass *self)
 {
 #ifdef PRN_NULLCHECK
 #define nullcheck(a) (a ? a : "(NULL)")
@@ -1774,7 +1774,7 @@ CC_log_error(char *func, char *desc, ConnectionClass * self)
 }
 
 int
-CC_get_max_query_len(const ConnectionClass * conn)
+CC_get_max_query_len(const ConnectionClass *conn)
 {
    int         value;
 
index 782fb0e4d158d41fccc3b4ab9873c4dbfd94e245..f2c21604b144a942c8b4cd4e0b4bc6185a70675a 100644 (file)
 
 typedef enum
 {
-               CONN_NOT_CONNECTED,     /* Connection has not been
-                                        * established */
-               CONN_CONNECTED, /* Connection is up and has been
+   CONN_NOT_CONNECTED,         /* Connection has not been established */
+   CONN_CONNECTED,             /* Connection is up and has been
                                 * established */
-               CONN_DOWN,      /* Connection is broken */
-               CONN_EXECUTING  /* the connection is currently executing a
+   CONN_DOWN,                  /* Connection is broken */
+   CONN_EXECUTING              /* the connection is currently executing a
                                 * statement */
-}          CONN_Status;
+} CONN_Status;
 
 /* These errors have general sql error state */
 #define CONNECTION_SERVER_NOT_REACHED              101
@@ -124,7 +123,7 @@ typedef struct _StartupPacket6_2
    char        options[ARGV_SIZE];
    char        execfile[ARGV_SIZE];
    char        tty[PATH_SIZE];
-}          StartupPacket6_2;
+} StartupPacket6_2;
 
 
 /* Structure to hold all the connection attributes for a specific
@@ -153,7 +152,7 @@ typedef struct
    char        disallow_premature;
    char        updatable_cursors;
    GLOBAL_VALUES drivers;      /* moved from driver's option */
-}          ConnInfo;
+} ConnInfo;
 
 /* Macro to determine is the connection using 6.2 protocol? */
 #define PROTOCOL_62(conninfo_)     (strncmp((conninfo_)->protocol, PG62, strlen(PG62)) == 0)
@@ -213,27 +212,27 @@ struct col_info
 #define HINSTANCE void *
 #endif
 
-typedef BOOL(FAR WINAPI * DataSourceToDriverProc) (UDWORD,
-                                          SWORD,
-                                          PTR,
-                                          SDWORD,
-                                          PTR,
-                                          SDWORD,
-                                          SDWORD FAR *,
-                                          UCHAR FAR *,
-                                          SWORD,
-                                          SWORD FAR *);
-
-typedef BOOL(FAR WINAPI * DriverToDataSourceProc) (UDWORD,
-                                          SWORD,
-                                          PTR,
-                                          SDWORD,
-                                          PTR,
-                                          SDWORD,
-                                          SDWORD FAR *,
-                                          UCHAR FAR *,
-                                          SWORD,
-                                          SWORD FAR *);
+typedef BOOL (FAR WINAPI * DataSourceToDriverProc) (UDWORD,
+                                                               SWORD,
+                                                               PTR,
+                                                               SDWORD,
+                                                               PTR,
+                                                               SDWORD,
+                                                           SDWORD FAR *,
+                                                            UCHAR FAR *,
+                                                               SWORD,
+                                                           SWORD FAR *);
+
+typedef BOOL (FAR WINAPI * DriverToDataSourceProc) (UDWORD,
+                                                               SWORD,
+                                                               PTR,
+                                                               SDWORD,
+                                                               PTR,
+                                                               SDWORD,
+                                                           SDWORD FAR *,
+                                                            UCHAR FAR *,
+                                                               SWORD,
+                                                           SWORD FAR *);
 
 /*******   The Connection handle   ************/
 struct ConnectionClass_
@@ -290,23 +289,24 @@ struct ConnectionClass_
 
 /* prototypes */
 ConnectionClass *CC_Constructor(void);
-char       CC_Destructor(ConnectionClass * self);
-int            CC_cursor_count(ConnectionClass * self);
-char       CC_cleanup(ConnectionClass * self);
-char       CC_abort(ConnectionClass * self);
-int            CC_set_translation(ConnectionClass * self);
-char       CC_connect(ConnectionClass * self, char do_password);
-char       CC_add_statement(ConnectionClass * self, StatementClass * stmt);
-char       CC_remove_statement(ConnectionClass * self, StatementClass * stmt);
-char       CC_get_error(ConnectionClass * self, int *number, char **message);
-QResultClass *CC_send_query(ConnectionClass * self, char *query, QueryInfo * qi);
-void       CC_clear_error(ConnectionClass * self);
-char      *CC_create_errormsg(ConnectionClass * self);
-int            CC_send_function(ConnectionClass * conn, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG * argv, int nargs);
-char       CC_send_settings(ConnectionClass * self);
-void       CC_lookup_lo(ConnectionClass * conn);
-void       CC_lookup_pg_version(ConnectionClass * conn);
-void       CC_initialize_pg_version(ConnectionClass * conn);
-void       CC_log_error(char *func, char *desc, ConnectionClass * self);
-int            CC_get_max_query_len(const ConnectionClass * self);
+char       CC_Destructor(ConnectionClass *self);
+int            CC_cursor_count(ConnectionClass *self);
+char       CC_cleanup(ConnectionClass *self);
+char       CC_abort(ConnectionClass *self);
+int            CC_set_translation(ConnectionClass *self);
+char       CC_connect(ConnectionClass *self, char do_password);
+char       CC_add_statement(ConnectionClass *self, StatementClass *stmt);
+char       CC_remove_statement(ConnectionClass *self, StatementClass *stmt);
+char       CC_get_error(ConnectionClass *self, int *number, char **message);
+QResultClass *CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi);
+void       CC_clear_error(ConnectionClass *self);
+char      *CC_create_errormsg(ConnectionClass *self);
+int            CC_send_function(ConnectionClass *conn, int fnid, void *result_buf, int *actual_result_len, int result_is_int, LO_ARG *argv, int nargs);
+char       CC_send_settings(ConnectionClass *self);
+void       CC_lookup_lo(ConnectionClass *conn);
+void       CC_lookup_pg_version(ConnectionClass *conn);
+void       CC_initialize_pg_version(ConnectionClass *conn);
+void       CC_log_error(char *func, char *desc, ConnectionClass *self);
+int            CC_get_max_query_len(const ConnectionClass *self);
+
 #endif
index aae290970cb5007209ae785be3ed9fe482a43360..871a9c37410daacd26f4ba679363536f40540e5e 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -138,7 +138,7 @@ static char *conv_to_octal(unsigned char val);
 
 /* This is called by SQLFetch() */
 int
-copy_and_convert_field_bindinfo(StatementClass * stmt, Int4 field_type, void *value, int col)
+copy_and_convert_field_bindinfo(StatementClass *stmt, Int4 field_type, void *value, int col)
 {
    BindInfoClass *bic = &(stmt->bindings[col]);
 
@@ -149,8 +149,8 @@ copy_and_convert_field_bindinfo(StatementClass * stmt, Int4 field_type, void *va
 
 /* This is called by SQLGetData() */
 int
-copy_and_convert_field(StatementClass * stmt, Int4 field_type, void *value, Int2 fCType,
-                      PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue)
+copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2 fCType,
+                      PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue)
 {
    Int4        len = 0,
                copy_len = 0;
@@ -756,7 +756,7 @@ copy_and_convert_field(StatementClass * stmt, Int4 field_type, void *value, Int2
  */
 #define INIT_MIN_ALLOC 4096
 static int
-enlarge_statement(StatementClass * stmt, unsigned int newsize)
+enlarge_statement(StatementClass *stmt, unsigned int newsize)
 {
    unsigned int newalsize = INIT_MIN_ALLOC;
    static char *func = "enlarge_statement";
@@ -952,7 +952,7 @@ table_for_update(const char *stmt, int *endpos)
  * This function does a dynamic memory allocation to get rid of query size limit!
  */
 int
-copy_statement_with_parameters(StatementClass * stmt)
+copy_statement_with_parameters(StatementClass *stmt)
 {
    static char *func = "copy_statement_with_parameters";
    unsigned int opos,
@@ -1855,7 +1855,7 @@ convert_money(const char *s, char *sout, size_t soutmax)
  * It does not zero out SIMPLE_TIME in case it is desired to initialize it with a value
  */
 char
-parse_datetime(char *buf, SIMPLE_TIME * st)
+parse_datetime(char *buf, SIMPLE_TIME *st)
 {
    int         y,
                m,
@@ -1922,7 +1922,7 @@ parse_datetime(char *buf, SIMPLE_TIME * st)
 
 /* Change linefeed to carriage-return/linefeed */
 int
-convert_linefeeds(const char *si, char *dst, size_t max, BOOL * changed)
+convert_linefeeds(const char *si, char *dst, size_t max, BOOL *changed)
 {
    size_t      i = 0,
                out = 0;
@@ -2221,8 +2221,8 @@ decode(const char *in, char *out)
  *-------
  */
 int
-convert_lo(StatementClass * stmt, const void *value, Int2 fCType, PTR rgbValue,
-          SDWORD cbValueMax, SDWORD * pcbValue)
+convert_lo(StatementClass *stmt, const void *value, Int2 fCType, PTR rgbValue,
+          SDWORD cbValueMax, SDWORD *pcbValue)
 {
    Oid         oid;
    int         retval,
index 9ef3dffa64430d13074a949a6b6658985f3c02bc..dfbd32ce2476310c0c372e674c5c312f70bdd239 100644 (file)
--- a/convert.h
+++ b/convert.h
@@ -27,17 +27,17 @@ typedef struct
    int         hh;
    int         mm;
    int         ss;
-}          SIMPLE_TIME;
+} SIMPLE_TIME;
 
-int            copy_and_convert_field_bindinfo(StatementClass * stmt, Int4 field_type, void *value, int col);
-int copy_and_convert_field(StatementClass * stmt, Int4 field_type, void *value, Int2 fCType,
-                    PTR rgbValue, SDWORD cbValueMax, SDWORD * pcbValue);
+int            copy_and_convert_field_bindinfo(StatementClass *stmt, Int4 field_type, void *value, int col);
+int copy_and_convert_field(StatementClass *stmt, Int4 field_type, void *value, Int2 fCType,
+                      PTR rgbValue, SDWORD cbValueMax, SDWORD *pcbValue);
 
-int            copy_statement_with_parameters(StatementClass * stmt);
+int            copy_statement_with_parameters(StatementClass *stmt);
 char      *convert_escape(char *value);
 BOOL       convert_money(const char *s, char *sout, size_t soutmax);
-char       parse_datetime(char *buf, SIMPLE_TIME * st);
-int            convert_linefeeds(const char *s, char *dst, size_t max, BOOL * changed);
+char       parse_datetime(char *buf, SIMPLE_TIME *st);
+int            convert_linefeeds(const char *s, char *dst, size_t max, BOOL *changed);
 int            convert_special_chars(const char *si, char *dst, int used);
 
 int            convert_pgbinary_to_char(const char *value, char *rgbValue, int cbValueMax);
@@ -45,6 +45,7 @@ int           convert_from_pgbinary(const unsigned char *value, unsigned char *rgbValue,
 int            convert_to_pgbinary(const unsigned char *in, char *out, int len);
 void       encode(const char *in, char *out);
 void       decode(const char *in, char *out);
-int convert_lo(StatementClass * stmt, const void *value, Int2 fCType, PTR rgbValue,
-          SDWORD cbValueMax, SDWORD * pcbValue);
+int convert_lo(StatementClass *stmt, const void *value, Int2 fCType, PTR rgbValue,
+          SDWORD cbValueMax, SDWORD *pcbValue);
+
 #endif
index d395e9a35e5d98291a5c2c6eabbff14dbe36aeee..e73c47e314e60e44fbc6eddadad49bfb09bb6c11 100644 (file)
@@ -40,13 +40,13 @@ extern GLOBAL_VALUES globals;
 
 #ifdef WIN32
 static int driver_optionsDraw(HWND, const ConnInfo *, int src, BOOL enable);
-static int driver_options_update(HWND hdlg, ConnInfo * ci, BOOL);
-static void updateCommons(const ConnInfo * ci);
+static int driver_options_update(HWND hdlg, ConnInfo *ci, BOOL);
+static void updateCommons(const ConnInfo *ci);
 #endif
 
 #ifdef WIN32
 void
-SetDlgStuff(HWND hdlg, const ConnInfo * ci)
+SetDlgStuff(HWND hdlg, const ConnInfo *ci)
 {
    /*
     * If driver attribute NOT present, then set the datasource name and
@@ -67,7 +67,7 @@ SetDlgStuff(HWND hdlg, const ConnInfo * ci)
 
 
 void
-GetDlgStuff(HWND hdlg, ConnInfo * ci)
+GetDlgStuff(HWND hdlg, ConnInfo *ci)
 {
    GetDlgItemText(hdlg, IDC_DESC, ci->desc, sizeof(ci->desc));
 
@@ -80,7 +80,7 @@ GetDlgStuff(HWND hdlg, ConnInfo * ci)
 
 
 static int
-driver_optionsDraw(HWND hdlg, const ConnInfo * ci, int src, BOOL enable)
+driver_optionsDraw(HWND hdlg, const ConnInfo *ci, int src, BOOL enable)
 {
    const GLOBAL_VALUES *comval;
    static BOOL defset = FALSE;
@@ -164,7 +164,7 @@ driver_optionsDraw(HWND hdlg, const ConnInfo * ci, int src, BOOL enable)
    return 0;
 }
 static int
-driver_options_update(HWND hdlg, ConnInfo * ci, BOOL updateProfile)
+driver_options_update(HWND hdlg, ConnInfo *ci, BOOL updateProfile)
 {
    GLOBAL_VALUES *comval;
 
@@ -391,7 +391,7 @@ ds_optionsProc(HWND hdlg,
  * to the ODBCINST.INI portion of the registry
  */
 static void
-updateCommons(const ConnInfo * ci)
+updateCommons(const ConnInfo *ci)
 {
    const char *sectionName;
    const char *fileName;
@@ -498,7 +498,7 @@ updateCommons(const ConnInfo * ci)
 
 
 void
-makeConnectString(char *connect_string, const ConnInfo * ci, UWORD len)
+makeConnectString(char *connect_string, const ConnInfo *ci, UWORD len)
 {
    char        got_dsn = (ci->dsn[0] != '\0');
    char        encoded_conn_settings[LARGE_REGISTRY_LEN];
@@ -576,7 +576,7 @@ makeConnectString(char *connect_string, const ConnInfo * ci, UWORD len)
 
 
 void
-copyAttributes(ConnInfo * ci, const char *attribute, const char *value)
+copyAttributes(ConnInfo *ci, const char *attribute, const char *value)
 {
    if (stricmp(attribute, "DSN") == 0)
        strcpy(ci->dsn, value);
@@ -631,7 +631,7 @@ copyAttributes(ConnInfo * ci, const char *attribute, const char *value)
 }
 
 void
-copyCommonAttributes(ConnInfo * ci, const char *attribute, const char *value)
+copyCommonAttributes(ConnInfo *ci, const char *attribute, const char *value)
 {
    if (stricmp(attribute, INI_FETCH) == 0 || stricmp(attribute, "A7") == 0)
        ci->drivers.fetch_max = atoi(value);
@@ -694,7 +694,7 @@ copyCommonAttributes(ConnInfo * ci, const char *attribute, const char *value)
 
 
 void
-getDSNdefaults(ConnInfo * ci)
+getDSNdefaults(ConnInfo *ci)
 {
    if (ci->port[0] == '\0')
        strcpy(ci->port, DEFAULT_PORT);
@@ -720,7 +720,7 @@ getDSNdefaults(ConnInfo * ci)
 
 
 void
-getDSNinfo(ConnInfo * ci, char overwrite)
+getDSNinfo(ConnInfo *ci, char overwrite)
 {
    char       *DSN = ci->dsn;
    char        encoded_conn_settings[LARGE_REGISTRY_LEN],
@@ -840,7 +840,7 @@ getDSNinfo(ConnInfo * ci, char overwrite)
 
 /* This is for datasource based options only */
 void
-writeDSNinfo(const ConnInfo * ci)
+writeDSNinfo(const ConnInfo *ci)
 {
    const char *DSN = ci->dsn;
    char        encoded_conn_settings[LARGE_REGISTRY_LEN],
@@ -931,7 +931,7 @@ writeDSNinfo(const ConnInfo * ci)
  * the registry and gets any driver defaults.
  */
 void
-getCommonDefaults(const char *section, const char *filename, ConnInfo * ci)
+getCommonDefaults(const char *section, const char *filename, ConnInfo *ci)
 {
    char        temp[256];
    GLOBAL_VALUES *comval;
index b1ec7090c037982e66bebdf9bbfd132ffc89ab50..5a8c7514852ba68b2489fb5fcd69b64375e0c925 100644 (file)
 #define DEFAULT_EXTRASYSTABLEPREFIXES  "dd_;"
 
 /* prototypes */
-void       getCommonDefaults(const char *section, const char *filename, ConnInfo * ci);
+void       getCommonDefaults(const char *section, const char *filename, ConnInfo *ci);
 
 #ifdef WIN32
-void       SetDlgStuff(HWND hdlg, const ConnInfo * ci);
-void       GetDlgStuff(HWND hdlg, ConnInfo * ci);
+void       SetDlgStuff(HWND hdlg, const ConnInfo *ci);
+void       GetDlgStuff(HWND hdlg, ConnInfo *ci);
 
 int CALLBACK driver_optionsProc(HWND hdlg,
                   WORD wMsg,
@@ -137,11 +137,11 @@ int CALLBACK ds_optionsProc(HWND hdlg,
 #endif  /* WIN32 */
 
 void       updateGlobals(void);
-void       writeDSNinfo(const ConnInfo * ci);
-void       getDSNdefaults(ConnInfo * ci);
-void       getDSNinfo(ConnInfo * ci, char overwrite);
-void       makeConnectString(char *connect_string, const ConnInfo * ci, UWORD);
-void       copyAttributes(ConnInfo * ci, const char *attribute, const char *value);
-void       copyCommonAttributes(ConnInfo * ci, const char *attribute, const char *value);
+void       writeDSNinfo(const ConnInfo *ci);
+void       getDSNdefaults(ConnInfo *ci);
+void       getDSNinfo(ConnInfo *ci, char overwrite);
+void       makeConnectString(char *connect_string, const ConnInfo *ci, UWORD);
+void       copyAttributes(ConnInfo *ci, const char *attribute, const char *value);
+void       copyCommonAttributes(ConnInfo *ci, const char *attribute, const char *value);
 
 #endif
index ce95296e5448a254034dba74ef0962163dcf161f..bdcf6af7f09f354a85d5a649efe0940f657789f3 100644 (file)
--- a/drvconn.c
+++ b/drvconn.c
 #include "dlg_specific.h"
 
 /* prototypes */
-void       dconn_get_connect_attributes(const UCHAR FAR * connect_string, ConnInfo * ci);
-static void dconn_get_common_attributes(const UCHAR FAR * connect_string, ConnInfo * ci);
+void       dconn_get_connect_attributes(const UCHAR FAR * connect_string, ConnInfo *ci);
+static void dconn_get_common_attributes(const UCHAR FAR * connect_string, ConnInfo *ci);
 
 #ifdef WIN32
 BOOL FAR PASCAL dconn_FDriverConnectProc(HWND hdlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
-RETCODE        dconn_DoDialog(HWND hwnd, ConnInfo * ci);
+RETCODE        dconn_DoDialog(HWND hwnd, ConnInfo *ci);
 
-extern HINSTANCE NEAR s_hModule;       /* Saved module handle. */
+extern HINSTANCE NEAR s_hModule;   /* Saved module handle. */
 #endif
 
 
@@ -249,7 +249,7 @@ dialog:
 
 #ifdef WIN32
 RETCODE
-dconn_DoDialog(HWND hwnd, ConnInfo * ci)
+dconn_DoDialog(HWND hwnd, ConnInfo *ci)
 {
    int         dialog_result;
 
@@ -342,7 +342,7 @@ dconn_FDriverConnectProc(
 
 
 void
-dconn_get_connect_attributes(const UCHAR FAR * connect_string, ConnInfo * ci)
+dconn_get_connect_attributes(const UCHAR FAR * connect_string, ConnInfo *ci)
 {
    char       *our_connect_string;
    char       *pair,
@@ -391,7 +391,7 @@ dconn_get_connect_attributes(const UCHAR FAR * connect_string, ConnInfo * ci)
 }
 
 static void
-dconn_get_common_attributes(const UCHAR FAR * connect_string, ConnInfo * ci)
+dconn_get_common_attributes(const UCHAR FAR * connect_string, ConnInfo *ci)
 {
    char       *our_connect_string;
    char       *pair,
index c36c300caf4632e116b366ce09aa6f8fcda79b3c..9bb9615dea4bdfa910da4bf0a5d93227cb6bbed4 100644 (file)
--- a/environ.c
+++ b/environ.c
@@ -494,7 +494,7 @@ EN_Constructor(void)
 
 
 char
-EN_Destructor(EnvironmentClass * self)
+EN_Destructor(EnvironmentClass *self)
 {
    int         lf;
    char        rv = 1;
@@ -523,7 +523,7 @@ EN_Destructor(EnvironmentClass * self)
 
 
 char
-EN_get_error(EnvironmentClass * self, int *number, char **message)
+EN_get_error(EnvironmentClass *self, int *number, char **message)
 {
    if (self && self->errormsg && self->errornumber)
    {
@@ -539,7 +539,7 @@ EN_get_error(EnvironmentClass * self, int *number, char **message)
 
 
 char
-EN_add_connection(EnvironmentClass * self, ConnectionClass * conn)
+EN_add_connection(EnvironmentClass *self, ConnectionClass *conn)
 {
    int         i;
 
@@ -563,7 +563,7 @@ EN_add_connection(EnvironmentClass * self, ConnectionClass * conn)
 
 
 char
-EN_remove_connection(EnvironmentClass * self, ConnectionClass * conn)
+EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn)
 {
    int         i;
 
@@ -579,7 +579,7 @@ EN_remove_connection(EnvironmentClass * self, ConnectionClass * conn)
 
 
 void
-EN_log_error(char *func, char *desc, EnvironmentClass * self)
+EN_log_error(char *func, char *desc, EnvironmentClass *self)
 {
    if (self)
        qlog("ENVIRON ERROR: func=%s, desc='%s', errnum=%d, errmsg='%s'\n", func, desc, self->errornumber, self->errormsg);
index a99a4e5a28575a73c5a89ec700cfb9725ba48cc8..7b463b3e744e093804077c400062d2ed2e61e4c3 100644 (file)
--- a/environ.h
+++ b/environ.h
@@ -22,9 +22,10 @@ struct EnvironmentClass_
 
 /* Environment prototypes */
 EnvironmentClass *EN_Constructor(void);
-char       EN_Destructor(EnvironmentClass * self);
-char       EN_get_error(EnvironmentClass * self, int *number, char **message);
-char       EN_add_connection(EnvironmentClass * self, ConnectionClass * conn);
-char       EN_remove_connection(EnvironmentClass * self, ConnectionClass * conn);
-void       EN_log_error(char *func, char *desc, EnvironmentClass * self);
+char       EN_Destructor(EnvironmentClass *self);
+char       EN_get_error(EnvironmentClass *self, int *number, char **message);
+char       EN_add_connection(EnvironmentClass *self, ConnectionClass *conn);
+char       EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn);
+void       EN_log_error(char *func, char *desc, EnvironmentClass *self);
+
 #endif
diff --git a/gpps.c b/gpps.c
index 658829a5fde11388209cb1e720c9d0da5d2d7e57..3d578c9d77ce04aa46d78a92525acb3455eb4627 100644 (file)
--- a/gpps.c
+++ b/gpps.c
@@ -55,7 +55,7 @@
  * ODBCINSTDIR/ODBCINST_INI
  */
 DWORD
-GetPrivateProfileString(const char *theSection,            /* section name */
+GetPrivateProfileString(const char *theSection, /* section name */
                        const char *theKey,     /* search key name */
                        const char *theDefault, /* default value if not
                                                 * found */
diff --git a/gpps.h b/gpps.h
index f44a266f394078cd5c1f131ce9f9ef7d3d250726..eb1b155c8ad754db949722d6a3f3f2065662634d 100644 (file)
--- a/gpps.h
+++ b/gpps.h
@@ -18,7 +18,7 @@ extern        "C"
 {
 #endif
 
-               DWORD
+   DWORD
                GetPrivateProfileString(const char *theSection, /* section name */
                                                    const char *theKey, /* search key name */
                                                  const char *theDefault,       /* default value if not
@@ -30,7 +30,7 @@ extern        "C"
                                             const char *theIniFileName);       /* pathname of ini file
                                                                                 * to search */
 
-               DWORD
+   DWORD
                WritePrivateProfileString(const char *theSection,       /* section name */
                                                      const char *theKey,       /* write key name */
                                                   const char *theBuffer,       /* input buffer */
@@ -44,4 +44,5 @@ extern        "C"
 #ifndef WIN32
 #undef DWORD
 #endif
+
 #endif
diff --git a/info.c b/info.c
index 0752ab03ab5b01e1d122a7024dc80b18c4d0dcc9..6ffc7cc51b098d3b8b47beb638430b0880b30206 100644 (file)
--- a/info.c
+++ b/info.c
@@ -178,7 +178,7 @@ PGAPI_GetInfo(
            p = CC_is_onlyread(conn) ? "Y" : "N";
            break;
 
-       case SQL_DATABASE_NAME:/* Support for old ODBC 1.0 Apps */
+       case SQL_DATABASE_NAME: /* Support for old ODBC 1.0 Apps */
 
            /*
             * Returning the database name causes problems in MS Query. It
@@ -789,7 +789,7 @@ PGAPI_GetTypeInfo(
 
        if (fSqlType == SQL_ALL_TYPES || fSqlType == sqlType)
        {
-           row = (TupleNode *) malloc(sizeof(TupleNode) + (15 - 1) * sizeof(TupleField));
+           row = (TupleNode *) malloc(sizeof(TupleNode) + (15 - 1) *sizeof(TupleField));
 
            /* These values can't be NULL */
            set_tuplefield_string(&row->tuple[0], pgtype_to_name(stmt, pgType));
@@ -1387,7 +1387,7 @@ PGAPI_Tables(
            (view && show_views) ||
            (regular_table && show_regular_tables))
        {
-           row = (TupleNode *) malloc(sizeof(TupleNode) + (5 - 1) * sizeof(TupleField));
+           row = (TupleNode *) malloc(sizeof(TupleNode) + (5 - 1) *sizeof(TupleField));
 
            set_tuplefield_string(&row->tuple[0], "");
 
@@ -1698,7 +1698,7 @@ PGAPI_Columns(
            /* For OID fields */
            the_type = PG_TYPE_OID;
            row = (TupleNode *) malloc(sizeof(TupleNode) +
-                                (result_cols - 1) * sizeof(TupleField));
+                                 (result_cols - 1) *sizeof(TupleField));
 
            set_tuplefield_string(&row->tuple[0], "");
            /* see note in SQLTables() */
@@ -1727,7 +1727,7 @@ PGAPI_Columns(
    while ((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO))
    {
        row = (TupleNode *) malloc(sizeof(TupleNode) +
-                                (result_cols - 1) * sizeof(TupleField));
+                                  (result_cols - 1) *sizeof(TupleField));
 
 
        set_tuplefield_string(&row->tuple[0], "");
@@ -1761,7 +1761,7 @@ PGAPI_Columns(
        if (field_type == PG_TYPE_NUMERIC)
        {
            if (mod_length >= 4)
-               mod_length -= 4;        /* the length is in atttypmod - 4 */
+               mod_length -= 4;    /* the length is in atttypmod - 4 */
 
            if (mod_length >= 0)
            {
@@ -1785,7 +1785,7 @@ PGAPI_Columns(
            useStaticPrecision = FALSE;
 
            if (mod_length >= 4)
-               mod_length -= 4;        /* the length is in atttypmod - 4 */
+               mod_length -= 4;    /* the length is in atttypmod - 4 */
 
            if (mod_length > ci->drivers.max_varchar_size || mod_length <= 0)
                mod_length = ci->drivers.max_varchar_size;
@@ -1838,7 +1838,7 @@ PGAPI_Columns(
        the_type = PG_TYPE_INT4;
 
        row = (TupleNode *) malloc(sizeof(TupleNode) +
-                                (result_cols - 1) * sizeof(TupleField));
+                                  (result_cols - 1) *sizeof(TupleField));
 
        set_tuplefield_string(&row->tuple[0], "");
        set_tuplefield_string(&row->tuple[1], "");
@@ -1975,7 +1975,7 @@ PGAPI_SpecialColumns(
        /* use the oid value for the rowid */
        if (fColType == SQL_BEST_ROWID)
        {
-           row = (TupleNode *) malloc(sizeof(TupleNode) + (8 - 1) * sizeof(TupleField));
+           row = (TupleNode *) malloc(sizeof(TupleNode) + (8 - 1) *sizeof(TupleField));
 
            set_tuplefield_int2(&row->tuple[0], SQL_SCOPE_SESSION);
            set_tuplefield_string(&row->tuple[1], "oid");
@@ -1995,7 +1995,7 @@ PGAPI_SpecialColumns(
 
            if (atoi(ci->row_versioning))
            {
-               row = (TupleNode *) malloc(sizeof(TupleNode) + (8 - 1) * sizeof(TupleField));
+               row = (TupleNode *) malloc(sizeof(TupleNode) + (8 - 1) *sizeof(TupleField));
 
                set_tuplefield_null(&row->tuple[0]);
                set_tuplefield_string(&row->tuple[1], "xmin");
@@ -2303,7 +2303,7 @@ PGAPI_Statistics(
    if (relhasrules[0] != '1' && atoi(ci->show_oid_column) && atoi(ci->fake_oid_index))
    {
        row = (TupleNode *) malloc(sizeof(TupleNode) +
-                                  (13 - 1) * sizeof(TupleField));
+                                  (13 - 1) *sizeof(TupleField));
 
        /* no table qualifier */
        set_tuplefield_string(&row->tuple[0], "");
@@ -2347,7 +2347,7 @@ PGAPI_Statistics(
            while (i < 16 && fields_vector[i] != 0)
            {
                row = (TupleNode *) malloc(sizeof(TupleNode) +
-                                          (13 - 1) * sizeof(TupleField));
+                                          (13 - 1) *sizeof(TupleField));
 
                /* no table qualifier */
                set_tuplefield_string(&row->tuple[0], "");
@@ -2630,7 +2630,7 @@ PGAPI_PrimaryKeys(
 
    while ((result == SQL_SUCCESS) || (result == SQL_SUCCESS_WITH_INFO))
    {
-       row = (TupleNode *) malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField));
+       row = (TupleNode *) malloc(sizeof(TupleNode) + (result_cols - 1) *sizeof(TupleField));
 
        set_tuplefield_null(&row->tuple[0]);
 
@@ -2698,7 +2698,7 @@ isMultibyte(const unsigned char *str)
    return FALSE;
 }
 static char *
-getClientTableName(ConnectionClass * conn, char *serverTableName, BOOL * nameAlloced)
+getClientTableName(ConnectionClass *conn, char *serverTableName, BOOL *nameAlloced)
 {
    char        query[1024],
                saveoid[24],
@@ -2778,7 +2778,7 @@ getClientTableName(ConnectionClass * conn, char *serverTableName, BOOL * nameAll
    return ret;
 }
 static char *
-getClientColumnName(ConnectionClass * conn, const char *serverTableName, char *serverColumnName, BOOL * nameAlloced)
+getClientColumnName(ConnectionClass *conn, const char *serverTableName, char *serverColumnName, BOOL *nameAlloced)
 {
    char        query[1024],
                saveattrelid[24],
@@ -3277,7 +3277,7 @@ PGAPI_ForeignKeys(
 
            for (k = 0; k < num_keys; k++)
            {
-               row = (TupleNode *) malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField));
+               row = (TupleNode *) malloc(sizeof(TupleNode) + (result_cols - 1) *sizeof(TupleField));
 
 #ifdef MULTIBYTE
                pkey_text = getClientColumnName(conn, pk_table, pkey_ptr, &pkey_alloced);
@@ -3533,7 +3533,7 @@ PGAPI_ForeignKeys(
 #endif  /* MULTIBYTE */
                mylog("pkey_ptr = '%s', fk_table = '%s', fkey_ptr = '%s'\n", pkey_text, fkt_text, fkey_text);
 
-               row = (TupleNode *) malloc(sizeof(TupleNode) + (result_cols - 1) * sizeof(TupleField));
+               row = (TupleNode *) malloc(sizeof(TupleNode) + (result_cols - 1) *sizeof(TupleField));
 
                mylog("pk_table_needed = '%s', pkey_ptr = '%s'\n", pk_table_needed, pkey_text);
                set_tuplefield_null(&row->tuple[0]);
diff --git a/iodbc.h b/iodbc.h
index ca12dd03733e208ee967e88f98705342eb889e26..9d826b3e459cf129f0aca46fb930a4da27c11006 100644 (file)
--- a/iodbc.h
+++ b/iodbc.h
@@ -64,4 +64,5 @@ typedef int BOOL;
 #ifndef    NULL
 #define  NULL              ((void FAR*)0UL)
 #endif
+
 #endif
diff --git a/isql.h b/isql.h
index fafb01594bc4c82b65c7cfff927f0b62b0121be4..ba55856096effbebfce14c6e8f40e8337ec7b003 100644 (file)
--- a/isql.h
+++ b/isql.h
@@ -236,4 +236,5 @@ extern      "C"
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 83e9c83ee2f3e0f81bb085b217d6aaed64840dce..bb5292e864f5ea3312a18bd1c7d0928aca0913a5 100644 (file)
--- a/isqlext.h
+++ b/isqlext.h
@@ -371,13 +371,13 @@ typedef struct
 {
    SQLUINTEGER dwLowWord;
    SQLUINTEGER dwHighWord;
-}          SQLUBIGINT;
+} SQLUBIGINT;
 
 typedef struct
 {
    SQLUINTEGER dwLowWord;
    SQLINTEGER  dwHighWord;
-}          SQLBIGINT;
+} SQLBIGINT;
 #endif  /* GCC */
 
 typedef struct tagDATE_STRUCT
@@ -385,18 +385,18 @@ typedef struct tagDATE_STRUCT
    SQLSMALLINT year;
    SQLUSMALLINT month;
    SQLUSMALLINT day;
-}          DATE_STRUCT,
+} DATE_STRUCT,
 
-           SQL_DATE_STRUCT;
+SQL_DATE_STRUCT;
 
 typedef struct tagTIME_STRUCT
 {
    SQLUSMALLINT hour;
    SQLUSMALLINT minute;
    SQLUSMALLINT second;
-}          TIME_STRUCT,
+} TIME_STRUCT,
 
-           SQL_TIME_STRUCT;
+SQL_TIME_STRUCT;
 
 typedef struct tagTIMESTAMP_STRUCT
 {
@@ -407,9 +407,9 @@ typedef struct tagTIMESTAMP_STRUCT
    SQLUSMALLINT minute;
    SQLUSMALLINT second;
    SQLUINTEGER fraction;
-}          TIMESTAMP_STRUCT,
+} TIMESTAMP_STRUCT,
 
-           SQL_TIMESTAMP_STRUCT;
+SQL_TIMESTAMP_STRUCT;
 
 /* postodbc doesn't use these but what the heck */
 /* Don't know what SQL_MAX_NUMERIC_LEN should be so I can't include this. It's
@@ -430,30 +430,30 @@ typedef struct tagSQLGUID
    WORD        Data2;
    WORD        Data3;
    BYTE        Data4[8];
-}          SQLGUID;
+} SQLGUID;
 
 typedef enum
 {
-               SQL_IS_YEAR = 1,
-               SQL_IS_MONTH = 2,
-               SQL_IS_DAY = 3,
-               SQL_IS_HOUR = 4,
-               SQL_IS_MINUTE = 5,
-               SQL_IS_SECOND = 6,
-               SQL_IS_YEAR_TO_MONTH = 7,
-               SQL_IS_DAY_TO_HOUR = 8,
-               SQL_IS_DAY_TO_MINUTE = 9,
-               SQL_IS_DAY_TO_SECOND = 10,
-               SQL_IS_HOUR_TO_MINUTE = 11,
-               SQL_IS_HOUR_TO_SECOND = 12,
-               SQL_IS_MINUTE_TO_SECOND = 13
-}          SQLINTERVAL;
+   SQL_IS_YEAR = 1,
+   SQL_IS_MONTH = 2,
+   SQL_IS_DAY = 3,
+   SQL_IS_HOUR = 4,
+   SQL_IS_MINUTE = 5,
+   SQL_IS_SECOND = 6,
+   SQL_IS_YEAR_TO_MONTH = 7,
+   SQL_IS_DAY_TO_HOUR = 8,
+   SQL_IS_DAY_TO_MINUTE = 9,
+   SQL_IS_DAY_TO_SECOND = 10,
+   SQL_IS_HOUR_TO_MINUTE = 11,
+   SQL_IS_HOUR_TO_SECOND = 12,
+   SQL_IS_MINUTE_TO_SECOND = 13
+} SQLINTERVAL;
 
 typedef struct tagSQL_YEAR_MONTH
 {
    SQLUINTEGER year;
    SQLUINTEGER month;
-}          SQL_YEAR_MONTH_STRUCT;
+} SQL_YEAR_MONTH_STRUCT;
 
 typedef struct tagSQL_DAY_SECOND
 {
@@ -462,7 +462,7 @@ typedef struct tagSQL_DAY_SECOND
    SQLUINTEGER minute;
    SQLUINTEGER second;
    SQLUINTEGER fraction;
-}          SQL_DAY_SECOND_STRUCT;
+} SQL_DAY_SECOND_STRUCT;
 
 typedef struct tagSQL_INTERVAL_STRUCT
 {
@@ -473,7 +473,7 @@ typedef struct tagSQL_INTERVAL_STRUCT
        SQL_YEAR_MONTH_STRUCT year_month;
        SQL_DAY_SECOND_STRUCT day_second;
    }           intval;
-}          SQL_INTERVAL_STRUCT;
+} SQL_INTERVAL_STRUCT;
 
 #define SQL_MAX_OPTION_STRING_LENGTH   256
 #define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST - SQL_EXT_API_START + 1)
@@ -1556,4 +1556,5 @@ extern        "C"
 #ifdef __cplusplus
 }
 #endif
+
 #endif
diff --git a/lobj.c b/lobj.c
index ab9c287e6a330e56f15c1949c565285817edb367..6b55b82d54e5632edb1b3bcbb2c79728888cb23d 100644 (file)
--- a/lobj.c
+++ b/lobj.c
@@ -18,7 +18,7 @@
 
 
 Oid
-lo_creat(ConnectionClass * conn, int mode)
+lo_creat(ConnectionClass *conn, int mode)
 {
    LO_ARG      argv[1];
    int         retval,
@@ -36,7 +36,7 @@ lo_creat(ConnectionClass * conn, int mode)
 
 
 int
-lo_open(ConnectionClass * conn, int lobjId, int mode)
+lo_open(ConnectionClass *conn, int lobjId, int mode)
 {
    int         fd;
    int         result_len;
@@ -61,7 +61,7 @@ lo_open(ConnectionClass * conn, int lobjId, int mode)
 
 
 int
-lo_close(ConnectionClass * conn, int fd)
+lo_close(ConnectionClass *conn, int fd)
 {
    LO_ARG      argv[1];
    int         retval,
@@ -79,7 +79,7 @@ lo_close(ConnectionClass * conn, int fd)
 
 
 int
-lo_read(ConnectionClass * conn, int fd, char *buf, int len)
+lo_read(ConnectionClass *conn, int fd, char *buf, int len)
 {
    LO_ARG      argv[2];
    int         result_len;
@@ -100,7 +100,7 @@ lo_read(ConnectionClass * conn, int fd, char *buf, int len)
 
 
 int
-lo_write(ConnectionClass * conn, int fd, char *buf, int len)
+lo_write(ConnectionClass *conn, int fd, char *buf, int len)
 {
    LO_ARG      argv[2];
    int         retval,
@@ -125,7 +125,7 @@ lo_write(ConnectionClass * conn, int fd, char *buf, int len)
 
 
 int
-lo_lseek(ConnectionClass * conn, int fd, int offset, int whence)
+lo_lseek(ConnectionClass *conn, int fd, int offset, int whence)
 {
    LO_ARG      argv[3];
    int         retval,
@@ -151,7 +151,7 @@ lo_lseek(ConnectionClass * conn, int fd, int offset, int whence)
 
 
 int
-lo_tell(ConnectionClass * conn, int fd)
+lo_tell(ConnectionClass *conn, int fd)
 {
    LO_ARG      argv[1];
    int         retval,
@@ -169,7 +169,7 @@ lo_tell(ConnectionClass * conn, int fd)
 
 
 int
-lo_unlink(ConnectionClass * conn, Oid lobjId)
+lo_unlink(ConnectionClass *conn, Oid lobjId)
 {
    LO_ARG      argv[1];
    int         retval,
diff --git a/lobj.h b/lobj.h
index f245411c2ceff8f942a379f102be403b6ee16566..4d720488a018339c5432c131710d05e8302e5cc9 100644 (file)
--- a/lobj.h
+++ b/lobj.h
@@ -35,12 +35,13 @@ struct lo_arg
 #define INV_WRITE                  0x00020000
 #define INV_READ                   0x00040000
 
-Oid            lo_creat(ConnectionClass * conn, int mode);
-int            lo_open(ConnectionClass * conn, int lobjId, int mode);
-int            lo_close(ConnectionClass * conn, int fd);
-int            lo_read(ConnectionClass * conn, int fd, char *buf, int len);
-int            lo_write(ConnectionClass * conn, int fd, char *buf, int len);
-int            lo_lseek(ConnectionClass * conn, int fd, int offset, int len);
-int            lo_tell(ConnectionClass * conn, int fd);
-int            lo_unlink(ConnectionClass * conn, Oid lobjId);
+Oid            lo_creat(ConnectionClass *conn, int mode);
+int            lo_open(ConnectionClass *conn, int lobjId, int mode);
+int            lo_close(ConnectionClass *conn, int fd);
+int            lo_read(ConnectionClass *conn, int fd, char *buf, int len);
+int            lo_write(ConnectionClass *conn, int fd, char *buf, int len);
+int            lo_lseek(ConnectionClass *conn, int fd, int offset, int len);
+int            lo_tell(ConnectionClass *conn, int fd);
+int            lo_unlink(ConnectionClass *conn, Oid lobjId);
+
 #endif
diff --git a/misc.h b/misc.h
index 5237af6bbe21628c46f00471bd4c2aab6f39b41d..5cedd4c147e8daeb5172b8548a4b0a059c4de95d 100644 (file)
--- a/misc.h
+++ b/misc.h
@@ -94,4 +94,5 @@ char     *my_strcat(char *buf, const char *fmt, const char *s, int len);
 #define STRCPY_NULL            (-2)
 
 int            my_strcpy(char *dst, int dst_len, const char *src, int src_len);
+
 #endif
index 3b1b1a0fc3c748d5b61891a1eeff269f7cb71af5..4604c14157e7580a20cd063b3b80c1e1854933aa 100644 (file)
--- a/odbcapi.c
+++ b/odbcapi.c
@@ -37,7 +37,7 @@
 #include "connection.h"
 #include "statement.h"
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLAllocConnect(HENV EnvironmentHandle,
                HDBC FAR * ConnectionHandle)
 {
@@ -45,45 +45,45 @@ SQLAllocConnect(HENV EnvironmentHandle,
    return PGAPI_AllocConnect(EnvironmentHandle, ConnectionHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLAllocEnv(HENV FAR * EnvironmentHandle)
 {
    mylog("[SQLAllocEnv]");
    return PGAPI_AllocEnv(EnvironmentHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLAllocStmt(HDBC ConnectionHandle,
-            HSTMT * StatementHandle)
+            HSTMT *StatementHandle)
 {
    mylog("[SQLAllocStmt]");
    return PGAPI_AllocStmt(ConnectionHandle, StatementHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLBindCol(HSTMT StatementHandle,
           SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
           PTR TargetValue, SQLINTEGER BufferLength,
-          SQLINTEGER * StrLen_or_Ind)
+          SQLINTEGER *StrLen_or_Ind)
 {
    mylog("[SQLBindCol]");
    return PGAPI_BindCol(StatementHandle, ColumnNumber,
                   TargetType, TargetValue, BufferLength, StrLen_or_Ind);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLCancel(HSTMT StatementHandle)
 {
    mylog("[SQLCancel]");
    return PGAPI_Cancel(StatementHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLColumns(HSTMT StatementHandle,
-          SQLCHAR * CatalogName, SQLSMALLINT NameLength1,
-          SQLCHAR * SchemaName, SQLSMALLINT NameLength2,
-          SQLCHAR * TableName, SQLSMALLINT NameLength3,
-          SQLCHAR * ColumnName, SQLSMALLINT NameLength4)
+          SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+          SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+          SQLCHAR *TableName, SQLSMALLINT NameLength3,
+          SQLCHAR *ColumnName, SQLSMALLINT NameLength4)
 {
    mylog("[SQLColumns]");
    return PGAPI_Columns(StatementHandle, CatalogName, NameLength1,
@@ -92,18 +92,18 @@ SQLColumns(HSTMT StatementHandle,
 }
 
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLConnect(HDBC ConnectionHandle,
-          SQLCHAR * ServerName, SQLSMALLINT NameLength1,
-          SQLCHAR * UserName, SQLSMALLINT NameLength2,
-          SQLCHAR * Authentication, SQLSMALLINT NameLength3)
+          SQLCHAR *ServerName, SQLSMALLINT NameLength1,
+          SQLCHAR *UserName, SQLSMALLINT NameLength2,
+          SQLCHAR *Authentication, SQLSMALLINT NameLength3)
 {
    mylog("[SQLConnect]");
    return PGAPI_Connect(ConnectionHandle, ServerName, NameLength1,
                     UserName, NameLength2, Authentication, NameLength3);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLDriverConnect(HDBC hdbc,
                 HWND hwnd,
                 UCHAR FAR * szConnStrIn,
@@ -117,26 +117,26 @@ SQLDriverConnect(HDBC hdbc,
    return PGAPI_DriverConnect(hdbc, hwnd, szConnStrIn, cbConnStrIn,
        szConnStrOut, cbConnStrOutMax, pcbConnStrOut, fDriverCompletion);
 }
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLBrowseConnect(
                 HDBC hdbc,
-                SQLCHAR * szConnStrIn,
+                SQLCHAR *szConnStrIn,
                 SQLSMALLINT cbConnStrIn,
-                SQLCHAR * szConnStrOut,
+                SQLCHAR *szConnStrOut,
                 SQLSMALLINT cbConnStrOutMax,
-                SQLSMALLINT * pcbConnStrOut)
+                SQLSMALLINT *pcbConnStrOut)
 {
    mylog("[SQLBrowseConnect]");
    return PGAPI_BrowseConnect(hdbc, szConnStrIn, cbConnStrIn,
                           szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLDataSources(HENV EnvironmentHandle,
-              SQLUSMALLINT Direction, SQLCHAR * ServerName,
-              SQLSMALLINT BufferLength1, SQLSMALLINT * NameLength1,
-              SQLCHAR * Description, SQLSMALLINT BufferLength2,
-              SQLSMALLINT * NameLength2)
+              SQLUSMALLINT Direction, SQLCHAR *ServerName,
+              SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
+              SQLCHAR *Description, SQLSMALLINT BufferLength2,
+              SQLSMALLINT *NameLength2)
 {
    mylog("[SQLDataSources]");
 
@@ -148,12 +148,12 @@ SQLDataSources(HENV EnvironmentHandle,
    return SQL_ERROR;
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLDescribeCol(HSTMT StatementHandle,
-              SQLUSMALLINT ColumnNumber, SQLCHAR * ColumnName,
-              SQLSMALLINT BufferLength, SQLSMALLINT * NameLength,
-              SQLSMALLINT * DataType, SQLUINTEGER * ColumnSize,
-              SQLSMALLINT * DecimalDigits, SQLSMALLINT * Nullable)
+              SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
+              SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
+              SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
+              SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
 {
    mylog("[SQLDescribeCol]");
    return PGAPI_DescribeCol(StatementHandle, ColumnNumber,
@@ -161,41 +161,41 @@ SQLDescribeCol(HSTMT StatementHandle,
                          DataType, ColumnSize, DecimalDigits, Nullable);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLDisconnect(HDBC ConnectionHandle)
 {
    mylog("[SQLDisconnect]");
    return PGAPI_Disconnect(ConnectionHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLError(HENV EnvironmentHandle,
         HDBC ConnectionHandle, HSTMT StatementHandle,
-        SQLCHAR * Sqlstate, SQLINTEGER * NativeError,
-        SQLCHAR * MessageText, SQLSMALLINT BufferLength,
-        SQLSMALLINT * TextLength)
+        SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
+        SQLCHAR *MessageText, SQLSMALLINT BufferLength,
+        SQLSMALLINT *TextLength)
 {
    mylog("[SQLError]");
    return PGAPI_Error(EnvironmentHandle, ConnectionHandle, StatementHandle,
           Sqlstate, NativeError, MessageText, BufferLength, TextLength);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLExecDirect(HSTMT StatementHandle,
-             SQLCHAR * StatementText, SQLINTEGER TextLength)
+             SQLCHAR *StatementText, SQLINTEGER TextLength)
 {
    mylog("[SQLExecDirect]");
    return PGAPI_ExecDirect(StatementHandle, StatementText, TextLength);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLExecute(HSTMT StatementHandle)
 {
    mylog("[SQLExecute]");
    return PGAPI_Execute(StatementHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLFetch(HSTMT StatementHandle)
 {
    static char *func = "SQLFetch";
@@ -218,21 +218,21 @@ SQLFetch(HSTMT StatementHandle)
    return PGAPI_Fetch(StatementHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLFreeConnect(HDBC ConnectionHandle)
 {
    mylog("[SQLFreeStmt]");
    return PGAPI_FreeConnect(ConnectionHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLFreeEnv(HENV EnvironmentHandle)
 {
    mylog("[SQLFreeEnv]");
    return PGAPI_FreeEnv(EnvironmentHandle);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLFreeStmt(HSTMT StatementHandle,
            SQLUSMALLINT Option)
 {
@@ -240,37 +240,37 @@ SQLFreeStmt(HSTMT StatementHandle,
    return PGAPI_FreeStmt(StatementHandle, Option);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetConnectOption(HDBC ConnectionHandle,
                    SQLUSMALLINT Option, PTR Value)
 {
    mylog("[SQLGetConnectOption]");
    return PGAPI_GetConnectOption(ConnectionHandle, Option, Value);
 }
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetCursorName(HSTMT StatementHandle,
-                SQLCHAR * CursorName, SQLSMALLINT BufferLength,
-                SQLSMALLINT * NameLength)
+                SQLCHAR *CursorName, SQLSMALLINT BufferLength,
+                SQLSMALLINT *NameLength)
 {
    mylog("[SQLGetCursorName]");
    return PGAPI_GetCursorName(StatementHandle, CursorName, BufferLength,
                               NameLength);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetData(HSTMT StatementHandle,
           SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
           PTR TargetValue, SQLINTEGER BufferLength,
-          SQLINTEGER * StrLen_or_Ind)
+          SQLINTEGER *StrLen_or_Ind)
 {
    mylog("[SQLGetData]");
    return PGAPI_GetData(StatementHandle, ColumnNumber, TargetType,
                         TargetValue, BufferLength, StrLen_or_Ind);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetFunctions(HDBC ConnectionHandle,
-               SQLUSMALLINT FunctionId, SQLUSMALLINT * Supported)
+               SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported)
 {
    mylog("[SQLGetFunctions]");
 #if (ODBCVER >= 0x3000)
@@ -279,10 +279,10 @@ SQLGetFunctions(HDBC ConnectionHandle,
 #endif
    return PGAPI_GetFunctions(ConnectionHandle, FunctionId, Supported);
 }
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetInfo(HDBC ConnectionHandle,
           SQLUSMALLINT InfoType, PTR InfoValue,
-          SQLSMALLINT BufferLength, SQLSMALLINT * StringLength)
+          SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
 {
 #if (ODBCVER >= 0x3000)
    RETCODE     ret;
@@ -303,7 +303,7 @@ SQLGetInfo(HDBC ConnectionHandle,
 #endif
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetStmtOption(HSTMT StatementHandle,
                 SQLUSMALLINT Option, PTR Value)
 {
@@ -311,7 +311,7 @@ SQLGetStmtOption(HSTMT StatementHandle,
    return PGAPI_GetStmtOption(StatementHandle, Option, Value);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetTypeInfo(HSTMT StatementHandle,
               SQLSMALLINT DataType)
 {
@@ -319,31 +319,31 @@ SQLGetTypeInfo(HSTMT StatementHandle,
    return PGAPI_GetTypeInfo(StatementHandle, DataType);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLNumResultCols(HSTMT StatementHandle,
-                SQLSMALLINT * ColumnCount)
+                SQLSMALLINT *ColumnCount)
 {
    mylog("[SQLNumResultCols]");
    return PGAPI_NumResultCols(StatementHandle, ColumnCount);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLParamData(HSTMT StatementHandle,
-            PTR * Value)
+            PTR *Value)
 {
    mylog("[SQLParamData]");
    return PGAPI_ParamData(StatementHandle, Value);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLPrepare(HSTMT StatementHandle,
-          SQLCHAR * StatementText, SQLINTEGER TextLength)
+          SQLCHAR *StatementText, SQLINTEGER TextLength)
 {
    mylog("[SQLPrepare]");
    return PGAPI_Prepare(StatementHandle, StatementText, TextLength);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLPutData(HSTMT StatementHandle,
           PTR Data, SQLINTEGER StrLen_or_Ind)
 {
@@ -351,15 +351,15 @@ SQLPutData(HSTMT StatementHandle,
    return PGAPI_PutData(StatementHandle, Data, StrLen_or_Ind);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLRowCount(HSTMT StatementHandle,
-           SQLINTEGER * RowCount)
+           SQLINTEGER *RowCount)
 {
    mylog("[SQLRowCount]");
    return PGAPI_RowCount(StatementHandle, RowCount);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetConnectOption(HDBC ConnectionHandle,
                    SQLUSMALLINT Option, SQLUINTEGER Value)
 {
@@ -367,20 +367,20 @@ SQLSetConnectOption(HDBC ConnectionHandle,
    return PGAPI_SetConnectOption(ConnectionHandle, Option, Value);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetCursorName(HSTMT StatementHandle,
-                SQLCHAR * CursorName, SQLSMALLINT NameLength)
+                SQLCHAR *CursorName, SQLSMALLINT NameLength)
 {
    mylog("[SQLSetCursorName]");
    return PGAPI_SetCursorName(StatementHandle, CursorName, NameLength);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetParam(HSTMT StatementHandle,
            SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
            SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
            SQLSMALLINT ParameterScale, PTR ParameterValue,
-           SQLINTEGER * StrLen_or_Ind)
+           SQLINTEGER *StrLen_or_Ind)
 {
    mylog("[SQLSetParam]");
 
@@ -392,7 +392,7 @@ SQLSetParam(HSTMT StatementHandle,
    return SQL_ERROR;
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetStmtOption(HSTMT StatementHandle,
                 SQLUSMALLINT Option, SQLUINTEGER Value)
 {
@@ -400,11 +400,11 @@ SQLSetStmtOption(HSTMT StatementHandle,
    return PGAPI_SetStmtOption(StatementHandle, Option, Value);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSpecialColumns(HSTMT StatementHandle,
-                 SQLUSMALLINT IdentifierType, SQLCHAR * CatalogName,
-                 SQLSMALLINT NameLength1, SQLCHAR * SchemaName,
-                 SQLSMALLINT NameLength2, SQLCHAR * TableName,
+                 SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
+                 SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
+                 SQLSMALLINT NameLength2, SQLCHAR *TableName,
                  SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
                  SQLUSMALLINT Nullable)
 {
@@ -414,11 +414,11 @@ SQLSpecialColumns(HSTMT StatementHandle,
                                Scope, Nullable);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLStatistics(HSTMT StatementHandle,
-             SQLCHAR * CatalogName, SQLSMALLINT NameLength1,
-             SQLCHAR * SchemaName, SQLSMALLINT NameLength2,
-             SQLCHAR * TableName, SQLSMALLINT NameLength3,
+             SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+             SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+             SQLCHAR *TableName, SQLSMALLINT NameLength3,
              SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
 {
    mylog("[SQLStatistics]");
@@ -427,12 +427,12 @@ SQLStatistics(HSTMT StatementHandle,
                            Reserved);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLTables(HSTMT StatementHandle,
-         SQLCHAR * CatalogName, SQLSMALLINT NameLength1,
-         SQLCHAR * SchemaName, SQLSMALLINT NameLength2,
-         SQLCHAR * TableName, SQLSMALLINT NameLength3,
-         SQLCHAR * TableType, SQLSMALLINT NameLength4)
+         SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+         SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+         SQLCHAR *TableName, SQLSMALLINT NameLength3,
+         SQLCHAR *TableType, SQLSMALLINT NameLength4)
 {
    mylog("[SQLTables]");
    return PGAPI_Tables(StatementHandle, CatalogName, NameLength1,
@@ -440,7 +440,7 @@ SQLTables(HSTMT StatementHandle,
                        TableType, NameLength4);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLTransact(HENV EnvironmentHandle,
            HDBC ConnectionHandle, SQLUSMALLINT CompletionType)
 {
@@ -448,31 +448,31 @@ SQLTransact(HENV EnvironmentHandle,
    return PGAPI_Transact(EnvironmentHandle, ConnectionHandle, CompletionType);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLColAttributes(
                 HSTMT hstmt,
                 SQLUSMALLINT icol,
                 SQLUSMALLINT fDescType,
                 PTR rgbDesc,
                 SQLSMALLINT cbDescMax,
-                SQLSMALLINT * pcbDesc,
-                SQLINTEGER * pfDesc)
+                SQLSMALLINT *pcbDesc,
+                SQLINTEGER *pfDesc)
 {
    mylog("[SQLColAttributes]");
    return PGAPI_ColAttributes(hstmt, icol, fDescType, rgbDesc,
                               cbDescMax, pcbDesc, pfDesc);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLColumnPrivileges(
                    HSTMT hstmt,
-                   SQLCHAR * szCatalogName,
+                   SQLCHAR *szCatalogName,
                    SQLSMALLINT cbCatalogName,
-                   SQLCHAR * szSchemaName,
+                   SQLCHAR *szSchemaName,
                    SQLSMALLINT cbSchemaName,
-                   SQLCHAR * szTableName,
+                   SQLCHAR *szTableName,
                    SQLSMALLINT cbTableName,
-                   SQLCHAR * szColumnName,
+                   SQLCHAR *szColumnName,
                    SQLSMALLINT cbColumnName)
 {
    mylog("[SQLColumnPrivileges]");
@@ -481,46 +481,46 @@ SQLColumnPrivileges(
                                  szColumnName, cbColumnName);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLDescribeParam(
                 HSTMT hstmt,
                 SQLUSMALLINT ipar,
-                SQLSMALLINT * pfSqlType,
-                SQLUINTEGER * pcbParamDef,
-                SQLSMALLINT * pibScale,
-                SQLSMALLINT * pfNullable)
+                SQLSMALLINT *pfSqlType,
+                SQLUINTEGER *pcbParamDef,
+                SQLSMALLINT *pibScale,
+                SQLSMALLINT *pfNullable)
 {
    mylog("[SQLDescribeParam]");
    return PGAPI_DescribeParam(hstmt, ipar, pfSqlType, pcbParamDef,
                               pibScale, pfNullable);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLExtendedFetch(
                 HSTMT hstmt,
                 SQLUSMALLINT fFetchType,
                 SQLINTEGER irow,
-                SQLUINTEGER * pcrow,
-                SQLUSMALLINT * rgfRowStatus)
+                SQLUINTEGER *pcrow,
+                SQLUSMALLINT *rgfRowStatus)
 {
    mylog("[SQLExtendedFetch]");
    return PGAPI_ExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLForeignKeys(
               HSTMT hstmt,
-              SQLCHAR * szPkCatalogName,
+              SQLCHAR *szPkCatalogName,
               SQLSMALLINT cbPkCatalogName,
-              SQLCHAR * szPkSchemaName,
+              SQLCHAR *szPkSchemaName,
               SQLSMALLINT cbPkSchemaName,
-              SQLCHAR * szPkTableName,
+              SQLCHAR *szPkTableName,
               SQLSMALLINT cbPkTableName,
-              SQLCHAR * szFkCatalogName,
+              SQLCHAR *szFkCatalogName,
               SQLSMALLINT cbFkCatalogName,
-              SQLCHAR * szFkSchemaName,
+              SQLCHAR *szFkSchemaName,
               SQLSMALLINT cbFkSchemaName,
-              SQLCHAR * szFkTableName,
+              SQLCHAR *szFkTableName,
               SQLSMALLINT cbFkTableName)
 {
    mylog("[SQLForeignKeys]");
@@ -530,54 +530,54 @@ SQLForeignKeys(
           szFkSchemaName, cbFkSchemaName, szFkTableName, cbFkTableName);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLMoreResults(HSTMT hstmt)
 {
    mylog("[SQLMoreResults]");
    return PGAPI_MoreResults(hstmt);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLNativeSql(
             HDBC hdbc,
-            SQLCHAR * szSqlStrIn,
+            SQLCHAR *szSqlStrIn,
             SQLINTEGER cbSqlStrIn,
-            SQLCHAR * szSqlStr,
+            SQLCHAR *szSqlStr,
             SQLINTEGER cbSqlStrMax,
-            SQLINTEGER * pcbSqlStr)
+            SQLINTEGER *pcbSqlStr)
 {
    mylog("[SQLNativeSql]");
    return PGAPI_NativeSql(hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr,
                           cbSqlStrMax, pcbSqlStr);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLNumParams(
             HSTMT hstmt,
-            SQLSMALLINT * pcpar)
+            SQLSMALLINT *pcpar)
 {
    mylog("[SQLNumParams]");
    return PGAPI_NumParams(hstmt, pcpar);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLParamOptions(
                HSTMT hstmt,
                SQLUINTEGER crow,
-               SQLUINTEGER * pirow)
+               SQLUINTEGER *pirow)
 {
    mylog("[SQLParamOptions]");
    return PGAPI_ParamOptions(hstmt, crow, pirow);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLPrimaryKeys(
               HSTMT hstmt,
-              SQLCHAR * szCatalogName,
+              SQLCHAR *szCatalogName,
               SQLSMALLINT cbCatalogName,
-              SQLCHAR * szSchemaName,
+              SQLCHAR *szSchemaName,
               SQLSMALLINT cbSchemaName,
-              SQLCHAR * szTableName,
+              SQLCHAR *szTableName,
               SQLSMALLINT cbTableName)
 {
    mylog("[SQLPrimaryKeys]");
@@ -585,16 +585,16 @@ SQLPrimaryKeys(
                   szSchemaName, cbSchemaName, szTableName, cbTableName);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLProcedureColumns(
                    HSTMT hstmt,
-                   SQLCHAR * szCatalogName,
+                   SQLCHAR *szCatalogName,
                    SQLSMALLINT cbCatalogName,
-                   SQLCHAR * szSchemaName,
+                   SQLCHAR *szSchemaName,
                    SQLSMALLINT cbSchemaName,
-                   SQLCHAR * szProcName,
+                   SQLCHAR *szProcName,
                    SQLSMALLINT cbProcName,
-                   SQLCHAR * szColumnName,
+                   SQLCHAR *szColumnName,
                    SQLSMALLINT cbColumnName)
 {
    mylog("[SQLProcedureColumns]");
@@ -603,14 +603,14 @@ SQLProcedureColumns(
                                  szColumnName, cbColumnName);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLProcedures(
              HSTMT hstmt,
-             SQLCHAR * szCatalogName,
+             SQLCHAR *szCatalogName,
              SQLSMALLINT cbCatalogName,
-             SQLCHAR * szSchemaName,
+             SQLCHAR *szSchemaName,
              SQLSMALLINT cbSchemaName,
-             SQLCHAR * szProcName,
+             SQLCHAR *szProcName,
              SQLSMALLINT cbProcName)
 {
    mylog("[SQLProcedures]");
@@ -618,7 +618,7 @@ SQLProcedures(
                     szSchemaName, cbSchemaName, szProcName, cbProcName);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetPos(
          HSTMT hstmt,
          SQLUSMALLINT irow,
@@ -629,14 +629,14 @@ SQLSetPos(
    return PGAPI_SetPos(hstmt, irow, fOption, fLock);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLTablePrivileges(
                   HSTMT hstmt,
-                  SQLCHAR * szCatalogName,
+                  SQLCHAR *szCatalogName,
                   SQLSMALLINT cbCatalogName,
-                  SQLCHAR * szSchemaName,
+                  SQLCHAR *szSchemaName,
                   SQLSMALLINT cbSchemaName,
-                  SQLCHAR * szTableName,
+                  SQLCHAR *szTableName,
                   SQLSMALLINT cbTableName)
 {
    mylog("[SQLTablePrivileges]");
@@ -644,7 +644,7 @@ SQLTablePrivileges(
                   szSchemaName, cbSchemaName, szTableName, cbTableName);
 }
 
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLBindParameter(
                 HSTMT hstmt,
                 SQLUSMALLINT ipar,
@@ -655,7 +655,7 @@ SQLBindParameter(
                 SQLSMALLINT ibScale,
                 PTR rgbValue,
                 SQLINTEGER cbValueMax,
-                SQLINTEGER * pcbValue)
+                SQLINTEGER *pcbValue)
 {
    mylog("[SQLBindParameter]");
    return PGAPI_BindParameter(hstmt, ipar, fParamType, fCType,
index ccd214a69dcc3a5bdae142b508332dabb1506c1e..161940aed877d65e412904508e4724cefb2cb50b 100644 (file)
@@ -29,7 +29,7 @@
 #include "pgapifunc.h"
 
 /* SQLAllocConnect/SQLAllocEnv/SQLAllocStmt -> SQLAllocHandle */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLAllocHandle(SQLSMALLINT HandleType,
               SQLHANDLE InputHandle, SQLHANDLE * OutputHandle)
 {
@@ -49,12 +49,12 @@ SQLAllocHandle(SQLSMALLINT HandleType,
 }
 
 /* SQLBindParameter/SQLSetParam -> SQLBindParam */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLBindParam(HSTMT StatementHandle,
             SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
             SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
             SQLSMALLINT ParameterScale, PTR ParameterValue,
-            SQLINTEGER * StrLen_or_Ind)
+            SQLINTEGER *StrLen_or_Ind)
 {
    int         BufferLength = 512;     /* Is it OK ? */
 
@@ -63,7 +63,7 @@ SQLBindParam(HSTMT StatementHandle,
 }
 
 /* New function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLCloseCursor(HSTMT StatementHandle)
 {
    mylog("[[SQLCloseCursor]]");
@@ -71,11 +71,11 @@ SQLCloseCursor(HSTMT StatementHandle)
 }
 
 /* SQLColAttributes -> SQLColAttribute */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLColAttribute(HSTMT StatementHandle,
                SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
                PTR CharacterAttribute, SQLSMALLINT BufferLength,
-               SQLSMALLINT * StringLength, PTR NumericAttribute)
+               SQLSMALLINT *StringLength, PTR NumericAttribute)
 {
    mylog("[[SQLColAttribute]]");
    return PGAPI_ColAttributes(StatementHandle, ColumnNumber,
@@ -84,7 +84,7 @@ SQLColAttribute(HSTMT StatementHandle,
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLCopyDesc(SQLHDESC SourceDescHandle,
            SQLHDESC TargetDescHandle)
 {
@@ -93,7 +93,7 @@ SQLCopyDesc(SQLHDESC SourceDescHandle,
 }
 
 /* SQLTransact -> SQLEndTran */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
           SQLSMALLINT CompletionType)
 {
@@ -113,7 +113,7 @@ SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
 }
 
 /* SQLExtendedFetch -> SQLFetchScroll */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLFetchScroll(HSTMT StatementHandle,
               SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
 {
@@ -144,7 +144,7 @@ SQLFetchScroll(HSTMT StatementHandle,
 }
 
 /* SQLFree(Connect/Env/Stmt) -> SQLFreeHandle */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
 {
    mylog("[[SQLFreeHandle]]");
@@ -163,46 +163,46 @@ SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetDescField(SQLHDESC DescriptorHandle,
                SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
                PTR Value, SQLINTEGER BufferLength,
-               SQLINTEGER * StringLength)
+               SQLINTEGER *StringLength)
 {
    mylog("[[SQLGetDescField]]\n");
    return SQL_ERROR;
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetDescRec(SQLHDESC DescriptorHandle,
-             SQLSMALLINT RecNumber, SQLCHAR * Name,
-             SQLSMALLINT BufferLength, SQLSMALLINT * StringLength,
-             SQLSMALLINT * Type, SQLSMALLINT * SubType,
-             SQLINTEGER * Length, SQLSMALLINT * Precision,
-             SQLSMALLINT * Scale, SQLSMALLINT * Nullable)
+             SQLSMALLINT RecNumber, SQLCHAR *Name,
+             SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
+             SQLSMALLINT *Type, SQLSMALLINT *SubType,
+             SQLINTEGER *Length, SQLSMALLINT *Precision,
+             SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
 {
    mylog("[[SQLGetDescRec]]\n");
    return SQL_ERROR;
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
                SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
                PTR DiagInfo, SQLSMALLINT BufferLength,
-               SQLSMALLINT * StringLength)
+               SQLSMALLINT *StringLength)
 {
    mylog("[[SQLGetDiagField]]\n");
    return SQL_ERROR;
 }
 
 /* SQLError -> SQLDiagRec */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
-             SQLSMALLINT RecNumber, SQLCHAR * Sqlstate,
-             SQLINTEGER * NativeError, SQLCHAR * MessageText,
-             SQLSMALLINT BufferLength, SQLSMALLINT * TextLength)
+             SQLSMALLINT RecNumber, SQLCHAR *Sqlstate,
+             SQLINTEGER *NativeError, SQLCHAR *MessageText,
+             SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
 {
    RETCODE     ret;
 
@@ -240,10 +240,10 @@ SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetEnvAttr(HENV EnvironmentHandle,
              SQLINTEGER Attribute, PTR Value,
-             SQLINTEGER BufferLength, SQLINTEGER * StringLength)
+             SQLINTEGER BufferLength, SQLINTEGER *StringLength)
 {
    EnvironmentClass *env = (EnvironmentClass *) EnvironmentHandle;
 
@@ -270,10 +270,10 @@ SQLGetEnvAttr(HENV EnvironmentHandle,
 }
 
 /* SQLGetConnectOption -> SQLGetconnectAttr */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetConnectAttr(HDBC ConnectionHandle,
                  SQLINTEGER Attribute, PTR Value,
-                 SQLINTEGER BufferLength, SQLINTEGER * StringLength)
+                 SQLINTEGER BufferLength, SQLINTEGER *StringLength)
 {
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
@@ -293,10 +293,10 @@ SQLGetConnectAttr(HDBC ConnectionHandle,
 }
 
 /* SQLGetStmtOption -> SQLGetStmtAttr */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLGetStmtAttr(HSTMT StatementHandle,
               SQLINTEGER Attribute, PTR Value,
-              SQLINTEGER BufferLength, SQLINTEGER * StringLength)
+              SQLINTEGER BufferLength, SQLINTEGER *StringLength)
 {
    static char *func = "SQLGetStmtAttr";
    StatementClass *stmt = (StatementClass *) StatementHandle;
@@ -341,7 +341,7 @@ SQLGetStmtAttr(HSTMT StatementHandle,
            *((HSTMT *) Value) = StatementHandle;       /* this is useless */
            len = 4;
            break;
-       case SQL_ATTR_AUTO_IPD:/* 10001 */
+       case SQL_ATTR_AUTO_IPD: /* 10001 */
        case SQL_ATTR_ROW_BIND_TYPE:    /* == SQL_BIND_TYPE */
        case SQL_ATTR_PARAMSET_SIZE:    /* 22 */
        case SQL_ATTR_PARAM_STATUS_PTR: /* 20 */
@@ -376,7 +376,7 @@ SQLGetStmtAttr(HSTMT StatementHandle,
 }
 
 /* SQLSetConnectOption -> SQLSetConnectAttr */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetConnectAttr(HDBC ConnectionHandle,
                  SQLINTEGER Attribute, PTR Value,
                  SQLINTEGER StringLength)
@@ -399,7 +399,7 @@ SQLSetConnectAttr(HDBC ConnectionHandle,
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetDescField(SQLHDESC DescriptorHandle,
                SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
                PTR Value, SQLINTEGER BufferLength)
@@ -409,20 +409,20 @@ SQLSetDescField(SQLHDESC DescriptorHandle,
 }
 
 /* new fucntion */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetDescRec(SQLHDESC DescriptorHandle,
              SQLSMALLINT RecNumber, SQLSMALLINT Type,
              SQLSMALLINT SubType, SQLINTEGER Length,
              SQLSMALLINT Precision, SQLSMALLINT Scale,
-             PTR Data, SQLINTEGER * StringLength,
-             SQLINTEGER * Indicator)
+             PTR Data, SQLINTEGER *StringLength,
+             SQLINTEGER *Indicator)
 {
    mylog("[[SQLsetDescRec]]\n");
    return SQL_ERROR;
 }
 
 /* new function */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetEnvAttr(HENV EnvironmentHandle,
              SQLINTEGER Attribute, PTR Value,
              SQLINTEGER StringLength)
@@ -457,7 +457,7 @@ SQLSetEnvAttr(HENV EnvironmentHandle,
 }
 
 /* SQLSet(Param/Scroll/Stmt)Option -> SQLSetStmtAttr */
-RETCODE SQL_API
+RETCODE        SQL_API
 SQLSetStmtAttr(HSTMT StatementHandle,
               SQLINTEGER Attribute, PTR Value,
               SQLINTEGER StringLength)
@@ -481,8 +481,8 @@ SQLSetStmtAttr(HSTMT StatementHandle,
 
        case SQL_ATTR_APP_ROW_DESC:     /* 10010 */
        case SQL_ATTR_APP_PARAM_DESC:   /* 10011 */
-       case SQL_ATTR_AUTO_IPD:/* 10001 */
-           /* case SQL_ATTR_ROW_BIND_TYPE: *//* == SQL_BIND_TYPE */
+       case SQL_ATTR_AUTO_IPD: /* 10001 */
+           /* case SQL_ATTR_ROW_BIND_TYPE: */  /* == SQL_BIND_TYPE */
        case SQL_ATTR_IMP_ROW_DESC:     /* 10012 */
        case SQL_ATTR_IMP_PARAM_DESC:   /* 10013 */
        case SQL_ATTR_METADATA_ID:      /* 10014 */
@@ -607,7 +607,7 @@ PGAPI_GetFunctions30(HDBC hdbc, UWORD fFunction, UWORD FAR * pfExists)
    SQL_FUNC_ESET(pfExists, SQL_API_SQLSETPOS); /* 68 */
    SQL_FUNC_ESET(pfExists, SQL_API_SQLSETSCROLLOPTIONS);       /* 69 deprecated */
    SQL_FUNC_ESET(pfExists, SQL_API_SQLTABLEPRIVILEGES);        /* 70 */
-   /* SQL_FUNC_ESET(pfExists, SQL_API_SQLDRIVERS); *//* 71 */
+   /* SQL_FUNC_ESET(pfExists, SQL_API_SQLDRIVERS); */  /* 71 */
    SQL_FUNC_ESET(pfExists, SQL_API_SQLBINDPARAMETER);  /* 72 */
 
    SQL_FUNC_ESET(pfExists, SQL_API_SQLALLOCHANDLE);    /* 1001 */
index 5668d8f2d112df6b471c0f1a8bed92350c162372..04331456c91a1871fdad3e0b16bb1a762918af94 100644 (file)
--- a/options.c
+++ b/options.c
 
 
 
-RETCODE set_statement_option(ConnectionClass * conn,
-                    StatementClass * stmt,
+RETCODE set_statement_option(ConnectionClass *conn,
+                    StatementClass *stmt,
                     UWORD fOption,
                     UDWORD vParam);
 
 
 RETCODE
-set_statement_option(ConnectionClass * conn,
-                    StatementClass * stmt,
+set_statement_option(ConnectionClass *conn,
+                    StatementClass *stmt,
                     UWORD fOption,
                     UDWORD vParam)
 {
@@ -173,12 +173,12 @@ set_statement_option(ConnectionClass * conn,
            mylog("SetStmtOption: SQL_NOSCAN, vParam = %d\n", vParam);
            break;
 
-       case SQL_QUERY_TIMEOUT:/* ignored */
+       case SQL_QUERY_TIMEOUT: /* ignored */
            mylog("SetStmtOption: SQL_QUERY_TIMEOUT, vParam = %d\n", vParam);
            /* "0" returned in SQLGetStmtOption */
            break;
 
-       case SQL_RETRIEVE_DATA:/* ignored, but saved */
+       case SQL_RETRIEVE_DATA: /* ignored, but saved */
            mylog("SetStmtOption(): SQL_RETRIEVE_DATA, vParam = %d\n", vParam);
            if (conn)
                conn->stmtOptions.retrieve_data = vParam;
@@ -373,7 +373,7 @@ PGAPI_SetConnectOption(
        case SQL_CURRENT_QUALIFIER:     /* ignored */
            break;
 
-       case SQL_LOGIN_TIMEOUT:/* ignored */
+       case SQL_LOGIN_TIMEOUT: /* ignored */
            break;
 
        case SQL_PACKET_SIZE:   /* ignored */
@@ -382,7 +382,7 @@ PGAPI_SetConnectOption(
        case SQL_QUIET_MODE:    /* ignored */
            break;
 
-       case SQL_TXN_ISOLATION:/* ignored */
+       case SQL_TXN_ISOLATION: /* ignored */
            break;
 
            /* These options should be handled by driver manager */
@@ -462,7 +462,7 @@ PGAPI_GetConnectOption(
 
            break;
 
-       case SQL_LOGIN_TIMEOUT:/* NOT SUPPORTED */
+       case SQL_LOGIN_TIMEOUT: /* NOT SUPPORTED */
            *((UDWORD *) pvParam) = 0;
            break;
 
@@ -474,7 +474,7 @@ PGAPI_GetConnectOption(
            *((UDWORD *) pvParam) = (UDWORD) NULL;
            break;
 
-       case SQL_TXN_ISOLATION:/* NOT SUPPORTED */
+       case SQL_TXN_ISOLATION: /* NOT SUPPORTED */
            *((UDWORD *) pvParam) = SQL_TXN_SERIALIZABLE;
            break;
 
@@ -632,11 +632,11 @@ PGAPI_GetStmtOption(
            *((SDWORD *) pvParam) = SQL_NOSCAN_ON;
            break;
 
-       case SQL_QUERY_TIMEOUT:/* NOT SUPPORTED */
+       case SQL_QUERY_TIMEOUT: /* NOT SUPPORTED */
            *((SDWORD *) pvParam) = 0;
            break;
 
-       case SQL_RETRIEVE_DATA:/* NOT SUPPORTED, but saved */
+       case SQL_RETRIEVE_DATA: /* NOT SUPPORTED, but saved */
            *((SDWORD *) pvParam) = stmt->options.retrieve_data;
            break;
 
diff --git a/parse.c b/parse.c
index 60d16d5c1ceb79f981fc3ce950ebbdce8296d202..8a90cce35a5ca923efac0fb680bb456ff4579721 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -43,8 +43,8 @@
 #define COL_INCR   16
 
 char      *getNextToken(char *s, char *token, int smax, char *delim, char *quote, char *dquote, char *numeric);
-void       getColInfo(COL_INFO * col_info, FIELD_INFO * fi, int k);
-char       searchColInfo(COL_INFO * col_info, FIELD_INFO * fi);
+void       getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k);
+char       searchColInfo(COL_INFO *col_info, FIELD_INFO *fi);
 
 
 char *
@@ -216,7 +216,7 @@ QR_set_field_info(stmt->result, 13, "FIELD_TYPE", PG_TYPE_INT4, 4);
 #endif
 
 void
-getColInfo(COL_INFO * col_info, FIELD_INFO * fi, int k)
+getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k)
 {
    char       *str;
 
@@ -236,7 +236,7 @@ getColInfo(COL_INFO * col_info, FIELD_INFO * fi, int k)
 
 
 char
-searchColInfo(COL_INFO * col_info, FIELD_INFO * fi)
+searchColInfo(COL_INFO *col_info, FIELD_INFO *fi)
 {
    int         k,
                cmp;
@@ -265,7 +265,7 @@ searchColInfo(COL_INFO * col_info, FIELD_INFO * fi)
 
 
 char
-parse_statement(StatementClass * stmt)
+parse_statement(StatementClass *stmt)
 {
    static char *func = "parse_statement";
    char        token[256];
index 465808f0ea7346281324bb773f51a0e0ea91bfb1..dadabe1fac86fbfc4ee60f97aa471cb12416ba35 100644 (file)
@@ -15,47 +15,47 @@ RETCODE SQL_API PGAPI_AllocConnect(HENV EnvironmentHandle,
                   HDBC FAR * ConnectionHandle);
 RETCODE SQL_API PGAPI_AllocEnv(HENV FAR * EnvironmentHandle);
 RETCODE SQL_API PGAPI_AllocStmt(HDBC ConnectionHandle,
-               HSTMT * StatementHandle);
+               HSTMT *StatementHandle);
 RETCODE SQL_API PGAPI_BindCol(HSTMT StatementHandle,
              SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
              PTR TargetValue, SQLINTEGER BufferLength,
-             SQLINTEGER * StrLen_or_Ind);
+             SQLINTEGER *StrLen_or_Ind);
 RETCODE SQL_API PGAPI_Cancel(HSTMT StatementHandle);
 RETCODE SQL_API PGAPI_Columns(HSTMT StatementHandle,
-             SQLCHAR * CatalogName, SQLSMALLINT NameLength1,
-             SQLCHAR * SchemaName, SQLSMALLINT NameLength2,
-             SQLCHAR * TableName, SQLSMALLINT NameLength3,
-             SQLCHAR * ColumnName, SQLSMALLINT NameLength4);
+             SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+             SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+             SQLCHAR *TableName, SQLSMALLINT NameLength3,
+             SQLCHAR *ColumnName, SQLSMALLINT NameLength4);
 RETCODE SQL_API PGAPI_Connect(HDBC ConnectionHandle,
-             SQLCHAR * ServerName, SQLSMALLINT NameLength1,
-             SQLCHAR * UserName, SQLSMALLINT NameLength2,
-             SQLCHAR * Authentication, SQLSMALLINT NameLength3);
+             SQLCHAR *ServerName, SQLSMALLINT NameLength1,
+             SQLCHAR *UserName, SQLSMALLINT NameLength2,
+             SQLCHAR *Authentication, SQLSMALLINT NameLength3);
 RETCODE SQL_API PGAPI_DriverConnect(HDBC hdbc, HWND hwnd,
                    UCHAR FAR * szConnStrIn, SWORD cbConnStrIn,
                    UCHAR FAR * szConnStrOut, SWORD cbConnStrOutMax,
                    SWORD FAR * pcbConnStrOut, UWORD fDriverCompletion);
 RETCODE SQL_API PGAPI_BrowseConnect(HDBC hdbc,
-                   SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn,
-                   SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax,
-                   SQLSMALLINT * pcbConnStrOut);
+                   SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn,
+                   SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax,
+                   SQLSMALLINT *pcbConnStrOut);
 RETCODE SQL_API PGAPI_DataSources(HENV EnvironmentHandle,
-                 SQLUSMALLINT Direction, SQLCHAR * ServerName,
-                 SQLSMALLINT BufferLength1, SQLSMALLINT * NameLength1,
-                 SQLCHAR * Description, SQLSMALLINT BufferLength2,
-                 SQLSMALLINT * NameLength2);
+                 SQLUSMALLINT Direction, SQLCHAR *ServerName,
+                 SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
+                 SQLCHAR *Description, SQLSMALLINT BufferLength2,
+                 SQLSMALLINT *NameLength2);
 RETCODE SQL_API PGAPI_DescribeCol(HSTMT StatementHandle,
-                 SQLUSMALLINT ColumnNumber, SQLCHAR * ColumnName,
-                 SQLSMALLINT BufferLength, SQLSMALLINT * NameLength,
-                 SQLSMALLINT * DataType, SQLUINTEGER * ColumnSize,
-                 SQLSMALLINT * DecimalDigits, SQLSMALLINT * Nullable);
+                 SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
+                 SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
+                 SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
+                 SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable);
 RETCODE SQL_API PGAPI_Disconnect(HDBC ConnectionHandle);
 RETCODE SQL_API PGAPI_Error(HENV EnvironmentHandle,
            HDBC ConnectionHandle, HSTMT StatementHandle,
-           SQLCHAR * Sqlstate, SQLINTEGER * NativeError,
-           SQLCHAR * MessageText, SQLSMALLINT BufferLength,
-           SQLSMALLINT * TextLength);
+           SQLCHAR *Sqlstate, SQLINTEGER *NativeError,
+           SQLCHAR *MessageText, SQLSMALLINT BufferLength,
+           SQLSMALLINT *TextLength);
 RETCODE SQL_API PGAPI_ExecDirect(HSTMT StatementHandle,
-                SQLCHAR * StatementText, SQLINTEGER TextLength);
+                SQLCHAR *StatementText, SQLINTEGER TextLength);
 RETCODE SQL_API PGAPI_Execute(HSTMT StatementHandle);
 RETCODE SQL_API PGAPI_Fetch(HSTMT StatementHandle);
 RETCODE SQL_API PGAPI_FreeConnect(HDBC ConnectionHandle);
@@ -65,63 +65,63 @@ RETCODE SQL_API PGAPI_FreeStmt(HSTMT StatementHandle,
 RETCODE SQL_API PGAPI_GetConnectOption(HDBC ConnectionHandle,
                       SQLUSMALLINT Option, PTR Value);
 RETCODE SQL_API PGAPI_GetCursorName(HSTMT StatementHandle,
-                   SQLCHAR * CursorName, SQLSMALLINT BufferLength,
-                   SQLSMALLINT * NameLength);
+                   SQLCHAR *CursorName, SQLSMALLINT BufferLength,
+                   SQLSMALLINT *NameLength);
 RETCODE SQL_API PGAPI_GetData(HSTMT StatementHandle,
              SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
              PTR TargetValue, SQLINTEGER BufferLength,
-             SQLINTEGER * StrLen_or_Ind);
+             SQLINTEGER *StrLen_or_Ind);
 RETCODE SQL_API PGAPI_GetFunctions(HDBC ConnectionHandle,
-                  SQLUSMALLINT FunctionId, SQLUSMALLINT * Supported);
+                  SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported);
 RETCODE SQL_API PGAPI_GetFunctions30(HDBC ConnectionHandle,
-                    SQLUSMALLINT FunctionId, SQLUSMALLINT * Supported);
+                    SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported);
 RETCODE SQL_API PGAPI_GetInfo(HDBC ConnectionHandle,
              SQLUSMALLINT InfoType, PTR InfoValue,
-             SQLSMALLINT BufferLength, SQLSMALLINT * StringLength);
+             SQLSMALLINT BufferLength, SQLSMALLINT *StringLength);
 RETCODE SQL_API PGAPI_GetInfo30(HDBC ConnectionHandle,
                SQLUSMALLINT InfoType, PTR InfoValue,
-               SQLSMALLINT BufferLength, SQLSMALLINT * StringLength);
+               SQLSMALLINT BufferLength, SQLSMALLINT *StringLength);
 RETCODE SQL_API PGAPI_GetStmtOption(HSTMT StatementHandle,
                    SQLUSMALLINT Option, PTR Value);
 RETCODE SQL_API PGAPI_GetTypeInfo(HSTMT StatementHandle,
                  SQLSMALLINT DataType);
 RETCODE SQL_API PGAPI_NumResultCols(HSTMT StatementHandle,
-                   SQLSMALLINT * ColumnCount);
+                   SQLSMALLINT *ColumnCount);
 RETCODE SQL_API PGAPI_ParamData(HSTMT StatementHandle,
-               PTR * Value);
+               PTR *Value);
 RETCODE SQL_API PGAPI_Prepare(HSTMT StatementHandle,
-             SQLCHAR * StatementText, SQLINTEGER TextLength);
+             SQLCHAR *StatementText, SQLINTEGER TextLength);
 RETCODE SQL_API PGAPI_PutData(HSTMT StatementHandle,
              PTR Data, SQLINTEGER StrLen_or_Ind);
 RETCODE SQL_API PGAPI_RowCount(HSTMT StatementHandle,
-              SQLINTEGER * RowCount);
+              SQLINTEGER *RowCount);
 RETCODE SQL_API PGAPI_SetConnectOption(HDBC ConnectionHandle,
                       SQLUSMALLINT Option, SQLUINTEGER Value);
 RETCODE SQL_API PGAPI_SetCursorName(HSTMT StatementHandle,
-                   SQLCHAR * CursorName, SQLSMALLINT NameLength);
+                   SQLCHAR *CursorName, SQLSMALLINT NameLength);
 RETCODE SQL_API PGAPI_SetParam(HSTMT StatementHandle,
               SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
               SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
               SQLSMALLINT ParameterScale, PTR ParameterValue,
-              SQLINTEGER * StrLen_or_Ind);
+              SQLINTEGER *StrLen_or_Ind);
 RETCODE SQL_API PGAPI_SetStmtOption(HSTMT StatementHandle,
                    SQLUSMALLINT Option, SQLUINTEGER Value);
 RETCODE SQL_API PGAPI_SpecialColumns(HSTMT StatementHandle,
-                    SQLUSMALLINT IdentifierType, SQLCHAR * CatalogName,
-                    SQLSMALLINT NameLength1, SQLCHAR * SchemaName,
-                    SQLSMALLINT NameLength2, SQLCHAR * TableName,
+                    SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
+                    SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
+                    SQLSMALLINT NameLength2, SQLCHAR *TableName,
                     SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
                     SQLUSMALLINT Nullable);
 RETCODE SQL_API PGAPI_Statistics(HSTMT StatementHandle,
-                SQLCHAR * CatalogName, SQLSMALLINT NameLength1,
-                SQLCHAR * SchemaName, SQLSMALLINT NameLength2,
-                SQLCHAR * TableName, SQLSMALLINT NameLength3,
+                SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+                SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+                SQLCHAR *TableName, SQLSMALLINT NameLength3,
                 SQLUSMALLINT Unique, SQLUSMALLINT Reserved);
 RETCODE SQL_API PGAPI_Tables(HSTMT StatementHandle,
-            SQLCHAR * CatalogName, SQLSMALLINT NameLength1,
-            SQLCHAR * SchemaName, SQLSMALLINT NameLength2,
-            SQLCHAR * TableName, SQLSMALLINT NameLength3,
-            SQLCHAR * TableType, SQLSMALLINT NameLength4);
+            SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+            SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+            SQLCHAR *TableName, SQLSMALLINT NameLength3,
+            SQLCHAR *TableType, SQLSMALLINT NameLength4);
 RETCODE SQL_API PGAPI_Transact(HENV EnvironmentHandle,
               HDBC ConnectionHandle, SQLUSMALLINT CompletionType);
 RETCODE SQL_API PGAPI_ColAttributes(
@@ -130,86 +130,86 @@ RETCODE SQL_API PGAPI_ColAttributes(
                    SQLUSMALLINT fDescType,
                    PTR rgbDesc,
                    SQLSMALLINT cbDescMax,
-                   SQLSMALLINT * pcbDesc,
-                   SQLINTEGER * pfDesc);
+                   SQLSMALLINT *pcbDesc,
+                   SQLINTEGER *pfDesc);
 RETCODE SQL_API PGAPI_ColumnPrivileges(
                       HSTMT hstmt,
-                      SQLCHAR * szCatalogName,
+                      SQLCHAR *szCatalogName,
                       SQLSMALLINT cbCatalogName,
-                      SQLCHAR * szSchemaName,
+                      SQLCHAR *szSchemaName,
                       SQLSMALLINT cbSchemaName,
-                      SQLCHAR * szTableName,
+                      SQLCHAR *szTableName,
                       SQLSMALLINT cbTableName,
-                      SQLCHAR * szColumnName,
+                      SQLCHAR *szColumnName,
                       SQLSMALLINT cbColumnName);
 RETCODE SQL_API PGAPI_DescribeParam(
                    HSTMT hstmt,
                    SQLUSMALLINT ipar,
-                   SQLSMALLINT * pfSqlType,
-                   SQLUINTEGER * pcbParamDef,
-                   SQLSMALLINT * pibScale,
-                   SQLSMALLINT * pfNullable);
+                   SQLSMALLINT *pfSqlType,
+                   SQLUINTEGER *pcbParamDef,
+                   SQLSMALLINT *pibScale,
+                   SQLSMALLINT *pfNullable);
 RETCODE SQL_API PGAPI_ExtendedFetch(
                    HSTMT hstmt,
                    SQLUSMALLINT fFetchType,
                    SQLINTEGER irow,
-                   SQLUINTEGER * pcrow,
-                   SQLUSMALLINT * rgfRowStatus);
+                   SQLUINTEGER *pcrow,
+                   SQLUSMALLINT *rgfRowStatus);
 RETCODE SQL_API PGAPI_ForeignKeys(
                  HSTMT hstmt,
-                 SQLCHAR * szPkCatalogName,
+                 SQLCHAR *szPkCatalogName,
                  SQLSMALLINT cbPkCatalogName,
-                 SQLCHAR * szPkSchemaName,
+                 SQLCHAR *szPkSchemaName,
                  SQLSMALLINT cbPkSchemaName,
-                 SQLCHAR * szPkTableName,
+                 SQLCHAR *szPkTableName,
                  SQLSMALLINT cbPkTableName,
-                 SQLCHAR * szFkCatalogName,
+                 SQLCHAR *szFkCatalogName,
                  SQLSMALLINT cbFkCatalogName,
-                 SQLCHAR * szFkSchemaName,
+                 SQLCHAR *szFkSchemaName,
                  SQLSMALLINT cbFkSchemaName,
-                 SQLCHAR * szFkTableName,
+                 SQLCHAR *szFkTableName,
                  SQLSMALLINT cbFkTableName);
 RETCODE SQL_API PGAPI_MoreResults(
                  HSTMT hstmt);
 RETCODE SQL_API PGAPI_NativeSql(
                HDBC hdbc,
-               SQLCHAR * szSqlStrIn,
+               SQLCHAR *szSqlStrIn,
                SQLINTEGER cbSqlStrIn,
-               SQLCHAR * szSqlStr,
+               SQLCHAR *szSqlStr,
                SQLINTEGER cbSqlStrMax,
-               SQLINTEGER * pcbSqlStr);
+               SQLINTEGER *pcbSqlStr);
 RETCODE SQL_API PGAPI_NumParams(
                HSTMT hstmt,
-               SQLSMALLINT * pcpar);
+               SQLSMALLINT *pcpar);
 RETCODE SQL_API PGAPI_ParamOptions(
                   HSTMT hstmt,
                   SQLUINTEGER crow,
-                  SQLUINTEGER * pirow);
+                  SQLUINTEGER *pirow);
 RETCODE SQL_API PGAPI_PrimaryKeys(
                  HSTMT hstmt,
-                 SQLCHAR * szCatalogName,
+                 SQLCHAR *szCatalogName,
                  SQLSMALLINT cbCatalogName,
-                 SQLCHAR * szSchemaName,
+                 SQLCHAR *szSchemaName,
                  SQLSMALLINT cbSchemaName,
-                 SQLCHAR * szTableName,
+                 SQLCHAR *szTableName,
                  SQLSMALLINT cbTableName);
 RETCODE SQL_API PGAPI_ProcedureColumns(
                       HSTMT hstmt,
-                      SQLCHAR * szCatalogName,
+                      SQLCHAR *szCatalogName,
                       SQLSMALLINT cbCatalogName,
-                      SQLCHAR * szSchemaName,
+                      SQLCHAR *szSchemaName,
                       SQLSMALLINT cbSchemaName,
-                      SQLCHAR * szProcName,
+                      SQLCHAR *szProcName,
                       SQLSMALLINT cbProcName,
-                      SQLCHAR * szColumnName,
+                      SQLCHAR *szColumnName,
                       SQLSMALLINT cbColumnName);
 RETCODE SQL_API PGAPI_Procedures(
                 HSTMT hstmt,
-                SQLCHAR * szCatalogName,
+                SQLCHAR *szCatalogName,
                 SQLSMALLINT cbCatalogName,
-                SQLCHAR * szSchemaName,
+                SQLCHAR *szSchemaName,
                 SQLSMALLINT cbSchemaName,
-                SQLCHAR * szProcName,
+                SQLCHAR *szProcName,
                 SQLSMALLINT cbProcName);
 RETCODE SQL_API PGAPI_SetPos(
             HSTMT hstmt,
@@ -218,11 +218,11 @@ RETCODE SQL_API PGAPI_SetPos(
             SQLUSMALLINT fLock);
 RETCODE SQL_API PGAPI_TablePrivileges(
                      HSTMT hstmt,
-                     SQLCHAR * szCatalogName,
+                     SQLCHAR *szCatalogName,
                      SQLSMALLINT cbCatalogName,
-                     SQLCHAR * szSchemaName,
+                     SQLCHAR *szSchemaName,
                      SQLSMALLINT cbSchemaName,
-                     SQLCHAR * szTableName,
+                     SQLCHAR *szTableName,
                      SQLSMALLINT cbTableName);
 RETCODE SQL_API PGAPI_BindParameter(
                    HSTMT hstmt,
@@ -234,10 +234,11 @@ RETCODE SQL_API PGAPI_BindParameter(
                    SQLSMALLINT ibScale,
                    PTR rgbValue,
                    SQLINTEGER cbValueMax,
-                   SQLINTEGER * pcbValue);
+                   SQLINTEGER *pcbValue);
 RETCODE SQL_API PGAPI_SetScrollOptions(
                       HSTMT hstmt,
                       UWORD fConcurrency,
                       SDWORD crowKeyset,
                       UWORD crowRowset);
+
 #endif  /* define_PG_API_FUNC_H__ */
index 6f1282a36cfd0e7f67ce52fa7483f822985d3cc5..1f177a10c4b7995f9043e35fa1052850d3533fef 100644 (file)
--- a/pgtypes.c
+++ b/pgtypes.c
@@ -25,7 +25,7 @@
 
 
 
-Int4       getCharPrecision(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as);
+Int4       getCharPrecision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as);
 
 /*
  * these are the types we support. all of the pgtype_ functions should
@@ -94,7 +94,7 @@ Int2      sqlTypes[] = {
 
 
 Int4
-sqltype_to_pgtype(StatementClass * stmt, SWORD fSqlType)
+sqltype_to_pgtype(StatementClass *stmt, SWORD fSqlType)
 {
    Int4        pgType;
    ConnInfo   *ci = &(SC_get_conn(stmt)->connInfo);
@@ -190,7 +190,7 @@ sqltype_to_pgtype(StatementClass * stmt, SWORD fSqlType)
  * types that are unknown.  All other pg routines in here return a suitable default.
  */
 Int2
-pgtype_to_sqltype(StatementClass * stmt, Int4 type)
+pgtype_to_sqltype(StatementClass *stmt, Int4 type)
 {
    ConnInfo   *ci = &(SC_get_conn(stmt)->connInfo);
 
@@ -266,7 +266,7 @@ pgtype_to_sqltype(StatementClass * stmt, Int4 type)
 
 
 Int2
-pgtype_to_ctype(StatementClass * stmt, Int4 type)
+pgtype_to_ctype(StatementClass *stmt, Int4 type)
 {
    ConnInfo   *ci = &(SC_get_conn(stmt)->connInfo);
 
@@ -315,7 +315,7 @@ pgtype_to_ctype(StatementClass * stmt, Int4 type)
 
 
 char *
-pgtype_to_name(StatementClass * stmt, Int4 type)
+pgtype_to_name(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -384,7 +384,7 @@ pgtype_to_name(StatementClass * stmt, Int4 type)
 
 
 static Int2
-getNumericScale(StatementClass * stmt, Int4 type, int col)
+getNumericScale(StatementClass *stmt, Int4 type, int col)
 {
    Int4        atttypmod;
    QResultClass *result;
@@ -421,7 +421,7 @@ getNumericScale(StatementClass * stmt, Int4 type, int col)
 
 
 static Int4
-getNumericPrecision(StatementClass * stmt, Int4 type, int col)
+getNumericPrecision(StatementClass *stmt, Int4 type, int col)
 {
    Int4        atttypmod;
    QResultClass *result;
@@ -458,7 +458,7 @@ getNumericPrecision(StatementClass * stmt, Int4 type, int col)
 
 
 Int4
-getCharPrecision(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as)
+getCharPrecision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as)
 {
    int         p = -1,
                maxsize;
@@ -545,7 +545,7 @@ getCharPrecision(StatementClass * stmt, Int4 type, int col, int handle_unknown_s
  * This is used for functions SQLDescribeCol and SQLColAttributes.
  */
 Int4
-pgtype_precision(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as)
+pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as)
 {
    switch (type)
    {
@@ -612,7 +612,7 @@ pgtype_precision(StatementClass * stmt, Int4 type, int col, int handle_unknown_s
 
 
 Int4
-pgtype_display_size(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as)
+pgtype_display_size(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as)
 {
    switch (type)
    {
@@ -653,7 +653,7 @@ pgtype_display_size(StatementClass * stmt, Int4 type, int col, int handle_unknow
  * override this length with the atttypmod length from pg_attribute
  */
 Int4
-pgtype_length(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as)
+pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as)
 {
    switch (type)
    {
@@ -706,7 +706,7 @@ pgtype_length(StatementClass * stmt, Int4 type, int col, int handle_unknown_size
 
 
 Int2
-pgtype_scale(StatementClass * stmt, Int4 type, int col)
+pgtype_scale(StatementClass *stmt, Int4 type, int col)
 {
    switch (type)
    {
@@ -740,7 +740,7 @@ pgtype_scale(StatementClass * stmt, Int4 type, int col)
 
 
 Int2
-pgtype_radix(StatementClass * stmt, Int4 type)
+pgtype_radix(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -760,14 +760,14 @@ pgtype_radix(StatementClass * stmt, Int4 type)
 
 
 Int2
-pgtype_nullable(StatementClass * stmt, Int4 type)
+pgtype_nullable(StatementClass *stmt, Int4 type)
 {
    return SQL_NULLABLE;        /* everything should be nullable */
 }
 
 
 Int2
-pgtype_auto_increment(StatementClass * stmt, Int4 type)
+pgtype_auto_increment(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -796,7 +796,7 @@ pgtype_auto_increment(StatementClass * stmt, Int4 type)
 
 
 Int2
-pgtype_case_sensitive(StatementClass * stmt, Int4 type)
+pgtype_case_sensitive(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -819,7 +819,7 @@ pgtype_case_sensitive(StatementClass * stmt, Int4 type)
 
 
 Int2
-pgtype_money(StatementClass * stmt, Int4 type)
+pgtype_money(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -832,7 +832,7 @@ pgtype_money(StatementClass * stmt, Int4 type)
 
 
 Int2
-pgtype_searchable(StatementClass * stmt, Int4 type)
+pgtype_searchable(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -854,7 +854,7 @@ pgtype_searchable(StatementClass * stmt, Int4 type)
 
 
 Int2
-pgtype_unsigned(StatementClass * stmt, Int4 type)
+pgtype_unsigned(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -878,7 +878,7 @@ pgtype_unsigned(StatementClass * stmt, Int4 type)
 
 
 char *
-pgtype_literal_prefix(StatementClass * stmt, Int4 type)
+pgtype_literal_prefix(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -900,7 +900,7 @@ pgtype_literal_prefix(StatementClass * stmt, Int4 type)
 
 
 char *
-pgtype_literal_suffix(StatementClass * stmt, Int4 type)
+pgtype_literal_suffix(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
@@ -922,7 +922,7 @@ pgtype_literal_suffix(StatementClass * stmt, Int4 type)
 
 
 char *
-pgtype_create_params(StatementClass * stmt, Int4 type)
+pgtype_create_params(StatementClass *stmt, Int4 type)
 {
    switch (type)
    {
index 6761ec319e4a115072b3414f7b214786b082de82..7bd33cf7512d6e1232852aaf526bea61ee0d2c4b 100644 (file)
--- a/pgtypes.h
+++ b/pgtypes.h
@@ -68,29 +68,30 @@ extern Int2 sqlTypes[];
 /* Defines for pgtype_precision */
 #define PG_STATIC              (-1)
 
-Int4       sqltype_to_pgtype(StatementClass * stmt, Int2 fSqlType);
+Int4       sqltype_to_pgtype(StatementClass *stmt, Int2 fSqlType);
 
-Int2       pgtype_to_sqltype(StatementClass * stmt, Int4 type);
-Int2       pgtype_to_ctype(StatementClass * stmt, Int4 type);
-char      *pgtype_to_name(StatementClass * stmt, Int4 type);
+Int2       pgtype_to_sqltype(StatementClass *stmt, Int4 type);
+Int2       pgtype_to_ctype(StatementClass *stmt, Int4 type);
+char      *pgtype_to_name(StatementClass *stmt, Int4 type);
 
 /* These functions can use static numbers or result sets(col parameter) */
-Int4       pgtype_precision(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as);
-Int4       pgtype_display_size(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as);
-Int4       pgtype_length(StatementClass * stmt, Int4 type, int col, int handle_unknown_size_as);
+Int4       pgtype_precision(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as);
+Int4       pgtype_display_size(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as);
+Int4       pgtype_length(StatementClass *stmt, Int4 type, int col, int handle_unknown_size_as);
 
-Int2       pgtype_scale(StatementClass * stmt, Int4 type, int col);
-Int2       pgtype_radix(StatementClass * stmt, Int4 type);
-Int2       pgtype_nullable(StatementClass * stmt, Int4 type);
-Int2       pgtype_auto_increment(StatementClass * stmt, Int4 type);
-Int2       pgtype_case_sensitive(StatementClass * stmt, Int4 type);
-Int2       pgtype_money(StatementClass * stmt, Int4 type);
-Int2       pgtype_searchable(StatementClass * stmt, Int4 type);
-Int2       pgtype_unsigned(StatementClass * stmt, Int4 type);
-char      *pgtype_literal_prefix(StatementClass * stmt, Int4 type);
-char      *pgtype_literal_suffix(StatementClass * stmt, Int4 type);
-char      *pgtype_create_params(StatementClass * stmt, Int4 type);
+Int2       pgtype_scale(StatementClass *stmt, Int4 type, int col);
+Int2       pgtype_radix(StatementClass *stmt, Int4 type);
+Int2       pgtype_nullable(StatementClass *stmt, Int4 type);
+Int2       pgtype_auto_increment(StatementClass *stmt, Int4 type);
+Int2       pgtype_case_sensitive(StatementClass *stmt, Int4 type);
+Int2       pgtype_money(StatementClass *stmt, Int4 type);
+Int2       pgtype_searchable(StatementClass *stmt, Int4 type);
+Int2       pgtype_unsigned(StatementClass *stmt, Int4 type);
+char      *pgtype_literal_prefix(StatementClass *stmt, Int4 type);
+char      *pgtype_literal_suffix(StatementClass *stmt, Int4 type);
+char      *pgtype_create_params(StatementClass *stmt, Int4 type);
 
 Int2       sqltype_to_default_ctype(Int2 sqltype);
 Int4       ctype_length(Int2 ctype);
+
 #endif
index 514922036bb413ff344a1d3bb2ad84786cd600ad..540e295d564384c44a77860f0d8955527bb66cb6 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Comments:       See "notice.txt" for copyright and license information.
  *
- * $Id: psqlodbc.h,v 1.52 2001/10/25 05:50:15 momjian Exp $
+ * $Id: psqlodbc.h,v 1.53 2001/10/28 06:26:14 momjian Exp $
  *
  */
 
@@ -185,7 +185,7 @@ typedef struct GlobalValues_
    char        extra_systable_prefixes[MEDIUM_REGISTRY_LEN];
    char        conn_settings[LARGE_REGISTRY_LEN];
    char        protocol[SMALL_REGISTRY_LEN];
-}          GLOBAL_VALUES;
+} GLOBAL_VALUES;
 
 typedef struct StatementOptions_
 {
@@ -202,7 +202,7 @@ typedef struct StatementOptions_
    UInt4      *rowsFetched;
    UInt2      *rowStatusArray;
    void       *bookmark_ptr;
-}          StatementOptions;
+} StatementOptions;
 
 /* Used to pass extra query info to send_query */
 typedef struct QueryInfo_
@@ -210,7 +210,7 @@ typedef struct QueryInfo_
    int         row_size;
    QResultClass *result_in;
    char       *cursor;
-}          QueryInfo;
+} QueryInfo;
 
 void       logs_on_off(int cnopen, int, int);
 
@@ -249,4 +249,5 @@ void        debug_memory_check(void);
 #define strdup debug_strdup
 #define free   debug_free
 #endif  /* _MEMORY_DEBUG_ */
+
 #endif
index b9f088227f792f8061b236fd620c4bc88711a03b..ca7a6dee9ea32d0fda3353b154ae7109b35eb239 100644 (file)
--- a/qresult.c
+++ b/qresult.c
@@ -39,7 +39,7 @@
  * All info functions call this function to create the manual result set.
  */
 void
-QR_set_num_fields(QResultClass * self, int new_num_fields)
+QR_set_num_fields(QResultClass *self, int new_num_fields)
 {
    mylog("in QR_set_num_fields\n");
 
@@ -54,28 +54,28 @@ QR_set_num_fields(QResultClass * self, int new_num_fields)
 
 
 void
-QR_set_position(QResultClass * self, int pos)
+QR_set_position(QResultClass *self, int pos)
 {
    self->tupleField = self->backend_tuples + ((self->base + pos) * self->num_fields);
 }
 
 
 void
-QR_set_cache_size(QResultClass * self, int cache_size)
+QR_set_cache_size(QResultClass *self, int cache_size)
 {
    self->cache_size = cache_size;
 }
 
 
 void
-QR_set_rowset_size(QResultClass * self, int rowset_size)
+QR_set_rowset_size(QResultClass *self, int rowset_size)
 {
    self->rowset_size = rowset_size;
 }
 
 
 void
-QR_inc_base(QResultClass * self, int base_inc)
+QR_inc_base(QResultClass *self, int base_inc)
 {
    self->base += base_inc;
 }
@@ -128,7 +128,7 @@ QR_Constructor()
 
 
 void
-QR_Destructor(QResultClass * self)
+QR_Destructor(QResultClass *self)
 {
    mylog("QResult: in DESTRUCTOR\n");
 
@@ -168,7 +168,7 @@ QR_Destructor(QResultClass * self)
 
 
 void
-QR_set_command(QResultClass * self, char *msg)
+QR_set_command(QResultClass *self, char *msg)
 {
    if (self->command)
        free(self->command);
@@ -178,7 +178,7 @@ QR_set_command(QResultClass * self, char *msg)
 
 
 void
-QR_set_notice(QResultClass * self, char *msg)
+QR_set_notice(QResultClass *self, char *msg)
 {
    if (self->notice)
        free(self->notice);
@@ -188,7 +188,7 @@ QR_set_notice(QResultClass * self, char *msg)
 
 
 void
-QR_free_memory(QResultClass * self)
+QR_free_memory(QResultClass *self)
 {
    register int lf,
                row;
@@ -211,7 +211,7 @@ QR_free_memory(QResultClass * self)
                    free(tuple[lf].value);
                }
            }
-           tuple += num_fields;        /* next row */
+           tuple += num_fields;    /* next row */
        }
 
        free(self->backend_tuples);
@@ -226,7 +226,7 @@ QR_free_memory(QResultClass * self)
 
 /* This function is called by send_query() */
 char
-QR_fetch_tuples(QResultClass * self, ConnectionClass * conn, char *cursor)
+QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor)
 {
    int         tuple_size;
 
@@ -327,7 +327,7 @@ QR_fetch_tuples(QResultClass * self, ConnectionClass * conn, char *cursor)
  * We only close cursor/end the transaction if a cursor was used.
  */
 int
-QR_close(QResultClass * self)
+QR_close(QResultClass *self)
 {
    QResultClass *res;
 
@@ -379,7 +379,7 @@ QR_close(QResultClass * self)
 
 /* This function is called by fetch_tuples() AND SQLFetch() */
 int
-QR_next_tuple(QResultClass * self)
+QR_next_tuple(QResultClass *self)
 {
    int         id;
    QResultClass *res;
@@ -620,7 +620,7 @@ QR_next_tuple(QResultClass * self)
 
 
 char
-QR_read_tuple(QResultClass * self, char binary)
+QR_read_tuple(QResultClass *self, char binary)
 {
    Int2        field_lf;
    TupleField *this_tuplefield;
index 23e125247c527e73a3520fac932fd7ef5c25c4e5..251bc449c126f0d09e84295b8372937bad4b3287 100644 (file)
--- a/qresult.h
+++ b/qresult.h
 
 enum QueryResultCode_
 {
-               PGRES_EMPTY_QUERY = 0,
-               PGRES_COMMAND_OK,       /* a query command that doesn't
-                                        * return */
+   PGRES_EMPTY_QUERY = 0,
+   PGRES_COMMAND_OK,           /* a query command that doesn't return */
    /* anything was executed properly by the backend */
-               PGRES_TUPLES_OK,/* a query command that returns tuples */
+   PGRES_TUPLES_OK,            /* a query command that returns tuples */
    /* was executed properly by the backend, PGresult */
    /* contains the resulttuples */
-               PGRES_COPY_OUT,
-               PGRES_COPY_IN,
-               PGRES_BAD_RESPONSE,     /* an unexpected response was
-                                        * recv'd from the backend */
-               PGRES_NONFATAL_ERROR,
-               PGRES_FATAL_ERROR,
-               PGRES_FIELDS_OK,/* field information from a query was
+   PGRES_COPY_OUT,
+   PGRES_COPY_IN,
+   PGRES_BAD_RESPONSE,         /* an unexpected response was recv'd from
+                                * the backend */
+   PGRES_NONFATAL_ERROR,
+   PGRES_FATAL_ERROR,
+   PGRES_FIELDS_OK,            /* field information from a query was
                                 * successful */
-               PGRES_END_TUPLES,
-               PGRES_INTERNAL_ERROR
+   PGRES_END_TUPLES,
+   PGRES_INTERNAL_ERROR
 };
 typedef enum QueryResultCode_ QueryResultCode;
 
@@ -48,7 +47,7 @@ struct QResultClass_
                                 * (backend) */
 
    /* Stuff for declare/fetch tuples */
-   int         count_allocated;        /* m(re)alloced count */
+   int         count_allocated;    /* m(re)alloced count */
    int         fetch_count;    /* logical rows read so far */
    int         fcount;         /* actual rows read in the fetch */
    int         currTuple;
@@ -113,19 +112,20 @@ struct QResultClass_
 
 /* Core Functions */
 QResultClass *QR_Constructor(void);
-void       QR_Destructor(QResultClass * self);
-char       QR_read_tuple(QResultClass * self, char binary);
-int            QR_next_tuple(QResultClass * self);
-int            QR_close(QResultClass * self);
-char       QR_fetch_tuples(QResultClass * self, ConnectionClass * conn, char *cursor);
-void       QR_free_memory(QResultClass * self);
-void       QR_set_command(QResultClass * self, char *msg);
-void       QR_set_notice(QResultClass * self, char *msg);
-
-void       QR_set_num_fields(QResultClass * self, int new_num_fields); /* manual result only */
-
-void       QR_inc_base(QResultClass * self, int base_inc);
-void       QR_set_cache_size(QResultClass * self, int cache_size);
-void       QR_set_rowset_size(QResultClass * self, int rowset_size);
-void       QR_set_position(QResultClass * self, int pos);
+void       QR_Destructor(QResultClass *self);
+char       QR_read_tuple(QResultClass *self, char binary);
+int            QR_next_tuple(QResultClass *self);
+int            QR_close(QResultClass *self);
+char       QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor);
+void       QR_free_memory(QResultClass *self);
+void       QR_set_command(QResultClass *self, char *msg);
+void       QR_set_notice(QResultClass *self, char *msg);
+
+void       QR_set_num_fields(QResultClass *self, int new_num_fields);  /* manual result only */
+
+void       QR_inc_base(QResultClass *self, int base_inc);
+void       QR_set_cache_size(QResultClass *self, int cache_size);
+void       QR_set_rowset_size(QResultClass *self, int rowset_size);
+void       QR_set_position(QResultClass *self, int pos);
+
 #endif
index 688ff7a6b90825e0116b19889858f44a18cadd40..b60d0dfd4b2a6d19634a70ce93592bf32e50b1f4 100644 (file)
@@ -62,4 +62,5 @@
 #define _APS_NEXT_CONTROL_VALUE            1062\r
 #define _APS_NEXT_SYMED_VALUE          101\r
 #endif  /*\r */
+
 #endif  /*\r */
index 3565e3f8d556b816a25cba4dd8b3d31d1a579b82..7d9ce4c92fe4b1a36a969bb20b2ce6f065c3c990 100644 (file)
--- a/results.c
+++ b/results.c
@@ -1220,7 +1220,7 @@ PGAPI_MoreResults(
  * Stuff for updatable cursors.
  */
 static QResultClass *
-positioned_load(StatementClass * stmt, BOOL latest, int res_cols, UInt4 oid, const char *tidval)
+positioned_load(StatementClass *stmt, BOOL latest, int res_cols, UInt4 oid, const char *tidval)
 {
    int         i;
    QResultClass *qres;
@@ -1250,7 +1250,7 @@ positioned_load(StatementClass * stmt, BOOL latest, int res_cols, UInt4 oid, con
 }
 
 RETCODE        SQL_API
-SC_pos_reload(StatementClass * stmt, UWORD irow, UWORD * count)
+SC_pos_reload(StatementClass *stmt, UWORD irow, UWORD *count)
 {
    int         i,
                res_cols;
@@ -1328,7 +1328,7 @@ SC_pos_reload(StatementClass * stmt, UWORD irow, UWORD * count)
 }
 
 RETCODE        SQL_API
-SC_pos_newload(StatementClass * stmt, UInt4 oid, const char *tidval)
+SC_pos_newload(StatementClass *stmt, UInt4 oid, const char *tidval)
 {
    int         i;
    QResultClass *res,
@@ -1399,7 +1399,7 @@ SC_pos_newload(StatementClass * stmt, UInt4 oid, const char *tidval)
 }
 
 RETCODE        SQL_API
-SC_pos_update(StatementClass * stmt,
+SC_pos_update(StatementClass *stmt,
              UWORD irow)
 {
    int         i,
@@ -1472,7 +1472,7 @@ SC_pos_update(StatementClass * stmt,
                mylog("%d used=%d\n", i, *bindings[i].used);
                if (*bindings[i].used != SQL_IGNORE)
                {
-                   PGAPI_BindParameter(hstmt, (SQLUSMALLINT)++ j,
+                   PGAPI_BindParameter(hstmt, (SQLUSMALLINT) ++j,
                                 SQL_PARAM_INPUT, bindings[i].returntype,
                      pgtype_to_sqltype(stmt, QR_get_field_type(res, i)),
                                        QR_get_fieldsize(res, i),
@@ -1533,7 +1533,7 @@ SC_pos_update(StatementClass * stmt,
    return ret;
 }
 RETCODE        SQL_API
-SC_pos_delete(StatementClass * stmt,
+SC_pos_delete(StatementClass *stmt,
              UWORD irow)
 {
    int         res_cols;
@@ -1606,7 +1606,7 @@ SC_pos_delete(StatementClass * stmt,
    return ret;
 }
 RETCODE        SQL_API
-SC_pos_add(StatementClass * stmt,
+SC_pos_add(StatementClass *stmt,
           UWORD irow)
 {
    int         num_cols,
@@ -1643,7 +1643,7 @@ SC_pos_add(StatementClass * stmt,
                    sprintf(addstr, "%s, \"%s\"", addstr, stmt->fi[i]->name);
                else
                    sprintf(addstr, "%s\"%s\"", addstr, stmt->fi[i]->name);
-               PGAPI_BindParameter(hstmt, (SQLUSMALLINT)++ add_cols,
+               PGAPI_BindParameter(hstmt, (SQLUSMALLINT) ++add_cols,
                                 SQL_PARAM_INPUT, bindings[i].returntype,
                      pgtype_to_sqltype(stmt, QR_get_field_type(res, i)),
                                    QR_get_fieldsize(res, i),
diff --git a/setup.c b/setup.c
index c4562ab90ddcd23ec8d6d4000004042c427b99ae..9db803a8340b63cea53bed5be65dd2b26bf1624a 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -25,7 +25,7 @@
 
 #define INTFUNC  __stdcall
 
-extern HINSTANCE NEAR s_hModule;       /* Saved module handle. */
+extern HINSTANCE NEAR s_hModule;   /* Saved module handle. */
 
 /* Constants */
 #define MIN(x,y)     ((x) < (y) ? (x) : (y))
@@ -303,14 +303,14 @@ ConfigDlgProc(HWND hdlg,
                case IDC_DRIVER:
                    lpsetupdlg = (LPSETUPDLG) GetWindowLong(hdlg, DWL_USER);
                    DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DRV),
-                   hdlg, driver_optionsProc, (LPARAM) & lpsetupdlg->ci);
+                    hdlg, driver_optionsProc, (LPARAM) &lpsetupdlg->ci);
                    return TRUE;
 
                case IDC_DATASOURCE:
                    lpsetupdlg = (LPSETUPDLG) GetWindowLong(hdlg, DWL_USER);
 
                    DialogBoxParam(s_hModule, MAKEINTRESOURCE(DLG_OPTIONS_DS),
-                       hdlg, ds_optionsProc, (LPARAM) & lpsetupdlg->ci);
+                        hdlg, ds_optionsProc, (LPARAM) &lpsetupdlg->ci);
 
                    return TRUE;
            }
index 8250fc87380805f4e62a748cf5ccda1e70fa3808..031a6779cbab5adac95a4c8480644a618519836c 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -35,7 +35,7 @@ extern GLOBAL_VALUES globals;
 
 
 void
-SOCK_clear_error(SocketClass * self)
+SOCK_clear_error(SocketClass *self)
 {
    self->errornumber = 0;
    self->errormsg = NULL;
@@ -43,7 +43,7 @@ SOCK_clear_error(SocketClass * self)
 
 
 SocketClass *
-SOCK_Constructor(const ConnectionClass * conn)
+SOCK_Constructor(const ConnectionClass *conn)
 {
    SocketClass *rv;
 
@@ -83,7 +83,7 @@ SOCK_Constructor(const ConnectionClass * conn)
 
 
 void
-SOCK_Destructor(SocketClass * self)
+SOCK_Destructor(SocketClass *self)
 {
    mylog("SOCK_Destructor\n");
    if (self->socket != -1)
@@ -104,7 +104,7 @@ SOCK_Destructor(SocketClass * self)
 
 
 char
-SOCK_connect_to(SocketClass * self, unsigned short port, char *hostname)
+SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname)
 {
    struct hostent *host;
    struct sockaddr_in sadr;
@@ -162,7 +162,7 @@ SOCK_connect_to(SocketClass * self, unsigned short port, char *hostname)
 
 
 void
-SOCK_get_n_char(SocketClass * self, char *buffer, int len)
+SOCK_get_n_char(SocketClass *self, char *buffer, int len)
 {
    int         lf;
 
@@ -179,7 +179,7 @@ SOCK_get_n_char(SocketClass * self, char *buffer, int len)
 
 
 void
-SOCK_put_n_char(SocketClass * self, char *buffer, int len)
+SOCK_put_n_char(SocketClass *self, char *buffer, int len)
 {
    int         lf;
 
@@ -201,7 +201,7 @@ SOCK_put_n_char(SocketClass * self, char *buffer, int len)
  * returns TRUE if truncation occurs.
  */
 BOOL
-SOCK_get_string(SocketClass * self, char *buffer, int bufsize)
+SOCK_get_string(SocketClass *self, char *buffer, int bufsize)
 {
    register int lf = 0;
 
@@ -215,7 +215,7 @@ SOCK_get_string(SocketClass * self, char *buffer, int bufsize)
 
 
 void
-SOCK_put_string(SocketClass * self, char *string)
+SOCK_put_string(SocketClass *self, char *string)
 {
    register int lf;
    int         len;
@@ -228,7 +228,7 @@ SOCK_put_string(SocketClass * self, char *string)
 
 
 int
-SOCK_get_int(SocketClass * self, short len)
+SOCK_get_int(SocketClass *self, short len)
 {
    switch (len)
    {
@@ -263,7 +263,7 @@ SOCK_get_int(SocketClass * self, short len)
 
 
 void
-SOCK_put_int(SocketClass * self, int value, short len)
+SOCK_put_int(SocketClass *self, int value, short len)
 {
    unsigned int rv;
 
@@ -288,7 +288,7 @@ SOCK_put_int(SocketClass * self, int value, short len)
 
 
 void
-SOCK_flush_output(SocketClass * self)
+SOCK_flush_output(SocketClass *self)
 {
    int         written;
 
@@ -303,7 +303,7 @@ SOCK_flush_output(SocketClass * self)
 
 
 unsigned char
-SOCK_get_next_byte(SocketClass * self)
+SOCK_get_next_byte(SocketClass *self)
 {
    if (self->buffer_read_in >= self->buffer_filled_in)
    {
@@ -335,7 +335,7 @@ SOCK_get_next_byte(SocketClass * self)
 
 
 void
-SOCK_put_next_byte(SocketClass * self, unsigned char next_byte)
+SOCK_put_next_byte(SocketClass *self, unsigned char next_byte)
 {
    int         bytes_sent;
 
index 828372d5cb5091bcb3a80d763f0319d7784e6336..c49d9fe88d86669972b556e308605c16bb2f81a8 100644 (file)
--- a/socket.h
+++ b/socket.h
@@ -77,17 +77,18 @@ struct SocketClass_
 
 
 /* Socket prototypes */
-SocketClass *SOCK_Constructor(const ConnectionClass * conn);
-void       SOCK_Destructor(SocketClass * self);
-char       SOCK_connect_to(SocketClass * self, unsigned short port, char *hostname);
-void       SOCK_get_n_char(SocketClass * self, char *buffer, int len);
-void       SOCK_put_n_char(SocketClass * self, char *buffer, int len);
-BOOL       SOCK_get_string(SocketClass * self, char *buffer, int bufsize);
-void       SOCK_put_string(SocketClass * self, char *string);
-int            SOCK_get_int(SocketClass * self, short len);
-void       SOCK_put_int(SocketClass * self, int value, short len);
-void       SOCK_flush_output(SocketClass * self);
-unsigned char SOCK_get_next_byte(SocketClass * self);
-void       SOCK_put_next_byte(SocketClass * self, unsigned char next_byte);
-void       SOCK_clear_error(SocketClass * self);
+SocketClass *SOCK_Constructor(const ConnectionClass *conn);
+void       SOCK_Destructor(SocketClass *self);
+char       SOCK_connect_to(SocketClass *self, unsigned short port, char *hostname);
+void       SOCK_get_n_char(SocketClass *self, char *buffer, int len);
+void       SOCK_put_n_char(SocketClass *self, char *buffer, int len);
+BOOL       SOCK_get_string(SocketClass *self, char *buffer, int bufsize);
+void       SOCK_put_string(SocketClass *self, char *string);
+int            SOCK_get_int(SocketClass *self, short len);
+void       SOCK_put_int(SocketClass *self, int value, short len);
+void       SOCK_flush_output(SocketClass *self);
+unsigned char SOCK_get_next_byte(SocketClass *self);
+void       SOCK_put_next_byte(SocketClass *self, unsigned char next_byte);
+void       SOCK_clear_error(SocketClass *self);
+
 #endif
index f313f926f3cda7b253cbcfaa3b4879b84e8a87e9..b4e33d059231b714de32328956d87291c662a07c 100644 (file)
@@ -35,7 +35,7 @@ static struct
 {
    int         type;
    char       *s;
-}          Statement_Type[] =
+} Statement_Type[] =
 
 {
    {
@@ -202,7 +202,7 @@ PGAPI_FreeStmt(HSTMT hstmt,
  * StatementClass implementation
  */
 void
-InitializeStatementOptions(StatementOptions * opt)
+InitializeStatementOptions(StatementOptions *opt)
 {
    opt->maxRows = 0;           /* driver returns all rows */
    opt->maxLength = 0;         /* driver returns all data for char/binary */
@@ -284,7 +284,7 @@ SC_Constructor(void)
 
 
 char
-SC_Destructor(StatementClass * self)
+SC_Destructor(StatementClass *self)
 {
    mylog("SC_Destructor: self=%u, self->result=%u, self->hdbc=%u\n", self, self->result, self->hdbc);
    SC_clear_error(self);
@@ -356,7 +356,7 @@ SC_Destructor(StatementClass * self)
  * data-at-execution parameters that was allocated in SQLPutData.
  */
 void
-SC_free_params(StatementClass * self, char option)
+SC_free_params(StatementClass *self, char option)
 {
    int         i;
 
@@ -421,7 +421,7 @@ statement_type(char *statement)
  * from SQLFreeStmt(SQL_CLOSE)
  */
 char
-SC_recycle_statement(StatementClass * self)
+SC_recycle_statement(StatementClass *self)
 {
    ConnectionClass *conn;
 
@@ -507,7 +507,7 @@ SC_recycle_statement(StatementClass * self)
     * Reset only parameters that have anything to do with results
     */
    self->status = STMT_READY;
-   self->manual_result = FALSE;        /* very important */
+   self->manual_result = FALSE;    /* very important */
 
    self->currTuple = -1;
    self->rowset_start = -1;
@@ -537,7 +537,7 @@ SC_recycle_statement(StatementClass * self)
 
 /* Pre-execute a statement (SQLPrepare/SQLDescribeCol) */
 void
-SC_pre_execute(StatementClass * self)
+SC_pre_execute(StatementClass *self)
 {
    mylog("SC_pre_execute: status = %d\n", self->status);
 
@@ -576,7 +576,7 @@ SC_pre_execute(StatementClass * self)
 
 /* This is only called from SQLFreeStmt(SQL_UNBIND) */
 char
-SC_unbind_cols(StatementClass * self)
+SC_unbind_cols(StatementClass *self)
 {
    Int2        lf;
 
@@ -597,7 +597,7 @@ SC_unbind_cols(StatementClass * self)
 
 
 void
-SC_clear_error(StatementClass * self)
+SC_clear_error(StatementClass *self)
 {
    if (self->errormsg_malloced && self->errormsg)
        free(self->errormsg);
@@ -613,7 +613,7 @@ SC_clear_error(StatementClass * self)
  * of the result, statement, connection, and socket messages.
  */
 char *
-SC_create_errormsg(StatementClass * self)
+SC_create_errormsg(StatementClass *self)
 {
    QResultClass *res = self->result;
    ConnectionClass *conn = self->hdbc;
@@ -652,7 +652,7 @@ SC_create_errormsg(StatementClass * self)
 
 
 char
-SC_get_error(StatementClass * self, int *number, char **message)
+SC_get_error(StatementClass *self, int *number, char **message)
 {
    char        rv;
 
@@ -684,14 +684,14 @@ SC_get_error(StatementClass * self, int *number, char **message)
  * someday, such as mapping a key to a 32 bit value
  */
 unsigned long
-SC_get_bookmark(StatementClass * self)
+SC_get_bookmark(StatementClass *self)
 {
    return (self->currTuple + 1);
 }
 
 
 RETCODE
-SC_fetch(StatementClass * self)
+SC_fetch(StatementClass *self)
 {
    static char *func = "SC_fetch";
    QResultClass *res = self->result;
@@ -741,7 +741,7 @@ SC_fetch(StatementClass * self)
            return SQL_NO_DATA_FOUND;
        }
        else if (retval > 0)
-           (self->currTuple)++;        /* all is well */
+           (self->currTuple)++;    /* all is well */
        else
        {
            mylog("SC_fetch: error\n");
@@ -876,7 +876,7 @@ SC_fetch(StatementClass * self)
 
 
 RETCODE
-SC_execute(StatementClass * self)
+SC_execute(StatementClass *self)
 {
    static char *func = "SC_execute";
    ConnectionClass *conn;
@@ -1107,7 +1107,7 @@ SC_execute(StatementClass * self)
 
 
 void
-SC_log_error(char *func, char *desc, StatementClass * self)
+SC_log_error(char *func, char *desc, StatementClass *self)
 {
 #ifdef PRN_NULLCHECK
 #define nullcheck(a) (a ? a : "(NULL)")
index 801c334bf3a0bdbadf9f2e7e3504fbdc917a1451..9b52f25694a7af2916f5e6c418054b15c5b505a7 100644 (file)
 
 typedef enum
 {
-               STMT_ALLOCATED, /* The statement handle is allocated, but
+   STMT_ALLOCATED,             /* The statement handle is allocated, but
                                 * not used so far */
-               STMT_READY,     /* the statement is waiting to be executed */
-               STMT_PREMATURE, /* ODBC states that it is legal to call
+   STMT_READY,                 /* the statement is waiting to be executed */
+   STMT_PREMATURE,             /* ODBC states that it is legal to call
                                 * e.g. SQLDescribeCol before a call to
                                 * SQLExecute, but after SQLPrepare. To
                                 * get all the necessary information in
@@ -34,9 +34,9 @@ typedef enum
                                 * query _before_ the actual call to
                                 * SQLExecute, so that statement is
                                 * considered to be "premature". */
-               STMT_FINISHED,  /* statement execution has finished */
-               STMT_EXECUTING  /* statement execution is still going on */
-}          STMT_Status;
+   STMT_FINISHED,              /* statement execution has finished */
+   STMT_EXECUTING              /* statement execution is still going on */
+} STMT_Status;
 
 #define STMT_ROW_VERSION_CHANGED                   (-4)
 #define STMT_POS_BEFORE_RECORDSET                  (-3)
@@ -79,18 +79,18 @@ typedef enum
 /* statement types */
 enum
 {
-               STMT_TYPE_UNKNOWN = -2,
-               STMT_TYPE_OTHER = -1,
-               STMT_TYPE_SELECT = 0,
-               STMT_TYPE_INSERT,
-               STMT_TYPE_UPDATE,
-               STMT_TYPE_DELETE,
-               STMT_TYPE_CREATE,
-               STMT_TYPE_ALTER,
-               STMT_TYPE_DROP,
-               STMT_TYPE_GRANT,
-               STMT_TYPE_REVOKE,
-               STMT_TYPE_PROCCALL
+   STMT_TYPE_UNKNOWN = -2,
+   STMT_TYPE_OTHER = -1,
+   STMT_TYPE_SELECT = 0,
+   STMT_TYPE_INSERT,
+   STMT_TYPE_UPDATE,
+   STMT_TYPE_DELETE,
+   STMT_TYPE_CREATE,
+   STMT_TYPE_ALTER,
+   STMT_TYPE_DROP,
+   STMT_TYPE_GRANT,
+   STMT_TYPE_REVOKE,
+   STMT_TYPE_PROCCALL
 };
 
 #define STMT_UPDATE(stmt)  (stmt->statement_type > STMT_TYPE_SELECT)
@@ -99,18 +99,18 @@ enum
 /* Parsing status */
 enum
 {
-               STMT_PARSE_NONE = 0,
-               STMT_PARSE_COMPLETE,
-               STMT_PARSE_INCOMPLETE,
-               STMT_PARSE_FATAL,
+   STMT_PARSE_NONE = 0,
+   STMT_PARSE_COMPLETE,
+   STMT_PARSE_INCOMPLETE,
+   STMT_PARSE_FATAL,
 };
 
 /* Result style */
 enum
 {
-               STMT_FETCH_NONE = 0,
-               STMT_FETCH_NORMAL,
-               STMT_FETCH_EXTENDED,
+   STMT_FETCH_NONE = 0,
+   STMT_FETCH_NORMAL,
+   STMT_FETCH_EXTENDED,
 };
 
 typedef struct
@@ -118,7 +118,7 @@ typedef struct
    COL_INFO   *col_info;       /* cached SQLColumns info for this table */
    char        name[MAX_TABLE_LEN + 1];
    char        alias[MAX_TABLE_LEN + 1];
-}          TABLE_INFO;
+} TABLE_INFO;
 
 typedef struct
 {
@@ -137,7 +137,7 @@ typedef struct
    char        dot[MAX_TABLE_LEN + 1];
    char        name[MAX_COLUMN_LEN + 1];
    char        alias[MAX_COLUMN_LEN + 1];
-}          FIELD_INFO;
+} FIELD_INFO;
 
 
 /********  Statement Handle    ***********/
@@ -234,21 +234,21 @@ struct StatementClass_
 
 /* Statement prototypes */
 StatementClass *SC_Constructor(void);
-void       InitializeStatementOptions(StatementOptions * opt);
-char       SC_Destructor(StatementClass * self);
+void       InitializeStatementOptions(StatementOptions *opt);
+char       SC_Destructor(StatementClass *self);
 int            statement_type(char *statement);
-char       parse_statement(StatementClass * stmt);
-void       SC_pre_execute(StatementClass * self);
-char       SC_unbind_cols(StatementClass * self);
-char       SC_recycle_statement(StatementClass * self);
-
-void       SC_clear_error(StatementClass * self);
-char       SC_get_error(StatementClass * self, int *number, char **message);
-char      *SC_create_errormsg(StatementClass * self);
-RETCODE        SC_execute(StatementClass * self);
-RETCODE        SC_fetch(StatementClass * self);
-void       SC_free_params(StatementClass * self, char option);
-void       SC_log_error(char *func, char *desc, StatementClass * self);
-unsigned long SC_get_bookmark(StatementClass * self);
+char       parse_statement(StatementClass *stmt);
+void       SC_pre_execute(StatementClass *self);
+char       SC_unbind_cols(StatementClass *self);
+char       SC_recycle_statement(StatementClass *self);
+
+void       SC_clear_error(StatementClass *self);
+char       SC_get_error(StatementClass *self, int *number, char **message);
+char      *SC_create_errormsg(StatementClass *self);
+RETCODE        SC_execute(StatementClass *self);
+RETCODE        SC_fetch(StatementClass *self);
+void       SC_free_params(StatementClass *self, char option);
+void       SC_log_error(char *func, char *desc, StatementClass *self);
+unsigned long SC_get_bookmark(StatementClass *self);
 
 #endif
diff --git a/tuple.c b/tuple.c
index 94d0bc17d32202b88126a0a689fab08e6454028a..512f36d2b23de4fdd2b607d67bf130a0a583b56c 100644 (file)
--- a/tuple.c
+++ b/tuple.c
@@ -24,7 +24,7 @@
 
 
 void
-set_tuplefield_null(TupleField * tuple_field)
+set_tuplefield_null(TupleField *tuple_field)
 {
    tuple_field->len = 0;
    tuple_field->value = NULL;  /* strdup(""); */
@@ -32,7 +32,7 @@ set_tuplefield_null(TupleField * tuple_field)
 
 
 void
-set_tuplefield_string(TupleField * tuple_field, char *string)
+set_tuplefield_string(TupleField *tuple_field, char *string)
 {
    tuple_field->len = strlen(string);
    tuple_field->value = malloc(strlen(string) + 1);
@@ -41,7 +41,7 @@ set_tuplefield_string(TupleField * tuple_field, char *string)
 
 
 void
-set_tuplefield_int2(TupleField * tuple_field, Int2 value)
+set_tuplefield_int2(TupleField *tuple_field, Int2 value)
 {
    char        buffer[10];
 
@@ -54,7 +54,7 @@ set_tuplefield_int2(TupleField * tuple_field, Int2 value)
 
 
 void
-set_tuplefield_int4(TupleField * tuple_field, Int4 value)
+set_tuplefield_int4(TupleField *tuple_field, Int4 value)
 {
    char        buffer[15];
 
diff --git a/tuple.h b/tuple.h
index 6cd87cb9dbba10ae3c6b42f450a4ca787d429125..fdc1a5f9eaab04b5b46989e16250e21672e9e5d4 100644 (file)
--- a/tuple.h
+++ b/tuple.h
@@ -38,8 +38,9 @@ struct TupleNode_
 #define set_nullfield_int2(FLD, VAL)       ((VAL) != -1 ? set_tuplefield_int2(FLD, (VAL)) : set_tuplefield_null(FLD))
 #define set_nullfield_int4(FLD, VAL)       ((VAL) != -1 ? set_tuplefield_int4(FLD, (VAL)) : set_tuplefield_null(FLD))
 
-void       set_tuplefield_null(TupleField * tuple_field);
-void       set_tuplefield_string(TupleField * tuple_field, char *string);
-void       set_tuplefield_int2(TupleField * tuple_field, Int2 value);
-void       set_tuplefield_int4(TupleField * tuple_field, Int4 value);
+void       set_tuplefield_null(TupleField *tuple_field);
+void       set_tuplefield_string(TupleField *tuple_field, char *string);
+void       set_tuplefield_int2(TupleField *tuple_field, Int2 value);
+void       set_tuplefield_int4(TupleField *tuple_field, Int4 value);
+
 #endif
index e00ab430062c51cdc55140447adb7ebefa4c9b60..0ae2130bff4d0ae1fbffa642c2e1656085d07b56 100644 (file)
@@ -44,7 +44,7 @@ TL_Constructor(UInt4 fieldcnt)
 
 
 void
-TL_Destructor(TupleListClass * self)
+TL_Destructor(TupleListClass *self)
 {
    int         lf;
    TupleNode  *node,
@@ -70,7 +70,7 @@ TL_Destructor(TupleListClass * self)
 
 
 void *
-TL_get_fieldval(TupleListClass * self, Int4 tupleno, Int2 fieldno)
+TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno)
 {
    Int4        lf;
    Int4        delta,
@@ -181,7 +181,7 @@ TL_get_fieldval(TupleListClass * self, Int4 tupleno, Int2 fieldno)
 
 
 char
-TL_add_tuple(TupleListClass * self, TupleNode * new_field)
+TL_add_tuple(TupleListClass *self, TupleNode *new_field)
 {
    /*
     * we append the tuple at the end of the doubly linked list of the
index 5ce2613e86a960f5ca43800496e16cd06479bcef..3dc98dd78ff34043fa942d0c3cb765d16ca561cc 100644 (file)
@@ -28,7 +28,8 @@ struct TupleListClass_
 
 /* Create a TupleList. Each tuple consits of fieldcnt columns */
 TupleListClass *TL_Constructor(UInt4 fieldcnt);
-void       TL_Destructor(TupleListClass * self);
-void      *TL_get_fieldval(TupleListClass * self, Int4 tupleno, Int2 fieldno);
-char       TL_add_tuple(TupleListClass * self, TupleNode * new_field);
+void       TL_Destructor(TupleListClass *self);
+void      *TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno);
+char       TL_add_tuple(TupleListClass *self, TupleNode *new_field);
+
 #endif