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
7accb294
Commit
7accb294
authored
Dec 27, 2006
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up pgindent handling of comments after 'else' by only moving
multi-line comments to the next line.
parent
72619f81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/tools/pgindent/pgindent
src/tools/pgindent/pgindent
+11
-5
No files found.
src/tools/pgindent/pgindent
View file @
7accb294
#!/bin/sh
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.
89 2006/10/04 00:02:10
momjian Exp $
# $PostgreSQL: pgsql/src/tools/pgindent/pgindent,v 1.
90 2006/12/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
...
...
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