* build-aux/update-copyright: Implement that.
+2009-07-31 Joel E. Denny <jdenny@clemson.edu>
+
+ update-copyright: support EOL=\r\n
+ * build-aux/update-copyright: Implement that.
+
2009-07-31 Joel E. Denny <jdenny@clemson.edu>
update-copyright: automatically format copyright statements
my $prefix_max = 5;
my $margin = 72;
+# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
+my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
+
my $leading;
my $prefix;
my $ws;
|| ($new =~ s/^([\S]+)(?: |$)//))
{
my $line = $1;
- $new_wrapped .= $new_wrapped ? "\n" : $leading;
+ $new_wrapped .= $new_wrapped ? $eol : $leading;
$new_wrapped .= "$prefix$line";
}
else