diff options
Diffstat (limited to 'src/interfaces/ecpg/test/expected/preproc-define.c')
-rw-r--r-- | src/interfaces/ecpg/test/expected/preproc-define.c | 79 |
1 files changed, 48 insertions, 31 deletions
diff --git a/src/interfaces/ecpg/test/expected/preproc-define.c b/src/interfaces/ecpg/test/expected/preproc-define.c index bde15b74a0e..0256609b1f9 100644 --- a/src/interfaces/ecpg/test/expected/preproc-define.c +++ b/src/interfaces/ecpg/test/expected/preproc-define.c @@ -40,73 +40,90 @@ main(void) { /* exec sql begin declare section */ + typedef char string [ 8 ]; -#line 21 "define.pgc" +#line 22 "define.pgc" - -#line 22 "define.pgc" + + + + + + + + + + + + + + + + + +#line 23 "define.pgc" intarray amount ; -#line 23 "define.pgc" +#line 24 "define.pgc" char name [ 6 ] [ 8 ] ; -#line 24 "define.pgc" +#line 37 "define.pgc" char letter [ 6 ] [ 1 ] ; #if 0 -#line 26 "define.pgc" +#line 39 "define.pgc" int not_used ; #endif /* exec sql end declare section */ -#line 29 "define.pgc" +#line 46 "define.pgc" int i,j; ECPGdebug(1, stderr); { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); -#line 34 "define.pgc" +#line 51 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 34 "define.pgc" +#line 51 "define.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( name char ( 8 ) , amount int , letter char ( 1 ) )", ECPGt_EOIT, ECPGt_EORT); -#line 36 "define.pgc" +#line 53 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 36 "define.pgc" +#line 53 "define.pgc" { ECPGtrans(__LINE__, NULL, "commit"); -#line 37 "define.pgc" +#line 54 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 37 "define.pgc" +#line 54 "define.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into Test ( name , amount , letter ) values ( 'false' , 1 , 'f' )", ECPGt_EOIT, ECPGt_EORT); -#line 39 "define.pgc" +#line 56 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 39 "define.pgc" +#line 56 "define.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test ( name , amount , letter ) values ( 'true' , 2 , 't' )", ECPGt_EOIT, ECPGt_EORT); -#line 40 "define.pgc" +#line 57 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 40 "define.pgc" +#line 57 "define.pgc" { ECPGtrans(__LINE__, NULL, "commit"); -#line 41 "define.pgc" +#line 58 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 41 "define.pgc" +#line 58 "define.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from test", ECPGt_EOIT, @@ -116,10 +133,10 @@ if (sqlca.sqlcode < 0) sqlprint();} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(letter),(long)1,(long)6,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 43 "define.pgc" +#line 60 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 43 "define.pgc" +#line 60 "define.pgc" for (i=0, j=sqlca.sqlerrd[2]; i<j; i++) @@ -129,16 +146,16 @@ if (sqlca.sqlcode < 0) sqlprint();} -#line 48 "define.pgc" +#line 65 "define.pgc" string n ; -#line 49 "define.pgc" +#line 66 "define.pgc" char l = letter [ i ] [ 0 ] ; -#line 50 "define.pgc" +#line 67 "define.pgc" int a = amount [ i ] ; /* exec sql end declare section */ -#line 51 "define.pgc" +#line 68 "define.pgc" strncpy(n, name[i], 8); @@ -146,22 +163,22 @@ if (sqlca.sqlcode < 0) sqlprint();} } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT); -#line 57 "define.pgc" +#line 74 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 57 "define.pgc" +#line 74 "define.pgc" { ECPGtrans(__LINE__, NULL, "commit"); -#line 58 "define.pgc" +#line 75 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 58 "define.pgc" +#line 75 "define.pgc" { ECPGdisconnect(__LINE__, "CURRENT"); -#line 59 "define.pgc" +#line 76 "define.pgc" if (sqlca.sqlcode < 0) sqlprint();} -#line 59 "define.pgc" +#line 76 "define.pgc" return 0; |