ODBC source code cleanup. Mostly alignment of #define constants.
This commit is contained in:
parent
ff71301806
commit
12ceb11182
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: bind.c
|
||||
*
|
||||
* Description: This module contains routines related to binding
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: bind.h
|
||||
*
|
||||
* Description: See "bind.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: columninfo.c
|
||||
*
|
||||
* Description: This module contains routines related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: columninfo.h
|
||||
*
|
||||
* Description: See "columninfo.c"
|
||||
@ -40,5 +39,4 @@ void CI_set_num_fields(ColumnInfoClass *self, int new_num_fields);
|
||||
void CI_set_field_info(ColumnInfoClass *self, int field_num, char *new_name,
|
||||
Oid new_adtid, Int2 new_adtsize, Int4 atttypmod);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: connection.c
|
||||
*
|
||||
* Description: This module contains routines related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: connection.h
|
||||
*
|
||||
* Description: See "connection.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: convert.c
|
||||
*
|
||||
* Description: This module contains routines related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: convert.h
|
||||
*
|
||||
* Description: See "convert.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: dlg_specific.c
|
||||
*
|
||||
* Description: This module contains any specific code for handling
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: dlg_specific.h
|
||||
*
|
||||
* Description: See "dlg_specific.c"
|
||||
@ -38,18 +37,23 @@
|
||||
#define ODBCINST_INI "/etc/odbcinst.ini"
|
||||
#endif
|
||||
#else /* WIN32 */
|
||||
#define ODBC_INI "ODBC.INI" /* ODBC initialization file */
|
||||
#define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation file */
|
||||
#define ODBC_INI "ODBC.INI" /* ODBC initialization
|
||||
* file */
|
||||
#define ODBCINST_INI "ODBCINST.INI" /* ODBC Installation
|
||||
* file */
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
#define INI_DSN DBMS_NAME /* Name of default Datasource in
|
||||
* ini file (not used?) */
|
||||
#define INI_KDESC "Description" /* Data source description */
|
||||
#define INI_SERVER "Servername" /* Name of Server running the
|
||||
* Postgres service */
|
||||
#define INI_PORT "Port"/* Port on which the Postmaster is
|
||||
* listening */
|
||||
#define INI_DSN DBMS_NAME /* Name of default
|
||||
* Datasource in ini
|
||||
* file (not used?) */
|
||||
#define INI_KDESC "Description" /* Data source
|
||||
* description */
|
||||
#define INI_SERVER "Servername" /* Name of Server
|
||||
* running the Postgres
|
||||
* service */
|
||||
#define INI_PORT "Port" /* Port on which the
|
||||
* Postmaster is listening */
|
||||
#define INI_DATABASE "Database" /* Database Name */
|
||||
#define INI_USER "Username" /* Default User Name */
|
||||
#define INI_PASSWORD "Password" /* Default Password */
|
||||
@ -57,15 +61,18 @@
|
||||
#define INI_FETCH "Fetch" /* Fetch Max Count */
|
||||
#define INI_SOCKET "Socket" /* Socket buffer size */
|
||||
#define INI_READONLY "ReadOnly" /* Database is read only */
|
||||
#define INI_COMMLOG "CommLog" /* Communication to backend
|
||||
* logging */
|
||||
#define INI_COMMLOG "CommLog" /* Communication to
|
||||
* backend logging */
|
||||
#define INI_PROTOCOL "Protocol" /* What protocol (6.2) */
|
||||
#define INI_OPTIMIZER "Optimizer" /* Use backend genetic optimizer */
|
||||
#define INI_KSQO "Ksqo"/* Keyset query optimization */
|
||||
#define INI_OPTIMIZER "Optimizer" /* Use backend genetic
|
||||
* optimizer */
|
||||
#define INI_KSQO "Ksqo" /* Keyset query
|
||||
* optimization */
|
||||
#define INI_CONNSETTINGS "ConnSettings" /* Anything to send to
|
||||
* backend on successful
|
||||
* connection */
|
||||
#define INI_UNIQUEINDEX "UniqueIndex" /* Recognize unique indexes */
|
||||
#define INI_UNIQUEINDEX "UniqueIndex" /* Recognize unique
|
||||
* indexes */
|
||||
#define INI_UNKNOWNSIZES "UnknownSizes" /* How to handle unknown
|
||||
* result set sizes */
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: drvconn.c
|
||||
*
|
||||
* Description: This module contains only routines related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: environ.c
|
||||
*
|
||||
* Description: This module contains routines related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: environ.h
|
||||
*
|
||||
* Description: See "environ.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: execute.c
|
||||
*
|
||||
* Description: This module contains routines related to
|
||||
|
@ -1,14 +1,21 @@
|
||||
/* GetPrivateProfileString() -- approximate implementation of */
|
||||
/* Windows NT System Services version of GetPrivateProfileString() */
|
||||
/* probably doesn't handle the NULL key for section name or value key */
|
||||
/* correctly also, doesn't provide Microsoft backwards compatability */
|
||||
/* wrt TAB characters in the value string -- Microsoft terminates value */
|
||||
/* at the first TAB, but I couldn't discover what the behavior should */
|
||||
/* be regarding TABS in quoted strings so, I treat tabs like any other */
|
||||
/* characters -- NO comments following value string separated by a TAB */
|
||||
/* are allowed (that is an anachronism anyway) */
|
||||
/* Added code to search for ODBC_INI file in users home directory on */
|
||||
/* Unix */
|
||||
/* GetPrivateProfileString()
|
||||
*
|
||||
* approximate implementation of
|
||||
* Windows NT System Services version of GetPrivateProfileString()
|
||||
* probably doesn't handle the NULL key for section name or value key
|
||||
* correctly also, doesn't provide Microsoft backwards compatability
|
||||
* wrt TAB characters in the value string
|
||||
*
|
||||
* Microsoft terminates value
|
||||
* at the first TAB, but I couldn't discover what the behavior should
|
||||
* be regarding TABS in quoted strings so, I treat tabs like any other
|
||||
* characters
|
||||
*
|
||||
* NO comments following value string separated by a TAB
|
||||
* are allowed (that is an anachronism anyway)
|
||||
* Added code to search for ODBC_INI file in users home directory on
|
||||
* Unix
|
||||
*/
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* GetPrivateProfileString */
|
||||
/* for UNIX use */
|
||||
/* GetPrivateProfileString
|
||||
* for UNIX use
|
||||
*/
|
||||
#ifndef GPPS_H
|
||||
#define GPPS_H
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: info.c
|
||||
*
|
||||
* Description: This module contains routines related to
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* Modified isql.h file from iodbc. This file should be placed in the
|
||||
/*
|
||||
* Modified isql.h file from iodbc. This file should be placed in the
|
||||
* include path to be used to create ODBC compliant applications.
|
||||
*/
|
||||
|
||||
#ifndef _INTRINSIC_SQL_H
|
||||
#define _INTRINSIC_SQL_H
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* This file has been modified from the original isqlext.h to add the
|
||||
/*
|
||||
* This file has been modified from the original isqlext.h to add the
|
||||
* missing function prototypes and appropriate #defines. It is designed
|
||||
* to be a drop in replacement for isqlext.h from iodbc.
|
||||
*/
|
||||
|
||||
#ifndef _INTRINSIC_SQLEXT_H
|
||||
#define _INTRINSIC_SQLEXT_H
|
||||
|
||||
@ -1275,7 +1277,8 @@ typedef struct tagSQL_INTERVAL_STRUCT
|
||||
*/
|
||||
#define SQL_UB_OFF 0UL
|
||||
#define SQL_UB_ON 1UL
|
||||
#define SQL_UB_FIXED SQL_UB_ON /* Deprecated in ODBC 3.0 */
|
||||
#define SQL_UB_FIXED SQL_UB_ON /* Deprecated in ODBC
|
||||
* 3.0 */
|
||||
#define SQL_UB_VARIABLE 2UL /* Added in ODBC 3.0 */
|
||||
#define SQL_UB_DEFAULT SQL_UB_OFF
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: lobj.c
|
||||
*
|
||||
* Description: This module contains routines related to manipulating
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: lobj.h
|
||||
*
|
||||
* Description: See "lobj.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: misc.c
|
||||
*
|
||||
* Description: This module contains miscellaneous routines
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: misc.h
|
||||
*
|
||||
* Description: See "misc.c"
|
||||
@ -98,8 +97,8 @@ char *my_strcat(char *buf, char *fmt, char *s, int len);
|
||||
/* defines for return value of my_strcpy */
|
||||
#define STRCPY_SUCCESS 1
|
||||
#define STRCPY_FAIL 0
|
||||
#define STRCPY_TRUNCATED -1
|
||||
#define STRCPY_NULL -2
|
||||
#define STRCPY_TRUNCATED (-1)
|
||||
#define STRCPY_NULL (-2)
|
||||
|
||||
int my_strcpy(char *dst, int dst_len, char *src, int src_len);
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
* Create 2001-03-03 Eiji Tokuya
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "multibyte.h"
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
*
|
||||
* Multibyte library header ( psqlODBC Only )
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* PostgreSQL client encoding */
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: options.c
|
||||
*
|
||||
* Description: This module contains routines for getting/setting
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: parse.c
|
||||
*
|
||||
* Description: This module contains routines related to parsing SQL statements.
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: pgtypes.c
|
||||
*
|
||||
* Description: This module contains routines for getting information
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: pgtypes.h
|
||||
*
|
||||
* Description: See "pgtypes.c"
|
||||
@ -67,7 +66,7 @@
|
||||
extern Int2 sqlTypes[];
|
||||
|
||||
/* Defines for pgtype_precision */
|
||||
#define PG_STATIC -1
|
||||
#define PG_STATIC (-1)
|
||||
|
||||
Int4 sqltype_to_pgtype(Int2 fSqlType);
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: psqlodbc.c
|
||||
*
|
||||
* Description: This module contains the main entry point (DllMain) for the library.
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: psqlodbc.h
|
||||
*
|
||||
* Description: This file contains defines and declarations that are related to
|
||||
@ -6,7 +5,8 @@
|
||||
*
|
||||
* Comments: See "notice.txt" for copyright and license information.
|
||||
*
|
||||
* $Id: psqlodbc.h,v 1.40 2001/03/22 04:01:35 momjian Exp $
|
||||
* $Id: psqlodbc.h,v 1.41 2001/03/27 04:00:54 momjian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __PSQLODBC_H__
|
||||
@ -91,18 +91,19 @@ typedef UInt4 Oid;
|
||||
#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_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 PG62 "6.2" /* "Protocol" key setting to force
|
||||
* Postgres 6.2 */
|
||||
#define PG63 "6.3" /* "Protocol" key setting to force
|
||||
* postgres 6.3 */
|
||||
#define PG62 "6.2" /* "Protocol" key setting
|
||||
* to force Postgres 6.2 */
|
||||
#define PG63 "6.3" /* "Protocol" key setting
|
||||
* to force postgres 6.3 */
|
||||
#define PG64 "6.4"
|
||||
|
||||
typedef struct ConnectionClass_ ConnectionClass;
|
||||
@ -173,15 +174,16 @@ typedef struct QueryInfo_
|
||||
} QueryInfo;
|
||||
|
||||
|
||||
#define PG_TYPE_LO -999 /* hack until permanent type
|
||||
* available */
|
||||
#define PG_TYPE_LO (-999) /* hack until permanent
|
||||
* type available */
|
||||
#define PG_TYPE_LO_NAME "lo"
|
||||
#define OID_ATTNUM -2 /* the attnum in pg_index of the
|
||||
* oid */
|
||||
#define OID_ATTNUM (-2) /* the attnum in pg_index
|
||||
* of the oid */
|
||||
|
||||
/* sizes */
|
||||
#define TEXT_FIELD_SIZE 8190 /* size of text fields (not
|
||||
* including null term) */
|
||||
#define TEXT_FIELD_SIZE 8190 /* size of text fields
|
||||
* (not including null
|
||||
* term) */
|
||||
#define NAME_FIELD_SIZE 32 /* size of name fields */
|
||||
#define MAX_VARCHAR_SIZE 254 /* maximum size of a varchar (not
|
||||
* including null term) */
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: qresult.c
|
||||
*
|
||||
* Description: This module contains functions related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: qresult.h
|
||||
*
|
||||
* Description: See "qresult.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: results.c
|
||||
*
|
||||
* Description: This module contains functions related to
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: setup.c
|
||||
*
|
||||
* Description: This module contains the setup functions for
|
||||
@ -11,7 +10,7 @@
|
||||
*
|
||||
* Comments: See "notice.txt" for copyright and license information.
|
||||
*
|
||||
*************************************************************************************/
|
||||
*/
|
||||
|
||||
#include "psqlodbc.h"
|
||||
#include "connection.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: socket.c
|
||||
*
|
||||
* Description: This module contains functions for low level socket
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: socket.h
|
||||
*
|
||||
* Description: See "socket.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: statement.c
|
||||
*
|
||||
* Description: This module contains functions related to creating
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: statement.h
|
||||
*
|
||||
* Description: See "statement.c"
|
||||
@ -50,11 +49,13 @@ 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
|
||||
* notification to be returned by SQLError */
|
||||
#define STMT_OK 0 /* will be interpreted as "no error
|
||||
* pending" */
|
||||
#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 pending" */
|
||||
#define STMT_EXEC_ERROR 1
|
||||
#define STMT_STATUS_ERROR 2
|
||||
#define STMT_SEQUENCE_ERROR 3
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: tuple.c
|
||||
*
|
||||
* Description: This module contains functions for setting the data for individual
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: tuple.h
|
||||
*
|
||||
* Description: See "tuple.c"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* Module: tuplelist.c
|
||||
*
|
||||
* Description: This module contains functions for creating a manual result set
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* File: tuplelist.h
|
||||
*
|
||||
* Description: See "tuplelist.c"
|
||||
|
Loading…
x
Reference in New Issue
Block a user