summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test/expected/compat_informix-rnull.c')
-rw-r--r--src/interfaces/ecpg/test/expected/compat_informix-rnull.c275
1 files changed, 156 insertions, 119 deletions
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
index 9ee19ace76..7cfa6a80d1 100644
--- a/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-rnull.c
@@ -30,65 +30,66 @@ test_null(int type, char *ptr)
printf("null: %d\n", risnull(type, ptr));
}
-int main(void)
+int
+main(void)
{
-
+
#line 15 "rnull.pgc"
- char c [] = "abc " ;
+ char c[] = "abc ";
#line 15 "rnull.pgc"
-
+
#line 16 "rnull.pgc"
- short s = 17 ;
+ short s = 17;
#line 16 "rnull.pgc"
-
+
#line 17 "rnull.pgc"
- int i = - 74874 ;
+ int i = -74874;
#line 17 "rnull.pgc"
-
+
#line 18 "rnull.pgc"
- bool b = 1 ;
+ bool b = 1;
#line 18 "rnull.pgc"
-
+
#line 19 "rnull.pgc"
- float f = 3.71 ;
+ float f = 3.71;
#line 19 "rnull.pgc"
-
+
#line 20 "rnull.pgc"
- long l = 487444 ;
+ long l = 487444;
#line 20 "rnull.pgc"
-
+
#line 21 "rnull.pgc"
- double dbl = 404.404 ;
+ double dbl = 404.404;
#line 21 "rnull.pgc"
-
+
#line 22 "rnull.pgc"
- decimal dec ;
+ decimal dec;
#line 22 "rnull.pgc"
-
+
#line 23 "rnull.pgc"
- date dat ;
+ date dat;
#line 23 "rnull.pgc"
-
+
#line 24 "rnull.pgc"
- timestamp tmp ;
+ timestamp tmp;
#line 24 "rnull.pgc"
@@ -98,50 +99,65 @@ int main(void)
#line 27 "rnull.pgc"
- { ECPGconnect(__LINE__, 1, "regress1" , NULL,NULL , NULL, 0);
+ {
+ ECPGconnect(__LINE__, 1, "regress1", NULL, NULL, NULL, 0);
#line 29 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 29 "rnull.pgc"
- { ECPGdo(__LINE__, 1, 0, NULL, "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);
+ {
+ ECPGdo(__LINE__, 1, 0, NULL, "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);
#line 33 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 33 "rnull.pgc"
- { ECPGtrans(__LINE__, NULL, "commit");
+ {
+ ECPGtrans(__LINE__, NULL, "commit");
#line 34 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 34 "rnull.pgc"
- { ECPGdo(__LINE__, 1, 0, NULL, "insert into test ( id , c , s , i , b , f , l , dbl ) values( 1 , ? , ? , ? , ? , ? , ? , ? ) ",
- ECPGt_char,(c),(long)sizeof("abc "),(long)1,(sizeof("abc "))*sizeof(char),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+ {
+ ECPGdo(__LINE__, 1, 0, NULL, "insert into test ( id , c , s , i , b , f , l , dbl ) values( 1 , ? , ? , ? , ? , ? , ? , ? ) ",
+ ECPGt_char, (c), (long) sizeof("abc "), (long) 1, (sizeof("abc ")) *sizeof(char),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_short, &(s), (long) 1, (long) 1, sizeof(short),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_int, &(i), (long) 1, (long) 1, sizeof(int),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_bool, &(b), (long) 1, (long) 1, sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_float, &(f), (long) 1, (long) 1, sizeof(float),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_long, &(l), (long) 1, (long) 1, sizeof(long),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_double, &(dbl), (long) 1, (long) 1, sizeof(double),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 38 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 38 "rnull.pgc"
- { ECPGtrans(__LINE__, NULL, "commit");
+ {
+ ECPGtrans(__LINE__, NULL, "commit");
#line 39 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 39 "rnull.pgc"
@@ -156,65 +172,74 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
rsetnull(CDATETYPE, (char *) &dat);
rsetnull(CDTIMETYPE, (char *) &tmp);
- { ECPGdo(__LINE__, 1, 0, NULL, "insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values( 2 , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ",
- ECPGt_char,(c),(long)sizeof("abc "),(long)1,(sizeof("abc "))*sizeof(char),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_decimal,&(dec),(long)1,(long)1,sizeof(decimal),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_date,&(dat),(long)1,(long)1,sizeof(date),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_timestamp,&(tmp),(long)1,(long)1,sizeof(timestamp),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
+ {
+ ECPGdo(__LINE__, 1, 0, NULL, "insert into test ( id , c , s , i , b , f , l , dbl , dec , dat , tmp ) values( 2 , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) ",
+ ECPGt_char, (c), (long) sizeof("abc "), (long) 1, (sizeof("abc ")) *sizeof(char),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_short, &(s), (long) 1, (long) 1, sizeof(short),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_int, &(i), (long) 1, (long) 1, sizeof(int),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_bool, &(b), (long) 1, (long) 1, sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_float, &(f), (long) 1, (long) 1, sizeof(float),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_long, &(l), (long) 1, (long) 1, sizeof(long),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_double, &(dbl), (long) 1, (long) 1, sizeof(double),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_decimal, &(dec), (long) 1, (long) 1, sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_date, &(dat), (long) 1, (long) 1, sizeof(date),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_timestamp, &(tmp), (long) 1, (long) 1, sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 54 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 54 "rnull.pgc"
- { ECPGtrans(__LINE__, NULL, "commit");
+ {
+ ECPGtrans(__LINE__, NULL, "commit");
#line 55 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 55 "rnull.pgc"
printf("first select\n");
- { ECPGdo(__LINE__, 1, 0, NULL, "select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1 ", ECPGt_EOIT,
- ECPGt_char,(c),(long)sizeof("abc "),(long)1,(sizeof("abc "))*sizeof(char),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_decimal,&(dec),(long)1,(long)1,sizeof(decimal),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_date,&(dat),(long)1,(long)1,sizeof(date),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_timestamp,&(tmp),(long)1,(long)1,sizeof(timestamp),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+ {
+ ECPGdo(__LINE__, 1, 0, NULL, "select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 1 ", ECPGt_EOIT,
+ ECPGt_char, (c), (long) sizeof("abc "), (long) 1, (sizeof("abc ")) *sizeof(char),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_short, &(s), (long) 1, (long) 1, sizeof(short),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_int, &(i), (long) 1, (long) 1, sizeof(int),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_bool, &(b), (long) 1, (long) 1, sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_float, &(f), (long) 1, (long) 1, sizeof(float),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_long, &(l), (long) 1, (long) 1, sizeof(long),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_double, &(dbl), (long) 1, (long) 1, sizeof(double),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_decimal, &(dec), (long) 1, (long) 1, sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_date, &(dat), (long) 1, (long) 1, sizeof(date),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_timestamp, &(tmp), (long) 1, (long) 1, sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
#line 61 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 61 "rnull.pgc"
@@ -231,30 +256,33 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
printf("second select\n");
- { ECPGdo(__LINE__, 1, 0, NULL, "select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2 ", ECPGt_EOIT,
- ECPGt_char,(c),(long)sizeof("abc "),(long)1,(sizeof("abc "))*sizeof(char),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_short,&(s),(long)1,(long)1,sizeof(short),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_bool,&(b),(long)1,(long)1,sizeof(bool),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_float,&(f),(long)1,(long)1,sizeof(float),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_long,&(l),(long)1,(long)1,sizeof(long),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_double,&(dbl),(long)1,(long)1,sizeof(double),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_decimal,&(dec),(long)1,(long)1,sizeof(decimal),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_date,&(dat),(long)1,(long)1,sizeof(date),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
- ECPGt_timestamp,&(tmp),(long)1,(long)1,sizeof(timestamp),
- ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
+ {
+ ECPGdo(__LINE__, 1, 0, NULL, "select c , s , i , b , f , l , dbl , dec , dat , tmp from test where id = 2 ", ECPGt_EOIT,
+ ECPGt_char, (c), (long) sizeof("abc "), (long) 1, (sizeof("abc ")) *sizeof(char),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_short, &(s), (long) 1, (long) 1, sizeof(short),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_int, &(i), (long) 1, (long) 1, sizeof(int),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_bool, &(b), (long) 1, (long) 1, sizeof(bool),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_float, &(f), (long) 1, (long) 1, sizeof(float),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_long, &(l), (long) 1, (long) 1, sizeof(long),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_double, &(dbl), (long) 1, (long) 1, sizeof(double),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_decimal, &(dec), (long) 1, (long) 1, sizeof(decimal),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_date, &(dat), (long) 1, (long) 1, sizeof(date),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
+ ECPGt_timestamp, &(tmp), (long) 1, (long) 1, sizeof(timestamp),
+ ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
#line 78 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 78 "rnull.pgc"
@@ -269,23 +297,32 @@ if (sqlca.sqlcode < 0) sqlprint ( );}
test_null(CDATETYPE, (char *) &dat);
test_null(CDTIMETYPE, (char *) &tmp);
- { ECPGdo(__LINE__, 1, 0, NULL, "drop table test ", ECPGt_EOIT, ECPGt_EORT);
+ {
+ ECPGdo(__LINE__, 1, 0, NULL, "drop table test ", ECPGt_EOIT, ECPGt_EORT);
#line 91 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 91 "rnull.pgc"
- { ECPGtrans(__LINE__, NULL, "commit");
+ {
+ ECPGtrans(__LINE__, NULL, "commit");
#line 92 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 92 "rnull.pgc"
- { ECPGdisconnect(__LINE__, "CURRENT");
+ {
+ ECPGdisconnect(__LINE__, "CURRENT");
#line 94 "rnull.pgc"
-if (sqlca.sqlcode < 0) sqlprint ( );}
+ if (sqlca.sqlcode < 0)
+ sqlprint();
+ }
#line 94 "rnull.pgc"