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

Commit9d244dd

Browse files
committed
Cleanup of source.
1 parent71f2b6f commit9d244dd

File tree

14 files changed

+91
-74
lines changed

14 files changed

+91
-74
lines changed

‎src/interfaces/libpq/fe-misc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
*
2727
* IDENTIFICATION
28-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.44 2001/02/10 02:31:30 tgl Exp $
28+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.45 2001/02/11 04:56:57 momjian Exp $
2929
*
3030
*-------------------------------------------------------------------------
3131
*/
@@ -645,9 +645,9 @@ pqFlush(PGconn *conn)
645645
caseECONNRESET:
646646
#endif
647647
printfPQExpBuffer(&conn->errorMessage,
648-
"pqFlush() -- backend closed the channel unexpectedly.\n"
649-
"\tThis probably means the backend terminated abnormally"
650-
" before or while processing the request.\n");
648+
"pqFlush() -- backend closed the channel unexpectedly.\n"
649+
"\tThis probably means the backend terminated abnormally"
650+
" before or while processing the request.\n");
651651

652652
/*
653653
* We used to close the socket here, but that's a bad
@@ -661,8 +661,8 @@ pqFlush(PGconn *conn)
661661

662662
default:
663663
printfPQExpBuffer(&conn->errorMessage,
664-
"pqFlush() -- couldn't send data: errno=%d\n%s\n",
665-
errno,strerror(errno));
664+
"pqFlush() -- couldn't send data: errno=%d\n%s\n",
665+
errno,strerror(errno));
666666
/* We don't assume it's a fatal error... */
667667
returnEOF;
668668
}

‎src/interfaces/odbc/convert.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ copy_and_convert_field(StatementClass * stmt, Int4 field_type, void *value, Int2
233233
*********************************************************************/
234234
switch (field_type)
235235
{
236+
236237
/*
237238
* $$$ need to add parsing for date/time/timestamp strings in
238239
* PG_TYPE_CHAR,VARCHAR $$$
@@ -462,6 +463,7 @@ copy_and_convert_field(StatementClass * stmt, Int4 field_type, void *value, Int2
462463
}
463464
else
464465
{
466+
465467
/*
466468
* for SQL_C_CHAR, it's probably ok to leave currency symbols in.
467469
* But to convert to numeric types, it is necessary to get rid of
@@ -1228,6 +1230,7 @@ convert_escape(char *value)
12281230
}
12291231
elseif (strcmp(key,"fn")==0)
12301232
{
1233+
12311234
/*
12321235
* Function invocation Separate off the func name, skipping
12331236
* trailing whitespace.

‎src/interfaces/odbc/dlg_specific.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ extern GLOBAL_VALUES globals;
4949
void
5050
SetDlgStuff(HWNDhdlg,ConnInfo*ci)
5151
{
52+
5253
/*
5354
* If driver attribute NOT present, then set the datasource name and
5455
* description
@@ -773,6 +774,7 @@ getGlobalDefaults(char *section, char *filename, char override)
773774
/* Dont allow override of an override! */
774775
if (!override)
775776
{
777+
776778
/*
777779
* ConnSettings is stored in the driver section and per datasource
778780
* for override

‎src/interfaces/odbc/drvconn.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ SQLDriverConnect(
215215

216216
if (szConnStrOut)
217217
{
218+
218219
/*
219220
* Return the completed string to the caller. The correct method
220221
* is to only construct the connect string if a dialog was put up,

‎src/interfaces/odbc/execute.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ SQLCancel(
437437
*/
438438
if (stmt->data_at_exec<0)
439439
{
440+
440441
/*
441442
* MAJOR HACK for Windows to reset the driver manager's cursor
442443
* state: Because of what seems like a bug in the Odbc driver

‎src/interfaces/odbc/info.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ SQLGetInfo(
201201

202202
/*
203203
* The ODBC spec wants ##.##.#### ...whatever... so prepend
204-
* the driver version number to the dbms version string
204+
* the driver version number to the dbms version string
205205
*/
206206
sprintf(tmp,"%s %s",POSTGRESDRIVERVERSION,conn->pg_version);
207207
p=tmp;
@@ -1324,6 +1324,7 @@ SQLTables(
13241324
result=SQLFetch(htbl_stmt);
13251325
while ((result==SQL_SUCCESS)|| (result==SQL_SUCCESS_WITH_INFO))
13261326
{
1327+
13271328
/*
13281329
* Determine if this table name is a system table. If treating
13291330
* system tables as regular tables, then no need to do this test.

‎src/interfaces/odbc/isql.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,26 +204,20 @@ extern"C"
204204
SWORDcbCursorMax,
205205
SWORDFAR*pcbCursor);
206206

207-
RETCODESQL_APISQLNumResultCols(HSTMThstmt,
208-
SWORDFAR*pccol);
207+
RETCODESQL_APISQLNumResultCols(HSTMThstmt,SWORDFAR*pccol);
209208

210-
RETCODESQL_APISQLPrepare(HSTMThstmt,
211-
UCHARFAR*szSqlStr,
209+
RETCODESQL_APISQLPrepare(HSTMThstmt,UCHARFAR*szSqlStr,
212210
SDWORDcbSqlStr);
213211

214-
RETCODESQL_APISQLRowCount(HSTMThstmt,
215-
SDWORDFAR*pcrow);
212+
RETCODESQL_APISQLRowCount(HSTMThstmt,SDWORDFAR*pcrow);
216213

217-
RETCODESQL_APISQLSetCursorName(HSTMThstmt,
218-
UCHARFAR*szCursor,
214+
RETCODESQL_APISQLSetCursorName(HSTMThstmt,UCHARFAR*szCursor,
219215
SWORDcbCursor);
220216

221-
RETCODESQL_APISQLTransact(HENVhenv,
222-
HDBChdbc,
217+
RETCODESQL_APISQLTransact(HENVhenv,HDBChdbc,
223218
UWORDfType);
224219

225-
RETCODESQL_APISQLSetParam(HSTMThstmt,
226-
UWORDipar,
220+
RETCODESQL_APISQLSetParam(HSTMThstmt,UWORDipar,
227221
SWORDfCType,
228222
SWORDfSqlType,
229223
UDWORDcbColDef,

‎src/interfaces/odbc/options.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ SQLSetConnectOption(
307307

308308
switch (fOption)
309309
{
310+
310311
/*
311312
* Statement Options (apply to all stmts on the connection and
312313
* become defaults for new stmts)

‎src/interfaces/odbc/qresult.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ QR_next_tuple(QResultClass * self)
384384
}
385385
else
386386
{
387+
387388
/*
388389
* See if we need to fetch another group of rows. We may be being
389390
* called from send_query(), and if so, don't send another fetch,
@@ -616,6 +617,7 @@ QR_read_tuple(QResultClass * self, char binary)
616617
}
617618
else
618619
{
620+
619621
/*
620622
* NO, the field is not null. so get at first the length of
621623
* the field (four bytes)

‎src/interfaces/odbc/resource.h

Lines changed: 60 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,67 @@
1-
//{{NO_DEPENDENCIES}}
2-
// Microsoft Developer Studio generated include file.
1+
//
2+
{
3+
{
4+
NO_DEPENDENCIES
5+
}
6+
}
7+
8+
//Microsoft Developer Studio generated include file.
39
// Used by psqlodbc.rc
410
//
5-
#defineIDS_BADDSN1
6-
#defineIDS_MSGTITLE2
7-
#defineDLG_OPTIONS_DRV102
8-
#defineDLG_OPTIONS_DS103
9-
#defineIDC_DSNAME400
10-
#defineIDC_DSNAMETEXT401
11-
#defineIDC_DESC404
12-
#defineIDC_SERVER407
13-
#defineIDC_DATABASE408
14-
#defineDLG_CONFIG1001
15-
#defineIDC_PORT1002
16-
#defineIDC_USER1006
17-
#defineIDC_PASSWORD1009
18-
#defineDS_READONLY1011
19-
#defineDS_SHOWOIDCOLUMN1012
20-
#defineDS_FAKEOIDINDEX1013
21-
#defineDRV_COMMLOG1014
22-
#defineIDC_DATASOURCE1018
23-
#defineDRV_OPTIMIZER1019
24-
#defineDS_CONNSETTINGS1020
25-
#defineIDC_DRIVER1021
26-
#defineDRV_CONNSETTINGS1031
27-
#defineDRV_UNIQUEINDEX1032
28-
#defineDRV_UNKNOWN_MAX1035
29-
#defineDRV_UNKNOWN_DONTKNOW1036
30-
#defineDRV_READONLY1037
31-
#defineIDC_DESCTEXT1039
32-
#defineDRV_MSG_LABEL1040
33-
#defineDRV_UNKNOWN_LONGEST1041
34-
#defineDRV_TEXT_LONGVARCHAR1043
35-
#defineDRV_UNKNOWNS_LONGVARCHAR1044
36-
#defineDRV_CACHE_SIZE1045
37-
#defineDRV_VARCHAR_SIZE1046
38-
#defineDRV_LONGVARCHAR_SIZE1047
39-
#defineIDDEFAULTS1048
40-
#defineDRV_USEDECLAREFETCH1049
41-
#defineDRV_BOOLS_CHAR1050
42-
#defineDS_SHOWSYSTEMTABLES1051
43-
#defineDRV_EXTRASYSTABLEPREFIXES1051
44-
#defineDS_ROWVERSIONING1052
45-
#defineDRV_PARSE1052
46-
#defineDRV_CANCELASFREESTMT1053
47-
#defineIDC_OPTIONS1054
48-
#defineDRV_KSQO1055
49-
#defineDS_PG641057
11+
#defineIDS_BADDSN1
12+
#defineIDS_MSGTITLE2
13+
#defineDLG_OPTIONS_DRV102
14+
#defineDLG_OPTIONS_DS103
15+
#defineIDC_DSNAME400
16+
#defineIDC_DSNAMETEXT401
17+
#defineIDC_DESC404
18+
#defineIDC_SERVER407
19+
#defineIDC_DATABASE408
20+
#defineDLG_CONFIG1001
21+
#defineIDC_PORT1002
22+
#defineIDC_USER1006
23+
#defineIDC_PASSWORD1009
24+
#defineDS_READONLY1011
25+
#defineDS_SHOWOIDCOLUMN1012
26+
#defineDS_FAKEOIDINDEX1013
27+
#defineDRV_COMMLOG1014
28+
#defineIDC_DATASOURCE1018
29+
#defineDRV_OPTIMIZER1019
30+
#defineDS_CONNSETTINGS1020
31+
#defineIDC_DRIVER1021
32+
#defineDRV_CONNSETTINGS1031
33+
#defineDRV_UNIQUEINDEX1032
34+
#defineDRV_UNKNOWN_MAX1035
35+
#defineDRV_UNKNOWN_DONTKNOW1036
36+
#defineDRV_READONLY1037
37+
#defineIDC_DESCTEXT1039
38+
#defineDRV_MSG_LABEL1040
39+
#defineDRV_UNKNOWN_LONGEST1041
40+
#defineDRV_TEXT_LONGVARCHAR1043
41+
#defineDRV_UNKNOWNS_LONGVARCHAR1044
42+
#defineDRV_CACHE_SIZE1045
43+
#defineDRV_VARCHAR_SIZE1046
44+
#defineDRV_LONGVARCHAR_SIZE1047
45+
#defineIDDEFAULTS1048
46+
#defineDRV_USEDECLAREFETCH1049
47+
#defineDRV_BOOLS_CHAR1050
48+
#defineDS_SHOWSYSTEMTABLES1051
49+
#defineDRV_EXTRASYSTABLEPREFIXES1051
50+
#defineDS_ROWVERSIONING1052
51+
#defineDRV_PARSE1052
52+
#defineDRV_CANCELASFREESTMT1053
53+
#defineIDC_OPTIONS1054
54+
#defineDRV_KSQO1055
55+
#defineDS_PG641057
5056

51-
// Next default values for new objects
52-
//
57+
//Next default values for new
58+
objects
59+
//
5360
#ifdefAPSTUDIO_INVOKED
5461
#ifndefAPSTUDIO_READONLY_SYMBOLS
55-
#define_APS_NEXT_RESOURCE_VALUE104
56-
#define_APS_NEXT_COMMAND_VALUE40001
57-
#define_APS_NEXT_CONTROL_VALUE1060
58-
#define_APS_NEXT_SYMED_VALUE101
62+
#define_APS_NEXT_RESOURCE_VALUE104
63+
#define_APS_NEXT_COMMAND_VALUE40001
64+
#define_APS_NEXT_CONTROL_VALUE1060
65+
#define_APS_NEXT_SYMED_VALUE101
5966
#endif
6067
#endif

‎src/interfaces/odbc/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ ConfigDlgProc(HWND hdlg,
264264

265265
switch (GET_WM_COMMAND_ID(wParam,lParam))
266266
{
267+
267268
/*
268269
* Ensure the OK button is enabled only when a data
269270
* source name

‎src/interfaces/odbc/socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ SOCK_Destructor(SocketClass * self)
9191
free(self->buffer_in);
9292

9393
if (self->buffer_out)
94-
free(self->buffer_out);
94+
SOCK_put_n_char(self, (char*)&rv,2);
95+
free(self->buffer_out);
9596

9697
free(self);
9798
}
@@ -256,7 +257,6 @@ SOCK_put_int(SocketClass * self, int value, short len)
256257
{
257258
case2:
258259
rv=self->reverse ?value :htons((unsigned short)value);
259-
SOCK_put_n_char(self, (char*)&rv,2);
260260
return;
261261

262262
case4:

‎src/interfaces/odbc/statement.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ SC_fetch(StatementClass * self)
681681
if (self->currTuple >=QR_get_num_tuples(res)-1||
682682
(self->options.maxRows>0&&self->currTuple==self->options.maxRows-1))
683683
{
684+
684685
/*
685686
* if at the end of the tuples, return "no data found" and set
686687
* the cursor past the end of the result set

‎src/interfaces/odbc/tuplelist.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ TL_get_fieldval(TupleListClass * self, Int4 tupleno, Int2 fieldno)
133133
}
134134
elseif (start_is_closer)
135135
{
136+
136137
/*
137138
* the shortest way is to start the search from the head of the
138139
* list
@@ -179,6 +180,7 @@ TL_get_fieldval(TupleListClass * self, Int4 tupleno, Int2 fieldno)
179180
char
180181
TL_add_tuple(TupleListClass*self,TupleNode*new_field)
181182
{
183+
182184
/*
183185
* we append the tuple at the end of the doubly linked list of the
184186
* tuples we have already read in
@@ -197,6 +199,7 @@ TL_add_tuple(TupleListClass * self, TupleNode * new_field)
197199
}
198200
else
199201
{
202+
200203
/*
201204
* there is already an element in the list, so add the new one at
202205
* the end of the list

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp