mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 00:00:00 -04:00
fix leading/trailing whitespace in C code.c we host copyright to
This commit is contained in:
parent
bd113f8c65
commit
14731fe09a
1 changed files with 22 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/local/bin/perl -w
|
||||
#
|
||||
# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2001 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: update_copyrights,v 1.50 2007/08/28 02:12:55 marka Exp $
|
||||
# $Id: update_copyrights,v 1.51 2008/01/18 00:43:22 marka Exp $
|
||||
|
||||
require 5.002;
|
||||
|
||||
|
|
@ -431,9 +431,26 @@ foreach $file (keys %file_types) {
|
|||
print TARGET "\n";
|
||||
}
|
||||
|
||||
undef $/;
|
||||
$_ = <SOURCE>;
|
||||
$/ = "\n";
|
||||
if ($type eq "C" && $sysyears =~ /2008/) {
|
||||
my $body = "";
|
||||
while (<SOURCE>) {
|
||||
# Process leading white space.
|
||||
# Remove 1-7 spaces followed by a tab into a single
|
||||
# tab if at start of line or proceeded by tabs.
|
||||
s/^(\t*) {1,7}\t/$1\t/ while (/^\t* {1,7}\t/);
|
||||
# Convert 8 spaces into tabs if at start of line
|
||||
# or preceeded by tabs.
|
||||
s/^(\t*) /$1\t/ while (/^\t* /);
|
||||
# Remove trailing white space.
|
||||
s/[ \t]*$//;
|
||||
$body = "$body$_";
|
||||
}
|
||||
$_ = $body;
|
||||
} else {
|
||||
undef $/;
|
||||
$_ = <SOURCE>;
|
||||
$/ = "\n";
|
||||
}
|
||||
|
||||
if ($type eq 'SGML' && m:<articleinfo>.*?</articleinfo>:s) {
|
||||
# print "docinfo: $file\n";
|
||||
|
|
|
|||
Loading…
Reference in a new issue