diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-10-07 13:45:51 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-10-07 13:45:51 +0000 |
commit | 8a28f50f8a3a5b014730b88cf5e965db2bb71b52 (patch) | |
tree | c2108ad905dac6bed1fc915faa93eac345f4dbfd /src/tools | |
parent | 4e28b08e537e295fa460da9ddfa1a11d4c242ce8 (diff) |
Improve pgindent processing of comment after 'else'.
Improve comment of pg_dump Win32 link workaround.
Diffstat (limited to 'src/tools')
-rwxr-xr-x | src/tools/pgindent/pgindent | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index eb0ce1590b5..e85a6723b72 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -38,8 +38,10 @@ do # mark some comments for special treatment later sed 's;/\* *---;/*---X_X;g' | # workaround for indent bug with 'else' handling - sed 's;\([} ]\)else\([ ]*\)\(/\*.*\)$;\1else\ -\2\3;g' | + sed 's;\([ ]*\)else[ ]*\(/\*.*\)$;\1else\ +\1\2;g' | + sed 's;\([ ]*\)\(}[ ]\)else[ ]*\(/\*.*\)$;\1\2else\ +\1\3;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. |