1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Fix whitespace issues found by git diff --check, add gitattributes

Set per file type attributes in .gitattributes to fine-tune whitespace
checks.  With the associated cleanups, the tree is now clean for git
This commit is contained in:
Peter Eisentraut
2013-11-10 09:20:52 -05:00
parent dca09ac533
commit 001e114b8d
78 changed files with 303 additions and 288 deletions

View File

@ -79,7 +79,7 @@ endif
REGRESS_OPTS = --dbname=regress1,connectdb --create-role=connectuser,connectdb $(EXTRA_REGRESS_OPTS)
check: all
./pg_regress $(REGRESS_OPTS) --top-builddir=$(top_builddir) --temp-install=./tmp_check $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
./pg_regress $(REGRESS_OPTS) --top-builddir=$(top_builddir) --temp-install=./tmp_check $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
# the same options, but with --listen-on-tcp
checktcp: all

View File

@ -25,7 +25,7 @@
static void test(void) {
/* exec sql begin declare section */
@ -127,7 +127,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
for (i=0; i<4; i++)
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
/* declare C cursor for select Item1 from T */
#line 35 "autoprep.pgc"

View File

@ -79,7 +79,7 @@ main (void)

View File

@ -113,7 +113,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 30 "fetch.pgc"
while (1) {
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT,
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT,
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char),
@ -182,7 +182,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 46 "fetch.pgc"
while (1) {
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in D", ECPGt_EOIT,
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in D", ECPGt_EOIT,
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(str),(long)25,(long)1,(25)*sizeof(char),

View File

@ -24,7 +24,7 @@
int main() {
/* exec sql begin declare section */
#line 9 "insupd.pgc"
int i1 [ 3 ] , i2 [ 3 ] , i3 [ 3 ] , i4 ;

View File

@ -25,7 +25,7 @@
int main() {
/* exec sql begin declare section */
#line 10 "parser.pgc"
int item [ 3 ] , ind [ 3 ] , i ;
@ -81,7 +81,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
for (i=0; i<3; i++)
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "alter table T alter Item1 type bigint", ECPGt_EOIT, ECPGt_EORT);
#line 31 "parser.pgc"

View File

@ -178,7 +178,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
while (true)
{
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT,
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch C", ECPGt_EOIT,
ECPGt_int,&(i),(long)1,(long)1,sizeof(int),
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
ECPGt_char,(var),(long)25,(long)1,(25)*sizeof(char),

View File

@ -7,7 +7,7 @@ EXEC SQL INCLUDE ../regression;
static void test(void) {
EXEC SQL BEGIN DECLARE SECTION;
int item[4], ind[4], i = 1;
int item[4], ind[4], i = 1;
int item1, ind1;
char sqlstr[64] = "SELECT item2 FROM T ORDER BY item2 NULLS LAST";
EXEC SQL END DECLARE SECTION;
@ -30,7 +30,7 @@ static void test(void) {
EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST;
for (i=0; i<4; i++)
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
EXEC SQL DECLARE C CURSOR FOR SELECT Item1 FROM T;

View File

@ -31,7 +31,7 @@ main (void)
c ptr = NULL;
struct varchar
{
int len;
int len;
char text[10];
} vc;
EXEC SQL END DECLARE SECTION;

View File

@ -113,7 +113,7 @@ main ()
break;
case SQL3_DATE_TIME_TIMESTAMP:
exec sql get descriptor MYDESC value :INDEX
:DATETIME_INTERVAL_CODE = datetime_interval_code;
:DATETIME_INTERVAL_CODE = datetime_interval_code;
switch (DATETIME_INTERVAL_CODE)
{
case SQL3_DDT_DATE:
@ -174,7 +174,7 @@ main ()
break;
case SQL3_DATE_TIME_TIMESTAMP:
exec sql get descriptor MYDESC value :INDEX
:DATETIME_INTERVAL_CODE = datetime_interval_code,
:DATETIME_INTERVAL_CODE = datetime_interval_code,
:STRINGVAR = data;
printf ("%d \"%s\"\n", DATETIME_INTERVAL_CODE, STRINGVAR);
break;

View File

@ -29,7 +29,7 @@ int main() {
EXEC SQL WHENEVER NOT FOUND DO BREAK;
while (1) {
EXEC SQL FETCH 1 IN C INTO :i, :str;
EXEC SQL FETCH 1 IN C INTO :i, :str;
printf("%d: %s\n", i, str);
}
@ -45,7 +45,7 @@ int main() {
EXEC SQL WHENEVER NOT FOUND DO BREAK;
while (1) {
EXEC SQL FETCH 1 IN D INTO :i, :str;
EXEC SQL FETCH 1 IN D INTO :i, :str;
printf("%d: %s\n", i, str);
}
EXEC SQL CLOSE D;

View File

@ -6,7 +6,7 @@ EXEC SQL INCLUDE ../regression;
int main() {
EXEC SQL BEGIN DECLARE SECTION;
int i1[3], i2[3], i3[3], i4;
int i1[3], i2[3], i3[3], i4;
EXEC SQL END DECLARE SECTION;
ECPGdebug(1, stderr);

View File

@ -7,7 +7,7 @@ EXEC SQL INCLUDE ../regression;
int main() {
EXEC SQL BEGIN DECLARE SECTION;
int item[3], ind[3], i;
int item[3], ind[3], i;
EXEC SQL END DECLARE SECTION;
ECPGdebug(1, stderr);
@ -19,14 +19,14 @@ int main() {
EXEC SQL CREATE TABLE T ( Item1 int, Item2 int );
EXEC SQL INSERT INTO t
SELECT 1,nullif(y-1,0)
EXEC SQL INSERT INTO t
SELECT 1,nullif(y-1,0)
FROM generate_series(1,3) WITH ORDINALITY AS series(x,y);
EXEC SQL SELECT Item2 INTO :item:ind FROM T ORDER BY Item2 NULLS LAST;
for (i=0; i<3; i++)
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
printf("item[%d] = %d\n", i, ind[i] ? -1 : item[i]);
EXEC SQL ALTER TABLE T ALTER Item1 TYPE bigint;
EXEC SQL ALTER TABLE T ALTER COLUMN Item2 SET DATA TYPE smallint;

View File

@ -48,7 +48,7 @@ int main() {
while (true)
{
EXEC SQL FETCH C INTO :i, :var;
EXEC SQL FETCH C INTO :i, :var;
printf("value: %d %s\n", i, var);
}