update_copyrights revision 5bae12051f80947fb9a5a6a3a54762e8bd08d95b
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# Copyright (C) 1998-2001 Internet Software Consortium.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# Permission to use, copy, modify, and distribute this software for any
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# purpose with or without fee is hereby granted, provided that the above
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# copyright notice and this permission notice appear in all copies.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# PERFORMANCE OF THIS SOFTWARE.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# $Id: update_copyrights,v 1.39 2005/05/13 01:06:30 marka Exp $
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanisrequire 5.002;
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# Map copyright owners to the files containing copyright messages.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# The first line of the copyright message is not in the file;
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# it is constructed by this script.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# Map each copyright owner name to a reference to an array containing
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis# the lines of the copyright message.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanismy $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis open(COPYRIGHT, "<$f") || die "can't open $f: $!";
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis if (defined($years_list) && $years_list =~ /^PARENT:/) {
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis $parent =~ s/\.[^.]*$/.docbook/;
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis $result = "$result <year>$_</year>\n" foreach (@_);
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis $result = "$result <holder>$holder</holder>\n";
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis my $a = copyright("Internet Systems Consortium, Inc. (\"ISC\")",
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis my $b = copyright("Internet Software Consortium.",
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis # copyright notice is now generated from the source.
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis my ($type, $owner) = split(/\./, $typeandowner);
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis print "$file: unknown copyright owner $owner\n";
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis } elsif ($type =~ /^(SH|PERL|TCL|MAKE|CONF-SH)$/) {
2eefc362ae6a0a94b84ee5bc9e7844ef45c3642cAlex Valavanis } elsif ($type eq "HTML" || $type eq "SGML") {
$_ = <SOURCE>;
$_ = <SOURCE>;
$_ = <SOURCE>;
last if $_ =~ /\*\//;
$_ = <SOURCE>;
$first = $_;
last;
$first = $_;
$_ = <SOURCE>;
$first = $_;
last;
$before_copyright = $_;
$_ = <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;
$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 $_;