1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Reverted changes made by pgindent

Made show.pgc set all variables before displaying them.
This commit is contained in:
Michael Meskes
2006-10-04 10:09:03 +00:00
parent f99a569a2e
commit fcc2fbac22
43 changed files with 2607 additions and 4143 deletions

View File

@ -22,174 +22,143 @@
/* exec sql begin declare section */
struct TBempl
{
struct TBempl {
#line 9 "binary.pgc"
long idnum;
long idnum ;
#line 10 "binary.pgc"
char name[21];
char name [ 21 ] ;
#line 11 "binary.pgc"
short accs;
short accs ;
#line 12 "binary.pgc"
char byte[20];
}; /* exec sql end declare section */
char byte [ 20 ] ;
} ;/* exec sql end declare section */
#line 14 "binary.pgc"
int
main(void)
main (void)
{
/* exec sql begin declare section */
/* exec sql begin declare section */
#line 20 "binary.pgc"
struct TBempl empl;
struct TBempl empl ;
#line 21 "binary.pgc"
char *data = "\\001\\155\\000\\212";
char * data = "\\001\\155\\000\\212" ;
/* exec sql end declare section */
#line 22 "binary.pgc"
int i;
int i;
ECPGdebug(1, stderr);
ECPGdebug (1, stderr);
empl.idnum = 1;
{
ECPGconnect(__LINE__, 0, "regress1", NULL, NULL, NULL, 0);
}
empl.idnum = 1;
{ ECPGconnect(__LINE__, 0, "regress1" , NULL,NULL , NULL, 0); }
#line 28 "binary.pgc"
if (sqlca.sqlcode)
{
printf("connect error = %ld\n", sqlca.sqlcode);
exit(sqlca.sqlcode);
}
if (sqlca.sqlcode)
{
printf ("connect error = %ld\n", sqlca.sqlcode);
exit (sqlca.sqlcode);
}
{
ECPGdo(__LINE__, 0, 1, NULL, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) ", ECPGt_EOIT, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "create table empl ( idnum integer , name char ( 20 ) , accs smallint , byte bytea ) ", ECPGt_EOIT, ECPGt_EORT);}
#line 36 "binary.pgc"
if (sqlca.sqlcode)
{
printf("create error = %ld\n", sqlca.sqlcode);
exit(sqlca.sqlcode);
}
if (sqlca.sqlcode)
{
printf ("create error = %ld\n", sqlca.sqlcode);
exit (sqlca.sqlcode);
}
{
ECPGdo(__LINE__, 0, 1, NULL, "insert into empl values ( 1 , 'first user' , 320 , ? ) ",
ECPGt_char, &(data), (long) 0, (long) 1, (1) * sizeof(char),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "insert into empl values ( 1 , 'first user' , 320 , ? ) ",
ECPGt_char,&(data),(long)0,(long)1,(1)*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
#line 43 "binary.pgc"
if (sqlca.sqlcode)
{
printf("insert error = %ld\n", sqlca.sqlcode);
exit(sqlca.sqlcode);
}
if (sqlca.sqlcode)
{
printf ("insert error = %ld\n", sqlca.sqlcode);
exit (sqlca.sqlcode);
}
/*
* declare C cursor for select name , accs , byte from empl where
* idnum = ?
*/
/* declare C cursor for select name , accs , byte from empl where idnum = ? */
#line 50 "binary.pgc"
{
ECPGdo(__LINE__, 0, 1, NULL, "declare C cursor for select name , accs , byte from empl where idnum = ? ",
ECPGt_long, &(empl.idnum), (long) 1, (long) 1, sizeof(long),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "declare C cursor for select name , accs , byte from empl where idnum = ? ",
ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
#line 51 "binary.pgc"
{
ECPGdo(__LINE__, 0, 1, NULL, "fetch C", ECPGt_EOIT,
ECPGt_char, (empl.name), (long) 21, (long) 1, (21) * sizeof(char),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
ECPGt_short, &(empl.accs), (long) 1, (long) 1, sizeof(short),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
ECPGt_char, (empl.byte), (long) 20, (long) 1, (20) * sizeof(char),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "fetch C", ECPGt_EOIT,
ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
#line 52 "binary.pgc"
if (sqlca.sqlcode)
{
printf("fetch error = %ld\n", sqlca.sqlcode);
exit(sqlca.sqlcode);
}
if (sqlca.sqlcode)
{
printf ("fetch error = %ld\n", sqlca.sqlcode);
exit (sqlca.sqlcode);
}
printf("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte);
printf ("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte);
memset(empl.name, 0, 21L);
memset(empl.byte, '#', 20L);
/*
* declare B binary cursor for select name , accs , byte from empl
* where idnum = ?
*/
memset(empl.name, 0, 21L);
memset(empl.byte, '#', 20L);
/* declare B binary cursor for select name , accs , byte from empl where idnum = ? */
#line 63 "binary.pgc"
{
ECPGdo(__LINE__, 0, 1, NULL, "declare B binary cursor for select name , accs , byte from empl where idnum = ? ",
ECPGt_long, &(empl.idnum), (long) 1, (long) 1, sizeof(long),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "declare B binary cursor for select name , accs , byte from empl where idnum = ? ",
ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
#line 64 "binary.pgc"
{
ECPGdo(__LINE__, 0, 1, NULL, "fetch B", ECPGt_EOIT,
ECPGt_char, (empl.name), (long) 21, (long) 1, (21) * sizeof(char),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
ECPGt_short, &(empl.accs), (long) 1, (long) 1, sizeof(short),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L,
ECPGt_char, (empl.byte), (long) 20, (long) 1, (20) * sizeof(char),
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "fetch B", ECPGt_EOIT,
ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_short,&(empl.accs),(long)1,(long)1,sizeof(short),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
#line 65 "binary.pgc"
if (sqlca.sqlcode)
{
printf("fetch error = %ld\n", sqlca.sqlcode);
exit(sqlca.sqlcode);
}
if (sqlca.sqlcode)
{
printf ("fetch error = %ld\n", sqlca.sqlcode);
exit (sqlca.sqlcode);
}
{
ECPGdo(__LINE__, 0, 1, NULL, "close B", ECPGt_EOIT, ECPGt_EORT);
}
{ ECPGdo(__LINE__, 0, 1, NULL, "close B", ECPGt_EOIT, ECPGt_EORT);}
#line 72 "binary.pgc"
/*
* do not print a.accs because big/little endian will have different
* outputs here
*/
printf("name=%s, byte=", empl.name);
for (i = 0; i < 20; i++)
{
if (empl.byte[i] == '#')
break;
printf("(%o)", (unsigned char) empl.byte[i]);
}
printf("\n");
{
ECPGdisconnect(__LINE__, "CURRENT");
}
/* do not print a.accs because big/little endian will have different outputs here */
printf ("name=%s, byte=", empl.name);
for (i=0; i<20; i++)
{
if (empl.byte[i] == '#')
break;
printf("(%o)", (unsigned char)empl.byte[i]);
}
printf("\n");
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 83 "binary.pgc"
exit(0);
exit (0);
}