update_copyrights revision 0295f63b67bb09cd4d00dd1d9c2238c37beefed8
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Copyright (C) 1998-2001 Internet Software Consortium.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Permission to use, copy, modify, and distribute this software for any
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# purpose with or without fee is hereby granted, provided that the above
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# copyright notice and this permission notice appear in all copies.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# $Id: update_copyrights,v 1.27 2004/03/04 03:21:19 marka Exp $
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntrequire 5.002;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Map copyright owners to the files containing copyright messages.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# The first line of the copyright message is not in the file;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# it is constructed by this script.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Map each copyright owner name to a reference to an array containing
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# the lines of the copyright message.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt open(COPYRIGHT, "<$f") || die "can't open $f: $!";
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ($file, $typeandowner, $years_list) = split(/\s+/);
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt } elsif ($type =~ /^(SH|PERL|TCL|MAKE|CONF-SH)$/) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt print "$file: type '$type' not supported yet; skipping\n";
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt open(SOURCE, "<$file") || die "can't open $file: $!";
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt last if $_ =~ /\*\//;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt } elsif (($m4_comment || $zone_comment || $man_comment) &&
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt last if s/.*-->//;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt open(TARGET, ">$file.new") || die "can't open $file.new: $!";
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt print TARGET $before_copyright if $before_copyright;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt ($firstline, $secondline, $thirdline, @otherlines) = @$textp;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt print TARGET $secondline =~ /^$/ ? $nonspaceprefix : $prefix;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt print TARGET $thirdline =~ /^$/ ? $nonspaceprefix : $prefix;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if ($first !~ /$keyword_pat/ && $_ !~ /$keyword_pat/) {
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt print TARGET $first if $first !~ /^\s*$/;