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
8266e8a8
Commit
8266e8a8
authored
May 17, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OK, now pgindent has blank lines before comment blocks, except when
there is a brace on the line above it.
parent
2d7795eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
src/tools/pgindent/pgindent
src/tools/pgindent/pgindent
+31
-1
No files found.
src/tools/pgindent/pgindent
View file @
8266e8a8
...
@@ -19,7 +19,7 @@ then echo "You appear to have GNU indent rather than BSD indent." >&2
...
@@ -19,7 +19,7 @@ then echo "You appear to have GNU indent rather than BSD indent." >&2
echo
"See the pgindent/README file for a description of its problems."
>
&2
echo
"See the pgindent/README file for a description of its problems."
>
&2
EXTRA_OPTS
=
"-ncdb -bli0 -npcs -cli4"
EXTRA_OPTS
=
"-ncdb -bli0 -npcs -cli4"
else
echo
"Hope you installed /src/tools/pgindent/indent.bsd.patch."
>
&2
else
echo
"Hope you installed /src/tools/pgindent/indent.bsd.patch."
>
&2
EXTRA_OPTS
=
"-cli1"
EXTRA_OPTS
=
"-
bbb -
cli1"
fi
fi
for
FILE
for
FILE
...
@@ -1343,6 +1343,36 @@ do
...
@@ -1343,6 +1343,36 @@ do
if (skips <= 2)
if (skips <= 2)
print line2;
print line2;
}'
|
}'
|
# remove blank line between opening brace and block comment
awk
'
{
line3 = $0;
if (skips > 0)
skips--;
if (line1 ~ " *{$" &&
line2 ~ "^$" &&
line3 ~ " */\\*$")
{
print line1;
print line3;
line1 = "";
line2 = "";
line3 = "";
skips = 3;
}
else
if (skips == 0 && NR >= 3)
print line1;
line1 = line2;
line2 = line3;
line3 = "";
}
END {
if (skips <= 1)
print line1;
if (skips <= 2)
print line2;
}'
|
# 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