Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d244dd

Browse files
committed
Cleanup of source.
1 parent 71f2b6f commit 9d244dd

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
case ECONNRESET:
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
return EOF;
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
else if (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(HWND hdlg, 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
SWORD cbCursorMax,
205205
SWORD FAR * pcbCursor);
206206

207-
RETCODE SQL_API SQLNumResultCols(HSTMT hstmt,
208-
SWORD FAR * pccol);
207+
RETCODE SQL_API SQLNumResultCols(HSTMT hstmt, SWORD FAR * pccol);
209208

210-
RETCODE SQL_API SQLPrepare(HSTMT hstmt,
211-
UCHAR FAR * szSqlStr,
209+
RETCODE SQL_API SQLPrepare(HSTMT hstmt, UCHAR FAR * szSqlStr,
212210
SDWORD cbSqlStr);
213211

214-
RETCODE SQL_API SQLRowCount(HSTMT hstmt,
215-
SDWORD FAR * pcrow);
212+
RETCODE SQL_API SQLRowCount(HSTMT hstmt, SDWORD FAR * pcrow);
216213

217-
RETCODE SQL_API SQLSetCursorName(HSTMT hstmt,
218-
UCHAR FAR * szCursor,
214+
RETCODE SQL_API SQLSetCursorName(HSTMT hstmt, UCHAR FAR * szCursor,
219215
SWORD cbCursor);
220216

221-
RETCODE SQL_API SQLTransact(HENV henv,
222-
HDBC hdbc,
217+
RETCODE SQL_API SQLTransact(HENV henv, HDBC hdbc,
223218
UWORD fType);
224219

225-
RETCODE SQL_API SQLSetParam(HSTMT hstmt,
226-
UWORD ipar,
220+
RETCODE SQL_API SQLSetParam(HSTMT hstmt, UWORD ipar,
227221
SWORD fCType,
228222
SWORD fSqlType,
229223
UDWORD cbColDef,

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-
#define IDS_BADDSN 1
6-
#define IDS_MSGTITLE 2
7-
#define DLG_OPTIONS_DRV 102
8-
#define DLG_OPTIONS_DS 103
9-
#define IDC_DSNAME 400
10-
#define IDC_DSNAMETEXT 401
11-
#define IDC_DESC 404
12-
#define IDC_SERVER 407
13-
#define IDC_DATABASE 408
14-
#define DLG_CONFIG 1001
15-
#define IDC_PORT 1002
16-
#define IDC_USER 1006
17-
#define IDC_PASSWORD 1009
18-
#define DS_READONLY 1011
19-
#define DS_SHOWOIDCOLUMN 1012
20-
#define DS_FAKEOIDINDEX 1013
21-
#define DRV_COMMLOG 1014
22-
#define IDC_DATASOURCE 1018
23-
#define DRV_OPTIMIZER 1019
24-
#define DS_CONNSETTINGS 1020
25-
#define IDC_DRIVER 1021
26-
#define DRV_CONNSETTINGS 1031
27-
#define DRV_UNIQUEINDEX 1032
28-
#define DRV_UNKNOWN_MAX 1035
29-
#define DRV_UNKNOWN_DONTKNOW 1036
30-
#define DRV_READONLY 1037
31-
#define IDC_DESCTEXT 1039
32-
#define DRV_MSG_LABEL 1040
33-
#define DRV_UNKNOWN_LONGEST 1041
34-
#define DRV_TEXT_LONGVARCHAR 1043
35-
#define DRV_UNKNOWNS_LONGVARCHAR 1044
36-
#define DRV_CACHE_SIZE 1045
37-
#define DRV_VARCHAR_SIZE 1046
38-
#define DRV_LONGVARCHAR_SIZE 1047
39-
#define IDDEFAULTS 1048
40-
#define DRV_USEDECLAREFETCH 1049
41-
#define DRV_BOOLS_CHAR 1050
42-
#define DS_SHOWSYSTEMTABLES 1051
43-
#define DRV_EXTRASYSTABLEPREFIXES 1051
44-
#define DS_ROWVERSIONING 1052
45-
#define DRV_PARSE 1052
46-
#define DRV_CANCELASFREESTMT 1053
47-
#define IDC_OPTIONS 1054
48-
#define DRV_KSQO 1055
49-
#define DS_PG64 1057
11+
#define IDS_BADDSN 1
12+
#define IDS_MSGTITLE 2
13+
#define DLG_OPTIONS_DRV 102
14+
#define DLG_OPTIONS_DS 103
15+
#define IDC_DSNAME 400
16+
#define IDC_DSNAMETEXT 401
17+
#define IDC_DESC 404
18+
#define IDC_SERVER 407
19+
#define IDC_DATABASE 408
20+
#define DLG_CONFIG 1001
21+
#define IDC_PORT 1002
22+
#define IDC_USER 1006
23+
#define IDC_PASSWORD 1009
24+
#define DS_READONLY 1011
25+
#define DS_SHOWOIDCOLUMN 1012
26+
#define DS_FAKEOIDINDEX 1013
27+
#define DRV_COMMLOG 1014
28+
#define IDC_DATASOURCE 1018
29+
#define DRV_OPTIMIZER 1019
30+
#define DS_CONNSETTINGS 1020
31+
#define IDC_DRIVER 1021
32+
#define DRV_CONNSETTINGS 1031
33+
#define DRV_UNIQUEINDEX 1032
34+
#define DRV_UNKNOWN_MAX 1035
35+
#define DRV_UNKNOWN_DONTKNOW 1036
36+
#define DRV_READONLY 1037
37+
#define IDC_DESCTEXT 1039
38+
#define DRV_MSG_LABEL 1040
39+
#define DRV_UNKNOWN_LONGEST 1041
40+
#define DRV_TEXT_LONGVARCHAR 1043
41+
#define DRV_UNKNOWNS_LONGVARCHAR 1044
42+
#define DRV_CACHE_SIZE 1045
43+
#define DRV_VARCHAR_SIZE 1046
44+
#define DRV_LONGVARCHAR_SIZE 1047
45+
#define IDDEFAULTS 1048
46+
#define DRV_USEDECLAREFETCH 1049
47+
#define DRV_BOOLS_CHAR 1050
48+
#define DS_SHOWSYSTEMTABLES 1051
49+
#define DRV_EXTRASYSTABLEPREFIXES 1051
50+
#define DS_ROWVERSIONING 1052
51+
#define DRV_PARSE 1052
52+
#define DRV_CANCELASFREESTMT 1053
53+
#define IDC_OPTIONS 1054
54+
#define DRV_KSQO 1055
55+
#define DS_PG64 1057
5056

51-
// Next default values for new objects
52-
//
57+
//Next default values for new
58+
objects
59+
//
5360
#ifdef APSTUDIO_INVOKED
5461
#ifndef APSTUDIO_READONLY_SYMBOLS
55-
#define _APS_NEXT_RESOURCE_VALUE 104
56-
#define _APS_NEXT_COMMAND_VALUE 40001
57-
#define _APS_NEXT_CONTROL_VALUE 1060
58-
#define _APS_NEXT_SYMED_VALUE 101
62+
#define _APS_NEXT_RESOURCE_VALUE 104
63+
#define _APS_NEXT_COMMAND_VALUE 40001
64+
#define _APS_NEXT_CONTROL_VALUE 1060
65+
#define _APS_NEXT_SYMED_VALUE 101
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
case 2:
258259
rv = self->reverse ? value : htons((unsigned short) value);
259-
SOCK_put_n_char(self, (char *) &rv, 2);
260260
return;
261261

262262
case 4:

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
else if (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)