Add blank line before #endif to #endif's at the end of the file.
This commit is contained in:
parent
bac0d2d2cd
commit
80b9a00439
9
HISTORY
9
HISTORY
@ -66,6 +66,8 @@ Fix nested EXCEPT/INTERSECT (Tom)
|
|||||||
Python fix fetchone() (Gerhard Haring)
|
Python fix fetchone() (Gerhard Haring)
|
||||||
ECPG fixes (Michael, Christof Petig)
|
ECPG fixes (Michael, Christof Petig)
|
||||||
PL/PgSQL trailing semicolon optional (Tom)
|
PL/PgSQL trailing semicolon optional (Tom)
|
||||||
|
Fix path_inter, path_distance, path_length, dist_ppath to handle closed
|
||||||
|
paths (Curtis Barrett, Tom)
|
||||||
|
|
||||||
Enhancements
|
Enhancements
|
||||||
------------
|
------------
|
||||||
@ -138,6 +140,7 @@ New CREATE OR REPLACE FUNCTION that preserves function oid (Gavin Sherry)
|
|||||||
DROP AGGREGATE and COMMENT ON AGGREGATE now accept an aggtype (Tom)
|
DROP AGGREGATE and COMMENT ON AGGREGATE now accept an aggtype (Tom)
|
||||||
Prevent output of default index op class in pg_dump (Tom)
|
Prevent output of default index op class in pg_dump (Tom)
|
||||||
Allow trailing semicolons in psql backslash commands (Greg Sabino Mullane)
|
Allow trailing semicolons in psql backslash commands (Greg Sabino Mullane)
|
||||||
|
Prompt for psql password from /dev/tty if possible
|
||||||
|
|
||||||
Types
|
Types
|
||||||
-----
|
-----
|
||||||
@ -165,7 +168,10 @@ Modify type coersion logic to attempt binary-compatible functions first (Tom)
|
|||||||
Allow optional () after current_user, session_user, user, etc. (Peter E)
|
Allow optional () after current_user, session_user, user, etc. (Peter E)
|
||||||
Add compatibility functions to odbc.sql (Peter E)
|
Add compatibility functions to odbc.sql (Peter E)
|
||||||
Force new password prompt when changing user and database in psql (Tatsuo, Tom)
|
Force new password prompt when changing user and database in psql (Tatsuo, Tom)
|
||||||
|
New /contrib/tsearch full text indexing (Oleg, Teodor Sigaev)
|
||||||
|
Allow better selectivity with Nan and infinities in NUMERIC (Tom)
|
||||||
|
Accept an INTERVAL argument for SET TIME ZONE (Thomas)
|
||||||
|
Implement INTERVAL() YEA
|
||||||
Performance
|
Performance
|
||||||
-----------
|
-----------
|
||||||
Optimizer improvements (Tom)
|
Optimizer improvements (Tom)
|
||||||
@ -225,6 +231,7 @@ ODBC
|
|||||||
ECPG
|
ECPG
|
||||||
EXECUTE ... INTO ... implemented
|
EXECUTE ... INTO ... implemented
|
||||||
multiple row descriptor support (e.g. CARDINALITY)
|
multiple row descriptor support (e.g. CARDINALITY)
|
||||||
|
Fix for GRANT parameters (Lee Kindness)
|
||||||
|
|
||||||
Source Code
|
Source Code
|
||||||
-----------
|
-----------
|
||||||
|
@ -1292,7 +1292,7 @@ int pgindent_func_no_var_fix;\
|
|||||||
# pull in #endif comments
|
# pull in #endif comments
|
||||||
sed 's;^#endif[ ][ ]*/\*;#endif /*;' |
|
sed 's;^#endif[ ][ ]*/\*;#endif /*;' |
|
||||||
# add space after comments that start on tab stops
|
# add space after comments that start on tab stops
|
||||||
sed 's:\([;,)/]\)/\*.*\*/\)$:\1 \2:' |
|
sed 's:\([^ ]\)/\*.*\*/\)$:\1 \2:' |
|
||||||
# work around #else indenting next line if #ifdef defines variables at top
|
# work around #else indenting next line if #ifdef defines variables at top
|
||||||
# work around misindenting of function with no variables defined
|
# work around misindenting of function with no variables defined
|
||||||
awk '
|
awk '
|
||||||
@ -1329,14 +1329,13 @@ int pgindent_func_no_var_fix;\
|
|||||||
print line1;
|
print line1;
|
||||||
line1 = line2;
|
line1 = line2;
|
||||||
line2 = line3;
|
line2 = line3;
|
||||||
line3 = "";
|
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
if (skips <= 1)
|
if (skips <= 1)
|
||||||
print line1;
|
print line1;
|
||||||
if (skips <= 2)
|
if (skips <= 2)
|
||||||
print line2;
|
print line2;
|
||||||
}' |
|
}' |
|
||||||
# remove blank line between opening brace and block comment
|
# remove blank line between opening brace and block comment
|
||||||
awk '
|
awk '
|
||||||
{
|
{
|
||||||
@ -1358,14 +1357,13 @@ int pgindent_func_no_var_fix;\
|
|||||||
print line1;
|
print line1;
|
||||||
line1 = line2;
|
line1 = line2;
|
||||||
line2 = line3;
|
line2 = line3;
|
||||||
line3 = "";
|
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
if (skips <= 1)
|
if (skips <= 1)
|
||||||
print line1;
|
print line1;
|
||||||
if (skips <= 2)
|
if (skips <= 2)
|
||||||
print line2;
|
print line2;
|
||||||
}' |
|
}' |
|
||||||
# remove blank line before #endif
|
# remove blank line before #endif
|
||||||
awk ' BEGIN {line1 = ""; line2 = ""; skips = 0}
|
awk ' BEGIN {line1 = ""; line2 = ""; skips = 0}
|
||||||
{
|
{
|
||||||
@ -1383,12 +1381,24 @@ int pgindent_func_no_var_fix;\
|
|||||||
if (skips == 0 && NR >= 2)
|
if (skips == 0 && NR >= 2)
|
||||||
print line1;
|
print line1;
|
||||||
line1 = line2;
|
line1 = line2;
|
||||||
line2 = "";
|
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
if (skips <= 1)
|
if (skips <= 1)
|
||||||
print line1;
|
print line1;
|
||||||
}' |
|
}' |
|
||||||
|
# add blank line before #endif if it is the last line in the file
|
||||||
|
awk ' BEGIN {line1 = ""; line2 = ""}
|
||||||
|
{
|
||||||
|
line2 = $0;
|
||||||
|
if (NR >= 2)
|
||||||
|
print line1;
|
||||||
|
line1 = line2;
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
if (line2 ~ "^#endif")
|
||||||
|
printf "\n";
|
||||||
|
print line1;
|
||||||
|
}' |
|
||||||
# Move prototype names to the same line as return type. Useful for ctags.
|
# Move prototype names to the same line as return type. Useful for ctags.
|
||||||
# Indent should do this, but it does not. It formats prototypes just
|
# Indent should do this, but it does not. It formats prototypes just
|
||||||
# like real functions.
|
# like real functions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user