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