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

Commit3c82099

Browse files
author
Michael Meskes
committed
First rounf of whitespace changes. Everything but connect-test1 should be fine.
1 parent2f806e5 commit3c82099

File tree

74 files changed

+888
-887
lines changed

Some content is hidden

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

74 files changed

+888
-887
lines changed

‎src/interfaces/ecpg/preproc/ecpg.addons

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.addons,v 1.1 2008/11/14 10:03:33 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.addons,v 1.2 2008/12/29 17:07:05 meskes Exp $ */
22

33
ECPG: stmtClosePortalStmt block
44
{
@@ -207,7 +207,7 @@ ECPG: ConstraintAttributeSpecConstraintTimeSpecConstraintDeferrabilitySpec addon
207207
mmerror(PARSE_ERROR, ET_ERROR, "INITIALLY DEFERRED constraint must be DEFERRABLE\n");
208208
ECPG: var_valueNumericOnly addon
209209
ECPG: fetch_directionSignedIconst addon
210-
if ($1[1] == '$')
210+
if ($1[0] == '$')
211211
{
212212
free($1);
213213
$1 = make_str("$0");
@@ -216,7 +216,7 @@ ECPG: fetch_directionABSOLUTE_PSignedIconst addon
216216
ECPG: fetch_directionRELATIVE_PSignedIconst addon
217217
ECPG: fetch_directionFORWARDSignedIconst addon
218218
ECPG: fetch_directionBACKWARDSignedIconst addon
219-
if ($2[1] == '$')
219+
if ($2[0] == '$')
220220
{
221221
free($2);
222222
$2 = make_str("$0");

‎src/interfaces/ecpg/preproc/ecpg.header

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.3 2008/11/26 08:45:12 petere Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.4 2008/12/29 17:07:05 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -111,7 +111,8 @@ cat2_str(char *str1, char *str2)
111111
char * res_str= (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
112112

113113
strcpy(res_str, str1);
114-
strcat(res_str, " ");
114+
if (strlen(str1) != 0 && strlen(str2) != 0)
115+
strcat(res_str, " ");
115116
strcat(res_str, str2);
116117
free(str1);
117118
free(str2);

‎src/interfaces/ecpg/test/expected/compat_informix-rnull.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,91 +34,91 @@ int main(void)
3434
{
3535

3636
#line 15 "rnull.pgc"
37-
charc []="abc" ;
37+
charc []="abc" ;
3838

3939
#line 15 "rnull.pgc"
4040

4141

4242
#line 16 "rnull.pgc"
43-
shorts=17 ;
43+
shorts=17 ;
4444

4545
#line 16 "rnull.pgc"
4646

4747

4848
#line 17 "rnull.pgc"
49-
inti=-74874 ;
49+
inti=-74874 ;
5050

5151
#line 17 "rnull.pgc"
5252

5353

5454
#line 18 "rnull.pgc"
55-
boolb=1 ;
55+
boolb=1 ;
5656

5757
#line 18 "rnull.pgc"
5858

5959

6060
#line 19 "rnull.pgc"
61-
floatf=3.71 ;
61+
floatf=3.71 ;
6262

6363
#line 19 "rnull.pgc"
6464

6565

6666
#line 20 "rnull.pgc"
67-
longl=487444 ;
67+
longl=487444 ;
6868

6969
#line 20 "rnull.pgc"
7070

7171

7272
#line 21 "rnull.pgc"
73-
doubledbl=404.404 ;
73+
doubledbl=404.404 ;
7474

7575
#line 21 "rnull.pgc"
7676

7777

7878
#line 22 "rnull.pgc"
79-
decimaldec ;
79+
decimaldec ;
8080

8181
#line 22 "rnull.pgc"
8282

8383

8484
#line 23 "rnull.pgc"
85-
datedat ;
85+
datedat ;
8686

8787
#line 23 "rnull.pgc"
8888

8989

9090
#line 24 "rnull.pgc"
91-
timestamptmp ;
91+
timestamptmp ;
9292

9393
#line 24 "rnull.pgc"
9494

9595

9696
ECPGdebug(1,stderr);
97-
/* exec sql whenever sqlerror do sqlprint () ; */
97+
/* exec sql whenever sqlerror do sqlprint ( ) ; */
9898
#line 27 "rnull.pgc"
9999

100100

101101
{ECPGconnect(__LINE__,1,"regress1" ,NULL,NULL ,NULL,0);
102102
#line 29 "rnull.pgc"
103103

104-
if (sqlca.sqlcode<0)sqlprint ();}
104+
if (sqlca.sqlcode<0)sqlprint ( );}
105105
#line 29 "rnull.pgc"
106106

107107

108-
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"createtable test ( id int, c char( 10 ), s smallint, i int, b bool, f float, l bigint, dbl double precision, dec decimal, dat date, tmp timestamptz )",ECPGt_EOIT,ECPGt_EORT);
108+
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz)",ECPGt_EOIT,ECPGt_EORT);
109109
#line 33 "rnull.pgc"
110110

111-
if (sqlca.sqlcode<0)sqlprint ();}
111+
if (sqlca.sqlcode<0)sqlprint ( );}
112112
#line 33 "rnull.pgc"
113113

114-
{ECPGtrans(__LINE__,NULL,"commit");
114+
{ECPGtrans(__LINE__,NULL,"commit");
115115
#line 34 "rnull.pgc"
116116

117-
if (sqlca.sqlcode<0)sqlprint ();}
117+
if (sqlca.sqlcode<0)sqlprint ( );}
118118
#line 34 "rnull.pgc"
119119

120120

121-
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"insert into test ( id, c, s, i, b, f, l, dbl) values ( 1 ,$1 ,$2 ,$3 ,$4 ,$5 ,$6 ,$7 )",
121+
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , $1 , $2 , $3 , $4 , $5 , $6 , $7 )",
122122
ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
123123
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
124124
ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
@@ -135,13 +135,13 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
135135
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EOIT,ECPGt_EORT);
136136
#line 38 "rnull.pgc"
137137

138-
if (sqlca.sqlcode<0)sqlprint ();}
138+
if (sqlca.sqlcode<0)sqlprint ( );}
139139
#line 38 "rnull.pgc"
140140

141-
{ECPGtrans(__LINE__,NULL,"commit");
141+
{ECPGtrans(__LINE__,NULL,"commit");
142142
#line 39 "rnull.pgc"
143143

144-
if (sqlca.sqlcode<0)sqlprint ();}
144+
if (sqlca.sqlcode<0)sqlprint ( );}
145145
#line 39 "rnull.pgc"
146146

147147

@@ -156,7 +156,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
156156
rsetnull(CDATETYPE, (char*)&dat);
157157
rsetnull(CDTIMETYPE, (char*)&tmp);
158158

159-
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"insert into test ( id, c, s, i, b, f, l, dbl, dec, dat, tmp) values ( 2 ,$1 ,$2 ,$3 ,$4 ,$5 ,$6 ,$7 ,$8 ,$9 ,$10 )",
159+
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 )",
160160
ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
161161
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
162162
ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
@@ -179,19 +179,19 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
179179
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EOIT,ECPGt_EORT);
180180
#line 54 "rnull.pgc"
181181

182-
if (sqlca.sqlcode<0)sqlprint ();}
182+
if (sqlca.sqlcode<0)sqlprint ( );}
183183
#line 54 "rnull.pgc"
184184

185-
{ECPGtrans(__LINE__,NULL,"commit");
185+
{ECPGtrans(__LINE__,NULL,"commit");
186186
#line 55 "rnull.pgc"
187187

188-
if (sqlca.sqlcode<0)sqlprint ();}
188+
if (sqlca.sqlcode<0)sqlprint ( );}
189189
#line 55 "rnull.pgc"
190190

191191

192192
printf("first select\n");
193193

194-
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"selectc , s , i , b , f , l , dbl , dec , dat , tmpfrom test where id = 1",ECPGt_EOIT,
194+
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1",ECPGt_EOIT,
195195
ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
196196
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
197197
ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
@@ -214,7 +214,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
214214
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);
215215
#line 61 "rnull.pgc"
216216

217-
if (sqlca.sqlcode<0)sqlprint ();}
217+
if (sqlca.sqlcode<0)sqlprint ( );}
218218
#line 61 "rnull.pgc"
219219

220220

@@ -231,7 +231,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
231231

232232
printf("second select\n");
233233

234-
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"selectc , s , i , b , f , l , dbl , dec , dat , tmpfrom test where id = 2",ECPGt_EOIT,
234+
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2",ECPGt_EOIT,
235235
ECPGt_char,(c),(long)sizeof("abc"),(long)1,(sizeof("abc"))*sizeof(char),
236236
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
237237
ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
@@ -254,7 +254,7 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
254254
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);
255255
#line 78 "rnull.pgc"
256256

257-
if (sqlca.sqlcode<0)sqlprint ();}
257+
if (sqlca.sqlcode<0)sqlprint ( );}
258258
#line 78 "rnull.pgc"
259259

260260

@@ -269,23 +269,23 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
269269
test_null(CDATETYPE, (char*)&dat);
270270
test_null(CDTIMETYPE, (char*)&tmp);
271271

272-
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"drop table test",ECPGt_EOIT,ECPGt_EORT);
272+
{ECPGdo(__LINE__,1,0,NULL,0,ECPGst_normal,"drop table test",ECPGt_EOIT,ECPGt_EORT);
273273
#line 91 "rnull.pgc"
274274

275-
if (sqlca.sqlcode<0)sqlprint ();}
275+
if (sqlca.sqlcode<0)sqlprint ( );}
276276
#line 91 "rnull.pgc"
277277

278-
{ECPGtrans(__LINE__,NULL,"commit");
278+
{ECPGtrans(__LINE__,NULL,"commit");
279279
#line 92 "rnull.pgc"
280280

281-
if (sqlca.sqlcode<0)sqlprint ();}
281+
if (sqlca.sqlcode<0)sqlprint ( );}
282282
#line 92 "rnull.pgc"
283283

284284

285285
{ECPGdisconnect(__LINE__,"CURRENT");
286286
#line 94 "rnull.pgc"
287287

288-
if (sqlca.sqlcode<0)sqlprint ();}
288+
if (sqlca.sqlcode<0)sqlprint ( );}
289289
#line 94 "rnull.pgc"
290290

291291

‎src/interfaces/ecpg/test/expected/compat_informix-rnull.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
[NO_PID]: sqlca: code: 0, state: 00000
33
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
44
[NO_PID]: sqlca: code: 0, state: 00000
5-
[NO_PID]: ecpg_execute on line 31: query: createtable test ( id int, c char( 10 ), s smallint, i int, b bool, f float, l bigint, dbl double precision, dec decimal, dat date, tmp timestamptz ); with 0 parameter(s) on connection regress1
5+
[NO_PID]: ecpg_execute on line 31: query: create table test ( id int , c char ( 10 ) , s smallint , i int , b bool , f float , l bigint , dbl double precision , dec decimal , dat date , tmp timestamptz); with 0 parameter(s) on connection regress1
66
[NO_PID]: sqlca: code: 0, state: 00000
77
[NO_PID]: ecpg_execute on line 31: using PQexec
88
[NO_PID]: sqlca: code: 0, state: 00000
99
[NO_PID]: ecpg_execute on line 31: OK: CREATE TABLE
1010
[NO_PID]: sqlca: code: 0, state: 00000
11-
[NO_PID]: ECPGtrans on line 34: action "commit"; connection "regress1"
11+
[NO_PID]: ECPGtrans on line 34: action "commit"; connection "regress1"
1212
[NO_PID]: sqlca: code: 0, state: 00000
13-
[NO_PID]: ecpg_execute on line 36: query: insert into test ( id, c, s, i, b, f, l, dbl) values ( 1 ,$1 ,$2 ,$3 ,$4 ,$5 ,$6 ,$7 ); with 7 parameter(s) on connection regress1
13+
[NO_PID]: ecpg_execute on line 36: query: insert into test ( id , c , s , i , b , f , l , dbl ) values ( 1 , $1 , $2 , $3 , $4 , $5 , $6 , $7 ); with 7 parameter(s) on connection regress1
1414
[NO_PID]: sqlca: code: 0, state: 00000
1515
[NO_PID]: ecpg_execute on line 36: using PQexecParams
1616
[NO_PID]: sqlca: code: 0, state: 00000
@@ -30,9 +30,9 @@
3030
[NO_PID]: sqlca: code: 0, state: 00000
3131
[NO_PID]: ecpg_execute on line 36: OK: INSERT 0 1
3232
[NO_PID]: sqlca: code: 0, state: 00000
33-
[NO_PID]: ECPGtrans on line 39: action "commit"; connection "regress1"
33+
[NO_PID]: ECPGtrans on line 39: action "commit"; connection "regress1"
3434
[NO_PID]: sqlca: code: 0, state: 00000
35-
[NO_PID]: ecpg_execute on line 52: query: insert into test ( id, c, s, i, b, f, l, dbl, dec, dat, tmp) values ( 2 ,$1 ,$2 ,$3 ,$4 ,$5 ,$6 ,$7 ,$8 ,$9 ,$10 ); with 10 parameter(s) on connection regress1
35+
[NO_PID]: ecpg_execute on line 52: query: insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values ( 2 , $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 ); with 10 parameter(s) on connection regress1
3636
[NO_PID]: sqlca: code: 0, state: 00000
3737
[NO_PID]: ecpg_execute on line 52: using PQexecParams
3838
[NO_PID]: sqlca: code: 0, state: 00000
@@ -58,9 +58,9 @@
5858
[NO_PID]: sqlca: code: 0, state: 00000
5959
[NO_PID]: ecpg_execute on line 52: OK: INSERT 0 1
6060
[NO_PID]: sqlca: code: 0, state: 00000
61-
[NO_PID]: ECPGtrans on line 55: action "commit"; connection "regress1"
61+
[NO_PID]: ECPGtrans on line 55: action "commit"; connection "regress1"
6262
[NO_PID]: sqlca: code: 0, state: 00000
63-
[NO_PID]: ecpg_execute on line 59: query: selectc , s , i , b , f , l , dbl , dec , dat , tmpfrom test where id = 1; with 0 parameter(s) on connection regress1
63+
[NO_PID]: ecpg_execute on line 59: query: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1; with 0 parameter(s) on connection regress1
6464
[NO_PID]: sqlca: code: 0, state: 00000
6565
[NO_PID]: ecpg_execute on line 59: using PQexec
6666
[NO_PID]: sqlca: code: 0, state: 00000
@@ -86,7 +86,7 @@
8686
[NO_PID]: sqlca: code: 0, state: 00000
8787
[NO_PID]: ecpg_get_data on line 59: RESULT: offset: -1; array: yes
8888
[NO_PID]: sqlca: code: 0, state: 00000
89-
[NO_PID]: ecpg_execute on line 76: query: selectc , s , i , b , f , l , dbl , dec , dat , tmpfrom test where id = 2; with 0 parameter(s) on connection regress1
89+
[NO_PID]: ecpg_execute on line 76: query: select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2; with 0 parameter(s) on connection regress1
9090
[NO_PID]: sqlca: code: 0, state: 00000
9191
[NO_PID]: ecpg_execute on line 76: using PQexec
9292
[NO_PID]: sqlca: code: 0, state: 00000
@@ -112,13 +112,13 @@
112112
[NO_PID]: sqlca: code: 0, state: 00000
113113
[NO_PID]: ecpg_get_data on line 76: RESULT: offset: -1; array: yes
114114
[NO_PID]: sqlca: code: 0, state: 00000
115-
[NO_PID]: ecpg_execute on line 91: query: drop table test; with 0 parameter(s) on connection regress1
115+
[NO_PID]: ecpg_execute on line 91: query: drop table test; with 0 parameter(s) on connection regress1
116116
[NO_PID]: sqlca: code: 0, state: 00000
117117
[NO_PID]: ecpg_execute on line 91: using PQexec
118118
[NO_PID]: sqlca: code: 0, state: 00000
119119
[NO_PID]: ecpg_execute on line 91: OK: DROP TABLE
120120
[NO_PID]: sqlca: code: 0, state: 00000
121-
[NO_PID]: ECPGtrans on line 92: action "commit"; connection "regress1"
121+
[NO_PID]: ECPGtrans on line 92: action "commit"; connection "regress1"
122122
[NO_PID]: sqlca: code: 0, state: 00000
123123
[NO_PID]: ecpg_finish: connection regress1 closed
124124
[NO_PID]: sqlca: code: 0, state: 00000

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp