update_copyrights revision 3e9a9442548489d3da3eefef70036d3a87135757
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# Copyright (C) 1998-2001 Internet Software Consortium.
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# Permission to use, copy, modify, and distribute this software for any
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# purpose with or without fee is hereby granted, provided that the above
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# copyright notice and this permission notice appear in all copies.
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# PERFORMANCE OF THIS SOFTWARE.
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# $Id: update_copyrights,v 1.29 2004/03/05 07:05:50 marka Exp $
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnellyrequire 5.002;
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# Map copyright owners to the files containing copyright messages.
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# The first line of the copyright message is not in the file;
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# it is constructed by this script.
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# Map each copyright owner name to a reference to an array containing
72378c4b11f0468874fbad14749246d2ae564474Jenny Donnelly# the lines of the copyright message.
my $f = $owner2filename{$owner};
@copyright_text = <COPYRIGHT>;
$owner2text{$owner} = [ @copyright_text ];
$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 $_;