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