Commit 3152ef63 authored by Bruce Momjian's avatar Bruce Momjian

Source alignment cleanups.

parent a952c79b
......@@ -35,7 +35,7 @@
/* Bind parameters on a statement handle */
RETCODE SQL_API
RETCODE SQL_API
SQLBindParameter(
HSTMT hstmt,
UWORD ipar,
......@@ -156,7 +156,7 @@ SQLBindParameter(
/* - - - - - - - - - */
/* Associate a user-supplied buffer with a database column. */
RETCODE SQL_API
RETCODE SQL_API
SQLBindCol(
HSTMT hstmt,
UWORD icol,
......@@ -267,7 +267,7 @@ SQLBindCol(
/* it is best to say this function is not supported and let the application assume a */
/* data type (most likely varchar). */
RETCODE SQL_API
RETCODE SQL_API
SQLDescribeParam(
HSTMT hstmt,
UWORD ipar,
......@@ -321,7 +321,7 @@ SQLDescribeParam(
/* Sets multiple values (arrays) for the set of parameter markers. */
RETCODE SQL_API
RETCODE SQL_API
SQLParamOptions(
HSTMT hstmt,
UDWORD crow,
......@@ -344,7 +344,7 @@ SQLParamOptions(
/* like it does for SQLDescribeParam is that some applications don't care and try */
/* to call it anyway. */
/* If the statement does not have parameters, it should just return 0. */
RETCODE SQL_API
RETCODE SQL_API
SQLNumParams(
HSTMT hstmt,
SWORD FAR *pcpar)
......
......@@ -36,9 +36,9 @@ 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_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);
Oid new_adtid, Int2 new_adtsize, Int4 atttypmod);
#endif
......@@ -34,7 +34,7 @@
extern GLOBAL_VALUES globals;
RETCODE SQL_API
RETCODE SQL_API
SQLAllocConnect(
HENV henv,
HDBC FAR *phdbc)
......@@ -75,7 +75,7 @@ SQLAllocConnect(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLConnect(
HDBC hdbc,
UCHAR FAR *szDSN,
......@@ -132,7 +132,7 @@ SQLConnect(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLBrowseConnect(
HDBC hdbc,
UCHAR FAR *szConnStrIn,
......@@ -151,7 +151,7 @@ SQLBrowseConnect(
/* - - - - - - - - - */
/* Drop any hstmts open on hdbc and disconnect from database */
RETCODE SQL_API
RETCODE SQL_API
SQLDisconnect(
HDBC hdbc)
{
......@@ -191,7 +191,7 @@ SQLDisconnect(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLFreeConnect(
HDBC hdbc)
{
......
......@@ -200,26 +200,26 @@ struct col_info
#endif
typedef BOOL (FAR WINAPI * DataSourceToDriverProc) (UDWORD,
SWORD,
PTR,
SDWORD,
PTR,
SDWORD,
SDWORD FAR *,
UCHAR FAR *,
SWORD,
SWORD FAR *);
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 *);
SWORD,
PTR,
SDWORD,
PTR,
SDWORD,
SDWORD FAR *,
UCHAR FAR *,
SWORD,
SWORD FAR *);
/******* The Connection handle ************/
struct ConnectionClass_
......
......@@ -65,7 +65,7 @@ extern HINSTANCE NEAR s_hModule;/* Saved module handle. */
extern GLOBAL_VALUES globals;
RETCODE SQL_API
RETCODE SQL_API
SQLDriverConnect(
HDBC hdbc,
HWND hwnd,
......
......@@ -22,7 +22,7 @@
ConnectionClass *conns[MAX_CONNECTIONS];
RETCODE SQL_API
RETCODE SQL_API
SQLAllocEnv(HENV FAR *phenv)
{
static char *func = "SQLAllocEnv";
......@@ -41,7 +41,7 @@ SQLAllocEnv(HENV FAR *phenv)
return SQL_SUCCESS;
}
RETCODE SQL_API
RETCODE SQL_API
SQLFreeEnv(HENV henv)
{
static char *func = "SQLFreeEnv";
......@@ -62,7 +62,7 @@ SQLFreeEnv(HENV henv)
/* Returns the next SQL error information. */
RETCODE SQL_API
RETCODE SQL_API
SQLError(
HENV henv,
HDBC hdbc,
......
......@@ -39,7 +39,7 @@ extern GLOBAL_VALUES globals;
/* Perform a Prepare on the SQL statement */
RETCODE SQL_API
RETCODE SQL_API
SQLPrepare(HSTMT hstmt,
UCHAR FAR *szSqlStr,
SDWORD cbSqlStr)
......@@ -133,7 +133,7 @@ SQLPrepare(HSTMT hstmt,
/* Performs the equivalent of SQLPrepare, followed by SQLExecute. */
RETCODE SQL_API
RETCODE SQL_API
SQLExecDirect(
HSTMT hstmt,
UCHAR FAR *szSqlStr,
......@@ -195,7 +195,7 @@ SQLExecDirect(
}
/* Execute a prepared SQL statement */
RETCODE SQL_API
RETCODE SQL_API
SQLExecute(
HSTMT hstmt)
{
......@@ -326,7 +326,7 @@ SQLExecute(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLTransact(
HENV henv,
HDBC hdbc,
......@@ -408,7 +408,7 @@ SQLTransact(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLCancel(
HSTMT hstmt) /* Statement to cancel. */
{
......@@ -486,7 +486,7 @@ SQLCancel(
/* Returns the SQL string as modified by the driver. */
/* Currently, just copy the input string without modification */
/* observing buffer limits and truncation. */
RETCODE SQL_API
RETCODE SQL_API
SQLNativeSql(
HDBC hdbc,
UCHAR FAR *szSqlStrIn,
......@@ -540,7 +540,7 @@ SQLNativeSql(
/* Supplies parameter data at execution time. Used in conjuction with */
/* SQLPutData. */
RETCODE SQL_API
RETCODE SQL_API
SQLParamData(
HSTMT hstmt,
PTR FAR *prgbValue)
......@@ -651,7 +651,7 @@ SQLParamData(
/* Supplies parameter data at execution time. Used in conjunction with */
/* SQLParamData. */
RETCODE SQL_API
RETCODE SQL_API
SQLPutData(
HSTMT hstmt,
PTR rgbValue,
......
......@@ -17,24 +17,22 @@ extern "C"
{
#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 */
DWORD
WritePrivateProfileString(char *theSection, /* section name */
char *theKey, /* write key name */
char *theBuffer, /* input buffer */
char *theIniFileName); /* pathname of ini file
* to write */
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 */
DWORD WritePrivateProfileString(char *theSection, /* section name */
char *theKey, /* write key name */
char *theBuffer, /* input buffer */
char *theIniFileName); /* pathname of ini file
* to write */
#ifdef __cplusplus
}
......
......@@ -58,7 +58,7 @@ extern GLOBAL_VALUES globals;
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLGetInfo(
HDBC hdbc,
UWORD fInfoType,
......@@ -713,7 +713,7 @@ SQLGetInfo(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLGetTypeInfo(
HSTMT hstmt,
SWORD fSqlType)
......@@ -810,7 +810,7 @@ SQLGetTypeInfo(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLGetFunctions(
HDBC hdbc,
UWORD fFunction,
......@@ -1094,7 +1094,7 @@ SQLGetFunctions(
RETCODE SQL_API
RETCODE SQL_API
SQLTables(
HSTMT hstmt,
UCHAR FAR *szTableQualifier,
......@@ -1419,7 +1419,7 @@ SQLTables(
RETCODE SQL_API
RETCODE SQL_API
SQLColumns(
HSTMT hstmt,
UCHAR FAR *szTableQualifier,
......@@ -1855,7 +1855,7 @@ SQLColumns(
return SQL_SUCCESS;
}
RETCODE SQL_API
RETCODE SQL_API
SQLSpecialColumns(
HSTMT hstmt,
UWORD fColType,
......@@ -2004,7 +2004,7 @@ SQLSpecialColumns(
return SQL_SUCCESS;
}
RETCODE SQL_API
RETCODE SQL_API
SQLStatistics(
HSTMT hstmt,
UCHAR FAR *szTableQualifier,
......@@ -2393,7 +2393,7 @@ SEEYA:
return SQL_SUCCESS;
}
RETCODE SQL_API
RETCODE SQL_API
SQLColumnPrivileges(
HSTMT hstmt,
UCHAR FAR *szTableQualifier,
......@@ -2419,7 +2419,7 @@ SQLColumnPrivileges(
/* SQLPrimaryKeys()
* Retrieve the primary key columns for the specified table.
*/
RETCODE SQL_API
RETCODE SQL_API
SQLPrimaryKeys(
HSTMT hstmt,
UCHAR FAR *szTableQualifier,
......@@ -2595,7 +2595,7 @@ SQLPrimaryKeys(
return SQL_SUCCESS;
}
RETCODE SQL_API
RETCODE SQL_API
SQLForeignKeys(
HSTMT hstmt,
UCHAR FAR *szPkTableQualifier,
......@@ -3259,7 +3259,7 @@ SQLForeignKeys(
RETCODE SQL_API
RETCODE SQL_API
SQLProcedureColumns(
HSTMT hstmt,
UCHAR FAR *szProcQualifier,
......@@ -3279,7 +3279,7 @@ SQLProcedureColumns(
return SQL_ERROR;
}
RETCODE SQL_API
RETCODE SQL_API
SQLProcedures(
HSTMT hstmt,
UCHAR FAR *szProcQualifier,
......@@ -3297,7 +3297,7 @@ SQLProcedures(
return SQL_ERROR;
}
RETCODE SQL_API
RETCODE SQL_API
SQLTablePrivileges(
HSTMT hstmt,
UCHAR FAR *szTableQualifier,
......
......@@ -51,15 +51,15 @@ typedef int BOOL;
#define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0)
#define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s)))
#define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
#define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
#define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
#define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
#define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
#endif
#endif /* WIN32 */
#define SYSERR (-1)
#define SYSERR (-1)
#ifndef NULL
#ifndef NULL
#define NULL ((void FAR*)0UL)
#endif
......
......@@ -24,72 +24,72 @@ typedef signed short RETCODE;
#define SQL_API EXPORT CALLBACK
#endif
#define ODBCVER 0x0250
#define ODBCVER 0x0250
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_DSN_LENGTH 32
#define SQL_MAX_MESSAGE_LENGTH 512
#define SQL_MAX_DSN_LENGTH 32
/* return code */
#define SQL_INVALID_HANDLE (-2)
#define SQL_ERROR (-1)
#define SQL_SUCCESS 0
#define SQL_INVALID_HANDLE (-2)
#define SQL_ERROR (-1)
#define SQL_SUCCESS 0
#define SQL_SUCCESS_WITH_INFO 1
#define SQL_NO_DATA_FOUND 100
#define SQL_NO_DATA_FOUND 100
/* standard SQL datatypes (agree with ANSI type numbering) */
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
#define SQL_VARCHAR 12
#define SQL_TYPE_MIN SQL_CHAR
#define SQL_TYPE_NULL 0
#define SQL_TYPE_MAX SQL_VARCHAR
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
#define SQL_VARCHAR 12
#define SQL_TYPE_MIN SQL_CHAR
#define SQL_TYPE_NUL 0
#define SQL_TYPE_MAX SQL_VARCHAR
/* C to SQL datatype mapping */
#define SQL_C_CHAR SQL_CHAR
#define SQL_C_LONG SQL_INTEGER
#define SQL_C_SHORT SQL_SMALLINT
#define SQL_C_FLOAT SQL_REAL
#define SQL_C_DOUBLE SQL_DOUBLE
#define SQL_C_DEFAULT 99
#define SQL_C_CHAR SQL_CHAR
#define SQL_C_LONG SQL_INTEGER
#define SQL_C_SHORT SQL_SMALLINT
#define SQL_C_FLOAT SQL_REAL
#define SQL_C_DOUBLE SQL_DOUBLE
#define SQL_C_DEFAULT 99
#define SQL_NO_NULLS 0
#define SQL_NULLABLE 1
#define SQL_NULLABLE_UNKNOWN 2
#define SQL_NO_NULLS 0
#define SQL_NULLABLE 1
#define SQL_NULLABLE_UNKNOWN 2
/* some special length values */
#define SQL_NULL_DATA (-1)
#define SQL_DATA_AT_EXEC (-2)
#define SQL_NTS (-3)
#define SQL_NULL_DATA (-1)
#define SQL_DATA_AT_EXEC (-2)
#define SQL_NTS (-3)
/* SQLFreeStmt flag values */
#define SQL_CLOSE 0
#define SQL_DROP 1
#define SQL_UNBIND 2
#define SQL_RESET_PARAMS 3
#define SQL_CLOSE 0
#define SQL_DROP 1
#define SQL_UNBIND 2
#define SQL_RESET_PARAMS 3
/* SQLTransact flag values */
#define SQL_COMMIT 0
#define SQL_ROLLBACK 1
#define SQL_COMMIT 0
#define SQL_ROLLBACK 1
/* SQLColAttributes flag values */
#define SQL_COLUMN_COUNT 0
#define SQL_COLUMN_LABEL 18
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#define SQL_COLUMN_COUNT 0
#define SQL_COLUMN_LABEL 18
#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
#define SQL_COLUMN_DRIVER_START 1000
#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
/* Null handles */
#define SQL_NULL_HENV 0
#define SQL_NULL_HDBC 0
#define SQL_NULL_HSTMT 0
#define SQL_NULL_HENV 0
#define SQL_NULL_HDBC 0
#define SQL_NULL_HSTMT 0
/* All code below has been added to the original isql.h coming from iodbc */
typedef unsigned char BYTE;
......@@ -98,13 +98,13 @@ typedef unsigned char BYTE;
#define SQL_COLUMN_NAME 1
#define SQL_COLUMN_TYPE 2
#define SQL_COLUMN_LENGTH 3
#define SQL_COLUMN_PRECISION 4
#define SQL_COLUMN_PRECISION 4
#define SQL_COLUMN_SCALE 5
#define SQL_COLUMN_DISPLAY_SIZE 6
#define SQL_COLUMN_DISPLAY_SIZE 6
#define SQL_COLUMN_NULLABLE 7
#define SQL_COLUMN_UNSIGNED 8
#define SQL_COLUMN_MONEY 9
#define SQL_COLUMN_UPDATABLE 10
#define SQL_COLUMN_UPDATABLE 10
#define SQL_COLUMN_AUTO_INCREMENT 11
#define SQL_COLUMN_CASE_SENSITIVE 12
#define SQL_COLUMN_SEARCHABLE 13
......@@ -114,11 +114,11 @@ typedef unsigned char BYTE;
#define SQL_COLUMN_QUALIFIER_NAME 17
/* SQLColAttributes Searchable flags */
#define SQL_UNSEARCHABLE 0
#define SQL_LIKE_ONLY 1
#define SQL_ALL_EXCEPT_LIKE 2
#define SQL_SEARCHABLE 3
#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
#define SQL_UNSEARCHABLE 0
#define SQL_LIKE_ONLY 1
#define SQL_ALL_EXCEPT_LIKE 2
#define SQL_SEARCHABLE 3
#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
/* SQLColAttributes Updateable flags */
#define SQL_ATTR_READONLY 0
......
This diff is collapsed.
......@@ -284,7 +284,7 @@ set_statement_option(ConnectionClass *conn,
/* Implements only SQL_AUTOCOMMIT */
RETCODE SQL_API
RETCODE SQL_API
SQLSetConnectOption(
HDBC hdbc,
UWORD fOption,
......@@ -433,7 +433,7 @@ SQLSetConnectOption(
/* - - - - - - - - - */
/* This function just can tell you whether you are in Autcommit mode or not */
RETCODE SQL_API
RETCODE SQL_API
SQLGetConnectOption(
HDBC hdbc,
UWORD fOption,
......@@ -510,7 +510,7 @@ SQLGetConnectOption(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLSetStmtOption(
HSTMT hstmt,
UWORD fOption,
......@@ -537,7 +537,7 @@ SQLSetStmtOption(
/* - - - - - - - - - */
RETCODE SQL_API
RETCODE SQL_API
SQLGetStmtOption(
HSTMT hstmt,
UWORD fOption,
......
......@@ -20,22 +20,22 @@
#define PG_TYPE_LO ????/* waiting for permanent type */
#endif
#define PG_TYPE_BOOL 16
#define PG_TYPE_BYTEA 17
#define PG_TYPE_CHAR 18
#define PG_TYPE_NAME 19
#define PG_TYPE_INT8 20
#define PG_TYPE_INT2 21
#define PG_TYPE_INT2VECTOR 22
#define PG_TYPE_INT4 23
#define PG_TYPE_REGPROC 24
#define PG_TYPE_TEXT 25
#define PG_TYPE_OID 26
#define PG_TYPE_TID 27
#define PG_TYPE_XID 28
#define PG_TYPE_CID 29
#define PG_TYPE_OIDVECTOR 30
#define PG_TYPE_SET 32
#define PG_TYPE_BOOL 16
#define PG_TYPE_BYTEA 17
#define PG_TYPE_CHAR 18
#define PG_TYPE_NAME 19
#define PG_TYPE_INT8 20
#define PG_TYPE_INT2 21
#define PG_TYPE_INT2VECTOR 22
#define PG_TYPE_INT4 23
#define PG_TYPE_REGPROC 24
#define PG_TYPE_TEXT 25
#define PG_TYPE_OID 26
#define PG_TYPE_TID 27
#define PG_TYPE_XID 28
#define PG_TYPE_CID 29
#define PG_TYPE_OIDVECTOR 30
#define PG_TYPE_SET 32
#define PG_TYPE_CHAR2 409
#define PG_TYPE_CHAR4 410
#define PG_TYPE_CHAR8 411
......@@ -55,19 +55,19 @@
#define PG_TYPE_OIDINT2 810
#define PG_TYPE_OIDINT4 910
#define PG_TYPE_OIDNAME 911
#define PG_TYPE_BPCHAR 1042
#define PG_TYPE_VARCHAR 1043
#define PG_TYPE_DATE 1082
#define PG_TYPE_TIME 1083
#define PG_TYPE_DATETIME 1184
#define PG_TYPE_TIMESTAMP 1296
#define PG_TYPE_NUMERIC 1700
#define PG_TYPE_BPCHAR 1042
#define PG_TYPE_VARCHAR 1043
#define PG_TYPE_DATE 1082
#define PG_TYPE_TIME 1083
#define PG_TYPE_DATETIME 1184
#define PG_TYPE_TIMESTAMP 1296
#define PG_TYPE_NUMERIC 1700
/* extern Int4 pgtypes_defined[]; */
extern Int2 sqlTypes[];
/* Defines for pgtype_precision */
#define PG_STATIC -1
#define PG_STATIC -1
Int4 sqltype_to_pgtype(Int2 fSqlType);
......
......@@ -136,7 +136,7 @@ _fini(void)
Driver Manager do this. Also, the ordinal values of the
functions must match the value of fFunction in SQLGetFunctions()
*/
RETCODE SQL_API
RETCODE SQL_API
SQLDummyOrdinal(void)
{
return SQL_SUCCESS;
......
......@@ -6,7 +6,7 @@
*
* Comments: See "notice.txt" for copyright and license information.
*
* $Id: psqlodbc.h,v 1.34 2001/02/11 05:13:51 momjian Exp $
* $Id: psqlodbc.h,v 1.35 2001/02/11 05:58:41 momjian Exp $
*/
#ifndef __PSQLODBC_H__
......@@ -39,10 +39,10 @@ typedef UInt4 Oid;
#define ODBCVER 0x0250
#define DRIVER_ODBC_VER "02.50"
#define DRIVERNAME "PostgreSQL ODBC"
#define DBMS_NAME "PostgreSQL"
#define DRIVERNAME "PostgreSQL ODBC"
#define DBMS_NAME "PostgreSQL"
#define POSTGRESDRIVERVERSION "07.01.0003"
#define POSTGRESDRIVERVERSION "07.01.0003"
#ifdef WIN32
#define DRIVER_FILE_NAME "PSQLODBC.DLL"
......@@ -52,52 +52,52 @@ typedef UInt4 Oid;
/* Limits */
#ifdef WIN32
#define BLCKSZ 4096
#define BLCKSZ 4096
#endif
#define MAX_MESSAGE_LEN 65536 /* This puts a limit on
#define MAX_MESSAGE_LEN 65536 /* This puts a limit on
* query size but I don't */
/* see an easy way round this - DJP 24-1-2001 */
#define MAX_CONNECT_STRING 4096
#define ERROR_MSG_LENGTH 4096
#define FETCH_MAX 100 /* default number of rows to cache
* for declare/fetch */
#define TUPLE_MALLOC_INC 100
#define SOCK_BUFFER_SIZE 4096 /* default socket buffer
#define MAX_CONNECT_STRING 4096
#define ERROR_MSG_LENGTH 4096
#define FETCH_MAX 100 /* default number of rows to cache
* for declare/fetch */
#define TUPLE_MALLOC_INC 100
#define SOCK_BUFFER_SIZE 4096 /* default socket buffer
* size */
#define MAX_CONNECTIONS 128 /* conns per environment
* (arbitrary) */
#define MAX_FIELDS 512
#define BYTELEN 8
#define VARHDRSZ sizeof(Int4)
#define MAX_CONNECTIONS 128 /* conns per environment
* (arbitrary) */
#define MAX_FIELDS 512
#define BYTELEN 8
#define VARHDRSZ sizeof(Int4)
#define MAX_TABLE_LEN 32
#define MAX_COLUMN_LEN 32
#define MAX_CURSOR_LEN 32
#define MAX_TABLE_LEN 32
#define MAX_COLUMN_LEN 32
#define MAX_CURSOR_LEN 32
/* Registry length limits */
#define LARGE_REGISTRY_LEN 4096 /* used for special cases */
#define MEDIUM_REGISTRY_LEN 256 /* normal size for
#define LARGE_REGISTRY_LEN 4096 /* used for special cases */
#define MEDIUM_REGISTRY_LEN 256 /* normal size for
* user,database,etc. */
#define SMALL_REGISTRY_LEN 10 /* for 1/0 settings */
#define SMALL_REGISTRY_LEN 10 /* for 1/0 settings */
/* These prefixes denote system tables */
#define POSTGRES_SYS_PREFIX "pg_"
#define KEYS_TABLE "dd_fkey"
#define POSTGRES_SYS_PREFIX "pg_"
#define KEYS_TABLE "dd_fkey"
/* Info limits */
#define MAX_INFO_STRING 128
#define MAX_KEYPARTS 20
#define MAX_KEYLEN 512 /* max key of the form
* "date+outlet+invoice" */
#define MAX_ROW_SIZE 0 /* Unlimited rowsize with the Tuple
* Toaster */
#define MAX_STATEMENT_LEN 0 /* Unlimited statement size with 7.0 */
#define MAX_INFO_STRING 128
#define MAX_KEYPARTS 20
#define MAX_KEYLEN 512 /* max key of the form
* "date+outlet+invoice" */
#define MAX_ROW_SIZE 0 /* Unlimited rowsize with the Tuple
* Toaster */
#define MAX_STATEMENT_LEN 0 /* Unlimited statement size with 7.0 */
/* Previously, numerous query strings were defined of length MAX_STATEMENT_LEN */
/* Now that's 0, lets use this instead. DJP 24-1-2001 */
#define STD_STATEMENT_LEN MAX_MESSAGE_LEN
#define STD_STATEMENT_LEN MAX_MESSAGE_LEN
#define PG64 "6.4"
......
......@@ -43,7 +43,7 @@ extern GLOBAL_VALUES globals;
RETCODE SQL_API
RETCODE SQL_API
SQLRowCount(
HSTMT hstmt,
SDWORD FAR *pcrow)
......@@ -113,7 +113,7 @@ SQLRowCount(
/* attached to "hstmt". */
RETCODE SQL_API
RETCODE SQL_API
SQLNumResultCols(
HSTMT hstmt,
SWORD FAR *pccol)
......@@ -176,7 +176,7 @@ SQLNumResultCols(
/* Return information about the database column the user wants */
/* information about. */
RETCODE SQL_API
RETCODE SQL_API
SQLDescribeCol(
HSTMT hstmt,
UWORD icol,
......@@ -375,7 +375,7 @@ SQLDescribeCol(
/* Returns result column descriptor information for a result set. */
RETCODE SQL_API
RETCODE SQL_API
SQLColAttributes(
HSTMT hstmt,
UWORD icol,
......@@ -651,7 +651,7 @@ SQLColAttributes(
/* Returns result data for a single column in the current row. */
RETCODE SQL_API
RETCODE SQL_API
SQLGetData(
HSTMT hstmt,
UWORD icol,
......@@ -836,7 +836,7 @@ SQLGetData(
/* Returns data for bound columns in the current row ("hstmt->iCursor"), */
/* advances the cursor. */
RETCODE SQL_API
RETCODE SQL_API
SQLFetch(
HSTMT hstmt)
{
......@@ -906,7 +906,7 @@ SQLFetch(
/* This fetchs a block of data (rowset). */
RETCODE SQL_API
RETCODE SQL_API
SQLExtendedFetch(
HSTMT hstmt,
UWORD fFetchType,
......@@ -1202,7 +1202,7 @@ SQLExtendedFetch(
/* the "hstmt". */
/* CC: return SQL_NO_DATA_FOUND since we do not support multiple result sets */
RETCODE SQL_API
RETCODE SQL_API
SQLMoreResults(
HSTMT hstmt)
{
......@@ -1211,7 +1211,7 @@ SQLMoreResults(
/* This positions the cursor within a rowset, that was positioned using SQLExtendedFetch. */
/* This will be useful (so far) only when using SQLGetData after SQLExtendedFetch. */
RETCODE SQL_API
RETCODE SQL_API
SQLSetPos(
HSTMT hstmt,
UWORD irow,
......@@ -1279,7 +1279,7 @@ SQLSetPos(
/* Sets options that control the behavior of cursors. */
RETCODE SQL_API
RETCODE SQL_API
SQLSetScrollOptions(
HSTMT hstmt,
UWORD fConcurrency,
......@@ -1295,7 +1295,7 @@ SQLSetScrollOptions(
/* Set the cursor name on a statement handle */
RETCODE SQL_API
RETCODE SQL_API
SQLSetCursorName(
HSTMT hstmt,
UCHAR FAR *szCursor,
......@@ -1329,7 +1329,7 @@ SQLSetCursorName(
/* Return the cursor name for a statement handle */
RETCODE SQL_API
RETCODE SQL_API
SQLGetCursorName(
HSTMT hstmt,
UCHAR FAR *szCursor,
......
......@@ -41,16 +41,16 @@ typedef unsigned int in_addr_t;
#include "psqlodbc.h"
#define SOCKET_ALREADY_CONNECTED 1
#define SOCKET_HOST_NOT_FOUND 2
#define SOCKET_COULD_NOT_CREATE_SOCKET 3
#define SOCKET_COULD_NOT_CONNECT 4
#define SOCKET_READ_ERROR 5
#define SOCKET_WRITE_ERROR 6
#define SOCKET_NULLPOINTER_PARAMETER 7
#define SOCKET_PUT_INT_WRONG_LENGTH 8
#define SOCKET_GET_INT_WRONG_LENGTH 9
#define SOCKET_CLOSED 10
#define SOCKET_ALREADY_CONNECTED 1
#define SOCKET_HOST_NOT_FOUND 2
#define SOCKET_COULD_NOT_CREATE_SOCKET 3
#define SOCKET_COULD_NOT_CONNECT 4
#define SOCKET_READ_ERROR 5
#define SOCKET_WRITE_ERROR 6
#define SOCKET_NULLPOINTER_PARAMETER 7
#define SOCKET_PUT_INT_WRONG_LENGTH 8
#define SOCKET_GET_INT_WRONG_LENGTH 9
#define SOCKET_CLOSED 10
struct SocketClass_
......
......@@ -85,7 +85,7 @@ static struct
};
RETCODE SQL_API
RETCODE SQL_API
SQLAllocStmt(HDBC hdbc,
HSTMT FAR *phstmt)
{
......@@ -139,7 +139,7 @@ SQLAllocStmt(HDBC hdbc,
}
RETCODE SQL_API
RETCODE SQL_API
SQLFreeStmt(HSTMT hstmt,
UWORD fOption)
{
......
......@@ -50,38 +50,38 @@ typedef enum
STMT_EXECUTING /* statement execution is still going on */
} STMT_Status;
#define STMT_TRUNCATED -2
#define STMT_INFO_ONLY -1 /* not an error message, just a
#define STMT_TRUNCATED (-2)
#define STMT_INFO_ONLY (-1) /* not an error message, just a
* notification to be returned by SQLError */
#define STMT_OK 0 /* will be interpreted as "no error
#define STMT_OK 0 /* will be interpreted as "no error
* pending" */
#define STMT_EXEC_ERROR 1
#define STMT_STATUS_ERROR 2
#define STMT_SEQUENCE_ERROR 3
#define STMT_NO_MEMORY_ERROR 4
#define STMT_COLNUM_ERROR 5
#define STMT_NO_STMTSTRING 6
#define STMT_ERROR_TAKEN_FROM_BACKEND 7
#define STMT_INTERNAL_ERROR 8
#define STMT_STILL_EXECUTING 9
#define STMT_NOT_IMPLEMENTED_ERROR 10
#define STMT_EXEC_ERROR 1
#define STMT_STATUS_ERROR 2
#define STMT_SEQUENCE_ERROR 3
#define STMT_NO_MEMORY_ERROR 4
#define STMT_COLNUM_ERROR 5
#define STMT_NO_STMTSTRING 6
#define STMT_ERROR_TAKEN_FROM_BACKEND 7
#define STMT_INTERNAL_ERROR 8
#define STMT_STILL_EXECUTING 9
#define STMT_NOT_IMPLEMENTED_ERROR 10
#define STMT_BAD_PARAMETER_NUMBER_ERROR 11
#define STMT_OPTION_OUT_OF_RANGE_ERROR 12
#define STMT_OPTION_OUT_OF_RANGE_ERROR 12
#define STMT_INVALID_COLUMN_NUMBER_ERROR 13
#define STMT_RESTRICTED_DATA_TYPE_ERROR 14
#define STMT_INVALID_CURSOR_STATE_ERROR 15
#define STMT_OPTION_VALUE_CHANGED 16
#define STMT_CREATE_TABLE_ERROR 17
#define STMT_NO_CURSOR_NAME 18
#define STMT_INVALID_CURSOR_NAME 19
#define STMT_INVALID_ARGUMENT_NO 20
#define STMT_ROW_OUT_OF_RANGE 21
#define STMT_OPERATION_CANCELLED 22
#define STMT_INVALID_CURSOR_POSITION 23
#define STMT_VALUE_OUT_OF_RANGE 24
#define STMT_OPERATION_INVALID 25
#define STMT_PROGRAM_TYPE_OUT_OF_RANGE 26
#define STMT_BAD_ERROR 27
#define STMT_OPTION_VALUE_CHANGED 16
#define STMT_CREATE_TABLE_ERROR 17
#define STMT_NO_CURSOR_NAME 18
#define STMT_INVALID_CURSOR_NAME 19
#define STMT_INVALID_ARGUMENT_NO 20
#define STMT_ROW_OUT_OF_RANGE 21
#define STMT_OPERATION_CANCELLED 22
#define STMT_INVALID_CURSOR_POSITION 23
#define STMT_VALUE_OUT_OF_RANGE 24
#define STMT_OPERATION_INVALID 25
#define STMT_PROGRAM_TYPE_OUT_OF_RANGE 26
#define STMT_BAD_ERROR 27
/* statement types */
enum
......
......@@ -27,3 +27,6 @@ We get the list of typedef's included in pgindent by running:
/src/tools/find_typedef
Make sure to do the pgsql/bin directory, and the src/interfaces/odbc
directory. Merge the output of these and remove duplicates.
......@@ -37,6 +37,10 @@ do
indent -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l75 \
-lp -nip -npro $EXTRA_OPTS \
-TFAR \
-TDWORD \
-TBOOL \
-TRETCODE \
-TSQL_API \
-TA_Const \
-TA_Expr \
-TA_Indices \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment