Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12ceb11

Browse files
committed
ODBC source code cleanup. Mostly alignment of #define constants.
1 parentff71301 commit12ceb11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1070
-1082
lines changed

‎src/interfaces/odbc/bind.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:bind.c
32
*
43
* Description:This module contains routines related to binding

‎src/interfaces/odbc/bind.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* File:bind.h
32
*
43
* Description:See "bind.c"

‎src/interfaces/odbc/columninfo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:columninfo.c
32
*
43
* Description:This module contains routines related to

‎src/interfaces/odbc/columninfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* File:columninfo.h
32
*
43
* Description:See "columninfo.c"
@@ -40,5 +39,4 @@ voidCI_set_num_fields(ColumnInfoClass *self, int new_num_fields);
4039
voidCI_set_field_info(ColumnInfoClass*self,intfield_num,char*new_name,
4140
Oidnew_adtid,Int2new_adtsize,Int4atttypmod);
4241

43-
4442
#endif

‎src/interfaces/odbc/connection.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:connection.c
32
*
43
* Description:This module contains routines related to

‎src/interfaces/odbc/connection.h

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* File:connection.h
32
*
43
* Description:See "connection.c"
@@ -38,41 +37,41 @@ typedef enum
3837
}CONN_Status;
3938

4039
/*These errors have general sql error state */
41-
#defineCONNECTION_SERVER_NOT_REACHED101
42-
#defineCONNECTION_MSG_TOO_LONG103
43-
#defineCONNECTION_COULD_NOT_SEND104
44-
#defineCONNECTION_NO_SUCH_DATABASE105
45-
#defineCONNECTION_BACKEND_CRAZY106
46-
#defineCONNECTION_NO_RESPONSE107
47-
#defineCONNECTION_SERVER_REPORTED_ERROR108
48-
#defineCONNECTION_COULD_NOT_RECEIVE109
49-
#defineCONNECTION_SERVER_REPORTED_WARNING110
50-
#defineCONNECTION_NEED_PASSWORD112
40+
#defineCONNECTION_SERVER_NOT_REACHED101
41+
#defineCONNECTION_MSG_TOO_LONG103
42+
#defineCONNECTION_COULD_NOT_SEND104
43+
#defineCONNECTION_NO_SUCH_DATABASE105
44+
#defineCONNECTION_BACKEND_CRAZY106
45+
#defineCONNECTION_NO_RESPONSE107
46+
#defineCONNECTION_SERVER_REPORTED_ERROR108
47+
#defineCONNECTION_COULD_NOT_RECEIVE109
48+
#defineCONNECTION_SERVER_REPORTED_WARNING110
49+
#defineCONNECTION_NEED_PASSWORD112
5150

5251
/*These errors correspond to specific SQL states */
53-
#defineCONN_INIREAD_ERROR201
54-
#defineCONN_OPENDB_ERROR202
55-
#defineCONN_STMT_ALLOC_ERROR203
56-
#defineCONN_IN_USE204
57-
#defineCONN_UNSUPPORTED_OPTION205
52+
#defineCONN_INIREAD_ERROR201
53+
#defineCONN_OPENDB_ERROR202
54+
#defineCONN_STMT_ALLOC_ERROR203
55+
#defineCONN_IN_USE204
56+
#defineCONN_UNSUPPORTED_OPTION205
5857
/* Used by SetConnectoption to indicate unsupported options */
59-
#defineCONN_INVALID_ARGUMENT_NO206
58+
#defineCONN_INVALID_ARGUMENT_NO206
6059
/* SetConnectOption: corresponds to ODBC--"S1009" */
61-
#defineCONN_TRANSACT_IN_PROGRES207
62-
#defineCONN_NO_MEMORY_ERROR208
63-
#defineCONN_NOT_IMPLEMENTED_ERROR209
64-
#defineCONN_INVALID_AUTHENTICATION210
65-
#defineCONN_AUTH_TYPE_UNSUPPORTED211
66-
#defineCONN_UNABLE_TO_LOAD_DLL212
60+
#defineCONN_TRANSACT_IN_PROGRES207
61+
#defineCONN_NO_MEMORY_ERROR208
62+
#defineCONN_NOT_IMPLEMENTED_ERROR209
63+
#defineCONN_INVALID_AUTHENTICATION210
64+
#defineCONN_AUTH_TYPE_UNSUPPORTED211
65+
#defineCONN_UNABLE_TO_LOAD_DLL212
6766

68-
#defineCONN_OPTION_VALUE_CHANGED213
69-
#defineCONN_VALUE_OUT_OF_RANGE214
67+
#defineCONN_OPTION_VALUE_CHANGED213
68+
#defineCONN_VALUE_OUT_OF_RANGE214
7069

71-
#defineCONN_TRUNCATED215
70+
#defineCONN_TRUNCATED215
7271

7372
/* Conn_status defines */
74-
#defineCONN_IN_AUTOCOMMIT0x01
75-
#defineCONN_IN_TRANSACTION0x02
73+
#defineCONN_IN_AUTOCOMMIT0x01
74+
#defineCONN_IN_TRANSACTION0x02
7675

7776
/* AutoCommit functions */
7877
#defineCC_set_autocommit_off(x)(x->transact_status &= ~CONN_IN_AUTOCOMMIT)
@@ -86,31 +85,31 @@ typedef enum
8685

8786

8887
/* Authentication types */
89-
#defineAUTH_REQ_OK0
90-
#defineAUTH_REQ_KRB41
91-
#defineAUTH_REQ_KRB52
92-
#defineAUTH_REQ_PASSWORD3
93-
#defineAUTH_REQ_CRYPT4
88+
#defineAUTH_REQ_OK0
89+
#defineAUTH_REQ_KRB41
90+
#defineAUTH_REQ_KRB52
91+
#defineAUTH_REQ_PASSWORD3
92+
#defineAUTH_REQ_CRYPT4
9493

9594
/*Startup Packet sizes */
96-
#defineSM_DATABASE64
97-
#defineSM_USER32
98-
#defineSM_OPTIONS64
99-
#defineSM_UNUSED64
100-
#defineSM_TTY64
95+
#defineSM_DATABASE64
96+
#defineSM_USER32
97+
#defineSM_OPTIONS64
98+
#defineSM_UNUSED64
99+
#defineSM_TTY64
101100

102101
/*Old 6.2 protocol defines */
103-
#defineNO_AUTHENTICATION7
104-
#definePATH_SIZE64
105-
#defineARGV_SIZE64
106-
#defineNAMEDATALEN16
102+
#defineNO_AUTHENTICATION7
103+
#definePATH_SIZE64
104+
#defineARGV_SIZE64
105+
#defineNAMEDATALEN16
107106

108107
typedefunsignedintProtocolVersion;
109108

110109
#definePG_PROTOCOL(major,minor)(((major) << 16) | (minor))
111-
#definePG_PROTOCOL_LATESTPG_PROTOCOL(2, 0)
112-
#definePG_PROTOCOL_63PG_PROTOCOL(1, 0)
113-
#definePG_PROTOCOL_62PG_PROTOCOL(0, 0)
110+
#definePG_PROTOCOL_LATESTPG_PROTOCOL(2, 0)
111+
#definePG_PROTOCOL_63PG_PROTOCOL(1, 0)
112+
#definePG_PROTOCOL_62PG_PROTOCOL(0, 0)
114113

115114
/*This startup packet is to support latest Postgres protocol (6.4, 6.3) */
116115
typedefstruct_StartupPacket
@@ -275,12 +274,12 @@ struct ConnectionClass_
275274

276275

277276
/* Accessor functions */
278-
#defineCC_get_socket(x)(x->sock)
279-
#defineCC_get_database(x)(x->connInfo.database)
280-
#defineCC_get_server(x)(x->connInfo.server)
281-
#defineCC_get_DSN(x)(x->connInfo.dsn)
282-
#defineCC_get_username(x)(x->connInfo.username)
283-
#defineCC_is_onlyread(x)(x->connInfo.onlyread[0] == '1')
277+
#defineCC_get_socket(x)(x->sock)
278+
#defineCC_get_database(x)(x->connInfo.database)
279+
#defineCC_get_server(x)(x->connInfo.server)
280+
#defineCC_get_DSN(x)(x->connInfo.dsn)
281+
#defineCC_get_username(x)(x->connInfo.username)
282+
#defineCC_is_onlyread(x)(x->connInfo.onlyread[0] == '1')
284283

285284

286285
/*for CC_DSN_info */

‎src/interfaces/odbc/convert.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module: convert.c
32
*
43
* Description: This module contains routines related to

‎src/interfaces/odbc/convert.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* File:convert.h
32
*
43
* Description:See "convert.c"
@@ -13,12 +12,12 @@
1312
#include"psqlodbc.h"
1413

1514
/* copy_and_convert results */
16-
#defineCOPY_OK0
17-
#defineCOPY_UNSUPPORTED_TYPE1
18-
#defineCOPY_UNSUPPORTED_CONVERSION2
19-
#defineCOPY_RESULT_TRUNCATED3
20-
#defineCOPY_GENERAL_ERROR4
21-
#defineCOPY_NO_DATA_FOUND5
15+
#defineCOPY_OK0
16+
#defineCOPY_UNSUPPORTED_TYPE1
17+
#defineCOPY_UNSUPPORTED_CONVERSION2
18+
#defineCOPY_RESULT_TRUNCATED3
19+
#defineCOPY_GENERAL_ERROR4
20+
#defineCOPY_NO_DATA_FOUND5
2221

2322
typedefstruct
2423
{

‎src/interfaces/odbc/dlg_specific.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:dlg_specific.c
32
*
43
* Description:This module contains any specific code for handling

‎src/interfaces/odbc/dlg_specific.h

Lines changed: 63 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* File:dlg_specific.h
32
*
43
* Description:See "dlg_specific.c"
@@ -25,73 +24,81 @@
2524
#endif
2625

2726
/*Unknown data type sizes */
28-
#defineUNKNOWNS_AS_MAX0
29-
#defineUNKNOWNS_AS_DONTKNOW1
30-
#defineUNKNOWNS_AS_LONGEST2
27+
#defineUNKNOWNS_AS_MAX0
28+
#defineUNKNOWNS_AS_DONTKNOW1
29+
#defineUNKNOWNS_AS_LONGEST2
3130

3231
/* INI File Stuff */
3332
#ifndefWIN32
34-
#defineODBC_INI".odbc.ini"
33+
#defineODBC_INI".odbc.ini"
3534
#ifdefODBCINSTDIR
36-
#defineODBCINST_INIODBCINSTDIR "/odbcinst.ini"
35+
#defineODBCINST_INIODBCINSTDIR "/odbcinst.ini"
3736
#else
38-
#defineODBCINST_INI"/etc/odbcinst.ini"
37+
#defineODBCINST_INI"/etc/odbcinst.ini"
3938
#endif
4039
#else/* WIN32 */
41-
#defineODBC_INI"ODBC.INI"/* ODBC initialization file */
42-
#defineODBCINST_INI"ODBCINST.INI"/* ODBC Installation file */
40+
#defineODBC_INI"ODBC.INI"/* ODBC initialization
41+
* file */
42+
#defineODBCINST_INI"ODBCINST.INI"/* ODBC Installation
43+
* file */
4344
#endif/* WIN32 */
4445

4546

46-
#defineINI_DSN DBMS_NAME/* Name of default Datasource in
47-
* ini file (not used?) */
48-
#defineINI_KDESC "Description"/* Data source description */
49-
#defineINI_SERVER "Servername"/* Name of Server running the
50-
* Postgres service */
51-
#defineINI_PORT "Port"/* Port on which the Postmaster is
52-
* listening */
53-
#defineINI_DATABASE "Database"/* Database Name */
54-
#defineINI_USER "Username"/* Default User Name */
55-
#defineINI_PASSWORD "Password"/* Default Password */
56-
#defineINI_DEBUG "Debug"/* Debug flag */
57-
#defineINI_FETCH "Fetch"/* Fetch Max Count */
58-
#defineINI_SOCKET "Socket"/* Socket buffer size */
59-
#defineINI_READONLY "ReadOnly"/* Database is read only */
60-
#defineINI_COMMLOG "CommLog"/* Communication to backend
61-
* logging */
62-
#defineINI_PROTOCOL "Protocol"/* What protocol (6.2) */
63-
#defineINI_OPTIMIZER "Optimizer"/* Use backend genetic optimizer */
64-
#defineINI_KSQO "Ksqo"/* Keyset query optimization */
65-
#defineINI_CONNSETTINGS "ConnSettings"/* Anything to send to
66-
* backend on successful
67-
* connection */
68-
#defineINI_UNIQUEINDEX "UniqueIndex"/* Recognize unique indexes */
69-
#defineINI_UNKNOWNSIZES "UnknownSizes"/* How to handle unknown
70-
* result set sizes */
71-
72-
#defineINI_CANCELASFREESTMT "CancelAsFreeStmt"
73-
74-
#defineINI_USEDECLAREFETCH "UseDeclareFetch"/* Use Declare/Fetch
75-
* cursors */
47+
#defineINI_DSNDBMS_NAME/* Name of default
48+
* Datasource in ini
49+
* file (not used?) */
50+
#defineINI_KDESC"Description"/* Data source
51+
* description */
52+
#defineINI_SERVER"Servername"/* Name of Server
53+
* running the Postgres
54+
* service */
55+
#defineINI_PORT"Port"/* Port on which the
56+
* Postmaster is listening */
57+
#defineINI_DATABASE"Database"/* Database Name */
58+
#defineINI_USER"Username"/* Default User Name */
59+
#defineINI_PASSWORD"Password"/* Default Password */
60+
#defineINI_DEBUG"Debug"/* Debug flag */
61+
#defineINI_FETCH"Fetch"/* Fetch Max Count */
62+
#defineINI_SOCKET"Socket"/* Socket buffer size */
63+
#defineINI_READONLY"ReadOnly"/* Database is read only */
64+
#defineINI_COMMLOG"CommLog"/* Communication to
65+
* backend logging */
66+
#defineINI_PROTOCOL"Protocol"/* What protocol (6.2) */
67+
#defineINI_OPTIMIZER"Optimizer"/* Use backend genetic
68+
* optimizer */
69+
#defineINI_KSQO"Ksqo"/* Keyset query
70+
* optimization */
71+
#defineINI_CONNSETTINGS "ConnSettings"/* Anything to send to
72+
* backend on successful
73+
* connection */
74+
#defineINI_UNIQUEINDEX"UniqueIndex"/* Recognize unique
75+
* indexes */
76+
#defineINI_UNKNOWNSIZES"UnknownSizes"/* How to handle unknown
77+
* result set sizes */
78+
79+
#defineINI_CANCELASFREESTMT"CancelAsFreeStmt"
80+
81+
#defineINI_USEDECLAREFETCH"UseDeclareFetch"/* Use Declare/Fetch
82+
* cursors */
7683

7784
/*More ini stuff */
78-
#defineINI_TEXTASLONGVARCHAR"TextAsLongVarchar"
79-
#defineINI_UNKNOWNSASLONGVARCHAR"UnknownsAsLongVarchar"
80-
#defineINI_BOOLSASCHAR"BoolsAsChar"
81-
#defineINI_MAXVARCHARSIZE"MaxVarcharSize"
82-
#defineINI_MAXLONGVARCHARSIZE"MaxLongVarcharSize"
83-
84-
#defineINI_FAKEOIDINDEX"FakeOidIndex"
85-
#defineINI_SHOWOIDCOLUMN"ShowOidColumn"
86-
#defineINI_ROWVERSIONING"RowVersioning"
87-
#defineINI_SHOWSYSTEMTABLES"ShowSystemTables"
88-
#defineINI_LIE"Lie"
89-
#defineINI_PARSE"Parse"
90-
#defineINI_EXTRASYSTABLEPREFIXES"ExtraSysTablePrefixes"
91-
92-
#defineINI_TRANSLATIONNAME"TranslationName"
93-
#defineINI_TRANSLATIONDLL"TranslationDLL"
94-
#defineINI_TRANSLATIONOPTION"TranslationOption"
85+
#defineINI_TEXTASLONGVARCHAR"TextAsLongVarchar"
86+
#defineINI_UNKNOWNSASLONGVARCHAR"UnknownsAsLongVarchar"
87+
#defineINI_BOOLSASCHAR"BoolsAsChar"
88+
#defineINI_MAXVARCHARSIZE"MaxVarcharSize"
89+
#defineINI_MAXLONGVARCHARSIZE"MaxLongVarcharSize"
90+
91+
#defineINI_FAKEOIDINDEX"FakeOidIndex"
92+
#defineINI_SHOWOIDCOLUMN"ShowOidColumn"
93+
#defineINI_ROWVERSIONING"RowVersioning"
94+
#defineINI_SHOWSYSTEMTABLES"ShowSystemTables"
95+
#defineINI_LIE"Lie"
96+
#defineINI_PARSE"Parse"
97+
#defineINI_EXTRASYSTABLEPREFIXES"ExtraSysTablePrefixes"
98+
99+
#defineINI_TRANSLATIONNAME"TranslationName"
100+
#defineINI_TRANSLATIONDLL"TranslationDLL"
101+
#defineINI_TRANSLATIONOPTION"TranslationOption"
95102

96103

97104
/*Connection Defaults */

‎src/interfaces/odbc/drvconn.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:drvconn.c
32
*
43
* Description:This module contains only routines related to

‎src/interfaces/odbc/environ.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:environ.c
32
*
43
* Description:This module contains routines related to

‎src/interfaces/odbc/environ.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* File:environ.h
32
*
43
* Description:See "environ.c"

‎src/interfaces/odbc/execute.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* Module:execute.c
32
*
43
* Description:This module contains routines related to

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp