update_copyrights revision c651f15b30f1dae5cc2f00878fb5da5b3a35a468
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# Copyright (C) 1998-2001 Internet Software Consortium.
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# Permission to use, copy, modify, and distribute this software for any
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# purpose with or without fee is hereby granted, provided that the above
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# copyright notice and this permission notice appear in all copies.
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# PERFORMANCE OF THIS SOFTWARE.
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# $Id: update_copyrights,v 1.33 2005/04/07 03:50:05 marka Exp $
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeneyrequire 5.002;
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# Map copyright owners to the files containing copyright messages.
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# The first line of the copyright message is not in the file;
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# it is constructed by this script.
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# Map each copyright owner name to a reference to an array containing
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeney# the lines of the copyright message.
fb1ecdf65fd4106deb62da339763f2e7670ca0f6Matt Sweeneymy $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
5d6d6a5b6cfcb06add1a3948b3d07087bff7f130Luke Smith open(COPYRIGHT, "<$f") || die "can't open $f: $!";
my $years_list;
my $parent;
$file_types{$file} = $type;
$file_years{$file} = $years;
$parent = $_[0];
$parent = $_[0];
$textp = $owner2text{$owner};
$c_comment = 0;
$shell_comment = 0;
$m4_comment = 0;
$sgml_comment = 0;
$zone_comment = 0;
$man_comment = 0;
$c_comment = 1;
$shell_comment = 1;
$zone_comment = 1;
$man_comment = 1;
$m4_comment = 1;
$sgml_comment = 1;
$_ = <SOURCE>;
$_ = <SOURCE>;
$_ = <SOURCE>;
last if $_ =~ /\*\//;
$_ = <SOURCE>;
$first = $_;
last;
$first = $_;
$_ = <SOURCE>;
$first = $_;
last;
$before_copyright = $_;
$_ = <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 = 2004;
$anchor_year = 2004;
$last_year = $year;
$firstline =~ s/\@SYSYEARS\@/$sysyears/;
$secondline =~ s/\@SFTYEARS\@/$sftyears/;
$thirdline =~ s/\@NOMYEARS\@/$nomyears/;
print TARGET $secondline =~ /^$/ ? $nonspaceprefix : $prefix;
print TARGET $thirdline =~ /^$/ ? $nonspaceprefix : $prefix;
print TARGET $end_comment if $end_comment;
undef $/;
$_ = <SOURCE>;
print TARGET $_;