Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
80b9a004
Commit
80b9a004
authored
Oct 25, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add blank line before #endif to #endif's at the end of the file.
parent
bac0d2d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
HISTORY
HISTORY
+8
-1
src/tools/pgindent/pgindent
src/tools/pgindent/pgindent
+17
-7
No files found.
HISTORY
View file @
80b9a004
...
@@ -66,6 +66,8 @@ Fix nested EXCEPT/INTERSECT (Tom)
...
@@ -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)
...
@@ -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)
...
@@ -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
...
@@ -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
-----------
-----------
...
...
src/tools/pgindent/pgindent
View file @
80b9a004
...
@@ -1292,7 +1292,7 @@ int pgindent_func_no_var_fix;\
...
@@ -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;\
...
@@ -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;\
...
@@ -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;\
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment