update_copyrights revision 5c144477062a5df657acee41a82051d38537fd38
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Copyright (C) 2004-2010, 2012-2015 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (C) 1998-2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Permission to use, copy, modify, and/or distribute this software for any
d0be1e954bd4674fc27f2616c72adb37cf3525a2David Lawrence# purpose with or without fee is hereby granted, provided that the above
d0be1e954bd4674fc27f2616c72adb37cf3525a2David Lawrence# copyright notice and this permission notice appear in all copies.
821644d49b73b49f2abc5463bc53a3132f612478Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
2d96b63d311a5252c8583eb30a56b1fc58172419Mark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2d96b63d311a5252c8583eb30a56b1fc58172419Mark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
2d96b63d311a5252c8583eb30a56b1fc58172419Mark Andrews# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1e7501fe074fcacd9512af8b7db073f2a3ee4478Tinderbox User# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
2d96b63d311a5252c8583eb30a56b1fc58172419Mark Andrews# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# PERFORMANCE OF THIS SOFTWARE.
ee6fe1d1975604af266af6c370fc6193dae80fddMichael Sawyerrequire 5.002;
4f37905cc38162128a507e619e38ae535720686bAndreas Gustafsson# Map copyright owners to the files containing copyright messages.
10bc8ffed60f064a2950527a82d7fdffe91b6206Michael Sawyer# The first line of the copyright message is not in the file;
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson# it is constructed by this script.
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson# perl util/update_copyrights <util/copyrights
2d96b63d311a5252c8583eb30a56b1fc58172419Mark Andrews# Map each copyright owner name to a reference to an array containing
43b9737b11f4f14b2d378746d0cd5561b1dc24a0Mark Andrews# the lines of the copyright message.
43b9737b11f4f14b2d378746d0cd5561b1dc24a0Mark Andrewsmy $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
9ab989b88ca3dc6a4f0f52ca450ea5e35242cc85Tinderbox User open(COPYRIGHT, "<$f") || die "can't open $f: $!";
my $years_list;
my $parent;
$file_types{$file} = $type;
$file_years{$file} = $years;
$parent = $_[0];
$parent = $_[0];
my $holder = shift;
return $result;
$textp = $owner2text{$owner};
$_ = $body;
print TARGET $_;
$c_comment = 0;
$shell_comment = 0;
$m4_comment = 0;
$sgml_comment = 0;
$mkd_comment = 0;
$zone_comment = 0;
$man_comment = 0;
$python_comment = 0;
$c_comment = 1;
$shell_comment = 1;
$python_comment = 1;
$zone_comment = 1;
$man_comment = 1;
$m4_comment = 1;
$sgml_comment = 1;
$mkd_comment = 1;
$_ = <SOURCE>;
$_ = <SOURCE>;
$_ = <SOURCE>;
last if $_ =~ /\*\//;
$_ = <SOURCE>;
$first = $_;
last;
$first = $_;
$_ = <SOURCE>;
$_ = <SOURCE> if $_ eq "############################################################################\n";
$first = $_;
last;
$first = $_;
$_ = <SOURCE>;
$first = $_;
last;
$_ = <SOURCE>;
$_ = <SOURCE>;
$_ = <SOURCE>;
last if s/.*-->//;
$_ = <SOURCE>;
$first = $_;
$first = $_;
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;
my $andor = 0;
my $noid = 0;
$last_year = $year;
$firstline =~ s/\@SYSYEARS\@/$sysyears/;
$secondline =~ s/\@SFTYEARS\@/$sftyears/;
print TARGET $secondline =~ /^$/ ? $nonspaceprefix : $prefix;
print TARGET $end_comment if $end_comment;
$_ = $body;
undef $/;
$_ = <SOURCE>;
s:<articleinfo>.*?</articleinfo>:<articleinfo>\n$r </articleinfo>:s;