update_copyrights revision c61c6db1cea02006815184845fcf1b633b28163d
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (C) 1998-2001 Internet Software Consortium.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Permission to use, copy, modify, and distribute this software for any
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# purpose with or without fee is hereby granted, provided that the above
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# copyright notice and this permission notice appear in all copies.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# PERFORMANCE OF THIS SOFTWARE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# $Id: update_copyrights,v 1.37 2005/05/12 08:08:44 marka Exp $
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowerequire 5.002;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Map copyright owners to the files containing copyright messages.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The first line of the copyright message is not in the file;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# it is constructed by this script.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Map each copyright owner name to a reference to an array containing
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# the lines of the copyright message.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowemy $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov open(COPYRIGHT, "<$f") || die "can't open $f: $!";
@copyright_text = <COPYRIGHT>;
$owner2text{$owner} = [ @copyright_text ];
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};
$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>;
print TARGET $_;