Guard against pgindent changing =- to = -.

This commit is contained in:
Bruce Momjian 2003-08-30 14:59:34 +00:00
parent ceacae7734
commit 5a288903b9
2 changed files with 9 additions and 6 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.79 2003/08/08 21:41:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.80 2003/08/30 14:59:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -2008,7 +2008,7 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse,
}
}
/* -= now do the thing on this relation =- */
/* now do the thing on this relation */
/*
* get the number of the attribute
@ -2152,7 +2152,7 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse,
}
}
/* -= now do the thing on this relation =- */
/* now do the thing on this relation */
/*
* get the number of the attribute
@ -2280,7 +2280,7 @@ AlterTableAlterColumnDefault(Oid myrelid, bool recurse,
}
}
/* -= now do the thing on this relation =- */
/* now do the thing on this relation */
/*
* get the number of the attribute
@ -2445,7 +2445,7 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse,
}
}
/* -= now do the thing on this relation =- */
/* now do the thing on this relation */
attrelation = heap_openr(AttributeRelationName, RowExclusiveLock);

View File

@ -33,6 +33,8 @@ do
cat "$FILE" |
# convert // comments to /* */
sed 's;^\([ ]*\)//\(.*\)$;\1/* \2 */;g' |
# Avoid bug that converts 'x =- 1' to 'x = -1'
sed 's;=- ;-= ;g' |
# mark some comments for special treatment later
sed 's;/\* *---;/*---X_X;g' |
# workaround for indent bug with 'else' handling
@ -40,7 +42,7 @@ do
\2;g' |
detab -t4 -qc |
# work around bug where function that defines no local variables misindents
# switch() case lines and line after #else. Do not do with for struct/enum.
# switch() case lines and line after #else. Do not do for struct/enum.
awk ' BEGIN {line1 = ""; line2 = ""}
{
line2 = $0;
@ -1672,6 +1674,7 @@ do
cat /tmp/$$
fi
cat /tmp/$$a |
# restore DATA/CATALOG lines
sed 's;^/\*\(DATA(.*\)\*/$;\1;' |
sed 's;^/\*\(CATALOG(.*\)\*/$;\1;' |
# remove tabs and retab with four spaces