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
7accb294
Commit
7accb294
authored
18 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Clean up pgindent handling of comments after 'else' by only moving
multi-line comments to the next line.
parent
72619f81
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
+11
-5
11 additions, 5 deletions
src/tools/pgindent/pgindent
with
11 additions
and
5 deletions
src/tools/pgindent/pgindent
+
11
−
5
View file @
7accb294
#!/bin/sh
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.
8
9 2006/1
0/04 00:02:10
momjian Exp $
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.9
0
2006/1
2/27 23:03:52
momjian Exp $
# Known bugs:
#
...
...
@@ -40,9 +40,12 @@ do
# mark some comments for special treatment later
sed
's;/\* *---;/*---X_X;g'
|
# workaround for indent bug with 'else' handling
# indent comment so BSD indent will move it
sed
's;\([} ]\)else[ ]*\(/\*.*\)$;\1else\
\2;g'
|
# trim trailing space after single-line after-'else' comment
# so next test can be done easily
sed
's;\([} ]\)else[ ]*\(/\*.*\*/\)[ ]*$;\1else \2;g'
|
# indent multi-line after-'else' comment so BSD indent will move it properly
sed
's;\([} ]\)else[ ]*\(/\*.*[^\*][^/]\)$;\1else\
\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 for struct/enum.
...
...
@@ -1890,9 +1893,12 @@ do
sed
's;^/\* Open extern \"C\" \*/$;{;'
|
sed
's;^/\* Close extern \"C\" \*/$;};'
|
sed
's;/\*---X_X;/* ---;g'
|
# workaround indent bug
# workaround indent bug
for 'static'
sed
's;^static[ ][ ]*;static ;g'
|
# remove too much indenting after closing brace
sed
's;^} [ ]*;} ;'
|
# indent single-line after-'else' comment by only one tab
sed
's;\([} ]\)else[ ]*\(/\*.*\*/\)[ ]*$;\1else \2;g'
|
# pull in #endif comments
sed
's;^#endif[ ][ ]*/\*;#endif /*;'
|
# work around #else indenting next line if #ifdef defines variables at top
...
...
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