mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Improve style of generate_history.pl Perl script.
This commit is contained in:
parent
671322751a
commit
fb3ad7895e
@ -13,10 +13,10 @@
|
||||
|
||||
use strict;
|
||||
|
||||
my($srcdir) = shift;
|
||||
defined($srcdir) || die "$0: missing required argument: srcdir\n";
|
||||
my($infile) = shift;
|
||||
defined($infile) || die "$0: missing required argument: inputfile\n";
|
||||
my $srcdir = shift;
|
||||
die "$0: missing required argument: srcdir\n" if !defined($srcdir);
|
||||
my $infile = shift;
|
||||
die "$0: missing required argument: inputfile\n" if !defined($infile);
|
||||
|
||||
# Emit DOCTYPE header so that the output is a self-contained SGML document
|
||||
print "<!DOCTYPE appendix PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\">\n";
|
||||
@ -26,11 +26,11 @@ process_file($infile);
|
||||
exit 0;
|
||||
|
||||
sub process_file {
|
||||
my($filename) = @_;
|
||||
my $filename = shift;
|
||||
|
||||
local *FILE; # need a local filehandle so we can recurse
|
||||
|
||||
my($f) = $srcdir . '/' . $filename;
|
||||
my $f = $srcdir . '/' . $filename;
|
||||
open(FILE, $f) || die "could not read $f: $!\n";
|
||||
|
||||
while (<FILE>) {
|
||||
|
Loading…
Reference in New Issue
Block a user