Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
47402a9b
Commit
47402a9b
authored
20 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Remove code that delete braces around single statements.
parent
abc98dcc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tools/pgindent/pgindent
+0
-27
0 additions, 27 deletions
src/tools/pgindent/pgindent
with
0 additions
and
27 deletions
src/tools/pgindent/pgindent
+
0
−
27
View file @
47402a9b
...
@@ -1742,33 +1742,6 @@ do
...
@@ -1742,33 +1742,6 @@ do
sed
's;\([^ ]\)\(/\*.*\*/\)$;\1 \2;'
|
sed
's;\([^ ]\)\(/\*.*\*/\)$;\1 \2;'
|
# move trailing * in function return type
# move trailing * in function return type
sed
's;^\([A-Za-z_][^ ]*\)[ ][ ]*\*$;\1 *;'
|
sed
's;^\([A-Za-z_][^ ]*\)[ ][ ]*\*$;\1 *;'
|
# remove un-needed braces around single statements
awk
'
{
line3 = $0;
if (skips > 0)
skips--;
if (line1 ~ " *{$" &&
line2 ~ " *[^;{}]*;$" &&
line3 ~ " *}$")
{
print line2;
line2 = "";
line3 = "";
skips = 3;
}
else
if (skips == 0 && NR >= 3)
print line1;
line1 = line2;
line2 = line3;
}
END {
if (NR >= 2 && skips <= 1)
print line1;
if (NR >= 1 && skips <= 2)
print line2;
}'
|
# remove blank line between opening brace and block comment
# remove blank line between opening brace and block comment
awk
'
awk
'
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment