|
|
@ -12,7 +12,7 @@ use IO::Handle; |
|
|
|
use Getopt::Long; |
|
|
|
use Getopt::Long; |
|
|
|
|
|
|
|
|
|
|
|
# Update for pg_bsd_indent version |
|
|
|
# Update for pg_bsd_indent version |
|
|
|
my $INDENT_VERSION = "1.2"; |
|
|
|
my $INDENT_VERSION = "1.3"; |
|
|
|
my $devnull = File::Spec->devnull; |
|
|
|
my $devnull = File::Spec->devnull; |
|
|
|
|
|
|
|
|
|
|
|
# Common indent settings |
|
|
|
# Common indent settings |
|
|
@ -286,12 +286,6 @@ sub post_indent |
|
|
|
# Reduce whitespace between #endif and comments to one tab |
|
|
|
# Reduce whitespace between #endif and comments to one tab |
|
|
|
$source =~ s!^\#endif[ \t]+/\*!#endif /*!gm; |
|
|
|
$source =~ s!^\#endif[ \t]+/\*!#endif /*!gm; |
|
|
|
|
|
|
|
|
|
|
|
# Remove blank line(s) before #else, #elif, and #endif |
|
|
|
|
|
|
|
$source =~ s!\n\n+(\#else|\#elif|\#endif)!\n$1!g; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add blank line before #endif if it is the last line in the file |
|
|
|
|
|
|
|
$source =~ s!\n(#endif.*)\n\z!\n\n$1\n!; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Functions |
|
|
|
## Functions |
|
|
|
|
|
|
|
|
|
|
|
# Work around misindenting of function with no variables defined. |
|
|
|
# Work around misindenting of function with no variables defined. |
|
|
|