SWORD ibScale,
PTR rgbValue,
SDWORD cbValueMax,
- SDWORD FAR * pcbValue)
+ SDWORD FAR *pcbValue)
{
StatementClass *stmt = (StatementClass *) hstmt;
static char *func = "SQLBindParameter";
SWORD fCType,
PTR rgbValue,
SDWORD cbValueMax,
- SDWORD FAR * pcbValue)
+ SDWORD FAR *pcbValue)
{
StatementClass *stmt = (StatementClass *) hstmt;
static char *func = "SQLBindCol";
SQLDescribeParam(
HSTMT hstmt,
UWORD ipar,
- SWORD FAR * pfSqlType,
- UDWORD FAR * pcbColDef,
- SWORD FAR * pibScale,
- SWORD FAR * pfNullable)
+ SWORD FAR *pfSqlType,
+ UDWORD FAR *pcbColDef,
+ SWORD FAR *pibScale,
+ SWORD FAR *pfNullable)
{
StatementClass *stmt = (StatementClass *) hstmt;
static char *func = "SQLDescribeParam";
SQLParamOptions(
HSTMT hstmt,
UDWORD crow,
- UDWORD FAR * pirow)
+ UDWORD FAR *pirow)
{
static char *func = "SQLParamOptions";
RETCODE SQL_API
SQLNumParams(
HSTMT hstmt,
- SWORD FAR * pcpar)
+ SWORD FAR *pcpar)
{
StatementClass *stmt = (StatementClass *) hstmt;
char in_quote = FALSE;
}
void
-extend_bindings(StatementClass * stmt, int num_columns)
+extend_bindings(StatementClass *stmt, int num_columns)
{
static char *func = "extend_bindings";
BindInfoClass *new_bindings;
};
BindInfoClass *create_empty_bindings(int num_columns);
-void extend_bindings(StatementClass * stmt, int num_columns);
+void extend_bindings(StatementClass *stmt, int num_columns);
#endif
}
void
-CI_Destructor(ColumnInfoClass * self)
+CI_Destructor(ColumnInfoClass *self)
{
CI_free_memory(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;
void
-CI_free_memory(ColumnInfoClass * self)
+CI_free_memory(ColumnInfoClass *self)
{
register Int2 lf;
int num_fields = self->num_fields;
}
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 */
}
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 */
#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);
RETCODE SQL_API
SQLAllocConnect(
HENV henv,
- HDBC FAR * phdbc)
+ HDBC FAR *phdbc)
{
EnvironmentClass *env = (EnvironmentClass *) henv;
ConnectionClass *conn;
RETCODE SQL_API
SQLConnect(
HDBC hdbc,
- UCHAR FAR * szDSN,
+ UCHAR FAR *szDSN,
SWORD cbDSN,
- UCHAR FAR * szUID,
+ UCHAR FAR *szUID,
SWORD cbUID,
- UCHAR FAR * szAuthStr,
+ UCHAR FAR *szAuthStr,
SWORD cbAuthStr)
{
ConnectionClass *conn = (ConnectionClass *) hdbc;
RETCODE SQL_API
SQLBrowseConnect(
HDBC hdbc,
- UCHAR FAR * szConnStrIn,
+ UCHAR FAR *szConnStrIn,
SWORD cbConnStrIn,
- UCHAR FAR * szConnStrOut,
+ UCHAR FAR *szConnStrOut,
SWORD cbConnStrOutMax,
- SWORD FAR * pcbConnStrOut)
+ SWORD FAR *pcbConnStrOut)
{
static char *func = "SQLBrowseConnect";
char
-CC_Destructor(ConnectionClass * self)
+CC_Destructor(ConnectionClass *self)
{
mylog("enter CC_Destructor, self=%u\n", 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,
}
void
-CC_clear_error(ConnectionClass * self)
+CC_clear_error(ConnectionClass *self)
{
self->errornumber = 0;
self->errormsg = NULL;
/* Used to cancel a transaction */
/* We are almost always in the middle of a transaction. */
char
-CC_abort(ConnectionClass * self)
+CC_abort(ConnectionClass *self)
{
QResultClass *res;
/* This is called by SQLDisconnect also */
char
-CC_cleanup(ConnectionClass * self)
+CC_cleanup(ConnectionClass *self)
{
int i;
StatementClass *stmt;
}
int
-CC_set_translation(ConnectionClass * self)
+CC_set_translation(ConnectionClass *self)
{
#ifdef WIN32
}
char
-CC_connect(ConnectionClass * self, char do_password)
+CC_connect(ConnectionClass *self, char do_password)
{
StartupPacket sp;
QResultClass *res;
}
char
-CC_add_statement(ConnectionClass * self, StatementClass * stmt)
+CC_add_statement(ConnectionClass *self, StatementClass *stmt)
{
int i;
}
char
-CC_remove_statement(ConnectionClass * self, StatementClass * stmt)
+CC_remove_statement(ConnectionClass *self, StatementClass *stmt)
{
int i;
error message with its socket error message.
*/
char *
-CC_create_errormsg(ConnectionClass * self)
+CC_create_errormsg(ConnectionClass *self)
{
SocketClass *sock = self->sock;
int pos;
char
-CC_get_error(ConnectionClass * self, int *number, char **message)
+CC_get_error(ConnectionClass *self, int *number, char **message)
{
int rv;
'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,
*res = NULL;
}
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,
char
-CC_send_settings(ConnectionClass * self)
+CC_send_settings(ConnectionClass *self)
{
/* char ini_query[MAX_MESSAGE_LEN]; */
ConnInfo *ci = &(self->connInfo);
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;
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);
self->pg_version_number = (float) 6.4;
DJP - 25-1-2001
*/
void
-CC_lookup_pg_version(ConnectionClass * self)
+CC_lookup_pg_version(ConnectionClass *self)
{
HSTMT hstmt;
StatementClass *stmt;
}
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)")
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
char translation_dll[MEDIUM_REGISTRY_LEN];
char translation_option[SMALL_REGISTRY_LEN];
char focus_password;
-} ConnInfo;
+} ConnInfo;
/*
* Macros to compare the server's version with a specified version
#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_
/* 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);
+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);
#endif
/* 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]);
/* 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;
This function no longer does any dynamic memory allocation!
*/
int
-copy_statement_with_parameters(StatementClass * stmt)
+copy_statement_with_parameters(StatementClass *stmt)
{
static char *func = "copy_statement_with_parameters";
unsigned int opos,
/* This function parses a character string for date/time info and fills in SIMPLE_TIME */
/* 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,
mapped to PG_TYPE_LO someday, instead of PG_TYPE_TEXT as it is now.
*/
int
-convert_lo(StatementClass * stmt, void *value, Int2 fCType, PTR rgbValue,
- SDWORD cbValueMax, SDWORD * pcbValue)
+convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue,
+ SDWORD cbValueMax, SDWORD *pcbValue)
{
Oid oid;
int retval,
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);
char *convert_money(char *s);
-char parse_datetime(char *buf, SIMPLE_TIME * st);
+char parse_datetime(char *buf, SIMPLE_TIME *st);
int convert_linefeeds(char *s, char *dst, size_t max);
char *convert_special_chars(char *si, char *dst, int used);
int convert_to_pgbinary(unsigned char *in, char *out, int len);
void encode(char *in, char *out);
void decode(char *in, char *out);
-int convert_lo(StatementClass * stmt, void *value, Int2 fCType, PTR rgbValue,
- SDWORD cbValueMax, SDWORD * pcbValue);
+int convert_lo(StatementClass *stmt, void *value, Int2 fCType, PTR rgbValue,
+ SDWORD cbValueMax, SDWORD *pcbValue);
#endif
#ifdef WIN32
void
-SetDlgStuff(HWND hdlg, ConnInfo * ci)
+SetDlgStuff(HWND hdlg, ConnInfo *ci)
{
/*
}
void
-GetDlgStuff(HWND hdlg, ConnInfo * ci)
+GetDlgStuff(HWND hdlg, ConnInfo *ci)
{
GetDlgItemText(hdlg, IDC_DESC, ci->desc, sizeof(ci->desc));
#endif /* WIN32 */
void
-makeConnectString(char *connect_string, ConnInfo * ci)
+makeConnectString(char *connect_string, ConnInfo *ci)
{
char got_dsn = (ci->dsn[0] != '\0');
char encoded_conn_settings[LARGE_REGISTRY_LEN];
}
void
-copyAttributes(ConnInfo * ci, char *attribute, char *value)
+copyAttributes(ConnInfo *ci, char *attribute, char *value)
{
if (stricmp(attribute, "DSN") == 0)
strcpy(ci->dsn, value);
}
void
-getDSNdefaults(ConnInfo * ci)
+getDSNdefaults(ConnInfo *ci)
{
if (ci->port[0] == '\0')
strcpy(ci->port, DEFAULT_PORT);
void
-getDSNinfo(ConnInfo * ci, char overwrite)
+getDSNinfo(ConnInfo *ci, char overwrite)
{
char *DSN = ci->dsn;
char encoded_conn_settings[LARGE_REGISTRY_LEN];
/* This is for datasource based options only */
void
-writeDSNinfo(ConnInfo * ci)
+writeDSNinfo(ConnInfo *ci)
{
char *DSN = ci->dsn;
char encoded_conn_settings[LARGE_REGISTRY_LEN];
void getGlobalDefaults(char *section, char *filename, char override);
#ifdef WIN32
-void SetDlgStuff(HWND hdlg, ConnInfo * ci);
-void GetDlgStuff(HWND hdlg, ConnInfo * ci);
+void SetDlgStuff(HWND hdlg, ConnInfo *ci);
+void GetDlgStuff(HWND hdlg, ConnInfo *ci);
int CALLBACK driver_optionsProc(HWND hdlg,
WORD wMsg,
#endif /* WIN32 */
void updateGlobals(void);
-void writeDSNinfo(ConnInfo * ci);
-void getDSNdefaults(ConnInfo * ci);
-void getDSNinfo(ConnInfo * ci, char overwrite);
-void makeConnectString(char *connect_string, ConnInfo * ci);
-void copyAttributes(ConnInfo * ci, char *attribute, char *value);
+void writeDSNinfo(ConnInfo *ci);
+void getDSNdefaults(ConnInfo *ci);
+void getDSNinfo(ConnInfo *ci, char overwrite);
+void makeConnectString(char *connect_string, ConnInfo *ci);
+void copyAttributes(ConnInfo *ci, char *attribute, char *value);
#endif
#include "dlg_specific.h"
/* prototypes */
-void dconn_get_connect_attributes(UCHAR FAR * connect_string, ConnInfo * ci);
+void dconn_get_connect_attributes(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. */
SQLDriverConnect(
HDBC hdbc,
HWND hwnd,
- UCHAR FAR * szConnStrIn,
+ UCHAR FAR *szConnStrIn,
SWORD cbConnStrIn,
- UCHAR FAR * szConnStrOut,
+ UCHAR FAR *szConnStrOut,
SWORD cbConnStrOutMax,
- SWORD FAR * pcbConnStrOut,
+ SWORD FAR *pcbConnStrOut,
UWORD fDriverCompletion)
{
static char *func = "SQLDriverConnect";
#ifdef WIN32
RETCODE
-dconn_DoDialog(HWND hwnd, ConnInfo * ci)
+dconn_DoDialog(HWND hwnd, ConnInfo *ci)
{
int dialog_result;
#endif /* WIN32 */
void
-dconn_get_connect_attributes(UCHAR FAR * connect_string, ConnInfo * ci)
+dconn_get_connect_attributes(UCHAR FAR *connect_string, ConnInfo *ci)
{
char *our_connect_string;
char *pair,
RETCODE SQL_API
-SQLAllocEnv(HENV FAR * phenv)
+SQLAllocEnv(HENV FAR *phenv)
{
static char *func = "SQLAllocEnv";
HENV henv,
HDBC hdbc,
HSTMT hstmt,
- UCHAR FAR * szSqlState,
- SDWORD FAR * pfNativeError,
- UCHAR FAR * szErrorMsg,
+ UCHAR FAR *szSqlState,
+ SDWORD FAR *pfNativeError,
+ UCHAR FAR *szErrorMsg,
SWORD cbErrorMsgMax,
- SWORD FAR * pcbErrorMsg)
+ SWORD FAR *pcbErrorMsg)
{
char *msg;
int status;
EnvironmentClass
-* EN_Constructor(void)
+ *
+EN_Constructor(void)
{
EnvironmentClass *rv;
char
-EN_Destructor(EnvironmentClass * self)
+EN_Destructor(EnvironmentClass *self)
{
int lf;
char rv = 1;
}
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)
{
}
char
-EN_add_connection(EnvironmentClass * self, ConnectionClass * conn)
+EN_add_connection(EnvironmentClass *self, ConnectionClass *conn)
{
int i;
}
char
-EN_remove_connection(EnvironmentClass * self, ConnectionClass * conn)
+EN_remove_connection(EnvironmentClass *self, ConnectionClass *conn)
{
int i;
}
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);
/* 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
/* Perform a Prepare on the SQL statement */
RETCODE SQL_API
SQLPrepare(HSTMT hstmt,
- UCHAR FAR * szSqlStr,
+ UCHAR FAR *szSqlStr,
SDWORD cbSqlStr)
{
static char *func = "SQLPrepare";
RETCODE SQL_API
SQLExecDirect(
HSTMT hstmt,
- UCHAR FAR * szSqlStr,
+ UCHAR FAR *szSqlStr,
SDWORD cbSqlStr)
{
StatementClass *stmt = (StatementClass *) hstmt;
RETCODE SQL_API
SQLNativeSql(
HDBC hdbc,
- UCHAR FAR * szSqlStrIn,
+ UCHAR FAR *szSqlStrIn,
SDWORD cbSqlStrIn,
- UCHAR FAR * szSqlStr,
+ UCHAR FAR *szSqlStr,
SDWORD cbSqlStrMax,
- SDWORD FAR * pcbSqlStr)
+ SDWORD FAR *pcbSqlStr)
{
static char *func = "SQLNativeSql";
int len = 0;
RETCODE SQL_API
SQLParamData(
HSTMT hstmt,
- PTR FAR * prgbValue)
+ PTR FAR *prgbValue)
{
static char *func = "SQLParamData";
StatementClass *stmt = (StatementClass *) hstmt;
#endif
DWORD
- GetPrivateProfileString(char *theSection, /* section name */
- char *theKey, /* search key name */
- char *theDefault, /* default value if not
- * found */
- char *theReturnBuffer, /* return valuse stored
- * here */
- size_t theBufferLength, /* byte length of return
- * buffer */
- char *theIniFileName); /* pathname of ini file
- * to search */
+ GetPrivateProfileString(char *theSection, /* section name */
+ char *theKey, /* search key name */
+ char *theDefault, /* default value if not
+ * found */
+ char *theReturnBuffer, /* return valuse stored
+ * here */
+ size_t theBufferLength, /* byte length of return
+ * buffer */
+ char *theIniFileName); /* pathname of ini file
+ * to search */
DWORD
- WritePrivateProfileString(char *theSection, /* section name */
- char *theKey, /* write key name */
- char *theBuffer, /* input buffer */
- char *theIniFileName); /* pathname of ini file
- * to write */
+ WritePrivateProfileString(char *theSection, /* section name */
+ char *theKey, /* write key name */
+ char *theBuffer, /* input buffer */
+ char *theIniFileName); /* pathname of ini file
+ * to write */
#ifdef __cplusplus
}
UWORD fInfoType,
PTR rgbInfoValue,
SWORD cbInfoValueMax,
- SWORD FAR * pcbInfoValue)
+ SWORD FAR *pcbInfoValue)
{
static char *func = "SQLGetInfo";
ConnectionClass *conn = (ConnectionClass *) hdbc;
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));
SQLGetFunctions(
HDBC hdbc,
UWORD fFunction,
- UWORD FAR * pfExists)
+ UWORD FAR *pfExists)
{
static char *func = "SQLGetFunctions";
RETCODE SQL_API
SQLTables(
HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
- UCHAR FAR * szTableType,
+ UCHAR FAR *szTableType,
SWORD cbTableType)
{
static char *func = "SQLTables";
(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], "");
RETCODE SQL_API
SQLColumns(
HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
- UCHAR FAR * szColumnName,
+ UCHAR FAR *szColumnName,
SWORD cbColumnName)
{
static char *func = "SQLColumns";
/* 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() */
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], "");
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], "");
SQLSpecialColumns(
HSTMT hstmt,
UWORD fColType,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
UWORD fScope,
UWORD fNullable)
/* 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");
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");
RETCODE SQL_API
SQLStatistics(
HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
UWORD fUnique,
UWORD fAccuracy)
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], "");
while (i < 8 && 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], "");
RETCODE SQL_API
SQLColumnPrivileges(
HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
- UCHAR FAR * szColumnName,
+ UCHAR FAR *szColumnName,
SWORD cbColumnName)
{
static char *func = "SQLColumnPrivileges";
RETCODE SQL_API
SQLPrimaryKeys(
HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName)
{
static char *func = "SQLPrimaryKeys";
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]);
RETCODE SQL_API
SQLForeignKeys(
HSTMT hstmt,
- UCHAR FAR * szPkTableQualifier,
+ UCHAR FAR *szPkTableQualifier,
SWORD cbPkTableQualifier,
- UCHAR FAR * szPkTableOwner,
+ UCHAR FAR *szPkTableOwner,
SWORD cbPkTableOwner,
- UCHAR FAR * szPkTableName,
+ UCHAR FAR *szPkTableName,
SWORD cbPkTableName,
- UCHAR FAR * szFkTableQualifier,
+ UCHAR FAR *szFkTableQualifier,
SWORD cbFkTableQualifier,
- UCHAR FAR * szFkTableOwner,
+ UCHAR FAR *szFkTableOwner,
SWORD cbFkTableOwner,
- UCHAR FAR * szFkTableName,
+ UCHAR FAR *szFkTableName,
SWORD cbFkTableName)
{
static char *func = "SQLForeignKeys";
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));
mylog("%s: pk_table = '%s', pkey_ptr = '%s'\n", func, pk_table, pkey_ptr);
set_tuplefield_null(&row->tuple[0]);
{
mylog("pkey_ptr = '%s', fk_table = '%s', fkey_ptr = '%s'\n", pkey_ptr, fk_table, fkey_ptr);
- 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_ptr);
set_tuplefield_null(&row->tuple[0]);
RETCODE SQL_API
SQLProcedureColumns(
HSTMT hstmt,
- UCHAR FAR * szProcQualifier,
+ UCHAR FAR *szProcQualifier,
SWORD cbProcQualifier,
- UCHAR FAR * szProcOwner,
+ UCHAR FAR *szProcOwner,
SWORD cbProcOwner,
- UCHAR FAR * szProcName,
+ UCHAR FAR *szProcName,
SWORD cbProcName,
- UCHAR FAR * szColumnName,
+ UCHAR FAR *szColumnName,
SWORD cbColumnName)
{
static char *func = "SQLProcedureColumns";
RETCODE SQL_API
SQLProcedures(
HSTMT hstmt,
- UCHAR FAR * szProcQualifier,
+ UCHAR FAR *szProcQualifier,
SWORD cbProcQualifier,
- UCHAR FAR * szProcOwner,
+ UCHAR FAR *szProcOwner,
SWORD cbProcOwner,
- UCHAR FAR * szProcName,
+ UCHAR FAR *szProcName,
SWORD cbProcName)
{
static char *func = "SQLProcedures";
RETCODE SQL_API
SQLTablePrivileges(
HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName)
{
static char *func = "SQLTablePrivileges";
#endif
RETCODE SQL_API SQLAllocConnect(HENV henv,
- HDBC FAR * phdbc);
- RETCODE SQL_API SQLAllocEnv(HENV FAR * phenv);
+ HDBC FAR *phdbc);
+ RETCODE SQL_API SQLAllocEnv(HENV FAR *phenv);
RETCODE SQL_API SQLAllocStmt(HDBC hdbc,
- HSTMT FAR * phstmt);
+ HSTMT FAR *phstmt);
RETCODE SQL_API SQLBindCol(HSTMT hstmt,
UWORD icol,
SWORD fCType,
PTR rgbValue,
SDWORD cbValueMax,
- SDWORD FAR * pcbValue);
+ SDWORD FAR *pcbValue);
RETCODE SQL_API SQLCancel(HSTMT hstmt);
UWORD fDescType,
PTR rgbDesc,
SWORD cbDescMax,
- SWORD FAR * pcbDesc,
- SDWORD FAR * pfDesc);
+ SWORD FAR *pcbDesc,
+ SDWORD FAR *pfDesc);
RETCODE SQL_API SQLConnect(HDBC hdbc,
- UCHAR FAR * szDSN,
+ UCHAR FAR *szDSN,
SWORD cbDSN,
- UCHAR FAR * szUID,
+ UCHAR FAR *szUID,
SWORD cbUID,
- UCHAR FAR * szAuthStr,
+ UCHAR FAR *szAuthStr,
SWORD cbAuthStr);
RETCODE SQL_API SQLDescribeCol(HSTMT hstmt,
UWORD icol,
- UCHAR FAR * szColName,
+ UCHAR FAR *szColName,
SWORD cbColNameMax,
- SWORD FAR * pcbColName,
- SWORD FAR * pfSqlType,
- UDWORD FAR * pcbColDef,
- SWORD FAR * pibScale,
- SWORD FAR * pfNullable);
+ SWORD FAR *pcbColName,
+ SWORD FAR *pfSqlType,
+ UDWORD FAR *pcbColDef,
+ SWORD FAR *pibScale,
+ SWORD FAR *pfNullable);
RETCODE SQL_API SQLDisconnect(HDBC hdbc);
RETCODE SQL_API SQLError(HENV henv,
HDBC hdbc,
HSTMT hstmt,
- UCHAR FAR * szSqlState,
- SDWORD FAR * pfNativeError,
- UCHAR FAR * szErrorMsg,
+ UCHAR FAR *szSqlState,
+ SDWORD FAR *pfNativeError,
+ UCHAR FAR *szErrorMsg,
SWORD cbErrorMsgMax,
- SWORD FAR * pcbErrorMsg);
+ SWORD FAR *pcbErrorMsg);
RETCODE SQL_API SQLExecDirect(HSTMT hstmt,
- UCHAR FAR * szSqlStr,
+ UCHAR FAR *szSqlStr,
SDWORD cbSqlStr);
RETCODE SQL_API SQLExecute(HSTMT hstmt);
UWORD fOption);
RETCODE SQL_API SQLGetCursorName(HSTMT hstmt,
- UCHAR FAR * szCursor,
+ UCHAR FAR *szCursor,
SWORD cbCursorMax,
- SWORD FAR * pcbCursor);
+ SWORD FAR *pcbCursor);
- RETCODE SQL_API SQLNumResultCols(HSTMT hstmt, SWORD FAR * pccol);
+ RETCODE SQL_API SQLNumResultCols(HSTMT hstmt, SWORD FAR *pccol);
- RETCODE SQL_API SQLPrepare(HSTMT hstmt, UCHAR FAR * szSqlStr,
+ RETCODE SQL_API SQLPrepare(HSTMT hstmt, UCHAR FAR *szSqlStr,
SDWORD cbSqlStr);
- RETCODE SQL_API SQLRowCount(HSTMT hstmt, SDWORD FAR * pcrow);
+ RETCODE SQL_API SQLRowCount(HSTMT hstmt, SDWORD FAR *pcrow);
- RETCODE SQL_API SQLSetCursorName(HSTMT hstmt, UCHAR FAR * szCursor,
+ RETCODE SQL_API SQLSetCursorName(HSTMT hstmt, UCHAR FAR *szCursor,
SWORD cbCursor);
RETCODE SQL_API SQLTransact(HENV henv, HDBC hdbc,
UDWORD cbColDef,
SWORD ibScale,
PTR rgbValue,
- SDWORD FAR * pcbValue);
+ SDWORD FAR *pcbValue);
#ifdef __cplusplus
}
{
SQLUINTEGER dwLowWord;
SQLUINTEGER dwHighWord;
-} SQLUBIGINT;
+} SQLUBIGINT;
typedef struct
{
SQLUINTEGER dwLowWord;
SQLINTEGER dwHighWord;
-} SQLBIGINT;
+} SQLBIGINT;
#endif /* GCC */
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
-} DATE_STRUCT, SQL_DATE_STRUCT;
+} DATE_STRUCT,
+SQL_DATE_STRUCT;
typedef struct tagTIME_STRUCT
{
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
-} TIME_STRUCT, SQL_TIME_STRUCT;
+} TIME_STRUCT,
+SQL_TIME_STRUCT;
typedef struct tagTIMESTAMP_STRUCT
{
SQLUSMALLINT minute;
SQLUSMALLINT second;
SQLUINTEGER fraction;
-} TIMESTAMP_STRUCT, SQL_TIMESTAMP_STRUCT;
+} 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
WORD Data2;
WORD Data3;
BYTE Data4[8];
-} SQLGUID;
+} SQLGUID;
typedef enum
{
{
SQLUINTEGER year;
SQLUINTEGER month;
-} SQL_YEAR_MONTH_STRUCT;
+} SQL_YEAR_MONTH_STRUCT;
typedef struct tagSQL_DAY_SECOND
{
SQLUINTEGER minute;
SQLUINTEGER second;
SQLUINTEGER fraction;
-} SQL_DAY_SECOND_STRUCT;
+} SQL_DAY_SECOND_STRUCT;
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)
* function prototypes previously missing from isqlext.h
*/
RETCODE SQL_API SQLColumns(HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
- UCHAR FAR * szColumnName,
+ UCHAR FAR *szColumnName,
SWORD cbColumnName);
RETCODE SQL_API SQLDriverConnect(HDBC hdbc,
HWND hwnd,
- UCHAR FAR * szConnStrIn,
+ UCHAR FAR *szConnStrIn,
SWORD cbConnStrIn,
- UCHAR FAR * szConnStrOut,
+ UCHAR FAR *szConnStrOut,
SWORD cbConnStrOutMax,
- SWORD FAR * pcbConnStrOut,
+ SWORD FAR *pcbConnStrOut,
UWORD fDriverCompletion);
RETCODE SQL_API SQLGetConnectOption(HDBC hdbc,
SWORD fCType,
PTR rgbValue,
SDWORD cbValueMax,
- SDWORD FAR * pcbValue);
+ SDWORD FAR *pcbValue);
RETCODE SQL_API SQLGetFunctions(HDBC hdbc,
UWORD fFunction,
- UWORD FAR * pfExists);
+ UWORD FAR *pfExists);
RETCODE SQL_API SQLGetInfo(HDBC hdbc,
UWORD fInfoType,
PTR rgbInfoValue,
SWORD cbInfoValueMax,
- SWORD FAR * pcbInfoValue);
+ SWORD FAR *pcbInfoValue);
RETCODE SQL_API SQLGetStmtOption(HSTMT hstmt,
UWORD fOption,
SWORD fSqlType);
RETCODE SQL_API SQLParamData(HSTMT hstmt,
- PTR FAR * prgbValue);
+ PTR FAR *prgbValue);
RETCODE SQL_API SQLPutData(HSTMT hstmt,
PTR rgbValue,
RETCODE SQL_API SQLSpecialColumns(HSTMT hstmt,
UWORD fColType,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
UWORD fScope,
UWORD fNullable);
RETCODE SQL_API SQLStatistics(HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
UWORD fUnique,
UWORD fAccuracy);
RETCODE SQL_API SQLTables(HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
- UCHAR FAR * szTableType,
+ UCHAR FAR *szTableType,
SWORD cbTableType);
RETCODE SQL_API SQLBrowseConnect(HDBC hdbc,
- UCHAR FAR * szConnStrIn,
+ UCHAR FAR *szConnStrIn,
SWORD cbConnStrIn,
- UCHAR FAR * szConnStrOut,
+ UCHAR FAR *szConnStrOut,
SWORD cbConnStrOutMax,
- SWORD FAR * pcbConnStrOut);
+ SWORD FAR *pcbConnStrOut);
RETCODE SQL_API SQLColumnPrivileges(HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName,
- UCHAR FAR * szColumnName,
+ UCHAR FAR *szColumnName,
SWORD cbColumnName);
RETCODE SQL_API SQLDescribeParam(HSTMT hstmt,
UWORD ipar,
- SWORD FAR * pfSqlType,
- UDWORD FAR * pcbColDef,
- SWORD FAR * pibScale,
- SWORD FAR * pfNullable);
+ SWORD FAR *pfSqlType,
+ UDWORD FAR *pcbColDef,
+ SWORD FAR *pibScale,
+ SWORD FAR *pfNullable);
RETCODE SQL_API SQLExtendedFetch(HSTMT hstmt,
UWORD fFetchType,
SDWORD irow,
- UDWORD FAR * pcrow,
- UWORD FAR * rgfRowStatus);
+ UDWORD FAR *pcrow,
+ UWORD FAR *rgfRowStatus);
RETCODE SQL_API SQLForeignKeys(HSTMT hstmt,
- UCHAR FAR * szPkTableQualifier,
+ UCHAR FAR *szPkTableQualifier,
SWORD cbPkTableQualifier,
- UCHAR FAR * szPkTableOwner,
+ UCHAR FAR *szPkTableOwner,
SWORD cbPkTableOwner,
- UCHAR FAR * szPkTableName,
+ UCHAR FAR *szPkTableName,
SWORD cbPkTableName,
- UCHAR FAR * szFkTableQualifier,
+ UCHAR FAR *szFkTableQualifier,
SWORD cbFkTableQualifier,
- UCHAR FAR * szFkTableOwner,
+ UCHAR FAR *szFkTableOwner,
SWORD cbFkTableOwner,
- UCHAR FAR * szFkTableName,
+ UCHAR FAR *szFkTableName,
SWORD cbFkTableName);
RETCODE SQL_API SQLMoreResults(HSTMT hstmt);
RETCODE SQL_API SQLNativeSql(HDBC hdbc,
- UCHAR FAR * szSqlStrIn,
+ UCHAR FAR *szSqlStrIn,
SDWORD cbSqlStrIn,
- UCHAR FAR * szSqlStr,
+ UCHAR FAR *szSqlStr,
SDWORD cbSqlStrMax,
- SDWORD FAR * pcbSqlStr);
+ SDWORD FAR *pcbSqlStr);
RETCODE SQL_API SQLNumParams(HSTMT hstmt,
- SWORD FAR * pcpar);
+ SWORD FAR *pcpar);
RETCODE SQL_API SQLParamOptions(HSTMT hstmt,
UDWORD crow,
- UDWORD FAR * pirow);
+ UDWORD FAR *pirow);
RETCODE SQL_API SQLPrimaryKeys(HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName);
RETCODE SQL_API SQLProcedureColumns(HSTMT hstmt,
- UCHAR FAR * szProcQualifier,
+ UCHAR FAR *szProcQualifier,
SWORD cbProcQualifier,
- UCHAR FAR * szProcOwner,
+ UCHAR FAR *szProcOwner,
SWORD cbProcOwner,
- UCHAR FAR * szProcName,
+ UCHAR FAR *szProcName,
SWORD cbProcName,
- UCHAR FAR * szColumnName,
+ UCHAR FAR *szColumnName,
SWORD cbColumnName);
RETCODE SQL_API SQLProcedures(HSTMT hstmt,
- UCHAR FAR * szProcQualifier,
+ UCHAR FAR *szProcQualifier,
SWORD cbProcQualifier,
- UCHAR FAR * szProcOwner,
+ UCHAR FAR *szProcOwner,
SWORD cbProcOwner,
- UCHAR FAR * szProcName,
+ UCHAR FAR *szProcName,
SWORD cbProcName);
RETCODE SQL_API SQLSetPos(HSTMT hstmt,
UWORD fLock);
RETCODE SQL_API SQLTablePrivileges(HSTMT hstmt,
- UCHAR FAR * szTableQualifier,
+ UCHAR FAR *szTableQualifier,
SWORD cbTableQualifier,
- UCHAR FAR * szTableOwner,
+ UCHAR FAR *szTableOwner,
SWORD cbTableOwner,
- UCHAR FAR * szTableName,
+ UCHAR FAR *szTableName,
SWORD cbTableName);
RETCODE SQL_API SQLBindParameter(HSTMT hstmt,
SWORD ibScale,
PTR rgbValue,
SDWORD cbValueMax,
- SDWORD FAR * pcbValue);
+ SDWORD FAR *pcbValue);
RETCODE SQL_API SQLSetScrollOptions(HSTMT hstmt,
UWORD fConcurrency,
#include "connection.h"
Oid
-lo_creat(ConnectionClass * conn, int mode)
+lo_creat(ConnectionClass *conn, int mode)
{
LO_ARG argv[1];
int retval,
}
int
-lo_open(ConnectionClass * conn, int lobjId, int mode)
+lo_open(ConnectionClass *conn, int lobjId, int mode)
{
int fd;
int result_len;
}
int
-lo_close(ConnectionClass * conn, int fd)
+lo_close(ConnectionClass *conn, int fd)
{
LO_ARG argv[1];
int retval,
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;
}
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,
}
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,
}
int
-lo_tell(ConnectionClass * conn, int fd)
+lo_tell(ConnectionClass *conn, int fd)
{
LO_ARG argv[1];
int retval,
}
int
-lo_unlink(ConnectionClass * conn, Oid lobjId)
+lo_unlink(ConnectionClass *conn, Oid lobjId)
{
LO_ARG argv[1];
int retval,
#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
extern GLOBAL_VALUES globals;
-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)
{
#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 *
getNextToken(char *s, char *token, int smax, char *delim, char *quote, char *dquote, char *numeric)
#endif
void
-getColInfo(COL_INFO * col_info, FIELD_INFO * fi, int k)
+getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k)
{
if (fi->name[0] == '\0')
strcpy(fi->name, QR_get_value_manual(col_info->result, k, 3));
}
char
-searchColInfo(COL_INFO * col_info, FIELD_INFO * fi)
+searchColInfo(COL_INFO *col_info, FIELD_INFO *fi)
{
int k;
char *col;
char
-parse_statement(StatementClass * stmt)
+parse_statement(StatementClass *stmt)
{
static char *func = "parse_statement";
char token[256];
extern GLOBAL_VALUES globals;
-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 */
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)
{
switch (type)
{
}
Int2
-pgtype_to_ctype(StatementClass * stmt, Int4 type)
+pgtype_to_ctype(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
char *
-pgtype_to_name(StatementClass * stmt, Int4 type)
+pgtype_to_name(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
static Int2
-getNumericScale(StatementClass * stmt, Int4 type, int col)
+getNumericScale(StatementClass *stmt, Int4 type, int col)
{
Int4 atttypmod;
QResultClass *result;
}
static Int4
-getNumericPrecision(StatementClass * stmt, Int4 type, int col)
+getNumericPrecision(StatementClass *stmt, Int4 type, int col)
{
Int4 atttypmod;
QResultClass *result;
}
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;
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)
{
}
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)
{
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)
{
}
Int2
-pgtype_scale(StatementClass * stmt, Int4 type, int col)
+pgtype_scale(StatementClass *stmt, Int4 type, int col)
{
switch (type)
{
Int2
-pgtype_radix(StatementClass * stmt, Int4 type)
+pgtype_radix(StatementClass *stmt, Int4 type)
{
switch (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)
{
}
Int2
-pgtype_case_sensitive(StatementClass * stmt, Int4 type)
+pgtype_case_sensitive(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
Int2
-pgtype_money(StatementClass * stmt, Int4 type)
+pgtype_money(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
Int2
-pgtype_searchable(StatementClass * stmt, Int4 type)
+pgtype_searchable(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
Int2
-pgtype_unsigned(StatementClass * stmt, Int4 type)
+pgtype_unsigned(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
char *
-pgtype_literal_prefix(StatementClass * stmt, Int4 type)
+pgtype_literal_prefix(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
char *
-pgtype_literal_suffix(StatementClass * stmt, Int4 type)
+pgtype_literal_suffix(StatementClass *stmt, Int4 type)
{
switch (type)
{
}
char *
-pgtype_create_params(StatementClass * stmt, Int4 type)
+pgtype_create_params(StatementClass *stmt, Int4 type)
{
switch (type)
{
Int4 sqltype_to_pgtype(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);
*
* Comments: See "notice.txt" for copyright and license information.
*
- * $Id: psqlodbc.h,v 1.33 2001/02/11 02:01:22 momjian Exp $
+ * $Id: psqlodbc.h,v 1.34 2001/02/11 05:13:51 momjian Exp $
*/
#ifndef __PSQLODBC_H__
char protocol[SMALL_REGISTRY_LEN];
FILE *mylogFP;
FILE *qlogFP;
-} GLOBAL_VALUES;
+} GLOBAL_VALUES;
typedef struct StatementOptions_
{
int bind_size; /* size of each structure if using Row
* Binding */
int use_bookmarks;
-} StatementOptions;
+} StatementOptions;
/* Used to pass extra query info to send_query */
typedef struct QueryInfo_
int row_size;
QResultClass *result_in;
char *cursor;
-} QueryInfo;
+} QueryInfo;
#define PG_TYPE_LO -999 /* hack until permanent type
/* Used for building a Manual Result only */
/* 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");
}
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;
}
}
void
-QR_Destructor(QResultClass * self)
+QR_Destructor(QResultClass *self)
{
mylog("QResult: in DESTRUCTOR\n");
}
void
-QR_set_command(QResultClass * self, char *msg)
+QR_set_command(QResultClass *self, char *msg)
{
if (self->command)
free(self->command);
}
void
-QR_set_notice(QResultClass * self, char *msg)
+QR_set_notice(QResultClass *self, char *msg)
{
if (self->notice)
free(self->notice);
}
void
-QR_free_memory(QResultClass * self)
+QR_free_memory(QResultClass *self)
{
register int lf,
row;
/* 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;
/* Close the cursor and end the transaction (if no cursors left) */
/* We only close cursor/end the transaction if a cursor was used. */
int
-QR_close(QResultClass * self)
+QR_close(QResultClass *self)
{
QResultClass *res;
/* This function is called by fetch_tuples() AND SQLFetch() */
int
-QR_next_tuple(QResultClass * self)
+QR_next_tuple(QResultClass *self)
{
int id;
QResultClass *res;
}
char
-QR_read_tuple(QResultClass * self, char binary)
+QR_read_tuple(QResultClass *self, char binary)
{
Int2 field_lf;
TupleField *this_tuplefield;
/* 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
RETCODE SQL_API
SQLRowCount(
HSTMT hstmt,
- SDWORD FAR * pcrow)
+ SDWORD FAR *pcrow)
{
static char *func = "SQLRowCount";
StatementClass *stmt = (StatementClass *) hstmt;
RETCODE SQL_API
SQLNumResultCols(
HSTMT hstmt,
- SWORD FAR * pccol)
+ SWORD FAR *pccol)
{
static char *func = "SQLNumResultCols";
StatementClass *stmt = (StatementClass *) hstmt;
SQLDescribeCol(
HSTMT hstmt,
UWORD icol,
- UCHAR FAR * szColName,
+ UCHAR FAR *szColName,
SWORD cbColNameMax,
- SWORD FAR * pcbColName,
- SWORD FAR * pfSqlType,
- UDWORD FAR * pcbColDef,
- SWORD FAR * pibScale,
- SWORD FAR * pfNullable)
+ SWORD FAR *pcbColName,
+ SWORD FAR *pfSqlType,
+ UDWORD FAR *pcbColDef,
+ SWORD FAR *pibScale,
+ SWORD FAR *pfNullable)
{
static char *func = "SQLDescribeCol";
UWORD fDescType,
PTR rgbDesc,
SWORD cbDescMax,
- SWORD FAR * pcbDesc,
- SDWORD FAR * pfDesc)
+ SWORD FAR *pcbDesc,
+ SDWORD FAR *pfDesc)
{
static char *func = "SQLColAttributes";
StatementClass *stmt = (StatementClass *) hstmt;
SWORD fCType,
PTR rgbValue,
SDWORD cbValueMax,
- SDWORD FAR * pcbValue)
+ SDWORD FAR *pcbValue)
{
static char *func = "SQLGetData";
QResultClass *res;
HSTMT hstmt,
UWORD fFetchType,
SDWORD irow,
- UDWORD FAR * pcrow,
- UWORD FAR * rgfRowStatus)
+ UDWORD FAR *pcrow,
+ UWORD FAR *rgfRowStatus)
{
static char *func = "SQLExtendedFetch";
StatementClass *stmt = (StatementClass *) hstmt;
RETCODE SQL_API
SQLSetCursorName(
HSTMT hstmt,
- UCHAR FAR * szCursor,
+ UCHAR FAR *szCursor,
SWORD cbCursor)
{
static char *func = "SQLSetCursorName";
RETCODE SQL_API
SQLGetCursorName(
HSTMT hstmt,
- UCHAR FAR * szCursor,
+ UCHAR FAR *szCursor,
SWORD cbCursorMax,
- SWORD FAR * pcbCursor)
+ SWORD FAR *pcbCursor)
{
static char *func = "SQLGetCursorName";
StatementClass *stmt = (StatementClass *) hstmt;
char szDSN[MAXDSNAME]; /* Original data source name */
BOOL fNewDSN; /* New data source flag */
BOOL fDefault; /* Default data source flag */
-} SETUPDLG, FAR * LPSETUPDLG;
+} SETUPDLG, FAR *LPSETUPDLG;
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;
}
void
-SOCK_clear_error(SocketClass * self)
+SOCK_clear_error(SocketClass *self)
{
self->errornumber = 0;
self->errormsg = NULL;
}
void
-SOCK_Destructor(SocketClass * self)
+SOCK_Destructor(SocketClass *self)
{
if (self->socket != -1)
{
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;
void
-SOCK_get_n_char(SocketClass * self, char *buffer, int len)
+SOCK_get_n_char(SocketClass *self, char *buffer, int len)
{
int lf;
void
-SOCK_put_n_char(SocketClass * self, char *buffer, int len)
+SOCK_put_n_char(SocketClass *self, char *buffer, int len)
{
int lf;
will read at most bufsize-1 characters + null.
*/
void
-SOCK_get_string(SocketClass * self, char *buffer, int bufsize)
+SOCK_get_string(SocketClass *self, char *buffer, int bufsize)
{
register int lf = 0;
void
-SOCK_put_string(SocketClass * self, char *string)
+SOCK_put_string(SocketClass *self, char *string)
{
register int lf;
int len;
int
-SOCK_get_int(SocketClass * self, short len)
+SOCK_get_int(SocketClass *self, short len)
{
char buf[4];
void
-SOCK_put_int(SocketClass * self, int value, short len)
+SOCK_put_int(SocketClass *self, int value, short len)
{
unsigned int rv;
void
-SOCK_flush_output(SocketClass * self)
+SOCK_flush_output(SocketClass *self)
{
int written;
}
unsigned char
-SOCK_get_next_byte(SocketClass * self)
+SOCK_get_next_byte(SocketClass *self)
{
if (self->buffer_read_in >= self->buffer_filled_in)
{
}
void
-SOCK_put_next_byte(SocketClass * self, unsigned char next_byte)
+SOCK_put_next_byte(SocketClass *self, unsigned char next_byte)
{
int bytes_sent;
/* Socket prototypes */
SocketClass *SOCK_Constructor(void);
-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);
-void 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);
+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);
+void 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
RETCODE SQL_API
SQLAllocStmt(HDBC hdbc,
- HSTMT FAR * phstmt)
+ HSTMT FAR *phstmt)
{
static char *func = "SQLAllocStmt";
ConnectionClass *conn = (ConnectionClass *) hdbc;
* 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 */
}
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);
if (STMT_EXECUTING == self->status)
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;
from SQLFreeStmt(SQL_CLOSE)
*/
char
-SC_recycle_statement(StatementClass * self)
+SC_recycle_statement(StatementClass *self)
{
ConnectionClass *conn;
/* 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);
/* This is only called from SQLFreeStmt(SQL_UNBIND) */
char
-SC_unbind_cols(StatementClass * self)
+SC_unbind_cols(StatementClass *self)
{
Int2 lf;
}
void
-SC_clear_error(StatementClass * self)
+SC_clear_error(StatementClass *self)
{
self->errornumber = 0;
self->errormsg = NULL;
/* This function creates an error msg which is the concatenation */
/* 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;
}
char
-SC_get_error(StatementClass * self, int *number, char **message)
+SC_get_error(StatementClass *self, int *number, char **message)
{
char rv;
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;
RETCODE
-SC_execute(StatementClass * self)
+SC_execute(StatementClass *self)
{
static char *func = "SC_execute";
ConnectionClass *conn;
}
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)")
* considered to be "premature". */
STMT_FINISHED, /* statement execution has finished */
STMT_EXECUTING /* statement execution is still going on */
-} STMT_Status;
+} STMT_Status;
#define STMT_TRUNCATED -2
#define STMT_INFO_ONLY -1 /* not an error message, just a
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
{
char dot[MAX_TABLE_LEN + 1];
char name[MAX_COLUMN_LEN + 1];
char alias[MAX_COLUMN_LEN + 1];
-} FIELD_INFO;
+} FIELD_INFO;
/******** Statement Handle ***********/
/* 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
#include <stdlib.h>
void
-set_tuplefield_null(TupleField * tuple_field)
+set_tuplefield_null(TupleField *tuple_field)
{
tuple_field->len = 0;
tuple_field->value = NULL; /* strdup(""); */
}
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);
void
-set_tuplefield_int2(TupleField * tuple_field, Int2 value)
+set_tuplefield_int2(TupleField *tuple_field, Int2 value)
{
char buffer[10];
}
void
-set_tuplefield_int4(TupleField * tuple_field, Int4 value)
+set_tuplefield_int4(TupleField *tuple_field, Int4 value)
{
char buffer[15];
#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
}
void
-TL_Destructor(TupleListClass * self)
+TL_Destructor(TupleListClass *self)
{
int lf;
TupleNode *node,
void *
-TL_get_fieldval(TupleListClass * self, Int4 tupleno, Int2 fieldno)
+TL_get_fieldval(TupleListClass *self, Int4 tupleno, Int2 fieldno)
{
Int4 lf;
Int4 delta,
char
-TL_add_tuple(TupleListClass * self, TupleNode * new_field)
+TL_add_tuple(TupleListClass *self, TupleNode *new_field)
{
/*
/* 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
# We get the list of typedef's from /src/tools/find_typedef
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l75 \
-lp -nip -npro $EXTRA_OPTS \
+-TFAR \
-TA_Const \
-TA_Expr \
-TA_Indices \
-TAllocBlockData \
-TAllocChunk \
-TAllocChunkData \
--TAllocMode \
-TAllocPointer \
-TAllocSet \
--TAllocSetData \
+-TAllocSetContext \
-TAlterGroupStmt \
-TAlterTableStmt \
-TAlterUserStmt \
-TAnyInvalidation \
-TAppend \
+-TAppendPath \
-TAppendState \
--TArray \
+-TArchive \
+-TArchiveEntryPtr \
+-TArchiveFormat \
+-TArchiveHandle \
+-TArchiveMode \
-TArrayRef \
-TArrayType \
-TAtom \
-TAttrNumber \
-TAuthRequest \
-TAuthRequestPacket \
+-TBOOKMARK \
+-TBOOL \
-TBOX \
-TBTItem \
-TBTItemData \
-TBTStack \
-TBTStackData \
-TBUCKET_INDEX \
+-TBYTE \
-TBackend \
-TBackendId \
--TBackendTag \
+-TBindInfoClass \
-TBitArray \
-TBitIndex \
+-TBkpBlock \
-TBlock \
-TBlockId \
-TBlockIdData \
-TBlockNumber \
-TBoolPtr \
+-TBpChar \
-TBucket \
-TBufFile \
-TBufFlags \
-TBuffer \
--TBufferBlock \
+-TBufferBlindId \
-TBufferDesc \
--TBufferLock \
-TBufferTag \
+-TByte \
+-TBytef \
-TCATEGORY \
--TCCHashFunc \
--TCHUNK_INFO \
-TCIRCLE \
+-TCOL_INFO \
+-TCONN_Status \
-TCPFunction \
-TCPPFunction \
-TCancelRequestPacket \
-TChangeACLStmt \
-TChangeVarNodes_context \
-TCheckPoint \
+-TCheckPointStmt \
-TChromosome \
-TCity \
-TClientData \
-TClosePortalStmt \
+-TClosePtr \
-TClusterStmt \
-TCmdType \
-TColormap \
-TColumnDef \
+-TColumnInfoClass \
-TCommandDest \
-TCommandId \
-TCommentStmt \
-TCommonScanState \
-TCommonState \
+-TConnInfo \
-TConnStatusType \
+-TConnectionClass \
-TConst \
-TConstrCheck \
-TConstrType \
-TCreateUserStmt \
-TCreatedbStmt \
-TCursor \
+-TCustomOutPtr \
+-TDATE_STRUCT \
-TDBState \
-TDCHCacheEntry \
-TDCH_poz \
-TDIR \
-TDR_printtup \
+-TDWORD \
+-TDataDumperPtr \
+-TDataSourceToDriverProc \
-TDateADT \
-TDatum \
-TDatumPtr \
-TDlelem \
-TDllist \
-TDrawable \
+-TDriverToDataSourceProc \
-TDropGroupStmt \
-TDropPLangStmt \
-TDropStmt \
-TDropTrigStmt \
-TDropUserStmt \
-TDropdbStmt \
+-TDumpContext \
-TDynamicFileList \
+-TEDGE \
-TELEMENT \
-TEState \
-TEdge \
+-TEndBlobPtr \
+-TEndBlobsPtr \
+-TEndDataPtr \
+-TEnvironmentClass \
-TErrorMessagePacket \
-TExcContext \
-TExcData \
-TExcMessage \
-TExcProc \
-TException \
+-TExecScanAccessMtd \
-TExecStatus \
-TExecStatusType \
--TExitStatus \
-TExplainState \
-TExplainStmt \
-TExpr \
-TExprContext \
+-TExprDoneCond \
-TExtendStmt \
+-TFIELD_INFO \
+-TFILE \
-TFILE \
-TFUNMAP \
-TFetchStmt \
+-TFieldSelect \
-TFile \
-TFileName \
--TFixedItem \
--TFixedItemData \
--TFixedStack \
--TFixedStackData \
+-TFindSplitData \
-TFjoin \
-TFkConstraint \
--TFmgrCall \
+-TFmgrBuiltin \
-TFmgrInfo \
--TFmgrValues \
-TFont \
-TFormData_pg_aggregate \
-TFormData_pg_am \
-TFormData_pg_inherits \
-TFormData_pg_ipl \
-TFormData_pg_language \
+-TFormData_pg_largeobject \
-TFormData_pg_listener \
-TFormData_pg_log \
-TFormData_pg_opclass \
-TForm_pg_inherits \
-TForm_pg_ipl \
-TForm_pg_language \
+-TForm_pg_largeobject \
-TForm_pg_log \
-TForm_pg_opclass \
-TForm_pg_operator \
-TForm_pg_type \
-TForm_pg_variable \
-TFormatNode \
+-TFromExpr \
-TFunc \
-TFuncCall \
--TFuncIndexInfo \
--TFuncIndexInfoPtr \
-TFuncInfo \
-TFunction \
-TFunctionCache \
-TFunctionCachePtr \
+-TFunctionCallInfo \
+-TFunctionCallInfoData \
-TGC \
-TGContext \
-TGISTENTRY \
-TGISTScanOpaque \
-TGISTScanOpaqueData \
-TGIST_SPLITVEC \
+-TGLOBAL_VALUES \
+-TGUC_yy_size_t \
+-TGUC_yy_state_type \
-TGene \
--TGlobalMemory \
--TGlobalMemoryData \
-TGroup \
--TGroupBuffer \
-TGroupClause \
-TGroupState \
+-TGucContext \
-THASHACTION \
-THASHCTL \
+-THASH_SEQ_STATUS \
+-THDBC \
+-THENV \
-THHDR \
-THISTORY_STATE \
-THIST_ENTRY \
+-THOLDER \
+-THOLDERTAG \
+-THSTMT \
-THTAB \
--THandleRIRAttributeRule_context \
+-THWND \
-THash \
-THashItem \
-THashItemData \
-THashtFunc \
-THeapAccessStatistics \
-THeapAccessStatisticsData \
--THeapMemoryBlock \
--THeapMemoryBlockData \
-THeapScanDesc \
-THeapScanDescData \
-THeapTuple \
-THeapTupleHeader \
-THeapTupleHeaderData \
-TINTRANGE \
--TIPCKey \
-TIdList \
-TIdent \
-TIncrementVarSublevelsUp_context \
--TIndDesc \
-TIndInfo \
-TIndex \
-TIndexAttributeBitMap \
-TIndexTupleData \
-TIndirectBlock \
-TInhInfo \
+-TInhOption \
-TInhPaths \
-TInsertIndexResult \
-TInsertIndexResultData \
-TJoinInfo \
-TJoinPath \
-TJoinState \
+-TJoinType \
-TJunkFilter \
-TKEYMAP_ENTRY \
-TKEYMAP_ENTRY_ARRAY \
-TLOCKMETHODTABLE \
-TLOCKMODE \
-TLOCKTAG \
+-TLO_ARG \
+-TLPARAM \
-TLSEG \
-TLargeObjectDesc \
+-TLimit \
+-TLimitState \
-TList \
-TListenStmt \
-TLoadStmt \
-TNestPath \
-TNode \
-TNodeTag \
--TNoname \
-TNotifyStmt \
-TNumeric \
-TNumericData \
-TOffsetNumber \
-TOffsetVarNodes_context \
-TOid \
+-TOid \
+-TOidOptions \
+-TOldstyle_fnextra \
-TOpType \
-TOpaque \
-TOpaqueData \
-TOper \
-TOperator \
-TOprInfo \
--TOrderedElem \
--TOrderedElemData \
--TOrderedSet \
--TOrderedSetData \
+-TOutputContext \
-TOverflowPageAddress \
-TPATH \
+-TPGFInfoFunction \
+-TPGFunction \
-TPGLZ_DecompState \
-TPGLZ_Header \
-TPGLZ_HistEntry \
-TPGLZ_Strategy \
+-TPGShmemHeader \
-TPGconn \
-TPGnotify \
-TPGresult \
-TPROC \
-TPROC_HDR \
-TPROC_QUEUE \
+-TPTR \
-TPacket \
-TPacketDoneProc \
-TPacketLen \
-TParamListInfo \
-TParamListInfoData \
-TParamNo \
+-TParameterInfoClass \
-TParseState \
-TPasswordPacket \
-TPasswordPacketV0 \
-TPath \
-TPathKeyItem \
-TPathKeysComparison \
+-TPattern_Prefix_Status \
+-TPattern_Type \
+-TPendingRelDelete \
+-TPg_finfo_record \
-TPixmap \
-TPlan \
-TPoint \
-TPool \
-TPort \
-TPortal \
--TPortalBlock \
--TPortalBlockData \
--TPortalBuffer \
-TPortalD \
--TPortalEntry \
-TPortalHashEnt \
--TPortalHeapMemory \
--TPortalMemoryContext \
--TPortalVariableMemory \
-TPostgresPollingStatusType \
--TPredInfo \
--TPrefix_Status \
+-TPrintExtraTocPtr \
+-TPrintTocDataPtr \
-TPrinttupAttrInfo \
--TPrivateMem \
-TProcState \
-TProcedureStmt \
-TProcessingMode \
-TProjectionInfo \
-TProtocolVersion \
+-TProtocolVersion \
-TPsqlSettings \
+-TQResultClass \
-TQuery \
-TQueryDesc \
+-TQueryInfo \
+-TQueryResultCode \
+-TRETCODE \
-TRI_OpreqHashEntry \
-TRI_QueryHashEntry \
-TRI_QueryKey \
-TRTreeScanOpaque \
-TRTreeScanOpaqueData \
-TRangeQueryClause \
+-TRangeSubselect \
-TRangeTblEntry \
+-TRangeTblRef \
-TRangeVar \
-TRawColumnDefault \
+-TReadBufPtr \
+-TReadBytePtr \
+-TReadExtraTocPtr \
-TRecipeStmt \
-TRegProcedure \
-TReindexStmt \
--TRelExpr \
+-TRelFileNode \
-TRelIdCacheEnt \
-TRelNameCacheEnt \
+-TRelNodeCacheEnt \
-TRelOptInfo \
-TRelabelType \
-TRelation \
-TRelationBuildDescInfo \
-TRelationData \
--TRelationInfo \
-TRelationInvalidationData \
--TRelationList \
-TRelationPtr \
-TRelativeTime \
-TRelids \
-TRemoveAggrStmt \
-TRemoveFuncStmt \
-TRemoveOperStmt \
--TRemoveStmt \
-TRenameStmt \
-TResTarget \
-TResdom \
-TResolveNew_context \
+-TRestoreOptions \
-TRestrictInfo \
-TResult \
+-TResultRelInfo \
-TResultState \
-TRetrieveIndexResult \
-TRetrieveIndexResultData \
+-TReturnSetInfo \
-TRewriteInfo \
-TRewriteRule \
-TRmgrData \
-TRmgrId \
--TRowMark \
-TRuleLock \
-TRuleStmt \
+-TSDOUBLE \
+-TSDWORD \
-TSEGMENT \
-TSEG_OFFSET \
-TSEMA \
+-TSFLOAT \
-TSHMEM_OFFSET \
-TSHM_QUEUE \
+-TSIMPLE_TIME \
-TSISeg \
-TSLock \
-TSPINLOCK \
-TSPITupleTable \
-TSPLITVEC \
+-TSQLBIGINT \
+-TSQLCHAR \
+-TSQLDOUBLE \
+-TSQLFLOAT \
+-TSQLFunctionCache \
+-TSQLFunctionCachePtr \
+-TSQLGUID \
+-TSQLINTEGER \
+-TSQLINTERVAL \
+-TSQLREAL \
+-TSQLSCHAR \
+-TSQLSMALLINT \
+-TSQLUBIGINT \
+-TSQLUINTEGER \
+-TSQLUSMALLINT \
+-TSQL_DATE_STRUCT \
+-TSQL_DAY_SECOND_STRUCT \
+-TSQL_INTERVAL_STRUCT \
+-TSQL_TIMESTAMP_STRUCT \
+-TSQL_TIME_STRUCT \
+-TSQL_YEAR_MONTH_STRUCT \
+-TSSHOR \
+-TSTMT_Status \
+-TSWORD \
+-TSaveArchivePtr \
-TScan \
-TScanDirection \
--TScanFunc \
-TScanKey \
-TScanKeyData \
-TScanKeyword \
-TSeqScan \
-TSeqTable \
-TSeqTableData \
+-TSetOp \
+-TSetOpCmd \
+-TSetOpState \
+-TSetOperation \
+-TSetOperationStmt \
-TSharedInvalid \
-TSharedInvalidData \
-TShmemIndexEnt \
-TSnapshot \
-TSnapshotData \
-TSockAddr \
+-TSocketClass \
-TSort \
-TSortClause \
-TSortGroupBy \
-TSortState \
-TSplitNumber \
+-TStandardChunkHeader \
+-TStartBlobPtr \
+-TStartBlobsPtr \
+-TStartDataPtr \
+-TStartUpID \
-TStartupPacket \
+-TStartupPacket \
+-TStatementClass \
+-TStatementOptions \
-TStrategyEvaluation \
-TStrategyEvaluationData \
-TStrategyExpression \
-TSubLink \
-TSubLinkType \
-TSubPlan \
--TSystemPortAddress \
+-TSubqueryScan \
+-TSubqueryScanState \
+-TTABLE_INFO \
+-TTAR_MEMBER \
+-TTIMESTAMP_STRUCT \
+-TTIME_STRUCT \
-TTXTRANGE \
-TTableID \
-TTableInfo \
-TTcl_ValueType \
-TTcl_Var \
-TTcl_VarTraceProc \
--TTempRelList \
-TTempTable \
+-TThingFile \
-TTidPath \
-TTidScan \
-TTidScanState \
-TTk_TextLayout \
-TTk_Uid \
-TTk_Window \
+-TTmFromChar \
+-TTocEntry \
+-TTocSortCompareFn \
-TTransactionId \
-TTransactionState \
-TTransactionStateData \
-TTransactionStmt \
+-TTrigInfo \
-TTrigger \
-TTriggerData \
-TTriggerDesc \
-TTriggerEvent \
-TTruncateStmt \
-TTupSortStatus \
--TTupleBlock \
+-TTupStoreStatus \
-TTupleConstr \
-TTupleDesc \
+-TTupleField \
+-TTupleListClass \
+-TTupleNode \
-TTupleTable \
-TTupleTableData \
-TTupleTableSlot \
-TTuplesortstate \
+-TTuplestorestate \
-TType \
--TTypeBlock \
-TTypeCast \
-TTypeInfo \
-TTypeName \
+-TUCHAR \
+-TUDWORD \
-TUNDO_LIST \
+-TUWORD \
-TUnique \
-TUniqueState \
-TUnlistenStmt \
-TVAttList \
-TVAttListData \
-TVFunction \
--TVPageDescr \
--TVPageDescrData \
--TVPageList \
--TVPageListData \
-TVRelList \
-TVRelListData \
-TVRelStats \
-TVTupleMove \
-TVTupleMoveData \
-TVacAttrStats \
+-TVacPage \
+-TVacPageData \
+-TVacPageList \
+-TVacPageListData \
-TVacuumStmt \
-TValue \
-TVar \
+-TVarBit \
+-TVarChar \
-TVariableCache \
-TVariableCacheData \
-TVariableRelationContents \
-TViewStmt \
-TVisual \
-TVisualID \
+-TWAIT_ORDER \
+-TWORD \
+-TWPARAM \
-TWindow \
+-TWriteBufPtr \
+-TWriteBytePtr \
+-TWriteDataPtr \
+-TWriteExtraTocPtr \
-TXActivateDeactivateEvent \
-TXActivateEvent \
-TXAnyEvent \
-TXICCallback \
-TXICProc \
-TXID \
--TXIDLookupEnt \
-TXIDProc \
--TXIDTAG \
-TXIM \
-TXIMCallback \
-TXIMCaretDirection \
-TXLogCtlWrite \
-TXLogPageHeader \
-TXLogPageHeaderData \
+-TXLogRecData \
-TXLogRecPtr \
-TXLogRecord \
+-TXLogRelCacheEntry \
+-TXLogRelDesc \
-TXLogSubRecord \
-TXMapEvent \
-TXMapRequestEvent \
-TYY_BUFFER_STATE \
-TYY_CHAR \
-T_LIB_VERSION_TYPE \
+-T_LIB_VERSION_TYPE \
-T_LockId_ \
-T_RuneEntry \
+-T_RuneEntry \
+-T_RuneLocale \
-T_RuneLocale \
-T_RuneRange \
+-T_RuneRange \
-T_SPI_connection \
-T_SPI_plan \
-T_XPrivDisplay \
-Taclitem \
--Tapply_RIR_view_context \
+-Tadjust_inherited_attrs_context \
+-Talloc_func \
-Tassoc_list \
-Tattribute_used_context \
-TbackslashResult \
-Tbool8 \
-Tbytea \
-Tcaddr_t \
+-Tcaddr_t \
-Tcat_t \
-Tcc_t \
-Tchar \
--Tcheck_if_rte_used_context \
+-Tchar \
+-Tcharf \
-Tcheck_ungrouped_columns_context \
-Tclock_t \
+-Tclock_t \
+-Tclockid_t \
-Tclockid_t \
+-Tcrc64 \
-Tcset \
-Tdaddr_t \
+-Tdaddr_t \
-Tdatetkn \
-Tdeparse_context \
-Tdev_t \
--Tdhalloc_ptr \
+-Tdev_t \
+-Tdiv_t \
-Tdiv_t \
-Tdouble \
+-Tdouble \
-TevalPlanQual \
-TexecRowMark \
-Texecution_state \
-Tf_smgr \
-Tfd_mask \
+-Tfd_mask \
+-Tfd_set \
-Tfd_set \
-Tfinalize_primnode_results \
--Tfix_parsetree_attnums_context \
+-Tfixpt_t \
-Tfixpt_t \
-Tfloat \
+-Tfloat \
-Tfloat32 \
-Tfloat32data \
-Tfloat4 \
-Tfloat64 \
-Tfloat64data \
-Tfloat8 \
+-Tfp_except \
+-Tfp_rnd \
+-Tfpclass_t \
+-Tfpos_t \
-Tfpos_t \
+-Tfree_func \
-Tfunc_ptr \
-Tgid_t \
+-Tgid_t \
+-TgzFile \
-Thashnode \
-ThbaPort \
-Tin_addr_t \
+-Tin_addr_t \
+-Tin_port_t \
-Tin_port_t \
-Tinet \
-Tinet_struct \
-Tino_t \
+-Tino_t \
+-Tint \
-Tint \
-Tint16 \
-Tint16_t \
+-Tint16_t \
+-Tint16m_t \
-Tint16m_t \
-Tint2 \
-Tint2vector \
-Tint32 \
-Tint32_t \
+-Tint32_t \
+-Tint32m_t \
-Tint32m_t \
-Tint4 \
-Tint64 \
-Tint64_t \
+-Tint64_t \
+-Tint64m_t \
-Tint64m_t \
-Tint8 \
-Tint8_t \
+-Tint8_t \
-Tint8m_t \
+-Tint8m_t \
+-Tintf \
-Tjmp_buf \
-Tjoin_references_context \
-Tkey_t \
+-Tkey_t \
+-TlclContext \
+-TlclTocEntry \
+-Tldiv_t \
-Tldiv_t \
--Tlztext \
-Tmacaddr \
--Tmanufacturer \
-Tmode_t \
--TmodifyAggrefChangeVarnodes_context \
+-Tmode_t \
-Tnlink_t \
+-Tnlink_t \
+-Toff_t \
-Toff_t \
-Toidvector \
+-ToptType \
-Tpg_pwd \
-Tpgsql_thing_t \
-Tpid_t \
+-Tpid_t \
-Tpqbool \
-Tpqsigfunc \
-TprintQueryOpt \
-TpromptStatus_t \
-Tptrdiff_t \
-Tpull_var_clause_context \
+-Tpull_varnos_context \
-Tqaddr_t \
+-Tqaddr_t \
+-Tquad_t \
-Tquad_t \
-TrangeTableEntry_used_context \
-Tregex_t \
-Tregister_t \
+-Tregister_t \
-Tregmatch_t \
-Tregoff_t \
-Tregproc \
-Treplace_vars_with_subplan_refs_context \
-Trune_t \
+-Trune_t \
+-Tsa_family_t \
-Tsa_family_t \
-Tsegsz_t \
+-Tsegsz_t \
-Tsequence_magic \
-Tsig_atomic_t \
--Tsig_func \
-Tsig_t \
-Tsighandler_cxt \
-Tsigjmp_buf \
-Tsigset_t \
+-Tsigset_t \
-Tsize_t \
+-Tsize_t \
+-Tslock_t \
-Tslock_t \
-Tsmgrid \
-Tsocklen_t \
+-Tsocklen_t \
-Tsop \
-Tsopno \
-Tspeed_t \
+-TsqlparseInfo \
+-TsqlparseState \
-Tssize_t \
+-Tssize_t \
+-Tswblk_t \
-Tswblk_t \
-Ttcflag_t \
-Ttcp_seq \
-Ttext \
--TthisLockWasTriggered_context \
-Ttime_t \
+-Ttime_t \
+-TuInt \
+-TuIntf \
+-TuLong \
+-TuLongf \
+-Tu_char \
-Tu_char \
-Tu_int \
+-Tu_int \
+-Tu_int16_t \
-Tu_int16_t \
-Tu_int16m_t \
+-Tu_int16m_t \
+-Tu_int32_t \
-Tu_int32_t \
-Tu_int32m_t \
+-Tu_int32m_t \
-Tu_int64_t \
+-Tu_int64_t \
+-Tu_int64m_t \
-Tu_int64m_t \
-Tu_int8_t \
+-Tu_int8_t \
+-Tu_int8m_t \
-Tu_int8m_t \
-Tu_long \
+-Tu_long \
+-Tu_quad_t \
-Tu_quad_t \
-Tu_short \
+-Tu_short \
-Tuch \
-Tuid_t \
+-Tuid_t \
+-Tuint \
-Tuint \
-Tuint16 \
-Tuint32 \
+-Tuint64 \
-Tuint8 \
-Tushort \
+-Tushort \
+-Tva_list \
-Tva_list \
+-Tvarattrib \
-Tvm_offset_t \
+-Tvm_offset_t \
+-Tvm_size_t \
-Tvm_size_t \
-Tvoid \
+-Tvoid \
+-Tvoidp \
+-Tvoidpf \
+-Twchar_t \
-Twchar_t \
-Tword16 \
-Tword32 \
-Tword8 \
+-Txl_btree_delete \
+-Txl_btree_insert \
+-Txl_btree_newroot \
+-Txl_btree_split \
+-Txl_btreetid \
+-Txl_heap_clean \
+-Txl_heap_delete \
+-Txl_heap_header \
+-Txl_heap_insert \
+-Txl_heap_update \
+-Txl_heaptid \
+-Txl_seq_rec \
+-Txl_xact_abort \
+-Txl_xact_commit \
-Tyy_size_t \
-Tyy_state_type \
+-Tz_stream \
+-Tz_streamp \
/tmp/$$a >/tmp/$$ 2>&1
if [ "$?" -ne 0 -o -s /tmp/$$ ]
then echo "$FILE"