update_copyrights revision 0ba25dfc4cecede3228acf372b3373880a5355b0
9bff67898d55cddfcec9ce30cc2b1bb6211ec691David Lawrence * Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC")
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * Copyright (C) 1998-2001 Internet Software Consortium.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * Permission to use, copy, modify, and/or distribute this software for any
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * purpose with or without fee is hereby granted, provided that the above
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * copyright notice and this permission notice appear in all copies.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencerequire 5.002;
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence# Map copyright owners to the files containing copyright messages.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence# The first line of the copyright message is not in the file;
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence# it is constructed by this script.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence# perl util/update_copyrights <util/copyrights
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence# Map each copyright owner name to a reference to an array containing
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence# the lines of the copyright message.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrencemy $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence open(COPYRIGHT, "<$f") || die "can't open $f: $!";
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence($dummy,$dummy,$dummy,$dummy,$this_month,$this_year,$dummy,$dummy,$dummy) = localtime(time());
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence if (defined($years_list) && $years_list =~ /^PARENT:/) {
f8a95eb9127a97e81ad4f1295a9d1abce993ef63David Lawrence $parent =~ s/\.[^.]*$/.docbook/;
f8a95eb9127a97e81ad4f1295a9d1abce993ef63David Lawrence $result = "$result <year>$_</year>\n" foreach (@_);
f8a95eb9127a97e81ad4f1295a9d1abce993ef63David Lawrence $result = "$result <holder>$holder</holder>\n";
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence my $a = copyright("Internet Systems Consortium, Inc. (\"ISC\")",
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence my $b = copyright("Internet Software Consortium.",
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence # copyright notice is now generated from the source.
487e6abc16c1b2958d371b0d4e808953646b520aDavid Lawrence my ($type, $owner) = split(/\./, $typeandowner);
$textp = $owner2text{$owner};
$c_comment = 0;
$shell_comment = 0;
$m4_comment = 0;
$sgml_comment = 0;
$zone_comment = 0;
$man_comment = 0;
$python_comment = 0;
$c_comment = 1;
$shell_comment = 1;
$python_comment = 1;
$zone_comment = 1;
$man_comment = 1;
$m4_comment = 1;
$sgml_comment = 1;
$_ = <SOURCE>;
$_ = <SOURCE>;
$_ = <SOURCE>;
last if $_ =~ /\*\//;
$_ = <SOURCE>;
$first = $_;
last;
$first = $_;
$_ = <SOURCE>;
$_ = <SOURCE> if $_ eq "############################################################################\n";
$first = $_;
last;
$first = $_;
$_ = <SOURCE>;
$first = $_;
last;
$_ = <SOURCE>;
$_ = <SOURCE>;
$_ = <SOURCE>;
last if s/.*-->//;
$_ = <SOURCE>;
$first = $_;
$first = $_;
/Permission to use, copy, modify, and / ||
$first = $_;
$first = $_;
print TARGET $before_copyright if $before_copyright;
print TARGET $start_comment if $start_comment;
$last_year = 0;
$anchor_year = 0;
$last_year = $year;
$last_year = 0;
$anchor_year = 0;
$last_year = $year;
$last_year = 0;
$anchor_year = 0;
my $andor = 0;
my $noid = 0;
$last_year = $year;
$firstline =~ s/\@SYSYEARS\@/$sysyears/;
$secondline =~ s/\@SFTYEARS\@/$sftyears/;
print TARGET $secondline =~ /^$/ ? $nonspaceprefix : $prefix;
print TARGET $end_comment if $end_comment;
$_ = $body;
undef $/;
$_ = <SOURCE>;
s:<articleinfo>.*?</articleinfo>:<articleinfo>\n$r </articleinfo>:s;