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