Commit fb3ad789 authored by Bruce Momjian's avatar Bruce Momjian

Improve style of generate_history.pl Perl script.

parent 67132275
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
use strict; use strict;
my($srcdir) = shift; my $srcdir = shift;
defined($srcdir) || die "$0: missing required argument: srcdir\n"; die "$0: missing required argument: srcdir\n" if !defined($srcdir);
my($infile) = shift; my $infile = shift;
defined($infile) || die "$0: missing required argument: inputfile\n"; die "$0: missing required argument: inputfile\n" if !defined($infile);
# Emit DOCTYPE header so that the output is a self-contained SGML document # Emit DOCTYPE header so that the output is a self-contained SGML document
print "<!DOCTYPE appendix PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\">\n"; print "<!DOCTYPE appendix PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\">\n";
...@@ -26,11 +26,11 @@ process_file($infile); ...@@ -26,11 +26,11 @@ process_file($infile);
exit 0; exit 0;
sub process_file { sub process_file {
my($filename) = @_; my $filename = shift;
local *FILE; # need a local filehandle so we can recurse 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"; open(FILE, $f) || die "could not read $f: $!\n";
while (<FILE>) { while (<FILE>) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment