update_copyrights revision 10e873cb368b0ed17a328e5421a0411eb90da0cb
bef75d63d74f58abc0f834ed271526672777ba29Automatic Updater# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Copyright (C) 1998-2001 Internet Software Consortium.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Permission to use, copy, modify, and distribute this software for any
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# purpose with or without fee is hereby granted, provided that the above
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# copyright notice and this permission notice appear in all copies.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# PERFORMANCE OF THIS SOFTWARE.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# $Id: update_copyrights,v 1.42 2006/10/24 00:57:16 marka Exp $
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Huntrequire 5.002;
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Map copyright owners to the files containing copyright messages.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# The first line of the copyright message is not in the file;
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# it is constructed by this script.
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt# Map each copyright owner name to a reference to an array containing
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# the lines of the copyright message.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usermy $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User open(COPYRIGHT, "<$f") || die "can't open $f: $!";
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt if (defined($years_list) && $years_list =~ /^PARENT:/) {
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt $parent =~ s/\.[^.]*$/.docbook/;
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt $result = "$result <year>$_</year>\n" foreach (@_);
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt my $a = copyright("Internet Systems Consortium, Inc. (\"ISC\")",
0f66aced2640d964aeb6db41210711ba0640d7f2Evan Hunt my $b = copyright("Internet Software Consortium.",
$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>;
$_ = <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 $_;