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

Commit5ad6274

Browse files
committed
More ODBC formatting cleanup.
1 parent08265ef commit5ad6274

21 files changed

+145
-363
lines changed

‎src/interfaces/odbc/bind.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
/*Bind parameters on a statement handle */
3737

38-
RETCODESQL_API
38+
RETCODESQL_API
3939
SQLBindParameter(
4040
HSTMThstmt,
4141
UWORDipar,
@@ -156,7 +156,7 @@ SQLBindParameter(
156156
/*--------- */
157157

158158
/*Associate a user-supplied buffer with a database column. */
159-
RETCODESQL_API
159+
RETCODESQL_API
160160
SQLBindCol(
161161
HSTMThstmt,
162162
UWORDicol,
@@ -192,7 +192,6 @@ SQLBindCol(
192192
/* If the bookmark column is being bound, then just save it */
193193
if (icol==0)
194194
{
195-
196195
if (rgbValue==NULL)
197196
{
198197
stmt->bookmark.buffer=NULL;
@@ -268,7 +267,7 @@ SQLBindCol(
268267
/*it is best to say this function is not supported and let the application assume a */
269268
/*data type (most likely varchar). */
270269

271-
RETCODESQL_API
270+
RETCODESQL_API
272271
SQLDescribeParam(
273272
HSTMThstmt,
274273
UWORDipar,
@@ -322,7 +321,7 @@ SQLDescribeParam(
322321

323322
/*Sets multiple values (arrays) for the set of parameter markers. */
324323

325-
RETCODESQL_API
324+
RETCODESQL_API
326325
SQLParamOptions(
327326
HSTMThstmt,
328327
UDWORDcrow,
@@ -345,7 +344,7 @@ SQLParamOptions(
345344
/*like it does for SQLDescribeParam is that some applications don't care and try */
346345
/*to call it anyway. */
347346
/*If the statement does not have parameters, it should just return 0. */
348-
RETCODESQL_API
347+
RETCODESQL_API
349348
SQLNumParams(
350349
HSTMThstmt,
351350
SWORDFAR*pcpar)
@@ -382,10 +381,8 @@ SQLNumParams(
382381
}
383382
else
384383
{
385-
386384
for (i=0;i<strlen(stmt->statement);i++)
387385
{
388-
389386
if (stmt->statement[i]=='?'&& !in_quote)
390387
(*pcpar)++;
391388
else
@@ -436,7 +433,6 @@ extend_bindings(StatementClass * stmt, int num_columns)
436433
/* entries into the new structure */
437434
if (stmt->bindings_allocated<num_columns)
438435
{
439-
440436
new_bindings=create_empty_bindings(num_columns);
441437
if (!new_bindings)
442438
{
@@ -461,7 +457,6 @@ extend_bindings(StatementClass * stmt, int num_columns)
461457

462458
stmt->bindings=new_bindings;
463459
stmt->bindings_allocated=num_columns;
464-
465460
}
466461
/* There is no reason to zero out extra bindings if there are */
467462
/* more than needed. If an app has allocated extra bindings, */

‎src/interfaces/odbc/columninfo.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,20 @@ CI_read_fields(ColumnInfoClass * self, ConnectionClass * conn)
7777
/* now read in the descriptions */
7878
for (lf=0;lf<new_num_fields;lf++)
7979
{
80-
8180
SOCK_get_string(sock,new_field_name,MAX_MESSAGE_LEN);
8281
new_adtid= (Oid)SOCK_get_int(sock,4);
8382
new_adtsize= (Int2)SOCK_get_int(sock,2);
8483

8584
/* If 6.4 protocol, then read the atttypmod field */
8685
if (PG_VERSION_GE(conn,6.4))
8786
{
88-
8987
mylog("READING ATTTYPMOD\n");
9088
new_atttypmod= (Int4)SOCK_get_int(sock,4);
9189

9290
/* Subtract the header length */
9391
new_atttypmod-=4;
9492
if (new_atttypmod<0)
9593
new_atttypmod=-1;
96-
9794
}
9895

9996
mylog("CI_read_fields: fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d\n",new_field_name,new_adtid,new_adtsize,new_atttypmod);
@@ -146,7 +143,6 @@ void
146143
CI_set_field_info(ColumnInfoClass*self,intfield_num,char*new_name,
147144
Oidnew_adtid,Int2new_adtsize,Int4new_atttypmod)
148145
{
149-
150146
/* check bounds */
151147
if ((field_num<0)|| (field_num >=self->num_fields))
152148
return;

‎src/interfaces/odbc/connection.c

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
externGLOBAL_VALUESglobals;
3535

3636

37-
RETCODESQL_API
37+
RETCODESQL_API
3838
SQLAllocConnect(
3939
HENVhenv,
4040
HDBCFAR*phdbc)
@@ -75,7 +75,7 @@ SQLAllocConnect(
7575

7676
/*--------- */
7777

78-
RETCODESQL_API
78+
RETCODESQL_API
7979
SQLConnect(
8080
HDBChdbc,
8181
UCHARFAR*szDSN,
@@ -132,7 +132,7 @@ SQLConnect(
132132

133133
/*--------- */
134134

135-
RETCODESQL_API
135+
RETCODESQL_API
136136
SQLBrowseConnect(
137137
HDBChdbc,
138138
UCHARFAR*szConnStrIn,
@@ -151,7 +151,7 @@ SQLBrowseConnect(
151151
/*--------- */
152152

153153
/* Drop any hstmts open on hdbc and disconnect from database */
154-
RETCODESQL_API
154+
RETCODESQL_API
155155
SQLDisconnect(
156156
HDBChdbc)
157157
{
@@ -191,7 +191,7 @@ SQLDisconnect(
191191

192192
/*--------- */
193193

194-
RETCODESQL_API
194+
RETCODESQL_API
195195
SQLFreeConnect(
196196
HDBChdbc)
197197
{
@@ -239,7 +239,6 @@ CC_Constructor()
239239

240240
if (rv!=NULL)
241241
{
242-
243242
rv->henv=NULL;/* not yet associated with an environment */
244243

245244
rv->errormsg=NULL;
@@ -280,7 +279,6 @@ CC_Constructor()
280279
/* Statements under this conn will inherit these options */
281280

282281
InitializeStatementOptions(&rv->stmtOptions);
283-
284282
}
285283
returnrv;
286284
}
@@ -289,7 +287,6 @@ CC_Constructor()
289287
char
290288
CC_Destructor(ConnectionClass*self)
291289
{
292-
293290
mylog("enter CC_Destructor, self=%u\n",self);
294291

295292
if (self->status==CONN_EXECUTING)
@@ -380,7 +377,6 @@ CC_abort(ConnectionClass * self)
380377
QR_Destructor(res);
381378
else
382379
return FALSE;
383-
384380
}
385381

386382
return TRUE;
@@ -499,12 +495,10 @@ CC_connect(ConnectionClass * self, char do_password)
499495
mylog("%s: entering...\n",func);
500496

501497
if (do_password)
502-
503498
sock=self->sock;/* already connected, just authenticate */
504499

505500
else
506501
{
507-
508502
qlog("Global Options: Version='%s', fetch=%d, socket=%d, unknown_sizes=%d, max_varchar_size=%d, max_longvarchar_size=%d\n",
509503
POSTGRESDRIVERVERSION,
510504
globals.fetch_max,
@@ -606,7 +600,6 @@ CC_connect(ConnectionClass * self, char do_password)
606600

607601
do
608602
{
609-
610603
if (do_password)
611604
beresp='R';
612605
else
@@ -690,7 +683,6 @@ CC_connect(ConnectionClass * self, char do_password)
690683
self->errornumber=CONN_INVALID_AUTHENTICATION;
691684
return0;
692685
}
693-
694686
}while (areq!=AUTH_REQ_OK);
695687

696688
CC_clear_error(self);/* clear any password error */
@@ -738,7 +730,6 @@ CC_connect(ConnectionClass * self, char do_password)
738730
mylog("%s: returning...\n",func);
739731

740732
return1;
741-
742733
}
743734

744735
char
@@ -955,7 +946,6 @@ CC_send_query(ConnectionClass * self, char *query, QueryInfo * qi)
955946
}
956947
else
957948
{
958-
959949
charclear=0;
960950

961951
mylog("send_query: ok - 'C' - %s\n",cmdbuffer);
@@ -1187,7 +1177,6 @@ CC_send_function(ConnectionClass * self, int fnid, void *result_buf, int *actual
11871177

11881178
for (i=0;i<nargs;++i)
11891179
{
1190-
11911180
mylog(" arg[%d]: len = %d, isint = %d, integer = %d, ptr = %u\n",i,args[i].len,args[i].isint,args[i].u.integer,args[i].u.ptr);
11921181

11931182
SOCK_put_int(sock,args[i].len,4);
@@ -1343,7 +1332,6 @@ CC_send_settings(ConnectionClass * self)
13431332
status= FALSE;
13441333

13451334
mylog("%s: result %d, status %d from set geqo\n",func,result,status);
1346-
13471335
}
13481336

13491337
/* KSQO */
@@ -1354,7 +1342,6 @@ CC_send_settings(ConnectionClass * self)
13541342
status= FALSE;
13551343

13561344
mylog("%s: result %d, status %d from set ksqo\n",func,result,status);
1357-
13581345
}
13591346

13601347
/* Global settings */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp