|
22 | 22 | # Collect arguments
|
23 | 23 | my @input_files;
|
24 | 24 | my $output_path = '';
|
25 |
| -my @include_path; |
| 25 | +my $include_path; |
26 | 26 |
|
27 | 27 | while (@ARGV)
|
28 | 28 | {
|
|
37 | 37 | }
|
38 | 38 | elsif ($arg =~ /^-I/)
|
39 | 39 | {
|
40 |
| - push @include_path, length($arg) > 2 ? substr($arg, 2) : shift @ARGV; |
| 40 | + $include_path = length($arg) > 2 ? substr($arg, 2) : shift @ARGV; |
41 | 41 | }
|
42 | 42 | else
|
43 | 43 | {
|
|
52 | 52 | }
|
53 | 53 |
|
54 | 54 | # Sanity check arguments.
|
55 |
| -die "No input files.\n" if !@input_files; |
56 |
| -die "No include path; you must specify -I at least once.\n" if !@include_path; |
| 55 | +die "No input files.\n" if !@input_files; |
| 56 | +die "No include path; you must specify -I.\n" if !$include_path; |
57 | 57 |
|
58 | 58 | # Read all the input files into internal data structures.
|
59 | 59 | # Note: We pass data file names as arguments and then look for matching
|
|
80 | 80 |
|
81 | 81 | # Fetch some values for later.
|
82 | 82 | my $FirstBootstrapObjectId =
|
83 |
| - Catalog::FindDefinedSymbol('access/transam.h', \@include_path, |
| 83 | + Catalog::FindDefinedSymbol('access/transam.h', $include_path, |
84 | 84 | 'FirstBootstrapObjectId');
|
85 | 85 | my $INTERNALlanguageId =
|
86 | 86 | Catalog::FindDefinedSymbolFromData($catalog_data{pg_language},
|
|
119 | 119 | open my $tfh, '>', $tabfile . $tmpext
|
120 | 120 | or die "Could not open $tabfile$tmpext: $!";
|
121 | 121 |
|
122 |
| -print $ofh |
123 |
| - qq|/*------------------------------------------------------------------------- |
| 122 | +print $ofh <<OFH; |
| 123 | +/*------------------------------------------------------------------------- |
124 | 124 | *
|
125 | 125 | * fmgroids.h
|
126 | 126 | * Macros that define the OIDs of built-in functions.
|
|
154 | 154 | * its equivalent macro will be defined with the lowest OID among those
|
155 | 155 | * entries.
|
156 | 156 | */
|
157 |
| -|; |
| 157 | +OFH |
158 | 158 |
|
159 |
| -print $pfh |
160 |
| - qq|/*------------------------------------------------------------------------- |
| 159 | +print $pfh <<PFH; |
| 160 | +/*------------------------------------------------------------------------- |
161 | 161 | *
|
162 | 162 | * fmgrprotos.h
|
163 | 163 | * Prototypes for built-in functions.
|
|
180 | 180 |
|
181 | 181 | #include "fmgr.h"
|
182 | 182 |
|
183 |
| -|; |
| 183 | +PFH |
184 | 184 |
|
185 |
| -print $tfh |
186 |
| - qq|/*------------------------------------------------------------------------- |
| 185 | +print $tfh <<TFH; |
| 186 | +/*------------------------------------------------------------------------- |
187 | 187 | *
|
188 | 188 | * fmgrtab.c
|
189 | 189 | * The function manager's table of internal functions.
|
|
208 | 208 | #include "utils/fmgrtab.h"
|
209 | 209 | #include "utils/fmgrprotos.h"
|
210 | 210 |
|
211 |
| -|; |
| 211 | +TFH |
212 | 212 |
|
213 | 213 | # Emit #define's and extern's -- only one per prosrc value
|
214 | 214 | my %seenit;
|
|
282 | 282 |
|
283 | 283 |
|
284 | 284 | # And add the file footers.
|
285 |
| -print $ofh "\n#endif /* FMGROIDS_H */\n"; |
286 |
| -print $pfh "\n#endif /* FMGRPROTOS_H */\n"; |
| 285 | +print $ofh "\n#endif\t\t\t\t\t\t\t/* FMGROIDS_H */\n"; |
| 286 | +print $pfh "\n#endif\t\t\t\t\t\t\t/* FMGRPROTOS_H */\n"; |
287 | 287 |
|
288 | 288 | close($ofh);
|
289 | 289 | close($pfh);
|
|
0 commit comments