Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcad1e02

Browse files
committed
pgindent: add --list-of-typedefs option
Allows typedefs to be specified on the command line, per request fromAndrew.
1 parenta87ae38 commitcad1e02

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/tools/pgindent/pgindent

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ my $indent_opts =
2222
# indent-dependant settings
2323
my$extra_opts ="";
2424

25-
my ($typedefs_file,$code_base,$excludes,$indent,$build);
25+
my ($typedefs_file,$typedef_str,$code_base,$excludes,$indent,$build);
2626

2727
my%options = (
2828
"typedefs=s"=> \$typedefs_file,
29+
"list-of-typedefs=s"=> \$typedef_str,
2930
"code-base=s"=> \$code_base,
3031
"excludes=s"=> \$excludes,
3132
"indent=s"=> \$indent,
@@ -125,6 +126,13 @@ sub load_typedefs
125126
||die"cannot open typedefs file\"$typedefs_file\":$!\n";
126127
my@typedefs = <$typedefs_fh>;
127128
close($typedefs_fh);
129+
if (defined($typedef_str))
130+
{
131+
foreachmy$typedef (split(m/[,\t\n]+/,$typedef_str))
132+
{
133+
push(@typedefs,$typedef ."\n");
134+
}
135+
}
128136

129137
# remove certain entries
130138
@typedefs =

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp